From: hickert Date: Mon, 6 Oct 2008 06:35:03 +0000 (+0000) Subject: Updated System Managenemt X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6b3cb015a8226a1a424d325948e973de7a8281bf;p=gosa.git Updated System Managenemt -Added opsi filter checkbox. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12596 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc index 1066c0bd2..bd339a332 100644 --- a/gosa-plugins/systems/admin/systems/class_divListSystem.inc +++ b/gosa-plugins/systems/admin/systems/class_divListSystem.inc @@ -39,6 +39,7 @@ class divListSystem extends MultiSelectWindow var $ShowPrinters; var $ShowDevices; var $ShowPhones; + var $ShowOpsiHosts; /* Subsearch checkbox */ var $SubSearch; @@ -131,6 +132,13 @@ class divListSystem extends MultiSelectWindow sprintf(_("Show %s"), _("network devices")), true); } + /* Add opsi checkboxes if opsi is enabled + */ + if($this->parent->opsi instanceof opsi && $this->parent->opsi->enabled()){ + $this->AddCheckBox("ShowOpsiHosts" , sprintf(_("Display objects of type '%s'."), + _("Opsi host")),_("Show opsi hosts") ,true); + } + /* Add SubSearch checkbox */ $this->AddCheckBox(SEPERATOR); $this->AddCheckBox("SubSearch", msgPool::selectToView("","subsearch"), msgPool::selectToView("","subsearch_small"), false); @@ -199,7 +207,10 @@ class divListSystem extends MultiSelectWindow $s.= "...|". " "._("Component")."|"."newsystem_component|\n"; } - if(class_available("opsiGeneric") && preg_match("/c/",$ui->get_permissions($this->selectedBase,"opsi/opsiGeneric"))){ + + if($this->parent->opsi instanceof opsi && + $this->parent->opsi->enabled() && + preg_match("/c/",$ui->get_permissions($this->selectedBase,"opsi/opsiGeneric"))){ $s.= "...|". " "._("Opsi")."|"."newsystem_opsi_client|\n"; } diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index 117847772..4f1820dda 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -62,9 +62,6 @@ class systems extends plugin $this->fai_activated = TRUE; } - /* Creat dialog object */ - $this->DivListSystem = new divListSystem($this->config,$this); - /* Copy & Paste enabled ?*/ if ($this->config->get_cfg_value("copyPaste") == "true"){ $this->CopyPasteHandler = new CopyPasteHandler($this->config); @@ -87,6 +84,9 @@ class systems extends plugin if(class_available("opsi")){ $this->opsi = new opsi($this->config); } + + /* Creat dialog object */ + $this->DivListSystem = new divListSystem($this->config,$this); } @@ -1192,7 +1192,7 @@ class systems extends plugin /* Append opsi systems, the opsi extension have to installed. */ - if($this->opsi != NULL && $this->opsi->enabled()){ + if($this->opsi instanceof opsi && $this->opsi->enabled() && $this->DivListSystem->ShowOpsiHosts){ $opsi_clients = $this->opsi->get_hosts_for_system_management(); if($this->opsi->is_error()){ msg_dialog::display(_("Error"),msgPool::siError($this->opsi->get_error()),ERROR_DIALOG);