Code

Updated listing of FAI classes
[gosa.git] / gosa-plugins / goto / admin / systems / goto / class_terminalInfo.inc
index ebab65764301186351f5f2717e25214c0dddebad..1736e2aa6e7edc2f05cce87f756b6d08ef4b08c4 100644 (file)
@@ -64,20 +64,22 @@ class terminfo extends plugin
 
     /* Do we represent a valid terminal? */
     if (!$this->is_account && $this->parent === NULL){
-      return("<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
+      return("<img alt=\"\" src=\"images/small-error.png\" align=middle>&nbsp;<b>".
         msgPool::noValidExtension(_("terminal"))."</b>");
     }
 
     $smarty= get_smarty();
     $display= "";
-    if(!is_callable("snmpget")){
-      msg_dialog::display(_("Configuration error"), msgPool::missingext("snmp"), ERROR_DIALOG);
+    $smarty->assign("ACL",TRUE);
+    if(!preg_match("/r/",$this->getacl(""))){
+      $smarty->assign("ACL",FALSE);
+    }elseif(!is_callable("snmpget")){
 
       $smarty->assign("load", progressbar(0,100,15,true));
       $smarty->assign("mem", progressbar(0,100,15,true));
       $smarty->assign("swap", progressbar(0,100,15,true));
       foreach(array("uptime", "sshd", "X", "saned", "artsd", "cupsd","status","ghNetNic", "ghIdeDev", "ghScsiDev","FloppyDevice", "CdromDevice","active") as $val){
-        $smarty->assign("$val", "<i>"._("unknown status")."</i>");
+        $smarty->assign("$val", "<i>"._("unknown status, SNMP support missing")."</i>");
       }
 
 
@@ -91,7 +93,6 @@ class terminfo extends plugin
       } else {
 
         /* Get template object */
-        $smarty->assign("staticAddress", "");
 
         /* Prevent undefined variable .... */ 
         $smarty->assign("load", progressbar(0,100,15,true));
@@ -240,6 +241,21 @@ class terminfo extends plugin
   {
   }
 
+
+  /* Return plugin informations for acl handling */
+  static function plInfo()
+  {
+    return (array(
+          "plShortName"   => _("System info"),
+          "plDescription" => _("System informations"),
+          "plSelfModify"  => FALSE,
+          "plDepends"     => array(),
+          "plPriority"    => 33,
+          "plSection"     => array("administration"),
+          "plCategory"    => array("workstation","server","terminal"),
+          "plProvidedAcls"=> array()
+            ));
+  }
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: