Code

Fixed krb key plugin style
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Jun 2008 08:46:25 +0000 (08:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 5 Jun 2008 08:46:25 +0000 (08:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11232 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mit-krb5/admin/systems/services/kerberos/class_krb_host_keys.inc
gosa-plugins/mit-krb5/admin/systems/services/kerberos/krb_host_keys.tpl

index 62c96eeba1f5d97b0b37eb6ea811d546aec79697..575681a02b48921184c2d8fe032e338350a065e1 100644 (file)
@@ -78,6 +78,19 @@ class krb_host_keys extends plugin
     }
   }
 
+  /*! \brief  Reloads the list of available principals. 
+   */ 
+  public function reload_principals()
+  {
+    if($this->kerberos_support){
+      foreach($this->server_list as $mac => $data){
+        $principals = $this->pwd_handle->load_principals_for_server($mac);
+        $this->server_list[$mac]['PRINCIPALS'] = $principals;
+      }
+    }
+  }
+
 
   /*! \brief  Load/reload all key settings for the current host ($this->object).
               This reloads the list of all kerberos realms and which keys 
@@ -195,6 +208,7 @@ class krb_host_keys extends plugin
         /* The host name has changed, check if there are kerberos key which have to be updated 
          */
         $found = array();
+        $this->reload_principals();
         foreach($this->server_list as $server => $data){
           foreach($data['PRINCIPALS'] as $p_name){
 
@@ -309,6 +323,12 @@ class krb_host_keys extends plugin
         $this->init();
         break;
       }
+
+      /* Reload krb key list */
+      if(preg_match("/^reload_krb_keys/",$name)){
+        $this->init();
+        break;
+      }
     }  
   } 
 
index a9707c2e4ce56a88d5c27e21cd0d5246ea9d7106..2bc8890bc8c141bc0d0cbd80e57252f6535a4b31 100644 (file)
@@ -1,20 +1,31 @@
 {if !$is_service_key}
 <p class="seperator">&nbsp;</p>
 {/if}
-<h2><img class="center" alt="" src="images/lists/locked.png" align="middle">   {t}Host key{/t}</h2>
+<h2><img class="center" alt="" src="images/lists/locked.png" align="middle">   {t}Kerberos keys{/t}</h2>
+
+{t}Reload key list{/t} &nbsp;<input type='image' name='reload_krb_keys' src='images/lists/reload.png' alt='{t}Reload{/t}' class='center'>
+
+
+<br>
+<br>
+<b>{t}Realms{/t}</b>: &nbsp;
+<br>
 <table style="">
 {foreach from=$server_list item=item key=key}
        <tr>
-               <td style="padding-right:50px;">{$item.REALM}</td>
+               <td style="padding-right:100px;">{$item.REALM}</td>
                <td>
                        {if $item.PRESENT}
                                <img src='images/empty.png' class="center">
                                <input type='image' class='center' name='recreate_{$key}'
-                                       src='images/lists/reload.png'>
+                                       alt='{t}Recreate key{/t}' title='{t}Recreate key{/t}'
+                                       src='images/crossref.png'>
                                <input type='image' class='center' name='remove_{$key}'
+                                       alt='{t}Remove key{/t}' title='{t}Remove key{/t}'
                                        src='images/lists/trash.png'>
                        {else}
                                <input type='image' class='center' name='create_{$key}'
+                                       alt='{t}Create key{/t}' title='{t}Create key{/t}'
                                        src='images/lists/new.png'>
                                <img src='images/empty.png' class="center">
                                <img src='images/empty.png' class="center">
@@ -22,7 +33,7 @@
                </td>
        </tr>
        <tr>
-               <td><i>{t}Keys for this realm{/t}:</i></td>
+               <td><i>{t}Kerberos keys for this realm{/t}:</i></td>
                <td>{$item.USED}</td>
        </tr>
 {/foreach}