From: cajus Date: Tue, 9 May 2006 14:43:49 +0000 (+0000) Subject: * Added traffic lights for fai installations X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86b9a0e3b911358c9b2326e1dea77b6776c1011f;p=gosa.git * Added traffic lights for fai installations * Prepared hack to adapt texts if we want to remove objects git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3238 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/TODO b/TODO index f55504667..f5be5bc5f 100644 --- a/TODO +++ b/TODO @@ -27,8 +27,6 @@ Target for 2.4.1: * Auto-Resize for subdialogs -* Create a status-bar/-display for FAI installations - * Fix fai objects to generate tags if needed (sub objects) * What about unitTag's when moving objects? @@ -40,16 +38,10 @@ Target for 2.5: * Asterisk : Create entry like this #309,1,PickupChan(SIP/rainer), to allow others to pickup the phone by pressing # and number of the phone. -* Rework group->application assignment. - * Evaluate patches for certificate generation * Bug submitter -* Fix translation mode - -* Gofon -Asterisk-database name should be defined in database tab, currently this setting is hard coded in class_config.inc - * Complete PHP5 compliance and optimization * Simplify plugins by providing a schema parser @@ -99,5 +91,3 @@ Target for 2.5: * Try RDN style for unique names -* Object Groups should have member tabs depending of the grouped object types - diff --git a/ihtml/themes/default/islocked.tpl b/ihtml/themes/default/islocked.tpl index ec6f7ff5b..93e40ce70 100644 --- a/ihtml/themes/default/islocked.tpl +++ b/ihtml/themes/default/islocked.tpl @@ -10,7 +10,7 @@

- +  

diff --git a/include/functions.inc b/include/functions.inc index 92f858105..852942761 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -1001,6 +1001,8 @@ function gen_locked_message($user, $dn) $ldap->cat ($user); $attrs= $ldap->fetch(); $uid= $attrs["uid"][0]; + $cn= $attrs["cn"][0]; + $remove= false; // print_a($_POST); // print_a($_GET); @@ -1028,7 +1030,12 @@ function gen_locked_message($user, $dn) /* Prepare and show template */ $smarty= get_smarty(); $smarty->assign ("dn", $dn); - $smarty->assign ("message", sprintf(_("You're going to edit the LDAP entry '%s' which appears to be used by '%s'. Please contact the person in order to clarify proceedings."), $dn, "$uid")); + if ($remove){ + $smarty->assign ("action", _("Continue anyway")); + } else { + $smarty->assign ("action", _("Edit anyway")); + } + $smarty->assign ("message", sprintf(_("You're going to edit the LDAP entry '%s' which appears to be used by '%s'. Please contact the person in order to clarify proceedings."), "".$dn."", "$cn")); return ($smarty->fetch (get_template_path('islocked.tpl'))); } diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index c3ee3c88d..ad8910dd4 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -580,7 +580,7 @@ class systems extends plugin if($oc['CLASS'] != ""){ $filter = "(|(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex.")))"; $res = array_merge($res,get_list($filter,$this->ui->subtreeACL, $oc['TREE'].$base, - array("cn", "description", "macAddress", "objectClass", "sambaDomainName"), GL_NONE)); + array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate"), GL_NONE)); } } } @@ -639,12 +639,18 @@ class systems extends plugin $terminal['location'] = array_search($tmp, $this->config->departments); $terminal['message'] = _("Workstation template for"); } + if (isset($value["FAIstate"][0])){ + $terminal['type']= $this->getState($terminal['type'], $value["FAIstate"][0]); + } } elseif (in_array('gotoPrinter', $value["objectClass"])){ $terminal = $value; $terminal['type'] = "P"; } elseif (in_array('goServer', $value["objectClass"])){ $terminal = $value; $terminal['type'] = "S"; + if (isset($value["FAIstate"][0])){ + $terminal['type']= $this->getState($terminal['type'], $value["FAIstate"][0]); + } } elseif (in_array('goFonHardware', $value["objectClass"])){ $terminal = $value; $terminal['type'] = "F"; @@ -723,8 +729,14 @@ class systems extends plugin "D" => array("select_default.png",_("Template")), "T" => array("select_terminal.png",_("Terminal")), "L" => array("select_workstation.png",_("Workstation")), + "GL" => array("select_workstation_green.png",_("Workstation is installing")), + "YL" => array("select_workstation_yellow.png",_("Workstation is waiting for action")), + "RL" => array("select_workstation_red.png",_("Workstation installation failed")), "F" => array("select_phone.png",_("Phone")), "S" => array("select_server.png",_("Server")), + "GS" => array("select_server_green.png",_("Server is installing")), + "YS" => array("select_server_yellow.png",_("Server is waiting for action")), + "RS" => array("select_server_red.png",_("Server installation failed")), "W" => array("select_winstation.png",_("Winstation")), "C" => array("select_component.png",_("Network Device")), "NT"=> array("select_new_terminal.png",_("New Terminal")), @@ -743,6 +755,31 @@ class systems extends plugin } } + + function getState($type, $state) + { + switch (preg_replace('/:.*$/', '', $state)) { + case 'installing': + $type= 'G'.$type; + break; + case 'error': + $type= 'R'.$type; + break; + case 'install': + $type= 'Y'.$type; + break; + case 'sysinfo': + $type= 'Y'.$type; + break; + case 'softupdate': + $type= 'Y'.$type; + break; + } + + + return ($type); + } + } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: