From: hickert Date: Wed, 18 May 2011 14:09:05 +0000 (+0000) Subject: Updated config management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=162f00128276469001403a07931d4acb114f3000;p=gosa.git Updated config management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20863 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc index 57a369c31..aef5352b3 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -31,6 +31,7 @@ class newConfigManagement extends plugin $this->config = &$config; $this->listing = new ConfigManagementListing($this->config, get_userinfo(), $this); + // Load the template engine and tell her what template // to use for the HTML it produces. $this->TemplateEngine = new TemplateEngine($config); @@ -61,6 +62,24 @@ class newConfigManagement extends plugin // Load configuration via rpc. $rpc = $this->config->getRpcHandle(); + + // Load some base install parameters + $res = $rpc->getSupportedBaseInstallMethods(); + $baseInstTypes = $installationTypes = $installationMethods = array(); + foreach($res as $type => $data){ + $baseInstTypes[$type] = $type; + if(isset($data['repositories'])){ + foreach($data['repositories'] as $m){ + $installationTypes[$m] = $m; + } + } + if(isset($data['methods'])){ + foreach($data['methods'] as $m){ + $installationMethods[$m] =$m; + } + } + } + $res = $rpc->getSupportedInstallMethods(); if(!$rpc->success()){ $this->errorMessage = $rpc->get_error();; @@ -100,7 +119,7 @@ class newConfigManagement extends plugin $map['%ROOT_CFG_ITEMS'] = &$rootElements; $map['%INSTALLATION_TYPES'] = array('dep' => 'dep', 'rpm' => 'rpm'); $map['%INSTALLATION_METHODS'] = array('puppet' => 'puppet'); - $map['%TEMPLATE_METHODS'] = array('preseed' => 'preseed'); + $map['%BASE_INSTALLATION_METHODS'] = array('preseed' => 'preseed'); $this->itemConfig = $this->__fillPlaceholder($this->itemConfig, $map); return(TRUE); } diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.json b/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.json index 30a6c4502..0bc998c92 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.json +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/root.json @@ -130,7 +130,7 @@ "required": true, "type": "combobox", "display": "Method", - "values": "%TEMPLATE_METHODS", + "values": "%BASE_INSTALLATION_METHODS", "initiallyEditableOnly": true }, "data": {