2013-11-19 Sergio Martin <sergio.martin@artica.es>
* operation/events/events.build_query.php: Fixed a subquery OR condition for not normal type. * operation/agentes/status_monitor.php: Fixed monitor filter by group and tags * mobile/operation/events.php: Fixed filter of events view in mobile console git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9097 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
5ae968a728
commit
8c86a93bb2
|
@ -1,3 +1,14 @@
|
||||||
|
2013-11-19 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* operation/events/events.build_query.php: Fixed a
|
||||||
|
subquery OR condition for not normal type.
|
||||||
|
|
||||||
|
* operation/agentes/status_monitor.php: Fixed monitor
|
||||||
|
filter by group and tags
|
||||||
|
|
||||||
|
* mobile/operation/events.php: Fixed filter of events
|
||||||
|
view in mobile console
|
||||||
|
|
||||||
2013-11-19 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2013-11-19 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/functions_groups.php
|
* include/functions_groups.php
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Events {
|
||||||
private $free_search = '';
|
private $free_search = '';
|
||||||
private $hours_old = 8;
|
private $hours_old = 8;
|
||||||
private $status = 3;
|
private $status = 3;
|
||||||
private $type = "";
|
private $type = "all";
|
||||||
private $severity = -1;
|
private $severity = -1;
|
||||||
private $filter = 0;
|
private $filter = 0;
|
||||||
private $group = 0;
|
private $group = 0;
|
||||||
|
@ -333,7 +333,7 @@ class Events {
|
||||||
|
|
||||||
$this->type = $system->getRequest('type', __("Type"));
|
$this->type = $system->getRequest('type', __("Type"));
|
||||||
if ($this->type === __("Type")) {
|
if ($this->type === __("Type")) {
|
||||||
$this->type = "";
|
$this->type = "all";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$this->default = false;
|
$this->default = false;
|
||||||
|
@ -576,16 +576,17 @@ class Events {
|
||||||
'name' => 'type',
|
'name' => 'type',
|
||||||
'title' => __('Type'),
|
'title' => __('Type'),
|
||||||
'label' => __('Type'),
|
'label' => __('Type'),
|
||||||
'items' => get_event_types(),
|
'items' => array_merge(array("all" => __('All')), get_event_types()),
|
||||||
'selected' => $this->type
|
'selected' => $this->type
|
||||||
);
|
);
|
||||||
|
|
||||||
$ui->formAddSelectBox($options);
|
$ui->formAddSelectBox($options);
|
||||||
|
|
||||||
$options = array(
|
$options = array(
|
||||||
'name' => 'severity',
|
'name' => 'severity',
|
||||||
'title' => __('Severity'),
|
'title' => __('Severity'),
|
||||||
'label' => __('Severity'),
|
'label' => __('Severity'),
|
||||||
'items' => get_priorities(),
|
'items' => array("-1" => __('All')) + get_priorities(),
|
||||||
'selected' => $this->severity
|
'selected' => $this->severity
|
||||||
);
|
);
|
||||||
$ui->formAddSelectBox($options);
|
$ui->formAddSelectBox($options);
|
||||||
|
@ -1035,7 +1036,7 @@ class Events {
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(window).bind(\"scroll\", function () {
|
$(window).bind(\"scroll\", function () {
|
||||||
if ($(this).scrollTop() + $(this).height()
|
if ($(this).scrollTop() + $(this).height()
|
||||||
>= ($(document).height() - 100)) {
|
>= ($(document).height() - 100) || true) {
|
||||||
|
|
||||||
ajax_load_rows();
|
ajax_load_rows();
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,8 +97,8 @@ $id_ag_group = db_get_value('id_grupo', 'tgrupo', 'nombre', $ag_group);
|
||||||
|
|
||||||
// Agent group selector
|
// Agent group selector
|
||||||
if (!defined('METACONSOLE')) {
|
if (!defined('METACONSOLE')) {
|
||||||
if ($ag_group > 0 && check_acl ($config["id_user"], $id_ag_group, "AR")) {
|
if ($ag_group > 0 && check_acl ($config["id_user"], $ag_group, "AR")) {
|
||||||
$sql_conditions_group = sprintf (" AND tagente.id_grupo = %d", $id_ag_group);
|
$sql_conditions_group = sprintf (" AND tagente.id_grupo = %d", $ag_group);
|
||||||
}
|
}
|
||||||
elseif ($user_groups != '') {
|
elseif ($user_groups != '') {
|
||||||
// User has explicit permission on group 1 ?
|
// User has explicit permission on group 1 ?
|
||||||
|
@ -121,9 +121,7 @@ if (defined('METACONSOLE')) {
|
||||||
FROM tmodule_group WHERE name = '%s')", $modulegroup);
|
FROM tmodule_group WHERE name = '%s')", $modulegroup);
|
||||||
}
|
}
|
||||||
else if ($modulegroup > -1) {
|
else if ($modulegroup > -1) {
|
||||||
|
$sql_conditions .= sprintf (" AND tagente_modulo.id_module_group = '%d'", $modulegroup);
|
||||||
$id_modulegroup = db_get_value('id_agente_modulo', 'tagente_modulo', 'nombre', $modulegroup);
|
|
||||||
$sql_conditions .= sprintf (" AND tagente_modulo.id_module_group = '%d'", $id_modulegroup);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,11 +171,10 @@ if ($tag_filter !== 0) {
|
||||||
)";
|
)";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$id_tag_filter = db_get_value('id_tag', 'ttag', 'name', $tag_filter);
|
|
||||||
$sql_conditions .= " AND tagente_modulo.id_agente_modulo IN (
|
$sql_conditions .= " AND tagente_modulo.id_agente_modulo IN (
|
||||||
SELECT ttag_module.id_agente_modulo
|
SELECT ttag_module.id_agente_modulo
|
||||||
FROM ttag_module
|
FROM ttag_module
|
||||||
WHERE ttag_module.id_tag = " . $id_tag_filter . "
|
WHERE ttag_module.id_tag = " . $tag_filter . "
|
||||||
)";
|
)";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ if ($event_type != "") {
|
||||||
$sql_post .= " AND event_type LIKE '%$event_type%' ";
|
$sql_post .= " AND event_type LIKE '%$event_type%' ";
|
||||||
}
|
}
|
||||||
elseif ($event_type == "not_normal") {
|
elseif ($event_type == "not_normal") {
|
||||||
$sql_post .= " AND event_type LIKE '%warning%' OR event_type LIKE '%critical%' OR event_type LIKE '%unknown%' ";
|
$sql_post .= " AND (event_type LIKE '%warning%' OR event_type LIKE '%critical%' OR event_type LIKE '%unknown%') ";
|
||||||
}
|
}
|
||||||
elseif ($event_type != "all") {
|
elseif ($event_type != "all") {
|
||||||
$sql_post .= " AND event_type = '" . $event_type."'";
|
$sql_post .= " AND event_type = '" . $event_type."'";
|
||||||
|
|
Loading…
Reference in New Issue