mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
* godmode/snmpconsole/snmp_alert.php, godmode/servers/manage_recontask_form.php, include/functions_filemanager.php, include/functions_networkmap.php, include/constants.php, include/graphs/functions_gd.php, include/graphs/functions_pchart.php, operation/events/events_list.php, operation/agentes/graphs.php, operation/agentes/networkmap.php, operation/agentes/stat_win.php, operation/agentes/estado_ultimopaquete.php, operation/agentes/networkmap.topology.php, operation/agentes/networkmap.groups.php, operation/gis_maps/render_view.php: cleaned source code style and change magic numbers for time constants. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6769 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f078f74d2a
commit
f704670749
@ -1,3 +1,18 @@
|
||||
2012-07-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/snmpconsole/snmp_alert.php,
|
||||
godmode/servers/manage_recontask_form.php,
|
||||
include/functions_filemanager.php, include/functions_networkmap.php,
|
||||
include/constants.php, include/graphs/functions_gd.php,
|
||||
include/graphs/functions_pchart.php,
|
||||
operation/events/events_list.php, operation/agentes/graphs.php,
|
||||
operation/agentes/networkmap.php, operation/agentes/stat_win.php,
|
||||
operation/agentes/estado_ultimopaquete.php,
|
||||
operation/agentes/networkmap.topology.php,
|
||||
operation/agentes/networkmap.groups.php,
|
||||
operation/gis_maps/render_view.php: cleaned source code style and
|
||||
change magic numbers for time constants.
|
||||
|
||||
2012-07-13 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* pandoradb_data.sql: Fixed missed column name change
|
||||
|
@ -172,15 +172,15 @@ $table->data[3][1] = html_print_input_text ('network', $network, '', 25, 0, true
|
||||
// Interval
|
||||
$values = array ();
|
||||
$values[0] = __('Manual');
|
||||
$values[3600] = __('%d hour', 1);
|
||||
$values[7200] = __('%d hours', 2);
|
||||
$values[21600] = __('%d hours', 6);
|
||||
$values[43200] = __('%d hours', 12);
|
||||
$values[86400] = __('%d day', 1);
|
||||
$values[432000] = __('%d days', 5);
|
||||
$values[604800] = __('%d week', 1);
|
||||
$values[1209600] = __('%d weeks', 2);
|
||||
$values[2592000] = __('%d month', 1);
|
||||
$values[SECONDS_1HOUR] = __('%d hour', 1);
|
||||
$values[SECONDS_2HOUR] = __('%d hours', 2);
|
||||
$values[SECONDS_6HOURS] = __('%d hours', 6);
|
||||
$values[SECONDS_12HOURS] = __('%d hours', 12);
|
||||
$values[SECONDS_1DAY] = __('%d day', 1);
|
||||
$values[SECONDS_5DAY] = __('%d days', 5);
|
||||
$values[SECONDS_1WEEK] = __('%d week', 1);
|
||||
$values[SECONDS_2WEEK] = __('%d weeks', 2);
|
||||
$values[SECONDS_1MONTH] = __('%d month', 1);
|
||||
|
||||
$table->data[4][0] = "<b>".__('Interval');
|
||||
$table->data[4][1] = html_print_select ($values, "interval", $interval, '', '', '', true);
|
||||
|
@ -27,11 +27,16 @@ if (! check_acl ($config['id_user'], 0, "LW")) {
|
||||
// =============
|
||||
|
||||
if (isset ($_GET["update_alert"]) && $_GET["update_alert"] == "-1") {
|
||||
ui_print_page_header (__('SNMP Console')." » ".__('Create alert'), "images/computer_error.png", false, "snmp_alert", true);
|
||||
} else if (isset ($_GET["update_alert"]) && $_GET["update_alert"] != "-1") {
|
||||
ui_print_page_header (__('SNMP Console')." » ".__('Update alert'), "images/computer_error.png", false, "snmp_alert", true);
|
||||
} else if (isset ($_GET["submit"])) {
|
||||
ui_print_page_header (__('SNMP Console')." » ".__('Update alert'), "images/computer_error.png", false, "snmp_alert", true);
|
||||
ui_print_page_header (__('SNMP Console')." » ".__('Create alert'),
|
||||
"images/computer_error.png", false, "snmp_alert", true);
|
||||
}
|
||||
else if (isset ($_GET["update_alert"]) && $_GET["update_alert"] != "-1") {
|
||||
ui_print_page_header (__('SNMP Console')." » ".__('Update alert'),
|
||||
"images/computer_error.png", false, "snmp_alert", true);
|
||||
}
|
||||
else if (isset ($_GET["submit"])) {
|
||||
ui_print_page_header (__('SNMP Console')." » ".__('Update alert'),
|
||||
"images/computer_error.png", false, "snmp_alert", true);
|
||||
$id_as = (int) get_parameter_get ("submit", -1);
|
||||
$source_ip = (string) get_parameter_post ("source_ip");
|
||||
$alert_type = (int) get_parameter_post ("alert_type"); //Event, e-mail
|
||||
@ -93,7 +98,8 @@ if (isset ($_GET["update_alert"]) && $_GET["update_alert"] == "-1") {
|
||||
echo '<h3 class="suc">'.__('Successfully created').'</h3>';
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$sql = sprintf ("UPDATE talert_snmp SET
|
||||
priority = %d, id_alert = %d, al_field1 = '%s', al_field2 = '%s', al_field3 = '%s', description = '%s', agent = '%s', custom_oid = '%s',
|
||||
oid = '%s', time_threshold = %d, max_alerts = %d, min_alerts = %d, _snmp_f1_ = '%s', _snmp_f2_ = '%s', _snmp_f3_ = '%s', _snmp_f4_ = '%s',
|
||||
@ -108,13 +114,14 @@ if (isset ($_GET["update_alert"]) && $_GET["update_alert"] == "-1") {
|
||||
if (!$result) {
|
||||
db_pandora_audit("SNMP management", "Fail try to update snmp alert #$id_as");
|
||||
echo '<h3 class="error">'.__('There was a problem updating the alert').'</h3>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
db_pandora_audit("SNMP management", "Update snmp alert #$id_as");
|
||||
echo '<h3 class="suc">'.__('Successfully updated').'</h3>';
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ui_print_page_header (__('SNMP Console')." » ".__('Alert overview'), "images/computer_error.png", false, "snmp_alert", true);
|
||||
}
|
||||
|
||||
@ -144,7 +151,8 @@ if ((isset ($_GET["update_alert"])) && ($_GET["update_alert"] != -1)) {
|
||||
$custom_oid_data_6 = $alert["_snmp_f6_"];
|
||||
$trap_type = $alert["trap_type"];
|
||||
$single_value = $alert["single_value"];
|
||||
} elseif (isset ($_GET["update_alert"])) {
|
||||
}
|
||||
elseif (isset ($_GET["update_alert"])) {
|
||||
// Variable init
|
||||
$id_as = -1;
|
||||
$source_ip = "";
|
||||
@ -323,16 +331,16 @@ if (isset ($_GET["update_alert"])) {
|
||||
|
||||
$fields = array ();
|
||||
$fields[$time_threshold] = human_time_description_raw ($time_threshold);
|
||||
$fields[300] = human_time_description_raw (300);
|
||||
$fields[600] = human_time_description_raw (600);
|
||||
$fields[900] = human_time_description_raw (900);
|
||||
$fields[1800] = human_time_description_raw (1800);
|
||||
$fields[3600] = human_time_description_raw (3600);
|
||||
$fields[7200] = human_time_description_raw (7200);
|
||||
$fields[18000] = human_time_description_raw (18000);
|
||||
$fields[43200] = human_time_description_raw (43200);
|
||||
$fields[86400] = human_time_description_raw (86400);
|
||||
$fields[604800] = human_time_description_raw (604800);
|
||||
$fields[SECONDS_5MINUTES] = human_time_description_raw (SECONDS_5MINUTES);
|
||||
$fields[SECONDS_10MINUTES] = human_time_description_raw (SECONDS_10MINUTES);
|
||||
$fields[SECONDS_15MINUTES] = human_time_description_raw (SECONDS_15MINUTES);
|
||||
$fields[SECONDS_30MINUTES] = human_time_description_raw (SECONDS_30MINUTES);
|
||||
$fields[SECONDS_1HOUR] = human_time_description_raw (SECONDS_1HOUR);
|
||||
$fields[SECONDS_2HOUR] = human_time_description_raw (SECONDS_2HOUR);
|
||||
$fields[SECONDS_5HOUR] = human_time_description_raw (SECONDS_5HOUR);
|
||||
$fields[SECONDS_12HOURS] = human_time_description_raw (SECONDS_12HOURS);
|
||||
$fields[SECONDS_1DAY] = human_time_description_raw (SECONDS_1DAY);
|
||||
$fields[SECONDS_1WEEK] = human_time_description_raw (SECONDS_1WEEK);
|
||||
$fields[-1] = __('Other value');
|
||||
|
||||
html_print_select ($fields, "time_threshold", $time_threshold, '', '', '0', false, false, false, '" style="margin-right:60px');
|
||||
@ -377,13 +385,14 @@ if (isset ($_GET["update_alert"])) {
|
||||
echo '<tr><td></td><td align="right">';
|
||||
if ($id_as > 0) {
|
||||
html_print_submit_button (__('Update'), "submit", false, 'class="sub upd"', false);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
html_print_submit_button (__('Create'), "submit", false, 'class="sub wand"', false);
|
||||
}
|
||||
echo '</td></tr></table>';
|
||||
echo "</table>";
|
||||
} else {
|
||||
|
||||
}
|
||||
else {
|
||||
require_once ('include/functions_alerts.php');
|
||||
|
||||
//Overview
|
||||
@ -442,7 +451,8 @@ if (isset ($_GET["update_alert"])) {
|
||||
|
||||
if (($row["last_fired"] != "1970-01-01 00:00:00") and ($row["last_fired"] != "01-01-1970 00:00:00")) {
|
||||
$data[6] = ui_print_timestamp($row["last_fired"], true);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$data[6] = __('Never');
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ define ('ERR_CONNECTION', -80000);
|
||||
|
||||
/* Seconds in a time unit constants */
|
||||
define('SECONDS_1MINUTE', 60);
|
||||
define('SECONDS_2MINUTES', 120);
|
||||
define('SECONDS_5MINUTES', 300);
|
||||
define('SECONDS_10MINUTES', 600);
|
||||
define('SECONDS_15MINUTES', 900);
|
||||
|
@ -672,7 +672,8 @@ function filemanager_box_upload_file_complex($real_directory, $relative_director
|
||||
echo '<p>';
|
||||
echo __('Please check that current directory has write rights for HTTP server');
|
||||
echo '</p>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$table->data[1][0] = __('Upload') . ui_print_help_tip (__("The zip upload in this dir, easy to upload multiple files."), true);
|
||||
$table->data[1][1] = html_print_input_file ('file', true, false);
|
||||
$table->data[1][2] = html_print_radio_button('zip_or_file', 'zip', __('Multiple files zipped'), false, true);
|
||||
@ -709,7 +710,8 @@ function filemanager_box_upload_file_explorer($real_directory, $relative_directo
|
||||
echo '<p>';
|
||||
echo __('Please check that current directory has write rights for HTTP server');
|
||||
echo '</p>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$table->data[1][0] = __('Upload file');
|
||||
$table->data[1][1] = html_print_input_file ('file', true, false);
|
||||
$table->data[1][2] = html_print_submit_button (__('Go'), 'go', false,
|
||||
@ -744,7 +746,8 @@ function filemanager_box_upload_zip_explorer($real_directory, $relative_director
|
||||
echo '<p>';
|
||||
echo __('Please check that current directory has write rights for HTTP server');
|
||||
echo '</p>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$table->data[1][0] = __('Upload zip file: ') . ui_print_help_tip (__("The zip upload in this dir, easy to upload multiple files."), true);
|
||||
$table->data[1][1] = html_print_input_file ('file', true, false);
|
||||
$table->data[1][2] = html_print_submit_button (__('Go'), 'go', false,
|
||||
@ -779,7 +782,8 @@ function filemanager_box_create_text_explorer($real_directory, $relative_directo
|
||||
echo '<p>';
|
||||
echo __('Please check that current directory has write rights for HTTP server');
|
||||
echo '</p>';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$table->data[1][0] = __('Create text file: ');
|
||||
$table->data[1][1] = html_print_input_text('name_file', '', '', 30, 50, true);
|
||||
$table->data[1][2] = html_print_submit_button (__('Create'), 'create', false,
|
||||
@ -891,11 +895,14 @@ function filemanager_get_file_info ($filepath) {
|
||||
$info['mime'] = MIME_DIR;
|
||||
$info['is_dir'] = true;
|
||||
$info['size'] = 0;
|
||||
} else if (strpos ($info['mime_extend'], 'image') !== false) {
|
||||
}
|
||||
else if (strpos ($info['mime_extend'], 'image') !== false) {
|
||||
$info['mime'] = MIME_IMAGE;
|
||||
} else if (in_array ($info['mime_extend'], $zip_mimes)) {
|
||||
}
|
||||
else if (in_array ($info['mime_extend'], $zip_mimes)) {
|
||||
$info['mime'] = MIME_ZIP;
|
||||
} else if (strpos ($info['mime_extend'], 'text') !== false) {
|
||||
}
|
||||
else if (strpos ($info['mime_extend'], 'text') !== false) {
|
||||
$info['mime'] = MIME_TEXT;
|
||||
}
|
||||
|
||||
@ -921,7 +928,8 @@ function filemanager_list_dir ($dirpath) {
|
||||
$info = filemanager_get_file_info ($dirpath.'/'.$file);
|
||||
if ($info['is_dir']) {
|
||||
$dirs[$file] = $info;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$files[$file] = $info;
|
||||
}
|
||||
}
|
||||
|
@ -397,8 +397,6 @@ function gd_progress_bar ($width, $height, $progress, $title, $font, $out_of_lim
|
||||
|
||||
imagePNG($image);
|
||||
imagedestroy($image);
|
||||
|
||||
|
||||
}
|
||||
|
||||
function ImageRectangleWithRoundedCorners(&$im, $x1, $y1, $x2, $y2, $radius, $color)
|
||||
|
@ -461,15 +461,19 @@ foreach ($modules as $module) {
|
||||
echo "<td class=".$tdcolor." width='78'>";
|
||||
$graph_label = io_safe_output($module["nombre"]);
|
||||
|
||||
echo "<a href='javascript:winopeng(\"operation/agentes/stat_win.php?type=$graph_type&period=2419200&id=".$module["id_agente_modulo"]."&label=".base64_encode($graph_label)."&refresh=180000\", \"month_".$win_handle."\")'>" . html_print_image('images/grafica_m.png' , true, array("border" => '0', "alt" => '')) . "</a> ";
|
||||
echo "<a href='javascript:" .
|
||||
"winopeng(\"operation/agentes/stat_win.php?type=$graph_type&period=" . (28 * SECONDS_1DAY) . "&id=".$module["id_agente_modulo"]."&label=".base64_encode($graph_label)."&refresh=180000\", \"month_".$win_handle."\")'>" . html_print_image('images/grafica_m.png' , true, array("border" => '0', "alt" => '')) . "</a> ";
|
||||
|
||||
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=604800&id=".$module["id_agente_modulo"]."&label=".base64_encode($graph_label)."&refresh=6000','week_".$win_handle."')";
|
||||
$link ="winopeng(" .
|
||||
"'operation/agentes/stat_win.php?type=$graph_type&period=" . SECONDS_1WEEK . "&id=".$module["id_agente_modulo"]."&label=".base64_encode($graph_label)."&refresh=6000','week_".$win_handle."')";
|
||||
echo '<a href="javascript:'.$link.'">' . html_print_image("images/grafica_w.png", true, array("border" => '0', "alt" => '')) . '</a> ';
|
||||
|
||||
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=86400&id=".$module["id_agente_modulo"]."&label=".base64_encode($graph_label)."&refresh=600','day_".$win_handle."')";
|
||||
$link ="winopeng(" .
|
||||
"'operation/agentes/stat_win.php?type=$graph_type&period=" . SECONDS_1DAY . "&id=".$module["id_agente_modulo"]."&label=".base64_encode($graph_label)."&refresh=600','day_".$win_handle."')";
|
||||
echo '<a href="javascript:'.$link.'">' . html_print_image("images/grafica_d.png", true, array("border" => '0', "alt" => '')) . '</a> ';
|
||||
|
||||
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=3600&id=".$module["id_agente_modulo"]."&label=".base64_encode($graph_label)."&refresh=60','hour_".$win_handle."')";
|
||||
$link ="winopeng(" .
|
||||
"'operation/agentes/stat_win.php?type=$graph_type&period=" . SECONDS_1HOUR . "&id=".$module["id_agente_modulo"]."&label=".base64_encode($graph_label)."&refresh=60','hour_".$win_handle."')";
|
||||
echo '<a href="javascript:'.$link.'">' . html_print_image("images/grafica_h.png", true, array("border" => '0', "alt" => "")) . '</a>';
|
||||
}
|
||||
|
||||
|
@ -27,10 +27,9 @@ if (! check_acl ($config['id_user'], $id_grupo, "AR")) {
|
||||
|
||||
require_once ($config["homedir"] . '/include/functions_graph.php');
|
||||
|
||||
$period = get_parameter ( "period", 3600);
|
||||
$draw_alerts = get_parameter("draw_alerts", 0);
|
||||
$avg_only = get_parameter ("avg_only", 1);
|
||||
$period = get_parameter ("period", 3600);
|
||||
$period = get_parameter ("period", SECONDS_1HOUR);
|
||||
$width = get_parameter ("width", 555);
|
||||
$height = get_parameter ("height", 245);
|
||||
$label = get_parameter ("label", "");
|
||||
|
@ -61,11 +61,13 @@ $filename_dot .= "_".$id_networkmap.".dot";
|
||||
|
||||
if ($regen != 1 && file_exists ($filename_img) && filemtime ($filename_img) > get_system_time () - 300) {
|
||||
$result = true;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$fh = @fopen ($filename_dot, 'w');
|
||||
if ($fh === false) {
|
||||
$result = false;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
fwrite ($fh, $graph);
|
||||
$cmd = "$filter -Tcmapx -o".$filename_map." -Tpng -o".$filename_img." ".$filename_dot;
|
||||
$result = system ($cmd);
|
||||
@ -81,18 +83,20 @@ if ($result !== false) {
|
||||
echo "<div class='warn'>Apparently something went wrong reading the output.</div>";
|
||||
echo "<br />Is ".$config["attachment_store"]." readable by the webserver process?";
|
||||
echo "<br /><br /> Is ".$filter." (usually part of GraphViz) and echo installed and able to be executed by the webserver process?";
|
||||
|
||||
return;
|
||||
}
|
||||
html_print_image ($filename_img, false, array ("alt" => __('Network map'), "usemap" => "#networkmap"));
|
||||
require ($filename_map);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ui_print_error_message (__('Map could not be generated'));
|
||||
echo $result;
|
||||
echo "<div class='warn'>Apparently something went wrong executing the command or writing the output.</div>";
|
||||
echo "<br />Is ".$filter." (usually part of GraphViz) and echo installed and able to be executed by the webserver process?";
|
||||
echo "<br /><br /> Is your webserver restricted from executing command line tools through the <code>system()</code> call (PHP Safe Mode or SELinux)";
|
||||
echo "<br /><br /> Is ".$config["attachment_store"]." writeable by the webserver process? To change this do the following (POSIX-based systems): chown <apache user> ".$config["attachment_store"];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
@ -170,8 +170,8 @@ if ($pure == 1) {
|
||||
$buttons['screen'] = array('active' => false,
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&tab='.$activeTab.'">' .
|
||||
html_print_image("images/normalscreen.png", true, array ('title' => __('Normal screen'))) .'</a>');
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$buttons['screen'] = array('active' => false,
|
||||
'text' => '<a href="index.php?sec=network&sec2=operation/agentes/networkmap&pure=1&tab='.$activeTab.'">' .
|
||||
html_print_image("images/fullscreen.png", true, array ('title' => __('Full screen'))) .'</a>');
|
||||
|
@ -66,7 +66,8 @@ else {
|
||||
$fh = @fopen ($filename_dot, 'w');
|
||||
if ($fh === false) {
|
||||
$result = false;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
fwrite ($fh, $graph);
|
||||
$cmd = "$filter -Tcmapx -o".$filename_map." -Tpng -o".$filename_img." ".$filename_dot;
|
||||
$result = system ($cmd);
|
||||
|
@ -167,7 +167,7 @@ if (!isset($_GET["period"]) OR (!isset($_GET["id"]))) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$period = get_parameter ( "period", 3600);
|
||||
$period = get_parameter ( "period", SECONDS_1HOUR);
|
||||
$draw_alerts = get_parameter("draw_alerts", 0);
|
||||
$avg_only = get_parameter ("avg_only", 1);
|
||||
$show_other = (bool)get_parameter('show_other', false);
|
||||
|
@ -220,7 +220,7 @@ if ($id_user_ack != "0")
|
||||
|
||||
|
||||
if ($event_view_hr > 0) {
|
||||
$unixtime = get_system_time () - ($event_view_hr * 3600); //Put hours in seconds
|
||||
$unixtime = get_system_time () - ($event_view_hr * SECONDS_1HOUR);
|
||||
$sql_post .= " AND (utimestamp > ".$unixtime . " OR estado = 2)";
|
||||
}
|
||||
|
||||
|
@ -101,15 +101,15 @@ if (check_acl ($config["id_user"], $map['group_id'], "IW"))
|
||||
$buttonsString = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=3">' . html_print_image("images/bricks.png", true, array("class" => "top", "border" => '0')) . ' Agent - test_gis1</a></li></ul></div><div id="menu_tab"><ul class="mn"><li class="nomn"><a href="index.php?sec=estado&sec2=godmode/agentes/configurar_agente&id_agente=3">' . html_print_image("images/setup.png", true, array("class" => "top", "title" => "Manage", "border" => "0", "width" => "16", "title" => "Manage")) . ' </a></li><li class="nomn_high"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=3">' . html_print_image("images/monitor.png", true, array("class" => "top", "title" => "Main", "border" => "0")) . ' </a></li><li class="nomn"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=3&tab=data">' . html_print_image("images/lightbulb.png", true, array("class" => "top", "title" => "Data", "border" => "0")) . ' </a></li><li class="nomn"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=3&tab=alert">' . html_print_image("images/bell.png", true, array("class" => "top", "title" => "Alerts", "border" => "0")) . ' </a></li><li class="nomn"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=sla&id_agente=3">' . html_print_image("images/images.png", true, array("class" => "top", "title" => "S.L.A.", "border" => "0")) . ' </a></li><li class="nomn"><a href="index.php?sec=estado&sec2=operation/agentes/estado_agente&group_id=2">' . html_print_image("images/agents_group.png", true, array("class" => "top", "title" => "Group", "border" => "0")) . ' </a></li><li class="nomn"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente=3">' . html_print_image("images/page_white_text.png", true, array("class" => "top", "title" => "Inventory", "border" => "0", "width" => "16")) . ' </a></li><li class="nomn"><a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=gis&id_agente=3">' . html_print_image("images/world.png", array("class" => "top", "title" => "GIS data", "border" => "0")) . ' </a>';
|
||||
|
||||
$times = array(
|
||||
5 => 5 . ' ' . __('seconds'),
|
||||
10 => 10 . ' ' . __('seconds'),
|
||||
30 => 30 . ' ' . __('seconds'),
|
||||
60 => 1 . ' ' . __('minute'),
|
||||
120 => 2 . ' ' . __('minutes'),
|
||||
300 => 5 . ' ' . __('minutes'),
|
||||
600 => 10 . ' ' . __('minutes'),
|
||||
3600 => 1 . ' ' . __('hour'),
|
||||
7200 => 2 . ' ' . __('hours')
|
||||
5 => __('5 seconds'),
|
||||
10 => __('10 seconds'),
|
||||
30 => __('30 seconds'),
|
||||
SECONDS_1MINUTE => __('1 minute'),
|
||||
SECONDS_2MINUTE => __('2 minutes'),
|
||||
SECONDS_5MINUTES => __('5 minutes'),
|
||||
SECONDS_10MINUTES => __('10 minutes'),
|
||||
SECONDS_1HOUR => __('1 hour'),
|
||||
SECONDS_2HOUR => __('2 hours')
|
||||
);
|
||||
|
||||
$buttons[] = ' ' . __('Refresh: ') . html_print_select($times, 'refresh_time', 60, 'changeRefreshTime(this.value);', '', 0, true, false, false) . " ";
|
||||
@ -212,7 +212,6 @@ else {
|
||||
$("#map").css("height", new_height - 20);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user