summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 131b217)
raw | patch | inline | side by side (parent: 131b217)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Apr 2010 15:34:09 +0000 (15:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Apr 2010 15:34:09 +0000 (15:34 +0000) |
-we now colour rows for locked systems .
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17976 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17976 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc b/gosa-plugins/systems/admin/systems/class_filterSYSTEMS.inc
index dc9eb972cc1e2f998ab17ff781bb46628d4e622c..d4f66f2cbc1b37a0e7e7685df839f7795bb13bdb 100644 (file)
// Detect Workstation & templates
}elseif(in_array('gotoWorkstation', $entry['objectClass'])){
if(!isset($entry['macAddress'][0]) || $entry['macAddress'][0] == "-"){
+ unset($entries[$key]);
continue; // We do not need templates anymore, we've ogroups now.
//$entries[$key]['objectClass'][] = 'FAKE_OC_WorkstationTemplate';
}
// Detect Terminal & templates
}elseif(in_array('gotoTerminal', $entry['objectClass'])){
if(!isset($entry['macAddress'][0]) || $entry['macAddress'][0] == "-"){
+ unset($entries[$key]);
continue; // We do not need templates anymore, we've ogroups now.
//$entries[$key]['objectClass'][] = 'FAKE_OC_TerminalTemplate';
}
// Detect Server & templates
}elseif(in_array('goServer', $entry['objectClass'])){
if(!isset($entry['macAddress'][0]) || $entry['macAddress'][0] == "-"){
+ unset($entries[$key]);
continue; // We do not need templates anymore, we've ogroups now.
//$entries[$key]['objectClass'][] = 'FAKE_OC_ServerTemplate';
}
}
// Detect object states
+ $state = 'none';
foreach(array('gotoWorkstation','gotoTerminal','goServer') as $type){
if(in_array($type, $entry['objectClass'])){
case 'scheduledupdate':
$state= 'busy';
break;
- default: $state ="";
}
}
}
}
- if(!empty($state)){
+
+ if(isset($entries[$key])){
$entries[$key][$entries[$key]['count']]= 'state';
$entries[$key]['state']= $state;
$entries[$key]['count'] ++;
}
- }
+
+
+ }
return($entries);
}
}
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index d9b59cf6613075d01291be5cc10fc7ad1cdb5777..56d1c62fb1c01a761bd5919e392e07c50f28809a 100644 (file)
}
- static function filterSystemDescription($row,$dn,$pid,$description=array())
+ static function filterSystemDescription($row,$dn,$pid,$state,$description=array())
{
$dn= LDAP::fix(func_get_arg(1));
$desc = isset($description[0])?$description[0]:" ";
- $rc = "<rowClass:entry-locked/>";
$rc = "";
+ switch($state){
+ case 'locked' : $rc = "<rowClass:entry-locked/>"; break;
+ case 'error' : $rc = "<rowClass:entry-locked/>"; break;
+ }
return("<a href='?plug=".$_GET['plug']."&PID={$pid}&act=listing_edit_{$row}' title='{$dn}'>{$desc}</a>{$rc}");
}
diff --git a/gosa-plugins/systems/admin/systems/system-filter.xml b/gosa-plugins/systems/admin/systems/system-filter.xml
index 6e2d395288b772288fae52c7f7bb5e480f8b64f4..5f6dc1de730e0b8fff209f33a36946962c8f651e 100644 (file)
<attribute>FAIclass</attribute>
<attribute>macAddress</attribute>
<attribute>gotoLastUser</attribute>
+ <attribute>state</attribute>
</definition>
<search>
diff --git a/gosa-plugins/systems/admin/systems/system-list.xml b/gosa-plugins/systems/admin/systems/system-list.xml
index 754f5a1f2240d1d160d5cd0b7bfd60375eaa3e58..e719021e7280769617f9ff7f7553f388493a3f12 100644 (file)
<label>Description</label>
<sortAttribute>description</sortAttribute>
<sortType>string</sortType>
- <value>%{filter:filterSystemDescription(row,dn,pid,description)}</value>
+ <value>%{filter:filterSystemDescription(row,dn,pid,state,description)}</value>
<export>true</export>
</column>