Code

Added community flag to configuration. Closes: #237
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Oct 2007 09:09:49 +0000 (09:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Oct 2007 09:09:49 +0000 (09:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7675 594d385d-05f5-0310-b6e9-bd551577e9d8

contrib/gosa.conf
plugins/admin/systems/class_terminalInfo.inc

index 59ed6eef411cd916767d816a1cd9b303d4e8e310..c48dc3a32b3e1adaa6814cc839b42d02f2ed8813 100644 (file)
                <tab class="termstartup" name="Startup" />
                <tab class="termservice" name="Devices" />
                <tab class="printgeneric" name="Printer" />
-               <tab class="terminfo" name="Information" />
+               <tab class="terminfo" name="Information" 
+                       snmpcommunity="goto" />
                <tab class="glpiAccount" name="Inventory" />
        </termtabs>
 
 {else}
 <!--   <tab class="servdhcp" name="DHCP" /> -->
 {/if}
-               <tab class="terminfo" name="Information" />
+               <tab class="terminfo" name="Information" 
+                       snmpcommunity="goto" />
                <tab class="glpiAccount" name="Inventory" />
        </servtabs>
 
                <tab class="workstartup" name="Startup" />
                <tab class="workservice" name="Devices" />
                <tab class="printgeneric" name="Printer" />
-               <tab class="terminfo" name="Information" />
+               <tab class="terminfo" name="Information" 
+                       snmpcommunity="goto" />
 {if $cv.enableFAI_management}
            <tab class="faiSummaryTab" name="FAI summary" />
 {else}
index f233e746b38996e0087b940f07ecdf3628bfd8f2..f2678b4cc66994c7b337c850a564918746149260 100644 (file)
@@ -95,11 +95,10 @@ class terminfo extends plugin
         $display.= _("This is a virtual terminal which has no properties to show here.");
         $display.= "</b></div>";
       } else {
-        /* Get template object */
 
+        /* Get template object */
         $smarty->assign("staticAddress", "");
 
-
         /* Prevent undefined variable .... */ 
         $smarty->assign("load", progressbar(0,100,15,true));
         $smarty->assign("mem", progressbar(0,100,15,true));
@@ -115,7 +114,13 @@ class terminfo extends plugin
 
           /* Fill data if we have snmp */
           $host= $this->cn;
+
+          /* Use goto as snmp community or the configured value from the config */
           $community= 'goto';
+          $str = search_config($this->config->data['TABS'],"terminfo","SNMPCOMMUNITY");
+          if(!empty($str)){
+            $community = $str;
+          }
 
           /* Get memory informations */
           if(!is_callable("snmpget")){