mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
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 <td class="listr" align="center"> The element named above was found in a context where it is not allowed.
This commit is contained in:
parent
8467c588e4
commit
cd6173f48c
@ -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;
|
||||
}
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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']);
|
||||
|
||||
@ -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";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user