summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/inc/statisticsstyling.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules-available/statistics/inc/statisticsstyling.inc.php')
-rw-r--r--modules-available/statistics/inc/statisticsstyling.inc.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/modules-available/statistics/inc/statisticsstyling.inc.php b/modules-available/statistics/inc/statisticsstyling.inc.php
new file mode 100644
index 00000000..1fd1d326
--- /dev/null
+++ b/modules-available/statistics/inc/statisticsstyling.inc.php
@@ -0,0 +1,42 @@
+<?php
+
+class StatisticsStyling
+{
+
+ public static function ramColorClass($mb)
+ {
+ if ($mb < 1500) {
+ return 'danger';
+ }
+ if ($mb < 2500) {
+ return 'warning';
+ }
+
+ return '';
+ }
+
+ public static function kvmColorClass($state)
+ {
+ if ($state === 'DISABLED') {
+ return 'danger';
+ }
+ if ($state === 'UNKNOWN' || $state === 'UNSUPPORTED') {
+ return 'warning';
+ }
+
+ return '';
+ }
+
+ public static function hddColorClass($gb)
+ {
+ if ($gb < 7) {
+ return 'danger';
+ }
+ if ($gb < 25) {
+ return 'warning';
+ }
+
+ return '';
+ }
+
+} \ No newline at end of file