From beb7d9e33261c5d3e7fa387f7d61054f0c55ad99 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 5 Dec 2014 17:43:48 +0545 Subject: Explicitly pass gateway status and color This code was passing a whole load of html to attempt to set various properties of the Gateways Widget Status column so that it would display the new status (Online, Offline...) and in the appropriate color. Now that I am using class=listr, the css fro listr already specifies white. Setting bgcolor in HTML does not override that. Pass both the status text and color as ordinary text, separated by "/". The consumer of this output can do their thing with jQuery to set the color as well as text of the element. --- usr/local/www/includes/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr/local/www/includes/functions.inc.php') diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 673e318..e8203f6 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -73,7 +73,7 @@ function get_gatewaystats() { $bgcolor = "#ADD8E6"; // lightblue } $data .= ($online == "Pending") ? "{$online},{$online}," : "{$gws['delay']},{$gws['loss']},"; - $data .= "
 $online 
"; + $data .= "{$online}/{$bgcolor}"; } return $data; } -- cgit v1.1