traefik/static/app/sections/providers/providers.controller.js
Fernandez Ludovic ac57dda074 feat(dashboard): new Dashboard
- show providers (auto refresh: 2s)
- show health (auto refresh: 3s)
- more colors
- add font
- remove jumbotron
- javascript minified version
2015-10-05 23:30:31 +02:00

27 lines
630 B
JavaScript

(function () {
'use strict';
angular
.module('traefik.section.providers')
.controller('ProvidersController', ['$scope', '$interval', '$log', 'Providers', function ($scope, $interval, $log, Providers) {
var vm = this;
vm.providers = Providers.get();
var intervalId = $interval(function () {
Providers.get(function (providers) {
vm.providers = providers;
}, function (error) {
vm.providers = {};
$log.error(error);
});
}, 2000);
$scope.$on('$destroy', function () {
$interval.cancel(intervalId);
});
}]);
})();