Code

Added snmp community to config file Closes: #237
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Oct 2007 09:06:15 +0000 (09:06 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Oct 2007 09:06:15 +0000 (09:06 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7674 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index c5071848194a8b5cd87062fa6a83e33f427c66cd..b5697afd9ea8de7f3654822ee6795c1379768b63 100644 (file)
                <tab class="termgeneric" name="Generic" />
                <tab class="termstartup" name="Startup" />
                <tab class="termservice" name="Devices" />
-               <tab class="terminfo" name="Information" />
+               <tab class="terminfo" name="Information" 
+                       snmpcommunity="goto" />
                <tab class="glpiAccount" name="Inventory" />
                <tab class="reference" name="References" />
        </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" />
                <tab class="reference" name="References" />
        </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 9f63a771a4415172a684add6b3e441dc362560cd..989a5e34c59c665217c53433f036f08f5ef52f8e 100644 (file)
@@ -84,11 +84,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));
@@ -104,7 +103,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")){