feat(dashboard): new Dashboard
- show providers (auto refresh: 2s) - show health (auto refresh: 3s) - more colors - add font - remove jumbotron - javascript minified version
This commit is contained in:
parent
da3d119a43
commit
ac57dda074
24 changed files with 420 additions and 0 deletions
26
static/app/sections/health/health.controller.js
Normal file
26
static/app/sections/health/health.controller.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('traefik.section.health')
|
||||
.controller('HealthController', ['$scope', '$interval', '$log', 'Health', function ($scope, $interval, $log, Health) {
|
||||
|
||||
var vm = this;
|
||||
|
||||
vm.health = Health.get();
|
||||
|
||||
var intervalId = $interval(function () {
|
||||
Health.get(function (health) {
|
||||
vm.health = health;
|
||||
}, function (error) {
|
||||
vm.health = {};
|
||||
$log.error(error);
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
$scope.$on('$destroy', function () {
|
||||
$interval.cancel(intervalId);
|
||||
});
|
||||
|
||||
}]);
|
||||
|
||||
})();
|
46
static/app/sections/health/health.html
Normal file
46
static/app/sections/health/health.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<div>
|
||||
<h1 class="text-danger">
|
||||
<span class="glyphicon glyphicon-heart" aria-hidden="true"></span> Health
|
||||
</h1>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<span>Average response time sec :</span><span class="badge">{{healthCtrl.health.average_response_time_sec}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Average response time :</span><span class="badge">{{healthCtrl.health.average_response_time}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Total response time sec :</span><span class="badge">{{healthCtrl.health.total_response_time_sec}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Total response time :</span><span class="badge">{{healthCtrl.health.total_response_time}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Total count :</span><span class="badge">{{healthCtrl.health.total_count}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>PID :</span><span class="badge">{{healthCtrl.health.pid}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Uptime :</span><span class="badge">{{healthCtrl.health.uptime}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Uptime sec :</span><span class="badge">{{healthCtrl.health.uptime_sec}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Time :</span><span class="badge">{{healthCtrl.health.time}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Unixtime :</span><span class="badge">{{healthCtrl.health.unixtime}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Status code count :</span><span class="badge">{{healthCtrl.health.status_code_count}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Total status code count :</span><span class="badge">{{healthCtrl.health.total_status_code_count}}</span>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<span>Count :</span><span class="badge">{{healthCtrl.health.count}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
16
static/app/sections/health/health.module.js
Normal file
16
static/app/sections/health/health.module.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
angular.module('traefik.section.health', ['traefik.core.health'])
|
||||
.config(['$stateProvider', function ($stateProvider) {
|
||||
|
||||
$stateProvider.state('health', {
|
||||
url: '/health',
|
||||
templateUrl: 'app/sections/health/health.html',
|
||||
controller: 'HealthController',
|
||||
controllerAs: 'healthCtrl'
|
||||
});
|
||||
|
||||
}]);
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue