From 9b636c89bcbdde531bab6cc3b3087b8dba3e85fb Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Tue, 25 Nov 2014 16:27:38 +0000 Subject: [PATCH] Show disk usage as a chart on the Host view --- web/skins/bootstrap/js/controllers.js | 13 +++++++++++++ web/skins/bootstrap/views/host.php | 10 ++++++++++ 2 files changed, 23 insertions(+) diff --git a/web/skins/bootstrap/js/controllers.js b/web/skins/bootstrap/js/controllers.js index a7281991f..7bbf4abc4 100644 --- a/web/skins/bootstrap/js/controllers.js +++ b/web/skins/bootstrap/js/controllers.js @@ -101,6 +101,19 @@ ZoneMinder.controller('ConfigController', function($scope, $http, Config) { }); ZoneMinder.controller('HostController', function($scope, Host, Footer) { + Footer.getDiskPercent(function(diskPercent) { + var array = []; + angular.forEach(diskPercent.usage, function(value, key) { + var a = { + 'value' : Math.floor(value), + 'label' : key, + 'color' : '#F7464A', + 'highlight' : '#FFC870', + }; + array.push(a); + }); + $scope.ddata = array; + }); Host.getLoad(function(load) { $scope.loadData = { diff --git a/web/skins/bootstrap/views/host.php b/web/skins/bootstrap/views/host.php index 136b35807..d7383154b 100644 --- a/web/skins/bootstrap/views/host.php +++ b/web/skins/bootstrap/views/host.php @@ -9,6 +9,16 @@ xhtmlHeaders( __FILE__, 'Host' );
+
+

Disk Usage in Gigabytes

+ +
+ +
+ +
+
+

CPU Load