ac57dda074
- show providers (auto refresh: 2s) - show health (auto refresh: 3s) - more colors - add font - remove jumbotron - javascript minified version
27 lines
630 B
JavaScript
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);
|
|
});
|
|
|
|
}]);
|
|
|
|
})();
|