Code

rework of the nagios plugin and interface
authoropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Sep 2005 23:51:51 +0000 (23:51 +0000)
committeropensides <opensides@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 Sep 2005 23:51:51 +0000 (23:51 +0000)
corrected one type in class_mailAccount.inc

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1428 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/mail/class_mailAccount.inc
plugins/personal/nagios/class_nagiosAccount.inc
plugins/personal/nagios/nagios.tpl

index f931376497c9c963f0bfeccab889a3415c7af398..13bc4b0c9dcb0debd51588fbe24c88b6e0c594e8 100644 (file)
@@ -670,7 +670,7 @@ class mailAccount extends plugin
     /* Optionally execute a command after we're done */
     if ($this->initially_was_account == $this->is_account){
       if ($this->is_modified){
-        $this->handle_post_events("mofify");
+        $this->handle_post_events("modify");
       }
     } else {
       $this->handle_post_events("add");
index b9b1d850e81b873cf5e666f80db526adcbc0a9b5..02bda738c6fd203654d9fed027740e7f1c74476f 100644 (file)
@@ -107,9 +107,9 @@ class nagiosAccount extends plugin
          plugin::save();
 
     /* Adapt attributes if needed */
-    $method= new $this->method($this->config);
-    $id= $method->uattrib;
-    $method->fixAttributesOnStore($this);
+    //$method= new $this->method($this->config);
+    //$id= $method->uattrib;
+    //$method->fixAttributesOnStore($this);
                 
 
          /* Write back to ldap */
@@ -166,7 +166,7 @@ class nagiosAccount extends plugin
     show_ldap_error($ldap->get_error());
                         
     /* remove the entry from LDAP */
-    //unset ($this->attrs['uid']);
+    unset ($this->attrs['uid']);
                 
     /* Optionally execute a command after we're done */
     $this->handle_post_events('remove');
index 2b51f15f52e0cecc8473d47b250f918d549e6b0e..7bc1891deb489474872f930436b52ff19fda937c 100644 (file)
@@ -1,45 +1,57 @@
-
-
-<h2><input type="checkbox" name="nagiosContact" value="B" {$nagiosContact}>{t}Nagios Contact{/t}</h2>
-<table summary="" style="width:90%; vertical-align:top; text-align:left;" cellpadding=0 border=0>
-
-<tr><td>nagios alias</td><td><input  style="width:280px" type="textbox" name="NagiosAlias"  {$NagiosAliasACL} value="{$NagiosAlias}"></td></tr>
-
-<tr><td>nagios email</td><td><input style="width:280px" type="textbox" name="NagiosMail"  {$NagiosMailACL} value="{$NagiosMail}"></td></tr>
-
-<tr><td>nagios pager</td><td><input style="width:280px" type="textbox" name="NagiosPager"  {$NagiosPagerACL} value="{$NagiosPager}"></td></tr>
-<tr><td colspan=2><hr></td><td></tr>
-<tr><td>service_notification_period</td><td><input style="width:280px" type="textbox" name="ServiceNotificationPeriod"  {$ServiceNotificationPeriodACL} value="{$ServiceNotificationPeriod}"></td>
-
-<td>host_notification_options</td><td><input style="width:280px" type="textbox" name="HostNotificationOptions" {$HostNotificationOptionsACL} value="{$HostNotificationOptions}"></td></tr>
-
-<tr><td>service_notification_options</td><td><input style="width:280px" type="textbox" name="ServiceNotificationOptions" {$ServiceNotificationOptions} value="{$ServiceNotificationPeriod}"></td>
-
-<td>host_notification_period</td><td><input style="width:280px" type="textbox" name="HostNotificationPeriod"  {$HostNotificationPeriodACL} value="{$HostNotificationPeriod}"></td></tr>
-
-<tr><td>service_notification_commands</td><td><input style="width:280px" type="textbox" name="ServiceNotificationCommands" {$ServiceNotificationCommands} value="{$ServiceNotificationCommands}"></td>
-
-<td>host_notification_commands</td><td><input style="width:280px" type="textbox" name="HostNotificationCommands" {$HostNotificationCommandsACL} value="{$HostNotificationCommands}"></td></tr>
+<table summary="" style="width:100%; vertical-align:top; text-align:left;" cellpadding=0 border=0>
+ <tr>
+  <td style="width:50%; vertical-align:top;">
+   <h2><img alt="" align="middle" src="images/rightarrow.png"> {t}Nagios Account{/t}</h2>
+   <table summary="">
+    <tr>
+     <td><LABEL for="NagiosAlias">{t}alias{/t}</LABEL>{$must}</td>
+     <td><input id="NagiosAlias" name="NagiosAlias" size=25 maxlength=65 {$NagiosAliasACL} value="{$NagiosAlias}"></td>
+    </tr>
+
+    <tr>
+     <td><LABEL for="NagiosEmail">{t}email{/t}</LABEL>{$must}</td>
+     <td><input id="NagiosEmail" name="NagiosEmail" size=25 maxlength=65 {$NagiosEmailACL} value="{$NagiosEmail}"></td>
+    </tr>
+
+    <tr>
+     <td><LABEL for="NagiosPager">{t}pager{/t}</LABEL></td>
+     <td><input id="NagiosPager" name="NagiosPager" size=25 maxlength=65 {$NagiosPagerACL} value="{$NagiosPager}"></td>
+    </tr>
+
+    <tr>
+     <td><LABEL for="ServiceNotificationPeriod">{t}Service Notification Period{/t}</LABEL>{$must}</td>
+     <td><input id="ServiceNotificationPeriod" name="ServiceNotificationPeriod" size=25 maxlength=65 {$ServiceNotificationPeriodACL} value="{$ServiceNotificationPeriod}"></td>
+    </tr>
+
+    <tr>
+     <td><LABEL for="ServiceNotificationOptions">{t}Service Notification Options{/t}</LABEL>{$must}</td>
+     <td><input id="ServiceNotificationOptions" name="ServiceNotificationOptions" size=25 maxlength=65 {$ServiceNotificationOptionsACL} value="{$ServiceNotificationOptions}"></td>
+    </tr>
+
+    <tr>
+     <td><LABEL for="ServiceNotificationCommands">{t}Service Notification Commands{/t}</LABEL>{$must}</td>
+     <td><input id="ServiceNotificationCommands" name="ServiceNotificationCommands" size=25 maxlength=65 {$ServiceNotificationCommandsACL} value="{$ServiceNotificationCommands}"></td>
+    </tr>
+
+    <tr>
+     <td><LABEL for="HostNotificationPeriod">{t}Host Notification Period{/t}</LABEL>{$must}</td>
+     <td><input id="HostNotificationPeriod" name="HostNotificationPeriod" size=25 maxlength=65 {$HostNotificationPeriodACL} value="{$HostNotificationPeriod}"></td>
+    </tr>
+
+    <tr>
+     <td><LABEL for="HostNotificationOptions">{t}Host Notification Options{/t}</LABEL>{$must}</td>
+     <td><input id="HostNotificationOptions" name="HostNotificationOptions" size=25 maxlength=65 {$HostNotificationOptionsACL} value="{$HostNotificationOptions}"></td>
+    </tr>
+
+    <tr>
+     <td><LABEL for="HostNotificationCommands">{t}Host Notification Period{/t}</LABEL>{$must}</td>
+     <td><input id="HostNotificationCommands" name="HostNotificationCommands" size=25 maxlength=65 {$HostNotificationCommandsACL} value="{$HostNotificationCommands}"></td>
+    </tr>
+       </table>
+  
 
 </table>
 
-<hr>
-<h2><input type="checkbox" name="nagiosAuth" value="B "{$nagiosAuth} >{t}Nagios authorisation{/t}</h2>
-
-<input type="checkbox" name="AuthorizedSystemInformation" {$AuthorizedSystemInformationACL} value="{$AuthorizedSystemInformation}" {$AuthorizedSystemInformation}>authorized_for_system_information<br />
-
-<input type="checkbox" name="AuthorizedConfigurationInformation" {$AuthorizedConfigurationInformationACL} value="{$AuthorizedConfigurationInformation}" {$AuthorizedConfigurationInformation}>authorized_for_configuration_information<br />
-
-<input type="checkbox" name="AuthorizedSystemCommands" {$AuthorizedSystemCommandsACL} value="{$AuthorizedSystemCommands}" {$AuthorizedSystemCommands}>authorized_for_system_commands<br />
-
-<input type="checkbox" name="AuthorizedAllServices" {$AuthorizedAllServicesACL} value="{$AuthorizedAllServices}" {$AuthorizedAllServices}>authorized_for_all_services<br />
-
-<input type="checkbox" name="AuthorizedAllHosts" {$AuthorizedAllHostsACL} value="{$AuthorizedAllHosts}" {$AuthorizedAllHosts}>authorized_for_all_hosts<br />
-
-<input type="checkbox" name="AuthorizedAllServiceCommands" {$AuthorizedAllServiceCommandsACL} value="{$AuthorizedAllServiceCommands}" {$AuthorizedAllServiceCommands}>authorized_for_all_service_commands<br />
-
-<input type="checkbox" name="AuthorizedAllHostCommands" {$AuthorizedAllHostCommandsACL} value="{$AuthorizedAllHostCommands}" {$AuthorizedAllHostCommands}>authorized_for_all_host_commands<br />
-
 <input type="hidden" name="nagiosTab" value="nagiosTab">
 
 <!-- Place cursor -->