From cd6173f48c290cd523d9cbb5a989e8a13d3d51a2 Mon Sep 17 00:00:00 2001 From: N0YB Date: Sun, 26 Jan 2014 21:58:25 -0800 Subject: [PATCH] The service status icon (get_service_status_icon) is not always in a table. So the caller should apply table td element, rather than the function. Document type does not allow element "td" here The element named above was found in a context where it is not allowed. --- etc/inc/service-utils.inc | 6 ++---- usr/local/www/status_openvpn.php | 6 ++++++ usr/local/www/status_services.php | 2 ++ usr/local/www/widgets/widgets/services_status.widget.php | 2 ++ 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 4547a538e2..a1dbf31490 100644 --- a/etc/inc/service-utils.inc +++ b/etc/inc/service-utils.inc @@ -442,23 +442,21 @@ function get_service_status_icon($service, $withtext = true, $smallicon = false) $output = ""; if(get_service_status($service)) { $statustext = gettext("Running"); - $output .= '' . "\n"; $output .= "\"status\""; if ($withtext) $output .= "  " . $statustext; - $output .= "\n"; + $output .= "\n"; } else { $service_enabled = is_service_enabled($service['name']); $statustext = ($service_enabled) ? gettext("Stopped") : gettext("Disabled"); - $output .= '' . "\n"; $output .= "\"status\""; if ($withtext) $output .= "  " . "{$statustext}"; - $output .= "\n"; + $output .= "\n"; } return $output; } diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php index 495682179d..e5ac31b6a3 100644 --- a/usr/local/www/status_openvpn.php +++ b/usr/local/www/status_openvpn.php @@ -195,7 +195,9 @@ include("head.inc"); ?> +
+
@@ -308,7 +310,9 @@ include("head.inc"); ?> +
+
@@ -371,7 +375,9 @@ include("head.inc"); ?> +
+
diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php index 1f1fee503f..731b79b31d 100755 --- a/usr/local/www/status_services.php +++ b/usr/local/www/status_services.php @@ -95,7 +95,9 @@ if (count($services) > 0) { $service['description'] = get_pkg_descr($service['name']); echo '' . $service['name'] . '' . "\n"; echo '' . $service['description'] . '' . "\n"; + echo '' . "\n"; echo get_service_status_icon($service, true, true); + echo "\n"; echo ''; echo get_service_control_links($service); $scut = get_shortcut_by_service_name($service['name']); diff --git a/usr/local/www/widgets/widgets/services_status.widget.php b/usr/local/www/widgets/widgets/services_status.widget.php index 9ae86962e5..ee8d521185 100644 --- a/usr/local/www/widgets/widgets/services_status.widget.php +++ b/usr/local/www/widgets/widgets/services_status.widget.php @@ -75,7 +75,9 @@ if (count($services) > 0) { $service_desc = explode(".",$service['description']); echo '' . $service['name'] . '' . "\n"; echo '' . $service_desc[0] . '' . "\n"; + echo '' . "\n"; echo get_service_status_icon($service, false, true); + echo "\n"; echo ''; echo get_service_control_links($service); echo "\n";