Show current version in web UI
This commit is contained in:
parent
408ef0f5b7
commit
4a43273ee5
6 changed files with 56 additions and 1 deletions
14
webui/src/app/core/version.resource.js
Normal file
14
webui/src/app/core/version.resource.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
'use strict';
|
||||
var angular = require('angular');
|
||||
|
||||
var traefikCoreVersion = 'traefik.core.version';
|
||||
module.exports = traefikCoreVersion;
|
||||
|
||||
angular
|
||||
.module(traefikCoreVersion, ['ngResource'])
|
||||
.factory('Version', Version);
|
||||
|
||||
/** @ngInject */
|
||||
function Version($resource) {
|
||||
return $resource('../api/version');
|
||||
}
|
10
webui/src/app/version/version.controller.js
Normal file
10
webui/src/app/version/version.controller.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
/** @ngInject */
|
||||
function VersionController($scope, $interval, $log, Version) {
|
||||
Version.get(function (version) {
|
||||
$scope.version = version;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = VersionController;
|
11
webui/src/app/version/version.module.js
Normal file
11
webui/src/app/version/version.module.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
'use strict';
|
||||
var angular = require('angular');
|
||||
var traefikCoreVersion = require('../core/version.resource');
|
||||
var VersionController = require('./version.controller');
|
||||
|
||||
var traefikVersion = 'traefik.version';
|
||||
module.exports = traefikVersion;
|
||||
|
||||
angular
|
||||
.module(traefikVersion, [traefikCoreVersion])
|
||||
.controller('VersionController', VersionController);
|
Loading…
Add table
Add a link
Reference in a new issue