diff --git a/app/components/live/get_services.js b/app/components/live/get_services.js index 30ec8c9..5167005 100644 --- a/app/components/live/get_services.js +++ b/app/components/live/get_services.js @@ -1,16 +1,13 @@ 'use strict'; -angular.module('adagios.live.getservices', []) +angular.module('adagios.live') - .factory('GetServices', ['$http', function ($http) { - alert('Salut'); - $http.post("/rest/status/json/services/"). - success(function(data, status, headers, config) { - alert(data); - }). - error(function(data, status, headers, config) { - alert('Request error'); - }); + .factory('GetServices', ['$http', function ($http, columns) { - return data; + return function (columns) { + return $http.get('/rest/status/json/services/?fields=' + columns) + .error(function (data, status, headers, config) { + console.error('GetServices : GET Request failed'); + }); + }; }]); diff --git a/app/components/live/live.js b/app/components/live/live.js new file mode 100644 index 0000000..0d89ba8 --- /dev/null +++ b/app/components/live/live.js @@ -0,0 +1,3 @@ +'use strict'; + +angular.module('adagios.live', []); diff --git a/app/components/live/notifications.js b/app/components/live/notifications.js index 726bb2f..c309b81 100644 --- a/app/components/live/notifications.js +++ b/app/components/live/notifications.js @@ -1,19 +1,9 @@ 'use strict'; -angular.module('adagios.live', []) +angular.module('adagios.live') .factory('GetProblems', ['$http', function ($http) { var problem_number = 44; return problem_number; - }]) - - .factory('GetServices', ['$http', function ($http) { - $http.post("/rest/status/json/services", "host_name") - .success(function(data, status, headers, config) { - return data; - }) - .error(function(data, status, headers, config) { - alert('request error'); - }); }]); diff --git a/app/index.html b/app/index.html index da24778..a98f40d 100644 --- a/app/index.html +++ b/app/index.html @@ -22,7 +22,9 @@ + + > diff --git a/app/table/entry/entry.js b/app/table/entry/entry.js index 158bf65..34212c2 100644 --- a/app/table/entry/entry.js +++ b/app/table/entry/entry.js @@ -7,7 +7,7 @@ angular.module('adagios.table.entry', ['adagios.table.entry.column_duration', ]) .controller('EntryCtrl', ['$scope', '$http', function ($scope, $http) { - noop; + return; }]) .directive('entry', function () { diff --git a/app/table/table.html b/app/table/table.html index 1b3b0ac..fbe4e3a 100644 --- a/app/table/table.html +++ b/app/table/table.html @@ -1,15 +1,15 @@
- |
---|
- |