mirror of
https://github.com/traefik/traefik.git
synced 2025-08-12 09:37:07 +02:00
- show providers (auto refresh: 2s) - show health (auto refresh: 3s) - more colors - add font - remove jumbotron - javascript minified version
28 lines
630 B
JavaScript
28 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);
|
|
});
|
|
|
|
}]);
|
|
|
|
})();
|