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 {
|
return {
|
||||||
getLoad: function(callback) {
|
getLoad: function(callback) {
|
||||||
$http.get('/api/host/getLoad.json').success(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) {
|
Footer.getLoad(function(load) {
|
||||||
$scope.load = load.load;
|
$scope.load = load.load;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Footer.getDiskPercent(function(diskPercent) {
|
||||||
|
$scope.diskPercent = diskPercent.space;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
ZoneMinder.controller('EventController', function($scope, $location, Event) {
|
ZoneMinder.controller('EventController', function($scope, $location, Event) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div id="footer" ng-controller="FooterController">
|
<div id="footer" ng-controller="FooterController">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<p class="pull-right text-muted"><?= $SLANG['Load'] ?>: <span ng-bind="load"></span> -
|
<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' ) ) ?> -
|
<?= makePopupLink( '?view=version', 'zmVersion', 'version', 'v' . ZM_VERSION, canEdit( 'System' ) ) ?> -
|
||||||
<?php
|
<?php
|
||||||
if ( ZM_OPT_USE_AUTH )
|
if ( ZM_OPT_USE_AUTH )
|
||||||
|
|
Loading…
Reference in New Issue