summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d28d309)
raw | patch | inline | side by side (parent: d28d309)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Mar 2008 09:48:31 +0000 (09:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Mar 2008 09:48:31 +0000 (09:48 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9656 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_servGeneric.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/server.tpl | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc
index 54256514aa45a97b13f75a9fa492e67ed995373d..81942231f93f7df2cba772a374c33b89bc39f34f 100644 (file)
var $fai_activated =FALSE;
var $view_logged = FALSE;
+ var $currently_installing = FALSE;
+ var $currently_installing_warned = FALSE;
+
function servgeneric (&$config, $dn= NULL, $parent= NULL)
{
/* Check if FAI is activated */
$this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
$this->netConfigDNS->set_acl_category("server");
$this->netConfigDNS->set_acl_base($this->base);
+
+ /* Check if this host is currently in installation process*/
+ $o = new gosaSupportDaemon();
+ $e_types = DaemonEvent::get_event_types(USER_EVENT | SYSTEM_EVENT | HIDDEN_EVENT);
+ $evts = $o->get_entries_by_mac(array($this->netConfigDNS->macAddress));
+ foreach($evts as $evt){
+ if(isset($e_types['QUEUED'][$evt['HEADERTAG']]) &&
+ $e_types['QUEUED'][$evt['HEADERTAG']] == "DaemonEvent_reinstall"){
+ $this->currently_installing =TRUE;
+ }
+ }
/* Save dn for later references */
$this->orig_dn= $this->dn;
}
$smarty->assign("netconfig", $str);
$smarty->assign("modes", $this->modes);
+ $smarty->assign("currently_installing", $this->currently_installing);
return($smarty->fetch (get_template_path('server.tpl', TRUE)));
}
}
}
+ /* Warn the user, that this host is currently installing */
+ if($this->currently_installing && !$this->currently_installing_warned){
+ $this->currently_installing_warned = TRUE;
+ $message[] = _("This host is currently installing, if you really want to save it, save again.");
+ }
+
return ($message);
}
diff --git a/gosa-plugins/systems/admin/systems/server.tpl b/gosa-plugins/systems/admin/systems/server.tpl
index 01e35a3a6a736a50baa5bd8f5bf04d5fba339cf4..9cf149f7ca38e5cdeba1ed6addf9c436b7ad8572 100644 (file)
<table summary="">
<tr>
<td>
+
+{if $currently_installing}
+ <i>{t}System installation in progress, the FAI state cannot be changed right now.{/t}</i>
+{else}
{render acl=$FAIstateACL}
<select size="1" name="saction" title="{t}Select action to execute for this server{/t}">
<option> </option>
{/render}
</td>
<td>
+{render acl=$FAIstateACL}
<input type=submit name="action" value="{t}Execute{/t}">
+{/render}
</td>
</tr>
+{/if}
</table>
{/if}