X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-plugins%2Fgoto%2Fadmin%2Fsystems%2Fgoto%2Fclass_terminalInfo.inc;h=071c99bf6494f4a0a41536fdf23818535ef4299d;hb=07d2b897f8faafcfa0c0bdc5e5bc70a09dff566a;hp=0a21884d2b1fff0cb7cb66118d3c9ada49a7b0cb;hpb=a58a64a5ddcf918a3f5e3411e372d7d5d11a6a97;p=gosa.git diff --git a/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc b/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc index 0a21884d2..071c99bf6 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_terminalInfo.inc @@ -2,11 +2,6 @@ class terminfo extends plugin { - /* CLI vars */ - var $cli_summary= "Retrieve informations about terminals"; - var $cli_description= "Some longer text\nfor help"; - var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); - /* Generic terminal attributes */ var $ghCpuType= "-"; var $ghMemSize= "-"; @@ -69,15 +64,14 @@ class terminfo extends plugin /* Do we represent a valid terminal? */ if (!$this->is_account && $this->parent === NULL){ - echo "\"\" ". - _("This 'dn' has no terminal features.").""; - return; + return("\"\" ". + msgPool::noValidExtension(_("terminal")).""); } $smarty= get_smarty(); $display= ""; if(!is_callable("snmpget")){ - print_red(_("There is no php snmp module installed, can't gather any informations.")); + msg_dialog::display(_("Configuration error"), msgPool::missingext("snmp"), ERROR_DIALOG); $smarty->assign("load", progressbar(0,100,15,true)); $smarty->assign("mem", progressbar(0,100,15,true)); @@ -105,10 +99,7 @@ class terminfo extends plugin $smarty->assign("swap", progressbar(0,100,15,true)); /* Check if terminal is online */ - $query= "fping -q -r 1 -t 500 ".$this->cn; - exec ($query, $dummy, $retval); - - if ($retval == 0){ + if (gosaSupportDaemon::ping($this->macAddress)){ $smarty->assign("status", _("online")); $smarty->assign("active", "true"); @@ -117,7 +108,7 @@ class terminfo extends plugin /* Use 'goto' as snmp community or the configured value from the config */ $community= 'goto'; - $str = search_config($this->config->data['TABS'],"terminfo","SNMPCOMMUNITY"); + $str= $this->config->search("terminfo", "SNMPCOMMUNITY", array('tabs')); if(!empty($str)){ $community = $str; } @@ -227,7 +218,7 @@ class terminfo extends plugin $smarty->assign($val, $this->$val); } - $display= $smarty->fetch (get_template_path('info.tpl', TRUE)); + $display= $smarty->fetch (get_template_path('info.tpl', TRUE, dirname(__FILE__))); return ($display); }