Added code to separate networkmap manage and networkmap view
This commit is contained in:
parent
60757b0ad6
commit
7b208f6209
|
@ -193,32 +193,51 @@ config_check();
|
||||||
|
|
||||||
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '" . $config['id_user'] . "'");
|
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '" . $config['id_user'] . "'");
|
||||||
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
|
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
|
||||||
|
|
||||||
if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
|
if ($autorefresh_list !== null && array_search($_GET['sec2'], $autorefresh_list) !== false) {
|
||||||
$autorefresh_img = html_print_image("images/header_refresh.png", true, array("class" => 'bot', "alt" => 'lightning', 'title' => __('Configure autorefresh')));
|
$do_refresh = true;
|
||||||
|
if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
|
||||||
if ($_GET['refr']) {
|
if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
|
||||||
$autorefresh_txt .= ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
$do_refresh = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($do_refresh) {
|
||||||
|
$autorefresh_img = html_print_image("images/header_refresh.png", true, array("class" => 'bot', "alt" => 'lightning', 'title' => __('Configure autorefresh')));
|
||||||
|
|
||||||
$ignored_params['refr'] = '';
|
if ($_GET['refr']) {
|
||||||
$values = get_refresh_time_array();
|
$autorefresh_txt .= ' (<span id="refrcounter">'.date ("i:s", $config["refr"]).'</span>)';
|
||||||
$autorefresh_additional = '<span id="combo_refr" style="display: none;">';
|
}
|
||||||
$autorefresh_additional .= html_print_select ($values, 'ref', '', '', __('Select'), '0', true, false, false);
|
|
||||||
$autorefresh_additional .= '</span>';
|
$ignored_params['refr'] = '';
|
||||||
unset ($values);
|
$values = get_refresh_time_array();
|
||||||
|
$autorefresh_additional = '<span id="combo_refr" style="display: none;">';
|
||||||
$autorefresh_link_open_img =
|
$autorefresh_additional .= html_print_select ($values, 'ref', '', '', __('Select'), '0', true, false, false);
|
||||||
'<a class="white autorefresh" href="' . ui_get_url_refresh ($ignored_params) . '">';
|
$autorefresh_additional .= '</span>';
|
||||||
|
unset ($values);
|
||||||
if ($_GET['refr']) {
|
|
||||||
$autorefresh_link_open_txt =
|
$autorefresh_link_open_img =
|
||||||
'<a class="white autorefresh autorefresh_txt" href="' . ui_get_url_refresh ($ignored_params) . '">';
|
'<a class="white autorefresh" href="' . ui_get_url_refresh ($ignored_params) . '">';
|
||||||
|
|
||||||
|
if ($_GET['refr']) {
|
||||||
|
$autorefresh_link_open_txt =
|
||||||
|
'<a class="white autorefresh autorefresh_txt" href="' . ui_get_url_refresh ($ignored_params) . '">';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$autorefresh_link_open_txt = '<a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$autorefresh_link_close = '</a>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$autorefresh_link_open_txt = '<a>';
|
$autorefresh_img = html_print_image("images/header_refresh_disabled.png", true, array("class" => 'bot autorefresh_disabled', "alt" => 'lightning', 'title' => __('Disabled autorefresh')));
|
||||||
}
|
|
||||||
|
|
||||||
$autorefresh_link_close = '</a>';
|
$ignored_params['refr'] = false;
|
||||||
|
|
||||||
|
$autorefresh_link_open_img = '';
|
||||||
|
$autorefresh_link_open_txt = '';
|
||||||
|
$autorefresh_link_close = '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$autorefresh_img = html_print_image("images/header_refresh_disabled.png", true, array("class" => 'bot autorefresh_disabled', "alt" => 'lightning', 'title' => __('Disabled autorefresh')));
|
$autorefresh_img = html_print_image("images/header_refresh_disabled.png", true, array("class" => 'bot autorefresh_disabled', "alt" => 'lightning', 'title' => __('Disabled autorefresh')));
|
||||||
|
@ -357,17 +376,25 @@ config_check();
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
<?php
|
<?php
|
||||||
if (($autorefresh_list !== null) && (array_search($_GET['sec2'], $autorefresh_list) !== false) && (!isset($_GET["refr"]))) {
|
if (($autorefresh_list !== null) && (array_search($_GET['sec2'], $autorefresh_list) !== false) && (!isset($_GET["refr"]))) {
|
||||||
|
$do_refresh = true;
|
||||||
|
if ($_GET['sec2'] == 'operation/agentes/pandora_networkmap') {
|
||||||
|
if ((!isset($_GET['tab'])) || ($_GET['tab'] != 'view')) {
|
||||||
|
$do_refresh = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($do_refresh) {
|
||||||
?>
|
?>
|
||||||
$("a.autorefresh_txt").toggle ();
|
$("a.autorefresh_txt").toggle ();
|
||||||
$("#combo_refr").toggle ();
|
$("#combo_refr").toggle ();
|
||||||
$("#combo_refr").css('padding-right', '9px');
|
$("#combo_refr").css('padding-right', '9px');
|
||||||
href = $("a.autorefresh").attr ("href");
|
href = $("a.autorefresh").attr ("href");
|
||||||
$(document).attr ("location", href + "30");
|
$(document).attr ("location", href + "30");
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
if (fixed_header) {
|
if (fixed_header) {
|
||||||
$('div#head').addClass('fixed_header');
|
$('div#head').addClass('fixed_header');
|
||||||
$('div#page')
|
$('div#page')
|
||||||
|
|
Loading…
Reference in New Issue