diff --git a/baseTemplate/static/baseTemplate/custom-js/system-status.js b/baseTemplate/static/baseTemplate/custom-js/system-status.js index 00807bd6b..26e282dde 100755 --- a/baseTemplate/static/baseTemplate/custom-js/system-status.js +++ b/baseTemplate/static/baseTemplate/custom-js/system-status.js @@ -365,18 +365,17 @@ app.controller('adminController', function ($scope, $http, $timeout) { app.controller('loadAvg', function ($scope, $http, $timeout) { - //getStuff(); + getLoadAvg(); - function getStuff() { + function getLoadAvg() { url = "/base/getLoadAverage"; - $http.get(url).then(ListInitialData, cantLoadInitialData); + $http.get(url).then(ListLoadAvgData, cantGetLoadAvgData); - function ListInitialData(response) { - + function ListLoadAvgData(response) { $scope.one = response.data.one; $scope.two = response.data.two; @@ -384,8 +383,8 @@ app.controller('loadAvg', function ($scope, $http, $timeout) { } - function cantLoadInitialData(response) { - console.log("not good"); + function cantGetLoadAvgData(response) { + console.log("Can't get load average data"); } //$timeout(getStuff, 2000); @@ -398,6 +397,7 @@ app.controller('loadAvg', function ($scope, $http, $timeout) { app.controller('homePageStatus', function ($scope, $http, $timeout) { getStuff(); + getLoadAvg(); function getStuff() { @@ -500,6 +500,32 @@ app.controller('homePageStatus', function ($scope, $http, $timeout) { $timeout(getStuff, 2000); } + + function getLoadAvg() { + + url = "/base/getLoadAverage"; + + $http.get(url).then(ListLoadAvgData, cantGetLoadAvgData); + + + function ListLoadAvgData(response) { + + $scope.one = response.data.one; + $scope.two = response.data.two; + $scope.three = response.data.three; + + document.getElementById("load1").innerHTML = $scope.one; + document.getElementById("load2").innerHTML = $scope.two; + document.getElementById("load3").innerHTML = $scope.three; + } + + function cantGetLoadAvgData(response) { + console.log("Can't get load average data"); + } + + $timeout(getLoadAvg, 2000); + + } }); //////////// diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 624cec310..c869268c0 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -62,8 +62,7 @@ - + {% block title %}Page Title{% endblock %} @@ -83,15 +82,12 @@ - - + + - + {% block styles %} {% endblock %} @@ -146,7 +142,6 @@ {$ ramUsage $}%
{% trans "Ram Usage" %} -
@@ -186,14 +181,14 @@
- +
- - - {$ one $} + {$ one $} - - {$ two $} + {$ two $} - - {$ three $} + {$ three $} @@ -827,12 +826,6 @@
  • {% trans "LiteSpeed Status" %}
  • -
  • {% trans "CyberPanel Main Log File" %} -
  • -
  • {% trans "Services Status" %} -
  • {% trans "Change Port" %}
  • @@ -874,6 +867,9 @@
  • {% trans "Server Mail" %}
  • +
  • {% trans "CyberPanel Main Log File" %} +
  • {% trans "Access Log" %}
  • @@ -920,9 +916,6 @@
  • {% trans "CSF" %}
  • -
  • {% trans "CageFS" %} -
  • {% trans "Imunify 360" %}
  • @@ -977,6 +970,9 @@
  • {% trans "Applications" %}
  • +
  • {% trans "Services Status" %} +
  • {% trans "Manage PowerDNS" %}