Display version in footer via api / angular
This commit is contained in:
parent
40dcca2084
commit
941bf3535f
|
@ -24,6 +24,9 @@ ZoneMinder.factory('Footer', function($http) {
|
|||
},
|
||||
getDiskPercent: function(callback) {
|
||||
$http.get('/api/host/getDiskPercent.json').success(callback);
|
||||
},
|
||||
getVersion: function(callback) {
|
||||
$http.get('/api/host/getVersion.json').success(callback);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -19,6 +19,10 @@ ZoneMinder.controller('FooterController', function($scope, Footer) {
|
|||
Footer.getDiskPercent(function(diskPercent) {
|
||||
$scope.diskPercent = diskPercent.space;
|
||||
});
|
||||
|
||||
Footer.getVersion(function(version) {
|
||||
$scope.version = version.version;
|
||||
});
|
||||
});
|
||||
|
||||
ZoneMinder.controller('EventController', function($scope, $location, Event) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container-fluid">
|
||||
<p class="pull-right text-muted"><?= $SLANG['Load'] ?>: <span ng-bind="load"></span> -
|
||||
<?= $SLANG['Disk'] ?>: <span ng-bind="diskPercent"></span>% -
|
||||
<?= makePopupLink( '?view=version', 'zmVersion', 'version', 'v' . ZM_VERSION, canEdit( 'System' ) ) ?> -
|
||||
<a href="?view=version" target="_blank">v {{ version }}</a>
|
||||
<?php
|
||||
if ( ZM_OPT_USE_AUTH )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue