2012-07-10 Miguel de Dios <miguel.dedios@artica.es>

* extensions/agents_alerts.php, extensions/net_tools.php,
	extensions/ssh_gateway.php,
	extensions/update_manager/lib/libupdate_manager_components.php,
	extensions/update_manager/lib/libupdate_manager_updates.php,
	general/main_menu.php: cleaned source code style and added into some
	strings the call to translation.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6758 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-07-10 09:21:19 +00:00
parent f5ac7cc261
commit ae4a12872c
7 changed files with 188 additions and 185 deletions

View File

@ -1,3 +1,12 @@
2012-07-10 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_alerts.php, extensions/net_tools.php,
extensions/ssh_gateway.php,
extensions/update_manager/lib/libupdate_manager_components.php,
extensions/update_manager/lib/libupdate_manager_updates.php,
general/main_menu.php: cleaned source code style and added into some
strings the call to translation.
2012-07-09 Sergio Martin <sergio.martin@artica.es>
* operation/extensions.php

View File

@ -287,10 +287,12 @@ function print_alerts_summary_modal_window($id, $alerts) {
if ($alert["times_fired"] > 0) {
$status = STATUS_ALERT_FIRED;
$title = __('Alert fired').' '.$alert["times_fired"].' '.__('times');
} elseif ($alert["disabled"] > 0) {
}
elseif ($alert["disabled"] > 0) {
$status = STATUS_ALERT_DISABLED;
$title = __('Alert disabled');
} else {
}
else {
$status = STATUS_ALERT_NOT_FIRED;
$title = __('Alert not fired');
}
@ -317,7 +319,6 @@ ui_require_jquery_file('pandora');
<script type="text/javascript">
function show_alerts_details(id) {
$("#alerts_details_"+id).dialog({
resizable: true,
draggable: true,

View File

@ -84,9 +84,7 @@ function main_net_tools () {
echo system ("$traceroute $ip");
echo "</pre>";
}
break;
case 2:
$ping = whereis_the_command ('ping');
if (empty($ping)) {
@ -99,7 +97,6 @@ function main_net_tools () {
echo "</pre>";
}
break;
case 4:
$nmap = whereis_the_command ('nmap');
if (empty($nmap)) {
@ -112,7 +109,6 @@ function main_net_tools () {
echo "</pre>";
}
break;
case 5:
echo "<h3>".__("Domain and IP information for "). $ip. "</h3>";
@ -136,7 +132,6 @@ function main_net_tools () {
echo "</pre>";
}
break;
case 3:
echo "<h3>".__("SNMP information for "). $ip. "</h3>";
@ -145,11 +140,11 @@ function main_net_tools () {
ui_print_error_message(__('SNMPget executable does not exist.'));
}
else {
echo "<h4>Uptime</h4>";
echo "<h4>" . __("Uptime") . "</h4>";
echo "<pre>";
echo exec ("$snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.3.0 ");
echo "</pre>";
echo "<h4>Device info</h4>";
echo "<h4>" . __("Device info") . "</h4>";
echo "<pre>";
echo system ("$snmpget -Ounv -v1 -c $community $ip .1.3.6.1.2.1.1.1.0 ");
@ -174,5 +169,4 @@ function main_net_tools () {
echo "</div>";
}
?>

View File

@ -39,10 +39,8 @@ function ssh_gateway () {
$HOST = $ip;
if (($HOST == "") OR ($USER == "")) {
if ($COMMIT == 1) {
echo "<h3 class=error>".__("You need to specify a user and a host address")."</h3>";
}
echo "<form method=post>";
@ -55,7 +53,8 @@ function ssh_gateway () {
if ($MODE == "telnet") {
echo "<option>telnet";
echo "<option>ssh";
} else {
}
else {
echo "<option>ssh";
echo "<option>telnet";
}
@ -74,7 +73,5 @@ function ssh_gateway () {
echo "</iframe>";
}
}
?>

View File

@ -158,7 +158,8 @@ function um_db_create_update ($type, $component_name, $id_package, $update, $db_
/* Add relative path if has one */
if ($component->relative_path != '') {
$values['filename'] = $component->relative_path.$update->filename;
} else {
}
else {
$values['filename'] = $update->filename;
}
$values['data'] = um_file_uuencode ($filepath);
@ -187,10 +188,10 @@ function um_db_create_update ($type, $component_name, $id_package, $update, $db_
break;
case 'db_schema':
$values['data'] = um_data_encode($update->data);
break;
default:
return false;
break;
}
$result = db_process_sql_insert(DB_PREFIX.'tupdate', $values);

View File

@ -31,6 +31,7 @@ if (check_acl ($config['id_user'], 0, "AW") ||
check_acl ($config['id_user'], 0, "LW") ||
check_acl ($config['id_user'], 0, "IW") ||
check_acl ($config['id_user'], 0, "DW")) {
echo '<div class="tit bg3">:: '.__('Administration').' ::</div>';
}