Get the diskPercent from angular, via the API
This commit is contained in:
parent
055a494fe4
commit
1f74d1cd60
|
@ -21,6 +21,9 @@ ZoneMinder.factory('Footer', function($http) {
|
|||
return {
|
||||
getLoad: function(callback) {
|
||||
$http.get('/api/host/getLoad.json').success(callback);
|
||||
},
|
||||
getDiskPercent: function(callback) {
|
||||
$http.get('/api/host/getDiskPercent.json').success(callback);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -15,6 +15,10 @@ ZoneMinder.controller('FooterController', function($scope, Footer) {
|
|||
Footer.getLoad(function(load) {
|
||||
$scope.load = load.load;
|
||||
});
|
||||
|
||||
Footer.getDiskPercent(function(diskPercent) {
|
||||
$scope.diskPercent = diskPercent.space;
|
||||
});
|
||||
});
|
||||
|
||||
ZoneMinder.controller('EventController', function($scope, $location, Event) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div id="footer" ng-controller="FooterController">
|
||||
<div class="container-fluid">
|
||||
<p class="pull-right text-muted"><?= $SLANG['Load'] ?>: <span ng-bind="load"></span> -
|
||||
<?= $SLANG['Disk'] ?>: <?= getDiskPercent() ?>% -
|
||||
<?= $SLANG['Disk'] ?>: <span ng-bind="diskPercent"></span>% -
|
||||
<?= makePopupLink( '?view=version', 'zmVersion', 'version', 'v' . ZM_VERSION, canEdit( 'System' ) ) ?> -
|
||||
<?php
|
||||
if ( ZM_OPT_USE_AUTH )
|
||||
|
|
Loading…
Reference in New Issue