Merge branch 'develop' into ent-12684-vista-tree-view-no-filtra-por-modulo-en-algunas-pestanas
This commit is contained in:
commit
dd322ad283
|
@ -304,18 +304,23 @@ class Tree
|
||||||
$this->filter['statusModule'] = -1;
|
$this->filter['statusModule'] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filter_status = '';
|
||||||
|
if ((int) $this->filter['statusModule'] !== -1 && ($this->type === 'module' || $this->type === 'module_group' || $this->type === 'tag')) {
|
||||||
|
$filter_status = ' AND tae.estado = '.$this->filter['statusModule'];
|
||||||
|
}
|
||||||
|
|
||||||
$show_init_condition = ($this->filter['show_not_init_agents']) ? '' : ' AND ta.notinit_count <> ta.total_count';
|
$show_init_condition = ($this->filter['show_not_init_agents']) ? '' : ' AND ta.notinit_count <> ta.total_count';
|
||||||
|
|
||||||
if ($this->getEmptyModuleFilterStatus()) {
|
if ($this->getEmptyModuleFilterStatus()) {
|
||||||
return $show_init_condition;
|
return $show_init_condition.$filter_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((int) $this->filter['statusModule'] === 6) {
|
if ((int) $this->filter['statusModule'] === 6) {
|
||||||
return ' AND (ta.warning_count > 0 OR ta.critical_count > 0)';
|
return ' AND (ta.warning_count > 0 OR ta.critical_count > 0)'.$filter_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->filter['statusModule'] === 'fired') {
|
if ($this->filter['statusModule'] === 'fired') {
|
||||||
return ' AND ta.fired_count > 0';
|
return ' AND ta.fired_count > 0'.$filter_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
$field_filter = modules_get_counter_by_states($this->filter['statusModule']);
|
$field_filter = modules_get_counter_by_states($this->filter['statusModule']);
|
||||||
|
@ -323,7 +328,7 @@ class Tree
|
||||||
return ' AND 1=0';
|
return ' AND 1=0';
|
||||||
}
|
}
|
||||||
|
|
||||||
return "AND ta.$field_filter > 0".$show_init_condition;
|
return "AND ta.$field_filter > 0".$show_init_condition.$filter_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,8 @@ class TreeModule extends Tree
|
||||||
$this->L1fieldNameSql = 'tam.nombre';
|
$this->L1fieldNameSql = 'tam.nombre';
|
||||||
$this->L1inner = '';
|
$this->L1inner = '';
|
||||||
$this->L1orderByFinal = 'name';
|
$this->L1orderByFinal = 'name';
|
||||||
$this->L1innerInside = 'INNER JOIN tagente_modulo tam
|
$this->L1innerInside = 'INNER JOIN tagente_modulo tam ON ta.id_agente = tam.id_agente
|
||||||
ON ta.id_agente = tam.id_agente';
|
INNER JOIN tagente_estado tae ON tae.id_agente_modulo = tam.id_agente_modulo';
|
||||||
|
|
||||||
$this->L2condition = "AND tam.nombre = '".$this->symbol2name($this->rootID)."'";
|
$this->L2condition = "AND tam.nombre = '".$this->symbol2name($this->rootID)."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@ class TreeModuleGroup extends Tree
|
||||||
'tmg.id_mg AS id',
|
'tmg.id_mg AS id',
|
||||||
];
|
];
|
||||||
$this->L1inner = 'INNER JOIN tmodule_group tmg ON tmg.id_mg = x2.g';
|
$this->L1inner = 'INNER JOIN tmodule_group tmg ON tmg.id_mg = x2.g';
|
||||||
$this->L1innerInside = 'INNER JOIN tagente_modulo tam
|
$this->L1innerInside = 'INNER JOIN tagente_modulo tam ON ta.id_agente = tam.id_agente
|
||||||
ON ta.id_agente = tam.id_agente';
|
INNER JOIN tagente_estado tae ON tae.id_agente_modulo = tam.id_agente_modulo';
|
||||||
$this->L1orderByFinal = 'tmg.name';
|
$this->L1orderByFinal = 'tmg.name';
|
||||||
|
|
||||||
$this->L2condition = 'AND tam.id_module_group = '.$this->rootID;
|
$this->L2condition = 'AND tam.id_module_group = '.$this->rootID;
|
||||||
|
|
|
@ -29,6 +29,8 @@ class TreeTag extends Tree
|
||||||
$this->L1innerInside = '
|
$this->L1innerInside = '
|
||||||
INNER JOIN tagente_modulo tam
|
INNER JOIN tagente_modulo tam
|
||||||
ON ta.id_agente = tam.id_agente
|
ON ta.id_agente = tam.id_agente
|
||||||
|
INNER JOIN tagente_estado tae
|
||||||
|
ON tae.id_agente_modulo = tam.id_agente_modulo
|
||||||
INNER JOIN ttag_module ttm
|
INNER JOIN ttag_module ttm
|
||||||
ON ttm.id_agente_modulo = tam.id_agente_modulo
|
ON ttm.id_agente_modulo = tam.id_agente_modulo
|
||||||
';
|
';
|
||||||
|
|
|
@ -108,7 +108,7 @@ td > input[id^="checkbox-multi"] {
|
||||||
height: 2.5em;
|
height: 2.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info_table.events tr > td span:not(.invisible) {
|
.info_table.events tr:not(.group) > td span:not(.invisible) {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
|
@ -1167,7 +1167,7 @@ if (is_ajax() === true) {
|
||||||
|
|
||||||
parse_str($url_link_hash, $url_hash_array);
|
parse_str($url_link_hash, $url_hash_array);
|
||||||
|
|
||||||
$redirection_form = "<form id='agent-table-redirection-".$redirection_form_id."' method='POST' action='".$url_link.$tmp->id_agente."'>";
|
$redirection_form = "<form id='agent-table-redirection-".$redirection_form_id."' class='invisible' method='POST' action='".$url_link.$tmp->id_agente."'>";
|
||||||
$redirection_form .= html_print_input_hidden(
|
$redirection_form .= html_print_input_hidden(
|
||||||
'loginhash',
|
'loginhash',
|
||||||
$url_hash_array['loginhash'],
|
$url_hash_array['loginhash'],
|
||||||
|
@ -3080,7 +3080,10 @@ function process_datatables_callback(table, settings) {
|
||||||
.data()
|
.data()
|
||||||
.each( function ( group, i ) {
|
.each( function ( group, i ) {
|
||||||
$(rows).eq( i ).show();
|
$(rows).eq( i ).show();
|
||||||
if ( last !== group ) {
|
// Compare only "a" tag because in metaconsole the node has "form".
|
||||||
|
let last_to_compare = $(last).filter('a').html();
|
||||||
|
let group_to_compare = $(group).filter('a').html();
|
||||||
|
if ( last_to_compare !== group_to_compare ) {
|
||||||
$(rows).eq( i ).before(
|
$(rows).eq( i ).before(
|
||||||
'<tr class="group"><td colspan="100%">'
|
'<tr class="group"><td colspan="100%">'
|
||||||
+'<?php echo __('Agent').' '; ?>'
|
+'<?php echo __('Agent').' '; ?>'
|
||||||
|
|
Loading…
Reference in New Issue