2011-12-07 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* operation/events/events_list.php operation/events/events.php: Added filter to hide/show alert events in this view. Pending task: #3406323 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5235 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
b7f6598117
commit
d9662cfcce
|
@ -1,3 +1,11 @@
|
||||||
|
2011-12-07 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
|
* operation/events/events_list.php
|
||||||
|
operation/events/events.php: Added filter to hide/show alert events
|
||||||
|
in this view.
|
||||||
|
|
||||||
|
Pending task: #3406323
|
||||||
|
|
||||||
2011-12-05 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2011-12-05 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* operation/agentes/status_monitor.php: Added sort funcionality
|
* operation/agentes/status_monitor.php: Added sort funcionality
|
||||||
|
|
|
@ -167,6 +167,7 @@ $delete = (bool) get_parameter ("delete");
|
||||||
$validate = (bool) get_parameter ("validate", 0);
|
$validate = (bool) get_parameter ("validate", 0);
|
||||||
$section = (string) get_parameter ("section", "list");
|
$section = (string) get_parameter ("section", "list");
|
||||||
$text_agent = (string)get_parameter('text_agent', __("All"));
|
$text_agent = (string)get_parameter('text_agent', __("All"));
|
||||||
|
$filter_only_alert = (int)get_parameter('filter_only_alert', 0);
|
||||||
|
|
||||||
$search = io_safe_output(preg_replace ("/&([A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/", "&", rawurldecode (get_parameter ("search"))));
|
$search = io_safe_output(preg_replace ("/&([A-Za-z]{0,4}\w{2,3};|#[0-9]{2,3};)/", "&", rawurldecode (get_parameter ("search"))));
|
||||||
|
|
||||||
|
|
|
@ -141,13 +141,21 @@ if ($tag != "") {
|
||||||
$sql_post .= " AND tags LIKE '%".io_safe_input($tag)."%'";
|
$sql_post .= " AND tags LIKE '%".io_safe_input($tag)."%'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filter/Only alerts
|
||||||
|
if (isset($filter_only_alert)){
|
||||||
|
if ($filter_only_alert == 0)
|
||||||
|
$sql_post .= " AND event_type NOT LIKE '%alert%'";
|
||||||
|
else
|
||||||
|
$sql_post .= " AND event_type LIKE '%alert%'";
|
||||||
|
}
|
||||||
|
|
||||||
$url = "index.php?sec=eventos&sec2=operation/events/events&search=" .
|
$url = "index.php?sec=eventos&sec2=operation/events/events&search=" .
|
||||||
rawurlencode(io_safe_input($search)) . "&event_type=" . $event_type .
|
rawurlencode(io_safe_input($search)) . "&event_type=" . $event_type .
|
||||||
"&severity=" . $severity . "&status=" . $status . "&ev_group=" .
|
"&severity=" . $severity . "&status=" . $status . "&ev_group=" .
|
||||||
$ev_group . "&refr=" . $config["refr"] . "&id_agent=" .
|
$ev_group . "&refr=" . $config["refr"] . "&id_agent=" .
|
||||||
$id_agent . "&id_event=" . $id_event . "&pagination=" .
|
$id_agent . "&id_event=" . $id_event . "&pagination=" .
|
||||||
$pagination . "&group_rep=" . $group_rep . "&event_view_hr=" .
|
$pagination . "&group_rep=" . $group_rep . "&event_view_hr=" .
|
||||||
$event_view_hr . "&id_user_ack=" . $id_user_ack . "&tag=" . $tag . "&offset=" . $offset;
|
$event_view_hr . "&id_user_ack=" . $id_user_ack . "&tag=" . $tag . "&filter_only_alert=" . $filter_only_alert . "&offset=" . $offset;
|
||||||
|
|
||||||
echo "<br>";
|
echo "<br>";
|
||||||
//Link to toggle filter
|
//Link to toggle filter
|
||||||
|
@ -260,8 +268,17 @@ foreach($tags as $t) {
|
||||||
|
|
||||||
html_print_select ($tags_name, "tag", $tag, '', __('All'), "");
|
html_print_select ($tags_name, "tag", $tag, '', __('All'), "");
|
||||||
|
|
||||||
|
echo "</td>";
|
||||||
|
|
||||||
|
echo "<td>";
|
||||||
|
echo __("Filter/Only alert events") . "</td><td>";
|
||||||
|
|
||||||
|
html_print_select (array('0' => __('Filter alert events'), '1' => __('Only alert events')), "filter_only_alert", $filter_only_alert, '', '', '');
|
||||||
|
|
||||||
echo "</td></tr>";
|
echo "</td></tr>";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo '<tr><td colspan="4" style="text-align:right">';
|
echo '<tr><td colspan="4" style="text-align:right">';
|
||||||
//The buttons
|
//The buttons
|
||||||
html_print_submit_button (__('Update'), '', false, 'class="sub upd"');
|
html_print_submit_button (__('Update'), '', false, 'class="sub upd"');
|
||||||
|
|
Loading…
Reference in New Issue