Move getDiskPercent from Footer to Host factory
This commit is contained in:
parent
9b636c89bc
commit
f854bf4dcb
|
@ -20,6 +20,9 @@ ZoneMinder.factory('Header', function($http) {
|
|||
|
||||
ZoneMinder.factory('Host', function($http) {
|
||||
return {
|
||||
getDiskPercent: function(callback) {
|
||||
$http.get('/api/host/getDiskPercent.json').success(callback);
|
||||
},
|
||||
getLoad: function(callback) {
|
||||
$http.get('/api/host/getLoad.json').success(callback);
|
||||
}
|
||||
|
@ -28,9 +31,6 @@ ZoneMinder.factory('Host', function($http) {
|
|||
|
||||
ZoneMinder.factory('Footer', function($http) {
|
||||
return {
|
||||
getDiskPercent: function(callback) {
|
||||
$http.get('/api/host/getDiskPercent.json').success(callback);
|
||||
},
|
||||
getVersion: function(callback) {
|
||||
$http.get('/api/host/getVersion.json').success(callback);
|
||||
}
|
||||
|
|
|
@ -12,10 +12,6 @@ ZoneMinder.controller('HeaderController', function($scope, Header) {
|
|||
});
|
||||
|
||||
ZoneMinder.controller('FooterController', function($scope, Footer) {
|
||||
Footer.getDiskPercent(function(diskPercent) {
|
||||
$scope.diskPercent = diskPercent.space;
|
||||
});
|
||||
|
||||
Footer.getVersion(function(version) {
|
||||
$scope.version = version.version;
|
||||
});
|
||||
|
@ -100,8 +96,8 @@ ZoneMinder.controller('ConfigController', function($scope, $http, Config) {
|
|||
|
||||
});
|
||||
|
||||
ZoneMinder.controller('HostController', function($scope, Host, Footer) {
|
||||
Footer.getDiskPercent(function(diskPercent) {
|
||||
ZoneMinder.controller('HostController', function($scope, Host) {
|
||||
Host.getDiskPercent(function(diskPercent) {
|
||||
var array = [];
|
||||
angular.forEach(diskPercent.usage, function(value, key) {
|
||||
var a = {
|
||||
|
|
Loading…
Reference in New Issue