Version information and extended header for admin panel.
This commit is contained in:
parent
db01edcb71
commit
124f330895
7 changed files with 88 additions and 5 deletions
admin/js/views
22
admin/js/views/version.js
Normal file
22
admin/js/views/version.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('ffffngAdmin')
|
||||
.directive('faVersion', function ($http, $state, notification) {
|
||||
var link = function (scope) {
|
||||
scope.version = '?';
|
||||
$http.get('/internal/api/version')
|
||||
.then(function (result) { scope.version = result.data.version; })
|
||||
.catch(function (e) {
|
||||
notification.log('Error: ' + e.data, { addnCls: 'humane-flatty-error' });
|
||||
console.error(e);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
'link': link,
|
||||
'restrict': 'E',
|
||||
'scope': {},
|
||||
|
||||
'template': '{{version}}'
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue