summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e27d5cf)
raw | patch | inline | side by side (parent: e27d5cf)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Aug 2008 12:34:07 +0000 (12:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Aug 2008 12:34:07 +0000 (12:34 +0000) |
-Display opsi host in system management too.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12245 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12245 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_systemManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index ed563037e9f7bb8d078b50bf0b9dc0df966d6407..d08dce0ffd8a9affed7ded4da5655e6d32594c57 100644 (file)
var $acl_module = array("incoming","terminal","workstation","server","printer","phone","winworkstation","component");
+ var $opsi = NULL;
+
function systems (&$config, $ui)
{
/* Save configuration for internal use */
$o = new gosaSupportDaemon();
$this->si_active = $o->connect() && class_available("DaemonEvent");
}
+
+ /* Check if we are able to communicate with the GOsa supprot daemon
+ */
+ if(class_available("opsi")){
+ $this->opsi = new opsi($this->config);
+ }
}
}
/* Find out more about the object type */
- $ldap= $this->config->get_ldap_link();
- $ldap->cat($this->dn, array('objectClass','gotoMode'));
- $attrs= $ldap->fetch();
+ $attrs = $this->terminals[$s_entry];
$type= $this->get_system_type($attrs);
-
+
/* Lock the current entry, so everyone will get the
above dialog */
$tabs = array(
+ "gosa_opsi_client"=> array("CLASS"=>"OPSITABS", "TABCLASS" =>"opsi_tabs", "ACL"=> "opsi"),
"terminal" => array("CLASS"=>"TERMTABS", "TABCLASS" =>"termtabs", "ACL"=> "terminal"),
"workstation" => array("CLASS"=>"WORKTABS", "TABCLASS" =>"worktabs", "ACL"=> "workstation"),
"server" => array("CLASS"=>"SERVTABS", "TABCLASS" =>"servtabs", "ACL"=> "server"),
"winstation" => array("CLASS"=>"WINTABS", "TABCLASS" =>"wintabs", "ACL"=> "winworkstation"),
"component" => array("CLASS"=>"COMPONENTTABS","TABCLASS" =>"componenttabs", "ACL"=> "component"));
-
if($type == "ArpNewDevice"){
if(!class_available("ArpNewDeviceTabs")){
msg_dialog::display(_("Error"), msgPool::class_not_found("ArpNewDevice"), ERROR_DIALOG);
$filter = "(|(&".$userregex."(objectClass=goHard)(cn=".$this->DivListSystem->Regex.")))";
$res = array_merge($res,get_list($filter,$sys_categories, get_ou('incomingou').$base,$sys_attrs, GL_SIZELIMIT));
+ /* Append opsi systems, the opsi extension have to installed.
+ */
+ if($this->opsi != NULL){
+ $res = array_merge($res,$this->opsi->get_hosts_for_system_management());
+ }
+
/* Get all gotoTerminal's */
foreach ($res as $value){
/* Detect type of object and create an entry for $this->terminals */
$terminal = array();
- if (in_array_ics('gotoTerminal', $value["objectClass"])){
+
+ if (in_array_ics('gosa_opsi_client', $value["objectClass"])){
+
+ /* check acl */
+ $terminal = $value;
+ $terminal['type'] = "O";
+
+ } elseif (in_array_ics('gotoTerminal', $value["objectClass"])){
/* check acl */
$acl = $ui->get_permissions($value['dn'],"terminal/termgeneric");
$classes = $attrs['objectClass'];
$type= "";
- if (in_array_ics('ieee802Device', $classes)){
+ if (in_array_ics('gosa_opsi_client', $classes)){
+ $type= "gosa_opsi_client";
+ }elseif (in_array_ics('ieee802Device', $classes)){
$type= "component";
}elseif (in_array_ics('gotoTerminal', $classes)){
$type= "terminal";
"NT" => array("plugins/systems/images/select_new_terminal.png",_("New terminal")),
"NL" => array("plugins/systems/images/select_new_workstation.png",_("New workstation")));
+ /* Add opsi client to system types */
+ if($this->opsi != NULL){
+ $conv["O"] = array("plugins/systems/images/select_default.png",_("Opsi client"));
+ }
+
/* Use locked icons
*/
if( in_array($input['type'],array("S","T","L")) &&