diff options
author | Renato Botelho <garga@pfSense.org> | 2014-01-27 02:10:45 -0800 |
---|---|---|
committer | Renato Botelho <garga@pfSense.org> | 2014-01-27 02:10:45 -0800 |
commit | 2704796a212d5d58e87b8c02c0e2a097a4aea6fb (patch) | |
tree | c12d8732791bbceedf0ac1d4a8a965cad94e5113 | |
parent | 8467c588e48965a412e2a146b1fd033c3a4d7ea2 (diff) | |
parent | 30469c9b0c34c3353401363dd59d4b6d2551a7cd (diff) | |
download | pfsense-2704796a212d5d58e87b8c02c0e2a097a4aea6fb.zip pfsense-2704796a212d5d58e87b8c02c0e2a097a4aea6fb.tar.gz |
Merge pull request #893 from N0YB/RELENG_2_1
The service status icon is not always in a table.
-rw-r--r-- | etc/inc/service-utils.inc | 6 | ||||
-rwxr-xr-x | usr/local/www/status_gateways.php | 2 | ||||
-rw-r--r-- | usr/local/www/status_openvpn.php | 6 | ||||
-rwxr-xr-x | usr/local/www/status_services.php | 2 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/services_status.widget.php | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc index 4547a53..a1dbf31 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 .= '<td class="listr" align="center">' . "\n"; $output .= "<img style=\"vertical-align:middle\" title=\"" . sprintf(gettext("%s Service is"),$service["name"]) . " {$statustext}\" src=\"/themes/" . $g["theme"] . "/images/icons/"; $output .= ($smallicon) ? "icon_pass.gif" : "icon_service_running.gif"; $output .= "\" alt=\"status\" />"; if ($withtext) $output .= " " . $statustext; - $output .= "</td>\n"; + $output .= "\n"; } else { $service_enabled = is_service_enabled($service['name']); $statustext = ($service_enabled) ? gettext("Stopped") : gettext("Disabled"); - $output .= '<td class="listbg" align="center">' . "\n"; $output .= "<img style=\"vertical-align:middle\" title=\"" . sprintf(gettext("%s Service is"),$service["name"]) . " {$statustext}\" src=\"/themes/" . $g["theme"] . "/images/icons/"; $output .= ($smallicon) ? "icon_block.gif" : "icon_service_stopped.gif"; $output .= "\" alt=\"status\" />"; if ($withtext) $output .= " " . "<font color=\"white\">{$statustext}</font>"; - $output .= "</td>\n"; + $output .= "\n"; } return $output; } diff --git a/usr/local/www/status_gateways.php b/usr/local/www/status_gateways.php index e7154a8..2cadc2f 100755 --- a/usr/local/www/status_gateways.php +++ b/usr/local/www/status_gateways.php @@ -149,6 +149,8 @@ include("head.inc"); <?php } ?> </table> </div> + </td> + </tr> </table> <?php include("fend.inc"); ?> diff --git a/usr/local/www/status_openvpn.php b/usr/local/www/status_openvpn.php index 4956821..e5ac31b 100644 --- a/usr/local/www/status_openvpn.php +++ b/usr/local/www/status_openvpn.php @@ -195,7 +195,9 @@ include("head.inc"); ?> <table> <tr> <?php $ssvc = find_service_by_openvpn_vpnid($server['vpnid']); ?> + <td class="listr" align="center"> <?= get_service_status_icon($ssvc, true, true); ?> + </td> <td><?= get_service_control_links($ssvc, true); ?></td> </tr> </table> @@ -308,7 +310,9 @@ include("head.inc"); ?> <table> <tr> <?php $ssvc = find_service_by_openvpn_vpnid($sk_server['vpnid']); ?> + <td class="listr" align="center"> <?= get_service_status_icon($ssvc, false, true); ?> + </td> <td><?= get_service_control_links($ssvc, true); ?></td> </tr> </table> @@ -371,7 +375,9 @@ include("head.inc"); ?> <table> <tr> <?php $ssvc = find_service_by_openvpn_vpnid($client['vpnid']); ?> + <td class="listr" align="center"> <?= get_service_status_icon($ssvc, false, true); ?> + </td> <td><?= get_service_control_links($ssvc, true); ?></td> </tr> </table> diff --git a/usr/local/www/status_services.php b/usr/local/www/status_services.php index 1f1fee5..731b79b 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 '<tr><td class="listlr" width="20%">' . $service['name'] . '</td>' . "\n"; echo '<td class="listr" width="55%">' . $service['description'] . '</td>' . "\n"; + echo '<td class="listr" align="center">' . "\n"; echo get_service_status_icon($service, true, true); + echo "</td>\n"; echo '<td valign="middle" class="list nowrap">'; 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 9ae8696..ee8d521 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 '<tr><td class="listlr">' . $service['name'] . '</td>' . "\n"; echo '<td class="listr">' . $service_desc[0] . '</td>' . "\n"; + echo '<td class="listr" align="center">' . "\n"; echo get_service_status_icon($service, false, true); + echo "</td>\n"; echo '<td valign="middle" class="list nowrap">'; echo get_service_control_links($service); echo "</td></tr>\n"; |