From f4e3050030f5e1d1f44202e1fac6e53eea662d25 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 22 Jan 2010 15:50:17 +0000 Subject: [PATCH] Added status flags git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15267 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_serverService.inc | 17 +++++++++++++++++ .../admin/systems/serverService-list.xml | 10 +++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/systems/admin/systems/class_serverService.inc b/gosa-plugins/systems/admin/systems/class_serverService.inc index 9a69e433c..455a6702a 100644 --- a/gosa-plugins/systems/admin/systems/class_serverService.inc +++ b/gosa-plugins/systems/admin/systems/class_serverService.inc @@ -77,6 +77,7 @@ class ServerService extends management // Build headpage $headpage = new listing(get_template_path("serverService-list.xml", true)); + $headpage->registerElementFilter("filterServiceStatus", "ServerService::filterServiceStatus"); $headpage->setFilter($filter); @@ -113,6 +114,22 @@ class ServerService extends management return(session::get('ServerService')); } + static function filterServiceStatus($a,$b,$c,$d) + { + $img =""; + if(isset($d['0'])){ + switch($d[0]){ + case 'Restart' : $img = ('images/status_restarting.png'); break; + case 'Stop' : $img = ('images/lists/off.png'); break; + case 'Start' : $img = ('images/lists/on.png'); break; + } + } + if(!empty($img)){ + return(''); + } + return(""); + } + function execute() { diff --git a/gosa-plugins/systems/admin/systems/serverService-list.xml b/gosa-plugins/systems/admin/systems/serverService-list.xml index f93d44e97..c179a6d41 100644 --- a/gosa-plugins/systems/admin/systems/serverService-list.xml +++ b/gosa-plugins/systems/admin/systems/serverService-list.xml @@ -21,7 +21,15 @@ - ||250px|170px;r| + |18px;c||250px|170px;r| + + + + Status + string + %{filter:filterServiceStatus(row,dn,"%s",Status)} + true + -- 2.30.2