summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/widgets')
-rw-r--r--usr/local/www/widgets/widgets/services_status.widget.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/local/www/widgets/widgets/services_status.widget.php b/usr/local/www/widgets/widgets/services_status.widget.php
index 71aa2b5..f41e7f5 100644
--- a/usr/local/www/widgets/widgets/services_status.widget.php
+++ b/usr/local/www/widgets/widgets/services_status.widget.php
@@ -177,7 +177,14 @@ if(isset($_POST['servicestatusfilter'])) {
<?php
$skipservices = explode(",", str_replace(" ", "", $config['widgets']['servicestatusfilter']));
+function service_name_compare($a, $b) {
+ if (strtolower($a['name']) == strtolower($b['name']))
+ return 0;
+ return (strtolower($a['name']) < strtolower($b['name'])) ? -1 : 1;
+}
+
if (count($services) > 0) {
+ uasort($services, "service_name_compare");
foreach($services as $service) {
if((!$service['name']) || (in_array($service['name'], $skipservices)))
continue;
OpenPOWER on IntegriCloud