From 9847b940a3af50057ea236df8227f38352c8acad Mon Sep 17 00:00:00 2001 From: smos Date: Mon, 4 Jun 2012 12:44:48 +0200 Subject: Enhance the gateways status widget. Show Pending when it's not ready yet, show unknown when it really isn't online. --- usr/local/www/widgets/widgets/gateways.widget.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'usr/local/www/widgets/widgets/gateways.widget.php') diff --git a/usr/local/www/widgets/widgets/gateways.widget.php b/usr/local/www/widgets/widgets/gateways.widget.php index 119ca23..6a57892 100644 --- a/usr/local/www/widgets/widgets/gateways.widget.php +++ b/usr/local/www/widgets/widgets/gateways.widget.php @@ -57,8 +57,12 @@ $counter = 1; @@ -85,18 +89,21 @@ $counter = 1; $online = "Offline"; $bgcolor = "lightcoral"; } elseif (stristr($gateways_status[$gname]['status'], "loss")) { - $online = "Warning, Packetloss"; + $online = "Packetloss"; $bgcolor = "khaki"; } elseif (stristr($gateways_status[$gname]['status'], "delay")) { - $online = "Warning, Latency"; + $online = "Latency"; $bgcolor = "khaki"; } elseif ($gateways_status[$gname]['status'] == "none") { $online = "Online"; $bgcolor = "lightgreen"; + } elseif ($gateways_status[$gname]['status'] == "") { + $online = "Pending"; + $bgcolor = "lightgray"; } } else { - $online = gettext("Pending"); - $bgcolor = "lightgray"; + $online = gettext("Unknown"); + $bgcolor = "lightblue"; } echo " $online "; $counter++; -- cgit v1.1