summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/pages
diff options
context:
space:
mode:
authorSimon Rettberg2022-07-20 14:16:29 +0200
committerSimon Rettberg2022-07-20 14:16:29 +0200
commita26e67618c3fd9a6e64059c0bbfdf2e6397f8492 (patch)
tree14e60a7ada4c2f45d4ee487fd190b221c131c2b2 /modules-available/statistics/pages
parent[statistics] chart: Fix table highlight not resetting on mouseout (diff)
downloadslx-admin-a26e67618c3fd9a6e64059c0bbfdf2e6397f8492.tar.gz
slx-admin-a26e67618c3fd9a6e64059c0bbfdf2e6397f8492.tar.xz
slx-admin-a26e67618c3fd9a6e64059c0bbfdf2e6397f8492.zip
[statistics] hints: Sort all tables by hostname
Diffstat (limited to 'modules-available/statistics/pages')
-rw-r--r--modules-available/statistics/pages/hints.inc.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/modules-available/statistics/pages/hints.inc.php b/modules-available/statistics/pages/hints.inc.php
index cc44caa9..dc51b6ea 100644
--- a/modules-available/statistics/pages/hints.inc.php
+++ b/modules-available/statistics/pages/hints.inc.php
@@ -56,16 +56,15 @@ class SubPage
if (HardwareParser::convertSize($row['Memory Installed Capacity'], 'M', false)
>= HardwareParser::convertSize($row['Memory Maximum Capacity'], 'M', false)) {
$row['size_class'] = 'danger';
- $list[] = $row;
- } elseif ($row['Memory Slot Occupied'] < $row['Memory Slot Count']) {
- $row['count_class'] = 'success';
- array_unshift($list, $row);
- } else {
- $list[] = $row;
}
+ if ($row['Memory Slot Occupied'] >= $row['Memory Slot Count']) {
+ $row['count_class'] = 'warning';
+ }
+ $list[] = $row;
}
if (empty($list))
return;
+ ArrayUtil::sortByColumn($list, 'hostname');
Render::addTemplate('hints-ram-upgrade', ['list' => $list]);
}
@@ -99,6 +98,7 @@ class SubPage
}
if (empty($list))
return;
+ ArrayUtil::sortByColumn($list, 'hostname');
Render::addTemplate('hints-ram-underclocked', ['list' => $list]);
}
@@ -143,6 +143,8 @@ class SubPage
}
if (empty($id44) && empty($id45))
return;
+ ArrayUtil::sortByColumn($id44, 'hostname');
+ ArrayUtil::sortByColumn($id45, 'hostname');
Render::addTemplate('hints-hdd-grow', [
'id44' => $id44,
'id45' => $id45,
@@ -168,7 +170,7 @@ class SubPage
}
if (empty($list))
return;
- ArrayUtil::sortByColumn($list, 'nic-speed', SORT_ASC | SORT_NUMERIC);
+ ArrayUtil::sortByColumn($list, 'hostname');
Render::addTemplate('hints-nic-speed', ['list' => $list]);
}