diff --git a/app/components/service/service.html b/app/components/service/service.html index 79461bf..382a608 100644 --- a/app/components/service/service.html +++ b/app/components/service/service.html @@ -1,5 +1,6 @@
-
+

Service

+
diff --git a/app/components/service/service.js b/app/components/service/service.js index 69b5a42..35509f4 100644 --- a/app/components/service/service.js +++ b/app/components/service/service.js @@ -15,7 +15,6 @@ angular.module('adagios.service', ['adagios.live', getService(hostName, description).success(function (data) { $scope.data = data; - console.log($scope.data); }); }]) diff --git a/app/components/service/service_info/service_info.html b/app/components/service/service_info/service_info.html index 6f0916a..b502e55 100644 --- a/app/components/service/service_info/service_info.html +++ b/app/components/service/service_info/service_info.html @@ -1,2 +1,38 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
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}}
diff --git a/app/components/service/service_info/service_info.js b/app/components/service/service_info/service_info.js index 299f278..7c8cc05 100644 --- a/app/components/service/service_info/service_info.js +++ b/app/components/service/service_info/service_info.js @@ -3,6 +3,7 @@ angular.module('adagios.service.info', []) .controller('ServiceInfoCtrl', ['$scope', function ($scope) { + $scope.acknowledged = $scope.data[0].acknowledged === "1" ? "Yes": "No"; }]) .directive('adgServiceInfo', function () { diff --git a/app/components/service/service_main/service_main.html b/app/components/service/service_main/service_main.html index 280d1f7..2ce2426 100644 --- a/app/components/service/service_main/service_main.html +++ b/app/components/service/service_main/service_main.html @@ -1,2 +1,9 @@
+
    +
  • {{data.0.host_name}}
  • +
  • {{data.0.description}}
  • +
  • {{data.0.plugin_output}}
  • +
  • {{data.0.backend}}
  • +
  • {{data.0.status}}
  • +
diff --git a/app/components/service/service_main/service_main.js b/app/components/service/service_main/service_main.js index 0e3788a..139f984 100644 --- a/app/components/service/service_main/service_main.js +++ b/app/components/service/service_main/service_main.js @@ -3,6 +3,7 @@ angular.module('adagios.service.main', []) .controller('ServiceMainCtrl', ['$scope', function ($scope) { + angular.noop(); }]) .directive('adgServiceMain', function () { diff --git a/app/components/service/service_metrics/service_metrics.html b/app/components/service/service_metrics/service_metrics.html index 26a1cb8..83e1aba 100644 --- a/app/components/service/service_metrics/service_metrics.html +++ b/app/components/service/service_metrics/service_metrics.html @@ -1,2 +1,3 @@
+

Metrics

diff --git a/app/templates/service/service.js b/app/templates/service/service.js index c89a510..2965ea2 100644 --- a/app/templates/service/service.js +++ b/app/templates/service/service.js @@ -1,6 +1,14 @@ "use strict"; -angular.module("adagios.view.service", [ "adagios.live" ]).controller("ServiceViewCtrl", [ "$scope", "$routeParams", function($scope, $routeParams) { - if (!$routeParams.host_name || !$routeParams.description) throw new Error("ERROR :'host_name' and 'description' GET parameters must be set"); - $scope.hostName = $routeParams.host_name, $scope.description = $routeParams.description; -} ]); \ No newline at end of file +angular.module("adagios.view.service", [ "adagios.live" ]) + + .controller("ServiceViewCtrl", [ "$scope", "$routeParams", + function($scope, $routeParams) { + + if (!$routeParams.host_name || !$routeParams.description) { + throw new Error("ERROR :'host_name' and 'description' GET parameters must be set"); + } + + $scope.hostName = $routeParams.host_name; + $scope.description = $routeParams.description; + }]);