summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c79feb6)
raw | patch | inline | side by side (parent: c79feb6)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Apr 2011 08:06:26 +0000 (08:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 14 Apr 2011 08:06:26 +0000 (08:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20728 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc | patch | blob | history | |
gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/puppet.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index 58afd625ca95429184743be406ad7471fb5ee800..faa9f1e93829406b1279cf377b88553e2817a3a1 100644 (file)
*/
function removeEntry($ids)
{
+ foreach($ids as $id){
+ $item = $this->dataModel->getItemById($id);
- $item = $this->dataModel->getItemById($ids[0]);
+ // Is an config item.
+ if($this->cfgItemMap[$item['type']] != 'root'){
+ $release = preg_replace("/^.*\//","", $this->getReleasePath($item['path']));
+ $path = $this->getItemPath($item['path']);
- // Is an config item.
- if($this->cfgItemMap[$item['type']] != 'root'){
- $release = preg_replace("/^.*\//","", $this->getReleasePath($item['path']));
- $path = $this->getItemPath($item['path']);
-
- $rpc = $this->config->getRpcHandle();
- $rpc->removeConfigItem($release, $path);
- if(!$rpc->success()){
- msg_dialog::display(_("Error"), sprintf(_("Failed to remove: %s"), $rpc->get_error()),ERROR_DIALOG);
- return(NULL);
+ $rpc = $this->config->getRpcHandle();
+ $rpc->removeConfigItem($release, $path);
+ if(!$rpc->success()){
+ msg_dialog::display(_("Error"), sprintf(_("Failed to remove: %s"), $rpc->get_error()),ERROR_DIALOG);
+ return(NULL);
+ }else{
+ $this->dataModel->removeItem($item['path']);
+ }
}else{
- $this->dataModel->removeItem($item['path']);
+ echo $item['type']." - are not handled yet!";
}
- }else{
- echo $item['type']." - are not handled yet!";
}
}
{
// We've to add a config item
$this->TemplateEngine->load($this->itemConfig);
- if($this->cfgItemMap[$item['type']] != 'root'){
+ if($this->cfgItemMap[$type] != 'root'){
$method = $this->cfgItemMap[$type];
$this->TemplateEngine->setTemplate($method.".tpl");
$this->TemplateEngine->setValues($type,array());
{
$item = $this->currentObject;
$type = $this->TemplateEngine->getItemType();
- if($this->cfgItemMap[$item['type']] == 'root'){
+ if($this->cfgItemMap[$type] == 'root'){
echo "{$type} Cannot be saved yet";
$this->listing->clearDialogObject();
return;
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/puppet.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/goto/Config/puppet.tpl
index 8b8d95b5672d2e23c35bd5dcd25c28125440bc9e..ffa27f73caa585724953c07a03ab57feec2743b0 100644 (file)
</tr>
</table>
{/if}
+{if $type == 'PuppetManifest'}
+ <table>
+ <tr>
+ <td>{$nameName}</td>
+ <td>{$name}</td>
+ </tr>
+ <tr>
+ <td>{$dataName}</td>
+ <td>{$data}</td>
+ </tr>
+ </table>
+{/if}
+{if $type == 'PuppetFile'}
+ <table>
+ <tr>
+ <td>{$nameName}</td>
+ <td>{$name}</td>
+ </tr>
+ <tr>
+ <td>{$dataName}</td>
+ <td>{$data}</td>
+ </tr>
+ </table>
+{/if}
{if $type == 'PuppetTemplate'}
<table>
<tr>
<td>{$data}</td>
</tr>
</table>
- <input type='submit'>
{/if}