summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c31f276)
raw | patch | inline | side by side (parent: c31f276)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Jan 2010 15:50:17 +0000 (15:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Jan 2010 15:50:17 +0000 (15:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15267 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_serverService.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/serverService-list.xml | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_serverService.inc b/gosa-plugins/systems/admin/systems/class_serverService.inc
index 9a69e433ccd3d31f5cf0dcc4df59edcfa8322c84..455a6702af0b485df2af3cb7d65ff98aba206344 100644 (file)
// Build headpage
$headpage = new listing(get_template_path("serverService-list.xml", true));
+ $headpage->registerElementFilter("filterServiceStatus", "ServerService::filterServiceStatus");
$headpage->setFilter($filter);
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('<img src=\''.$img.'\'>');
+ }
+ return("");
+ }
+
function execute()
{
diff --git a/gosa-plugins/systems/admin/systems/serverService-list.xml b/gosa-plugins/systems/admin/systems/serverService-list.xml
index f93d44e97e8d61c7b6fdc918a18fc81474249109..c179a6d415db59fc0ed108d7b434c749475bb388 100644 (file)
</definition>
<table>
- <layout>||250px|170px;r|</layout>
+ <layout>|18px;c||250px|170px;r|</layout>
+
+ <column>
+ <label>!</label>
+ <sortAttribute>Status</sortAttribute>
+ <sortType>string</sortType>
+ <value>%{filter:filterServiceStatus(row,dn,"%s",Status)}</value>
+ <export>true</export>
+ </column>
<column>
<label>Description</label>