diff --git a/app/components/live/surveil.js b/app/components/live/surveil.js
index d0f74ef..10e2135 100644
--- a/app/components/live/surveil.js
+++ b/app/components/live/surveil.js
@@ -48,7 +48,7 @@ angular.module('bansho.live', [])
filters = {
'is': {
'host_name': [hostName],
- 'description': [description]
+ 'service_description': [description]
}
};
@@ -70,7 +70,7 @@ angular.module('bansho.live', [])
.error(function () {
throw new Error('getService : POST Request failed');
});
- }
+ };
var getHostOpenProblems = function () {
var fields = ['state'],
diff --git a/app/components/service/service.html b/app/components/service/service.html
index 3bda5b6..79db5ab 100644
--- a/app/components/service/service.html
+++ b/app/components/service/service.html
@@ -1,8 +1,10 @@
- Service
-
-
-
-
+
+ {{service.service_description}}
+
+ Info
+
+ Metrics
+
diff --git a/app/components/service/service.js b/app/components/service/service.js
index 0e5f937..a148313 100644
--- a/app/components/service/service.js
+++ b/app/components/service/service.js
@@ -13,7 +13,7 @@ angular.module('bansho.service', ['bansho.live',
description = serviceConfig.description;
backendClient.getService(hostName, description).success(function (data) {
- $scope.data = data;
+ $scope.service = data[0];
});
}])
diff --git a/app/components/service/service_info/service_info.html b/app/components/service/service_info/service_info.html
index b502e55..5157169 100644
--- a/app/components/service/service_info/service_info.html
+++ b/app/components/service/service_info/service_info.html
@@ -1,38 +1,5 @@
-
-
-
- Handled : |
- {{data.0.handled}} |
-
-
- Tags : |
- {{data.0.tags}} |
-
-
- Tags : |
- {{data.0.tags}} |
-
-
- Backend : |
- {{data.0.backend}} |
-
-
- Last check : |
- {{data.0.last_check|timeElapsed}} |
-
-
- Last state change : |
- {{data.0.last_state_change|timeElapsed}} |
-
-
- Tags : |
- {{data.0.tags}} |
-
-
- Acknowledged : |
- {{acknowledged}} |
-
-
-
+
Last check: {{service.last_check|timeElapsed}}
+
Last state change: {{service.last_state_change|timeElapsed}}
+
Acknowledged: {{isAcknowledged}}
diff --git a/app/components/service/service_info/service_info.js b/app/components/service/service_info/service_info.js
index 9241e2c..8c7be4c 100644
--- a/app/components/service/service_info/service_info.js
+++ b/app/components/service/service_info/service_info.js
@@ -3,12 +3,15 @@
angular.module('bansho.service.info', [])
.controller('ServiceInfoCtrl', ['$scope', function ($scope) {
- $scope.acknowledged = $scope.data[0].acknowledged === "1" ? "Yes" : "No";
+ $scope.isAcknowledged = $scope.acknowledged === "1" ? "Yes" : "No";
}])
.directive('banshoServiceInfo', function () {
return {
restrict: 'E',
+ scope: {
+ service: '=service'
+ },
templateUrl: 'components/service/service_info/service_info.html'
};
});
diff --git a/app/components/service/service_main/service_main.html b/app/components/service/service_main/service_main.html
index 91a9c4c..d1bca7f 100644
--- a/app/components/service/service_main/service_main.html
+++ b/app/components/service/service_main/service_main.html
@@ -1,10 +1,6 @@
-
- - {{data.0.host_name}}
- - {{data.0.description}}
- - {{data.0.state}}
- - {{data.0.plugin_output}}
- - {{data.0.backend}}
- - {{data.0.status}}
-
+
Description: {{service.description}}
+
Host Name: {{service.host_name}}
+
Current state: {{service.state}}
+
Live plugin output: {{service.plugin_output}}
diff --git a/app/components/service/service_main/service_main.js b/app/components/service/service_main/service_main.js
index 3fb2a3e..5548a3c 100644
--- a/app/components/service/service_main/service_main.js
+++ b/app/components/service/service_main/service_main.js
@@ -9,6 +9,11 @@ angular.module('bansho.service.main', [])
.directive('banshoServiceMain', function () {
return {
restrict: 'E',
- templateUrl: 'components/service/service_main/service_main.html'
+ scope: {
+ service: '=service'
+ },
+ templateUrl: 'components/service/service_main/service_main.html',
+ controller: 'ServiceMainCtrl'
+
};
});
diff --git a/app/components/service/service_metrics/service_metrics.js b/app/components/service/service_metrics/service_metrics.js
index bdadbd9..489cdbc 100644
--- a/app/components/service/service_metrics/service_metrics.js
+++ b/app/components/service/service_metrics/service_metrics.js
@@ -9,6 +9,9 @@ angular.module('bansho.service.metrics', [])
.directive('banshoServiceMetrics', function () {
return {
restrict: 'E',
+ scope: {
+ service: '=service'
+ },
templateUrl: 'components/service/service_metrics/service_metrics.html'
};
});
diff --git a/app/components/table/cell_host/cell_host.css b/app/components/table/cell_host/cell_host.css
index 0b10c82..de20a20 100644
--- a/app/components/table/cell_host/cell_host.css
+++ b/app/components/table/cell_host/cell_host.css
@@ -27,7 +27,7 @@
margin: 0px;
line-height: 35px;
cursor: pointer;
- /*
+ /*
.collapsed{
.arrow:before{
font-family: FontAwesome;
@@ -143,4 +143,3 @@ body {
margin: 0px;
padding: 0px;
}
-
diff --git a/app/components/table/cell_service_check/cell_service_check.css b/app/components/table/cell_service_check/cell_service_check.css
index 0b10c82..de20a20 100644
--- a/app/components/table/cell_service_check/cell_service_check.css
+++ b/app/components/table/cell_service_check/cell_service_check.css
@@ -27,7 +27,7 @@
margin: 0px;
line-height: 35px;
cursor: pointer;
- /*
+ /*
.collapsed{
.arrow:before{
font-family: FontAwesome;
@@ -143,4 +143,3 @@ body {
margin: 0px;
padding: 0px;
}
-