From 2744b43c17b931f8a4654b474cc62c88a4c8ca10 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 14 Jun 2006 05:41:09 +0000 Subject: [PATCH] Added snapshot to fai git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3805 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_divListFai.inc | 21 ++++++++++++++------- plugins/admin/fai/class_faiManagement.inc | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/plugins/admin/fai/class_divListFai.inc b/plugins/admin/fai/class_divListFai.inc index 2262fd8ae..7d910064d 100644 --- a/plugins/admin/fai/class_divListFai.inc +++ b/plugins/admin/fai/class_divListFai.inc @@ -57,7 +57,7 @@ class divListFai extends MultiSelectWindow $this->AddHeader(array("string" => " ", "attach" => "style='text-align:center;width:20px;'")); $this->AddHeader(array("string" => _("Name of FAI class"), "attach" => "style=''")); $this->AddHeader(array("string" => _("Class type"), "attach" => "style='width:200px;'")); - $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'")); + $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:90px;border-right:0px;text-align:right;'")); $this->AddCheckBox("ShowProfiles" , _("Display FAI profile objects") ,_("Show profiles") ,true); $this->AddCheckBox("ShowTemplates" , _("Display FAI template objects") ,_("Show templates") ,true); @@ -124,9 +124,15 @@ _("Submit")."'> ". "  ". - "\"\" ". + "\"\" "; + + if($this->parent->snapshotEnabled()){ + $listhead .= " ". + "  "; + } - "  ". "  ". $desc= ""; } + $action = $this->GetSnapShotActions($value['dn']);; if($value['FAIstate'] == "freeze"){ - $action = ""; $edi = $editlink; $acti = $action; }else{ - $action = ""; $action .= ""; @@ -222,9 +229,9 @@ _("Submit")."'> ". $field1 = array("string" => $img , "attach" => "style='text-align:center;width:20px;'"); $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$value['cn'].$desc,preg_replace('/ /', ' ', @LDAP::fix($value['dn']))),$edi) , "attach" => "style=''"); $field3 = array("string" => $info, "attach" => "style='width:200px;'"); - $field4 = array("string" => preg_replace("/%KEY%/",$key,$acti) , "attach" => "style='width:60px;border-right:0px;text-align:right;'"); + $field4 = array("string" => preg_replace("/%KEY%/",$key,$acti) , "attach" => "style='width:90px;border-right:0px;text-align:right;'"); $this->AddElement(array($field1,$field2,$field3,$field4)); - } + } } function Save() diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 0d8f508a0..19f5a5288 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -561,6 +561,20 @@ class faiManagement extends plugin Dialog display ****************/ + /* Check if there is a snapshot dialog open */ + $tmp = array(); + $types = array("hooks","scripts","disk","packages","profiles","templates","variables"); + foreach($types as $type){ + if($this->DivListFai->selectedBranch == "main"){ + $tmp[] = "ou=".$type.",ou=fai,ou=configs,ou=systems,".$this->DivListFai->selectedBase; + }else{ + $tmp[] = "ou=".$type.",".$this->DivListFai->selectedBranch; + } + } + if($str = $this->showSnapshotDialog($this->DivListFai->selectedBase,$tmp)){ + return($str); + } + /* Display dialog with system list */ $this->DivListFai->parent = $this; $this->DivListFai->execute(); -- 2.30.2