diff options
author | Colin Fleming <cj_fleming@sky.com> | 2013-11-14 13:44:59 +0000 |
---|---|---|
committer | Colin Fleming <cj_fleming@sky.com> | 2013-11-14 13:44:59 +0000 |
commit | 17b8c60a398c225db03cedbb936aa62b97cb4ee3 (patch) | |
tree | 4d9e4d1da58f4bcef218621252d8bcd6d5528312 /usr/local/www/status_services.php | |
parent | eef01b14df77186f9c1205e9e5cb83f80407d7fd (diff) | |
download | pfsense-17b8c60a398c225db03cedbb936aa62b97cb4ee3.zip pfsense-17b8c60a398c225db03cedbb936aa62b97cb4ee3.tar.gz |
Tidy up the "Helper Icons"
The "Helper Icons" at the top right of some service pages at present
produces 30+ HTML errors/warnings, this is due to the table cell being
wrapped in a span statement then in a div statement, table cells can
only be part of a table row then within a table statement.
- remove the table cell definitions from /etc/inc/service-utils.inc
- add the table cell definition from /etc/inc/service-utils.inc to
/usr/local/www/status_services.php and add some logic to determine if
the service is running which will then determine which class statement
to use and pad the icon with a space
- apply the same table cell definition and logic as above to
/usr/local/www/widgets/widgets/services_status.widget.php
Diffstat (limited to 'usr/local/www/status_services.php')
-rwxr-xr-x | usr/local/www/status_services.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php index 1f1fee5..48f9db4 100755 --- a/usr/local/www/status_services.php +++ b/usr/local/www/status_services.php @@ -93,11 +93,16 @@ if (count($services) > 0) { continue; if (empty($service['description'])) $service['description'] = get_pkg_descr($service['name']); - echo '<tr><td class="listlr" width="20%">' . $service['name'] . '</td>' . "\n"; - echo '<td class="listr" width="55%">' . $service['description'] . '</td>' . "\n"; - echo get_service_status_icon($service, true, true); - echo '<td valign="middle" class="list nowrap">'; - echo get_service_control_links($service); + echo "<tr><td class=\"listlr\" width=\"20%\">" . $service['name'] . "</td>\n"; + echo "<td class=\"listr\" width=\"55%\">" . $service['description'] . "</td>\n"; + // if service is running then listr else listbg + $bgclass = null; + if (get_service_status($service)) + $bgclass = "listr"; + else + $bgclass = "listbg"; + echo "<td class=\"" . $bgclass . "\" align=\"center\">" . get_service_status_icon($service, true, true) . "</td>\n"; + echo "<td valign=\"middle\" class=\"list nowrap\">" . get_service_control_links($service); $scut = get_shortcut_by_service_name($service['name']); if (!empty($scut)) { echo get_shortcut_main_link($scut, true, $service); @@ -107,7 +112,7 @@ if (count($services) > 0) { echo "</td></tr>\n"; } } else { - echo "<tr><td colspan=\"3\" align=\"center\">" . gettext("No services found") . ".</td></tr>\n"; + echo "<tr><td colspan=\"3\" align=\"center\">" . gettext("No services found") . " . </td></tr>\n"; } ?> |