summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 259a279)
raw | patch | inline | side by side (parent: 259a279)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Sep 2010 09:43:49 +0000 (09:43 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Sep 2010 09:43:49 +0000 (09:43 +0000) |
-
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19826 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19826 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-filter.xml b/gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-filter.xml
index 2ad58ebac53010852016d1d7bcdd562f29b7862e..1517fa48159e469d1ce9d6a1be15f7af88f1d748 100644 (file)
<filterdef>
<definition>
<initial>true</initial>
- <category>server</category>
- <category>workstation</category>
- <category>terminal</category>
- <category>opsi</category>
- <category>incoming</category>
- <category>phone</category>
- <category>printer</category>
- <category>winworkstation</category>
- <category>component</category>
<category>Device</category>
<scope>auto</scope>
<default>default</default>
- <attribute>dn</attribute>
- <attribute>objectClass</attribute>
- <attribute>cn</attribute>
- <attribute>description</attribute>
- <attribute>gotoMode</attribute>
- <attribute>FAIstate</attribute>
- <attribute>FAIclass</attribute>
- <attribute>macAddress</attribute>
- <attribute>gotoLastUser</attribute>
- <attribute>state</attribute>
+ <attribute>-</attribute>
</definition>
<search>
<tag>default</tag>
<label>Default filter</label>
<query>
- <backend>SYSTEMS</backend>
- <filter>(&
- (|(objectClass=goServer)
- (objectClass=gotoWorkstation)
- (objectClass=device)
- (objectClass=gotoTerminal)
- (objectClass=goFonHardware)
- (objectClass=ieee802Device)
- (objectClass=gotoPrinter)
- (objectClass=sambaSamAccount)
- )
- (cn=$)
- )
+ <backend>DeviceItems</backend>
+ <filter>-
</filter>
</query>
<autocomplete>
</autocomplete>
</search>
- <search>
- <tag>all</tag>
- <label>All systems</label>
- <query>
- <backend>SYSTEMS</backend>
- <filter>(&
- (|(objectClass=goServer)
- (objectClass=gotoWorkstation)
- (objectClass=gotoTerminal)
- (objectClass=goFonHardware)
- (objectClass=ieee802Device)
- (objectClass=gotoPrinter)
- (objectClass=sambaSamAccount)
- (&(objectClass=goHard)(ou:dn:=%systemIncomingRDN))
- )
- (cn=$)
- )
- </filter>
- </query>
- <query>
- <backend>OPSIHOSTS</backend>
- <filter>cn=$</filter>
- </query>
- <autocomplete>
- <attribute>cn</attribute>
- <frequency>0.5</frequency>
- <characters>3</characters>
- </autocomplete>
- </search>
-
-
- <search>
- <tag>onlyOpsi</tag>
- <label>Opsi</label>
- <query>
- <backend>OPSIHOSTS</backend>
- <filter>cn=$</filter>
- </query>
- <autocomplete>
- <attribute>cn</attribute>
- <frequency>0.5</frequency>
- <characters>3</characters>
- </autocomplete>
- </search>
-
- <search>
- <tag>incoming</tag>
- <label>Incoming objects</label>
- <query>
- <backend>SYSTEMS</backend>
- <filter>(&(objectClass=goHard)(ou:dn:=%systemIncomingRDN)(cn=$))</filter>
- </query>
- <autocomplete>
- <attribute>cn</attribute>
- <frequency>0.5</frequency>
- <characters>3</characters>
- </autocomplete>
- </search>
-
</filterdef>
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-list.xml b/gosa-plugins/goto/admin/systems/goto/Config/DeviceConfig-list.xml
index 917521bb6458d7774812086de78c4eb65f5f426b..447f6fae977327a4ae7f8a44edac618913ec2456 100644 (file)
<list>
<definition>
- <departmentBrowser>true</departmentBrowser>
+ <departmentBrowser>false</departmentBrowser>
<departmentRootVisible>false</departmentRootVisible>
- <baseMode>true</baseMode>
+ <baseMode>false</baseMode>
<multiSelect>true</multiSelect>
<template>goto/Config/DeviceConfig-list.tpl</template>
<label>List of systems</label>
<objectType>
<label>Device</label>
- <objectClass>device</objectClass>
+ <objectClass>FAKE_OC_DeviceItem</objectClass>
<category>Device</category>
<class>Device</class>
<image>images/lists/edit.png</image>
</objectType>
- <objectType>
- <label>Opsi host</label>
- <objectClass>FAKE_OC_OpsiHost</objectClass>
- <category>opsi</category>
- <class>opsiGeneric</class>
- <image>plugins/systems/images/select_winstation.png</image>
- </objectType>
-
- <objectType>
- <label>New workstation</label>
- <objectClass>FAKE_OC_NewWorkstation</objectClass>
- <category>workstation</category>
- <class>workgeneric</class>
- <image>plugins/systems/images/select_workstation.png[new]</image>
- </objectType>
-
- <objectType>
- <label>Locked server</label>
- <objectClass>goServer__IS_LOCKED</objectClass>
- <category>server</category>
- <class>servgeneric</class>
- <image>plugins/systems/images/select_server.png[locked]</image>
- </objectType>
-
- <objectType>
- <label>Locked workstation</label>
- <objectClass>gotoWorkstation__IS_LOCKED</objectClass>
- <category>workstation</category>
- <class>workgeneric</class>
- <image>plugins/systems/images/select_workstation.png[locked]</image>
- </objectType>
-
- <objectType>
- <label>Locked terminal</label>
- <objectClass>gotoTerminal__IS_LOCKED</objectClass>
- <category>terminal</category>
- <class>termgeneric</class>
- <image>plugins/systems/images/select_terminal.png[locked]</image>
- </objectType>
-
-
- <objectType>
- <label>New terminal</label>
- <objectClass>FAKE_OC_NewTerminal</objectClass>
- <category>terminal</category>
- <class>termgeneric</class>
- <image>plugins/systems/images/select_terminal.png[new]</image>
- </objectType>
-
- <objectType>
- <label>New unknown device</label>
- <objectClass>FAKE_OC_ArpNewDevice</objectClass>
- <category>incoming</category>
- <class>ArpNewDevice</class>
- <image>images/lists/element.png[new]</image>
- </objectType>
-
- <objectType>
- <label>New device</label>
- <objectClass>FAKE_OC_NewDevice</objectClass>
- <category>incoming</category>
- <class>systemManagement</class>
- <image>images/lists/element.png[new]</image>
- </objectType>
-
- <objectType>
- <label>Workstation template</label>
- <objectClass>FAKE_OC_WorkstationTemplate</objectClass>
- <category>workstation</category>
- <class>workgeneric</class>
- <image>plugins/systems/images/select_default.png</image>
- </objectType>
-
- <objectType>
- <label>Terminal template</label>
- <objectClass>FAKE_OC_TerminalTemplate</objectClass>
- <category>terminal</category>
- <class>termgeneric</class>
- <image>plugins/systems/images/select_default.png</image>
- </objectType>
-
- <objectType>
- <label>Windows workstation</label>
- <objectClass>FAKE_OC_winstation</objectClass>
- <category>winworkstation</category>
- <class>wingeneric</class>
- <image>plugins/systems/images/select_winstation.png</image>
- </objectType>
-
- <objectType>
- <label>Server</label>
- <objectClass>goServer</objectClass>
- <category>server</category>
- <class>servgeneric</class>
- <image>plugins/systems/images/select_server.png</image>
- </objectType>
-
- <objectType>
- <label>Workstation</label>
- <objectClass>gotoWorkstation</objectClass>
- <category>workstation</category>
- <class>workgeneric</class>
- <image>plugins/systems/images/select_workstation.png</image>
- </objectType>
-
- <objectType>
- <label>Terminal</label>
- <objectClass>gotoTerminal</objectClass>
- <category>terminal</category>
- <class>termgeneric</class>
- <image>plugins/systems/images/select_terminal.png</image>
- </objectType>
-
- <objectType>
- <label>Printer</label>
- <objectClass>gotoPrinter</objectClass>
- <category>printer</category>
- <class>printgeneric</class>
- <image>plugins/systems/images/select_printer.png</image>
- </objectType>
-
- <objectType>
- <label>Phone</label>
- <objectClass>goFonHardware</objectClass>
- <category>phone</category>
- <class>phoneGeneric</class>
- <image>plugins/systems/images/select_phone.png</image>
- </objectType>
-
- <objectType>
- <label>Component</label>
- <objectClass>ieee802Device</objectClass>
- <category>component</category>
- <class>componentGeneric</class>
- <image>plugins/systems/images/select_component.png</image>
- </objectType>
-
</definition>
<table>
<label>Name</label>
<sortAttribute>cn</sortAttribute>
<sortType>string</sortType>
- <value>%{filter:filterLink(row,dn,"%s",cn,pid)}</value>
+ <value>%{filter:link(row,dn,"%s",cn,pid)}</value>
<export>true</export>
</column>
<label>Description</label>
<sortAttribute>description</sortAttribute>
<sortType>string</sortType>
- <value>%{filter:filterSystemDescription(row,dn,pid,state,description)}</value>
- <export>true</export>
- </column>
-
- <column>
- <label>Release</label>
- <sortAttribute>description</sortAttribute>
- <sortType>string</sortType>
- <value>%{filter:systemRelease(row,dn,"%s",objectClass,FAIclass)}</value>
+ <value>%{filter:link(row,dn,pid,state,description)}</value>
<export>true</export>
</column>
<depends>Device</depends>
</action>
- <action>
- <name>new_goServer</name>
- <type>entry</type>
- <image>plugins/systems/images/select_server.png[new]</image>
- <label>Server</label>
- <depends>servgeneric</depends>
- </action>
-
- <action>
- <name>new_gotoWorkstation</name>
- <type>entry</type>
- <image>plugins/systems/images/select_workstation.png[new]</image>
- <label>Workstation</label>
- <depends>workgeneric</depends>
- </action>
-
- <action>
- <name>new_gotoTerminal</name>
- <type>entry</type>
- <image>plugins/systems/images/select_terminal.png[new]</image>
- <label>Terminal</label>
- <depends>termgeneric</depends>
- </action>
-
- <action>
- <name>new_gotoPrinter</name>
- <type>entry</type>
- <image>plugins/systems/images/select_printer.png[new]</image>
- <label>Network printer</label>
- <depends>printgeneric</depends>
- </action>
-
- <action>
- <name>new_goFonHardware</name>
- <type>entry</type>
- <image>plugins/systems/images/select_phone.png[new]</image>
- <label>Phone</label>
- <depends>phoneGeneric</depends>
- </action>
-
- <action>
- <name>new_ieee802Device</name>
- <type>entry</type>
- <image>plugins/systems/images/select_component.png[new]</image>
- <label>Network device</label>
- <depends>componentGeneric</depends>
- </action>
-
- <action>
- <name>new_FAKE_OC_OpsiHost</name>
- <type>entry</type>
- <image>plugins/systems/images/select_winstation.png[new]</image>
- <label>Opsi client</label>
- <depends>opsi</depends>
- </action>
- </action>
-
- <action>
- <type>separator</type>
- </action>
-
- <action>
- <type>sub</type>
- <image>images/rocket.png</image>
- <label>Trigger action</label>
-
- <action>
- <name>T_DaemonEvent_halt</name>
- <depends>DaemonEvent_halt</depends>
- <type>entry</type>
- <image>images/lists/reload.png</image>
- <label>Halt </label>
- </action>
-
- <action>
- <name>T_DaemonEvent_reboot</name>
- <depends>DaemonEvent_reboot</depends>
- <type>entry</type>
- <image>images/lists/reload.png</image>
- <label>Reboot</label>
- </action>
-
- <action>
- <name>T_DaemonEvent_wakeup</name>
- <depends>DaemonEvent_wakeup</depends>
- <type>entry</type>
- <image>images/lists/on.png</image>
- <label>Wakeup</label>
- </action>
-
- <action>
- <name>T_DaemonEvent_update</name>
- <depends>DaemonEvent_update</depends>
- <type>entry</type>
- <image>plugins/goto/images/update.png</image>
- <label>Update</label>
- </action>
-
- <action>
- <name>T_DaemonEvent_lock</name>
- <depends>DaemonEvent_lock</depends>
- <type>entry</type>
- <image>images/lists/locked.png</image>
- <label>Lock</label>
- </action>
-
- <action>
- <name>T_DaemonEvent_activate</name>
- <depends>DaemonEvent_activate</depends>
- <type>entry</type>
- <image>images/lists/unlocked.png</image>
- <label>Activate</label>
- </action>
-
- <action>
- <name>T_DaemonEvent_reinstall</name>
- <depends>DaemonEvent_reinstall</depends>
- <type>entry</type>
- <image>plugins/goto/images/reinstall.png</image>
- <label>Reinstall</label>
- </action>
-
-
- </action>
-
-
-
- <action>
- <type>sub</type>
- <image>plugins/systems/images/clock.png</image>
- <label>Schedule action</label>
-
- <action>
- <name>S_DaemonEvent_halt</name>
- <depends>DaemonEvent_halt</depends>
- <type>entry</type>
- <image>images/lists/off.png</image>
- <label>Halt</label>
- </action>
-
- <action>
- <name>S_DaemonEvent_reboot</name>
- <depends>DaemonEvent_reboot</depends>
- <type>entry</type>
- <image>images/lists/reload.png</image>
- <label>Reboot</label>
- </action>
-
- <action>
- <name>S_DaemonEvent_wakeup</name>
- <depends>DaemonEvent_wakeup</depends>
- <type>entry</type>
- <image>images/lists/on.png</image>
- <label>Wakeup</label>
- </action>
-
- <action>
- <name>S_DaemonEvent_update</name>
- <depends>DaemonEvent_update</depends>
- <type>entry</type>
- <image>plugins/goto/images/update.png</image>
- <label>Update</label>
- </action>
-
- <action>
- <name>S_DaemonEvent_lock</name>
- <depends>DaemonEvent_lock</depends>
- <type>entry</type>
- <image>images/lists/locked.png</image>
- <label>Lock</label>
- </action>
-
- <action>
- <name>S_DaemonEvent_activate</name>
- <depends>DaemonEvent_activate</depends>
- <type>entry</type>
- <image>images/lists/unlocked.png</image>
- <label>Activate</label>
- </action>
-
- <action>
- <name>S_DaemonEvent_reinstall</name>
- <depends>DaemonEvent_reinstall</depends>
- <type>entry</type>
- <image>plugins/goto/images/reinstall.png</image>
- <label>Reinstall</label>
- </action>
-
- </action>
-
- <action>
- <type>separator</type>
- </action>
-
- <action>
- <name>activateMultiple</name>
- <depends>DaemonEvent_activate</depends>
- <type>entry</type>
- <image>images/lists/unlocked.png</image>
- <label>Activate systems</label>
- </action>
-
<action>
<name>remove</name>
<type>entry</type>
<label>Remove</label>
</action>
- <action>
- <type>exporter</type>
- </action>
-
- <action>
- <type>separator</type>
- </action>
-
- <action>
- <type>copypaste</type>
- </action>
-
- <action>
- <type>snapshot</type>
- </action>
-
</actionmenu>
- <actiontriggers snapshot="true" copypaste="true">
-
- <action>
- <name>setPassword</name>
- <type>entry</type>
- <objectclass>FAKE_OC_PWD_changeAble</objectclass>
- <image>images/lists/key.png</image>
- <label>Change password</label>
- </action>
-
-
- <action>
- <name>createISO</name>
- <type>entry</type>
- <objectclass>gotoWorkstation</objectclass>
- <objectclass>FAIobject</objectclass>
- <image>plugins/systems/images/cdrom.png</image>
- <acl>workstation/workgeneric[createFAICD:w]</acl>
- <label>Create ISO</label>
- </action>
-
- <action>
- <name>cp</name>
- <type>copypaste</type>
- </action>
+ <actiontriggers snapshot="false" copypaste="false">
<action>
<name>edit</name>
<label>Edit role</label>
</action>
- <action>
- <name>snapshot</name>
- <type>snapshot</type>
- </action>
-
<action>
<name>remove</name>
<type>entry</type>
<image>images/lists/trash.png</image>
- <acl>%acl[d]</acl>
<label>Remove system</label>
</action>
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+class filterDeviceItems {
+
+ static function query($base, $scope, $filter, $attributes, $category, $objectStorage= "")
+ {
+ $ret = array();
+
+ $entry = array();
+ $entry['dn'] = 'cn=test,cn=/';
+ $entry[] = 'dn';
+ $entry['cn'] = array('test', 'count' => 1);
+ $entry[] = 'cn';
+ $entry['description'] = array('test-item', 'count' => 1);
+ $entry[] = 'description';
+ $entry['objectClass'] = array('FAKE_OC_DeviceItem','count' => 1);
+ $entry[] = 'objectClass';
+ $entry['count'] = 4;
+
+
+ $ret[] = $entry;
+ return($ret);
+ }
+}
+
+?>