ticket changed

Former-commit-id: 532d461aa9ff0c956dbbe0dd931dc6f03d56498b
This commit is contained in:
marcos.alconada 2019-03-06 16:47:56 +01:00
parent 35ad2f4bb5
commit 18ca3a191b
1 changed files with 17 additions and 15 deletions

View File

@ -63,17 +63,6 @@ $sort = get_parameter('sort', 'none');
$id_module = (int) get_parameter('id_module', 0); $id_module = (int) get_parameter('id_module', 0);
$ag_custom_fields = (array) get_parameter('ag_custom_fields', []); $ag_custom_fields = (array) get_parameter('ag_custom_fields', []);
$module_option = (int) get_parameter('module_option', 1); $module_option = (int) get_parameter('module_option', 1);
$autosearch = false;
// It is validated if it receives parameters different from those it has by default
if ($ag_freestring != '' || $moduletype != '' || $datatype != ''
|| $ag_modulename != '' || $refr != 0 || $offset != 0 || $status != 4
|| $modulegroup != -1 || $tag_filter != 0 || $sortField != ''
|| $sort != '' || $id_module != 0 || $ag_custom_fields != null
|| $module_option != 1
) {
$autosearch = true;
}
if (!is_metaconsole()) { if (!is_metaconsole()) {
$ag_group = (int) get_parameter('ag_group', 0); $ag_group = (int) get_parameter('ag_group', 0);
@ -955,10 +944,23 @@ $sql = 'SELECT
ORDER BY '.$order['field'].' '.$order['order'].' ORDER BY '.$order['field'].' '.$order['order'].'
LIMIT '.$offset.','.$limit_sql; LIMIT '.$offset.','.$limit_sql;
// When you enter for the first time you have less than 4 query params in the url $automonitordetail = false;
$first_interaction = count($_GET); $autovisualconsole = false;
// We do not show the modules until the user searches with the filter
if ($first_interaction || $autosearch) { // It is validated if it receives parameters different from those it has by default
$defaulturl = ui_get_full_url();
if ($defaulturl !== 'http://localhost/pandora_console/index.php?sec=view&sec2=operation/agentes/status_monitor') {
$automonitordetail = true;
}
$urlvisual = 'http://localhost/pandora_console/index.php?sec=view&sec2=operation/agentes/status_monitor&id_module='.$id_module;
if ($urlvisual !== $defaulturl) {
$autovisualconsole = true;
}
// We do not show the modules until the user searches with the filter
if ($automonitordetail && $autovisualconsole) {
if (! defined('METACONSOLE')) { if (! defined('METACONSOLE')) {
$result = db_get_all_rows_sql($sql); $result = db_get_all_rows_sql($sql);