summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/service-utils.inc14
1 files changed, 9 insertions, 5 deletions
diff --git a/etc/inc/service-utils.inc b/etc/inc/service-utils.inc
index 487b41e..e4a942e 100644
--- a/etc/inc/service-utils.inc
+++ b/etc/inc/service-utils.inc
@@ -397,22 +397,26 @@ function get_service_status($service) {
return $running;
}
-function get_service_status_icon($service, $withtext = true) {
+function get_service_status_icon($service, $withtext = true, $smallicon = false) {
global $g;
$output = "";
if(get_service_status($service)) {
$statustext = gettext("Running");
$output .= '<td class="listr"><center>' . "\n";
- $output .= "<img style=\"vertical-align:middle\" title=\"" . sprintf(gettext("%s Service is"),$service["name"]) . " {$statustext}\" src=\"/themes/" . $g["theme"] . "/images/icons/icon_service_running.gif\">";
+ $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 .= "\">";
if ($withtext)
- $output .= " " . $statustext;
+ $output .= "&nbsp;&nbsp;" . $statustext;
$output .= "</td>\n";
} else {
$statustext = gettext("Stopped");
$output .= '<td class="listbg"><center>' . "\n";
- $output .= "<img style=\"vertical-align:middle\" title=\"" . sprintf(gettext("%s Service is"),$service["name"]) . " {$statustext}\" src=\"/themes/" . $g["theme"] . "/images/icons/icon_service_stopped.gif\">";
+ $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 .= "\">";
if ($withtext)
- $output .= "<font color=\"white\">{$statustext}</font>";
+ $output .= "&nbsp;&nbsp;" . "<font color=\"white\">{$statustext}</font>";
$output .= "</td>\n";
}
return $output;
OpenPOWER on IntegriCloud