diff options
author | Phil Davis <phil.davis@inf.org> | 2014-12-05 17:43:48 +0545 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-12-05 11:06:36 -0200 |
commit | 3002168fab6b40ff6009eaa991d98cd0b162afac (patch) | |
tree | 9177d6c9c0660e9d0efc8f8883f5cf1696754a1d /usr/local | |
parent | d68be5d67a2ae7e7316c421d2ca4e79f60e51238 (diff) | |
download | pfsense-3002168fab6b40ff6009eaa991d98cd0b162afac.zip pfsense-3002168fab6b40ff6009eaa991d98cd0b162afac.tar.gz |
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.
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/includes/functions.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
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 .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"2\" style=\"table-layout: fixed;\" summary=\"status\"><tr><td bgcolor=\"$bgcolor\"> $online </td></tr></table>"; + $data .= "{$online}/{$bgcolor}"; } return $data; } |