Skip to content

Commit 66d94a0

Browse files
author
oilyflutesalad
committed
Fixed: Server uptime minutes will always be two digits as a clock would show (eg 10:03 hours instead of 10:3 hours)
1 parent a3e696c commit 66d94a0

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

interface/web/monitor/tools.inc.php

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function showServerLoad(){
3838
/*
3939
Format the data
4040
*/
41+
if (strlen($data['up_minutes']) == "1") $data['up_minutes'] = "0".$data['up_minutes'];
4142
$html =
4243
'<div class="systemmonitor-state state-'.$record['state'].'">
4344
<div class="systemmonitor-content icons32 ico-'.$record['state'].'">
@@ -114,9 +115,7 @@ function showDiskUsage () {
114115
return $html;
115116
}
116117

117-
118-
function showMemUsage ()
119-
{
118+
function showMemUsage () {
120119
global $app;
121120

122121
/* fetch the Data from the DB */
@@ -151,8 +150,7 @@ function showMemUsage ()
151150
return $html;
152151
}
153152

154-
function showCpuInfo ()
155-
{
153+
function showCpuInfo () {
156154
global $app;
157155

158156
/* fetch the Data from the DB */
@@ -185,8 +183,7 @@ function showCpuInfo ()
185183
return $html;
186184
}
187185

188-
function showServices ()
189-
{
186+
function showServices () {
190187
global $app;
191188

192189
/* fetch the Data from the DB */
@@ -298,8 +295,7 @@ function showServices ()
298295
return $html;
299296
}
300297

301-
function showSystemUpdate()
302-
{
298+
function showSystemUpdate() {
303299
global $app;
304300

305301
/* fetch the Data from the DB */
@@ -328,8 +324,7 @@ function showSystemUpdate()
328324
return $html;
329325
}
330326

331-
function showRaidState()
332-
{
327+
function showRaidState() {
333328
global $app;
334329

335330
/* fetch the Data from the DB */
@@ -360,8 +355,7 @@ function showRaidState()
360355
return $html;
361356
}
362357

363-
function showRKHunter()
364-
{
358+
function showRKHunter() {
365359
global $app;
366360

367361
/* fetch the Data from the DB */
@@ -392,8 +386,7 @@ function showRKHunter()
392386
return $html;
393387
}
394388

395-
function showFail2ban()
396-
{
389+
function showFail2ban() {
397390
global $app;
398391

399392
/* fetch the Data from the DB */
@@ -427,9 +420,7 @@ function showFail2ban()
427420
return $html;
428421
}
429422

430-
431-
function showMailq()
432-
{
423+
function showMailq() {
433424
global $app;
434425

435426
/* fetch the Data from the DB */

0 commit comments

Comments
 (0)