Code

Updated Config Management
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 31 Mar 2011 08:53:33 +0000 (08:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 31 Mar 2011 08:53:33 +0000 (08:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20632 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/ConfigManagement/class_ConfigManagement.inc
gosa-plugins/goto/admin/ConfigManagement/goto/Config/AddItemDialog.tpl [new file with mode: 0644]
gosa-plugins/goto/admin/ConfigManagement/goto/Config/DeviceConfig-list.tpl [new file with mode: 0644]
gosa-plugins/goto/admin/ConfigManagement/goto/Config/DeviceConfig.tpl [new file with mode: 0644]
gosa-plugins/goto/admin/ConfigManagement/goto/Config/TemplateEngine.tpl [new file with mode: 0644]
gosa-plugins/goto/admin/ConfigManagement/goto/Config/TemplateWidget_textEditor.tpl [new file with mode: 0644]
gosa-plugins/goto/admin/ConfigManagement/goto/Config/failed.tpl [new file with mode: 0644]
gosa-plugins/goto/admin/ConfigManagement/goto/Config/puppet.tpl [new file with mode: 0644]

index 5f0c18ca7ccd17bfe8e89b96103b4d4e4ae3f927..af9bbf554e749387c87dc0d1c1f4785672e4045e 100644 (file)
@@ -65,6 +65,7 @@ class ConfigManagement extends management
         
         // Try to initialize
         $this->init();
+        $this->setInstallMethod('puppet');
         $this->rebuildListing();
     }
 
diff --git a/gosa-plugins/goto/admin/ConfigManagement/goto/Config/AddItemDialog.tpl b/gosa-plugins/goto/admin/ConfigManagement/goto/Config/AddItemDialog.tpl
new file mode 100644 (file)
index 0000000..859ce16
--- /dev/null
@@ -0,0 +1,21 @@
+
+<h3>{t}Add item{/t}</h3>
+
+{t}Please specify a name for the item to add. This name has to be unique within the item configuration.{/t}
+<br>
+
+<hr>
+
+<p>
+ <b>{$itemCfg.name}</b>&nbsp;-&nbsp; {$itemCfg.description}
+</p>
+
+{t}Name{/t}:&nbsp;<input type='text' name='itemName' value="{$itemName}">
+
+<hr>
+
+<div class='plugin-actions'>
+    <button name='saveItemAdd'>{msgPool type=okButton}</button>
+    <button name='cancelItemAdd'>{msgPool type=cancelButton}</button>
+</div>
+
diff --git a/gosa-plugins/goto/admin/ConfigManagement/goto/Config/DeviceConfig-list.tpl b/gosa-plugins/goto/admin/ConfigManagement/goto/Config/DeviceConfig-list.tpl
new file mode 100644 (file)
index 0000000..813a1f5
--- /dev/null
@@ -0,0 +1,21 @@
+<div id="mainlist">
+
+  <div class="mainlist-header">
+   <p>{$HEADLINE}&nbsp;{$SIZELIMIT}</p>
+   <div class="mainlist-nav">
+    <table summary="{$HEADLINE}">
+     <tr>
+      <td>{$RELOAD}</td>
+      <td class="left-border">{t}Base{/t} {$RELEASE}</td>
+      <td class="left-border">{$ACTIONS}</td>
+      <td class="left-border">{$FILTER}</td>
+     </tr>
+    </table>
+   </div>
+  </div>
+
+  {$LIST}
+</div>
+
+<div class="clear"></div>
+
diff --git a/gosa-plugins/goto/admin/ConfigManagement/goto/Config/DeviceConfig.tpl b/gosa-plugins/goto/admin/ConfigManagement/goto/Config/DeviceConfig.tpl
new file mode 100644 (file)
index 0000000..0bb627e
--- /dev/null
@@ -0,0 +1,12 @@
+<h3>{t}Device Config{/t}</h3>
+{$navigationList}
+<button name='addSubModule'>{msgPool type='addButton'}</button>
+
+<hr>
+
+<b>{$containerName}</b>&nbsp;<i>({$containerDescription})</i>
+
+<p>
+{$template}
+</p>
+
diff --git a/gosa-plugins/goto/admin/ConfigManagement/goto/Config/TemplateEngine.tpl b/gosa-plugins/goto/admin/ConfigManagement/goto/Config/TemplateEngine.tpl
new file mode 100644 (file)
index 0000000..e60c5ae
--- /dev/null
@@ -0,0 +1,11 @@
+<h3>Bla</h3>
+
+{$template}
+
+<hr>
+
+<div class='plugin-actions'>
+    <button name='saveItemEdit'>{msgPool type=okButton}</button>
+    <button name='cancelItemEdit'>{msgPool type=cancelButton}</button>
+</div>
+
diff --git a/gosa-plugins/goto/admin/ConfigManagement/goto/Config/TemplateWidget_textEditor.tpl b/gosa-plugins/goto/admin/ConfigManagement/goto/Config/TemplateWidget_textEditor.tpl
new file mode 100644 (file)
index 0000000..4427b4a
--- /dev/null
@@ -0,0 +1,12 @@
+{if $write_protect}
+  {t}The text is write protected due to its encoding. Editing may break it!{/t}
+  <br>
+  <button type='submit' name='editAnyway'>{t}Edit anyway{/t}</button>
+{/if}
+<textarea {if $write_protect} disabled {/if} {if !$write_protect} name="{$postName}" {/if}
+    style="width:100%;height:300px;" id="{$postName}"
+    rows="20" cols="120">{$value}</textarea>
+<div>
+  <input type="file" name="ImportFile">&nbsp;
+  <button type='submit' name='ImportUpload'>{t}Import text{/t}</button>
+</div>
diff --git a/gosa-plugins/goto/admin/ConfigManagement/goto/Config/failed.tpl b/gosa-plugins/goto/admin/ConfigManagement/goto/Config/failed.tpl
new file mode 100644 (file)
index 0000000..94a4eb2
--- /dev/null
@@ -0,0 +1,12 @@
+{if $rpcError}
+    <h3>{t}Error{/t}</h3>
+    {msgPool type=rpcError p1=$error}
+    <button name='retryInit'>{t}Retry{/t}</button>
+{elseif $initFailed}
+    <h3>{t}Communication failed{/t}</h3>
+    {msgPool type=rpcError p1=$error}
+    <button name='retryInit'>{t}Retry{/t}</button>
+{elseif $invalidInstallMethod}
+    <h3>{t}Configuration error{/t}</h3>
+    {msgPool type=rpcError p1=$error}
+{/if}
diff --git a/gosa-plugins/goto/admin/ConfigManagement/goto/Config/puppet.tpl b/gosa-plugins/goto/admin/ConfigManagement/goto/Config/puppet.tpl
new file mode 100644 (file)
index 0000000..8b8d95b
--- /dev/null
@@ -0,0 +1,39 @@
+{if $type == 'PuppetModule'}
+    <table width="100%">
+        <tr>
+            <td style="width:50%; vertical-align: top;">
+                <table>
+                    <tr>
+                        <td>{$nameName}</td>
+                        <td>{$name}</td>
+                    </tr>
+                    <tr>
+                        <td>{$descriptionName}</td>
+                        <td>{$description}</td>
+                    </tr>
+                    <tr>
+                        <td>{$versionName}</td>
+                        <td>{$version}</td>
+                    </tr>
+                </table>
+            </td>
+            <td style="width:50%; vertical-align: top;">
+                {$dependencyName}:<br>
+                {$dependency}
+            </td>
+        </tr>
+    </table>
+{/if}
+{if $type == 'PuppetTemplate'}
+    <table>
+        <tr>
+            <td>{$nameName}</td>
+            <td>{$name}</td>
+        </tr>
+        <tr>
+            <td>{$dataName}</td>
+            <td>{$data}</td>
+        </tr>
+    </table>
+    <input type='submit'>    
+{/if}