2013-06-13 Sergio Martin <sergio.martin@artica.es>
* include/functions_ui.php: Fix layout issue * operation/events/events.build_table.php: Hide checkbox column in read only view * operation/events/events_list.php: Hide save filter button when user has only ER ACLs permission * general/login_page.php: Fix width and height of the login error modal win * operation/agentes/stat_win.php: Enable the show events filter in replication mode when show local events is enabled git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8320 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2d7ccc0c15
commit
2cd487cd81
|
@ -1,3 +1,19 @@
|
|||
2013-06-13 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_ui.php: Fix layout issue
|
||||
|
||||
* operation/events/events.build_table.php: Hide checkbox column
|
||||
in read only view
|
||||
|
||||
* operation/events/events_list.php: Hide save filter button
|
||||
when user has only ER ACLs permission
|
||||
|
||||
* general/login_page.php: Fix width and height of the
|
||||
login error modal win
|
||||
|
||||
* operation/agentes/stat_win.php: Enable the show events
|
||||
filter in replication mode when show local events is enabled
|
||||
|
||||
2013-06-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_snmp.php: changed the PHP function to execute
|
||||
|
|
|
@ -322,8 +322,8 @@ html_print_div(array('id' => 'modal_alert', 'hidden' => true));
|
|||
resizable: true,
|
||||
draggable: true,
|
||||
modal: true,
|
||||
height: 150,
|
||||
width: 350,
|
||||
height: 200,
|
||||
width: 400,
|
||||
overlay: {
|
||||
opacity: 0.5,
|
||||
background: "black"}
|
||||
|
|
|
@ -2171,7 +2171,7 @@ function ui_print_page_header ($title, $icon = "", $return = false, $help = "",
|
|||
|
||||
|
||||
$buffer .= '<ul class="mn"><li class="'.$type.'"> ' . html_print_image($icon, true, array("style" => "vertical-align:middle;", "class" => "bottom", "border" => "0", "alt" => "")) . ' ';
|
||||
$buffer .= '<span style="display: inline-block; vertical-align: top; margin-top: 2px;">' . ui_print_truncate_text($title, 45);
|
||||
$buffer .= '<span style="display: inline-block; vertical-align: top; margin-top: 2px;">' . ui_print_truncate_text($title, 40);
|
||||
if ($help != "")
|
||||
$buffer .= "<div class='head_help' style='float: right; margin-top: -3px !important; margin-left: 2px !important;'>" . ui_print_help_icon ($help, true, '', 'images/help_w.png') . "</div>";
|
||||
$buffer .= '</span></li></ul></div>';
|
||||
|
|
|
@ -284,7 +284,7 @@ $label = base64_decode(get_parameter('label', ''));
|
|||
$data[0] = __('Show events');
|
||||
$disabled = false;
|
||||
if (isset($config['event_replication'])) {
|
||||
if ($config['event_replication']) {
|
||||
if ($config['event_replication'] && !$config['show_events_in_local']) {
|
||||
$disabled = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ if ($i != 0 && $allow_action) {
|
|||
$table->align[$i] = 'center';
|
||||
$table->size[$i] = '80px';
|
||||
$i++;
|
||||
if (check_acl ($config["id_user"], 0, "EW") == 1) {
|
||||
if (check_acl ($config["id_user"], 0, "EW") == 1 && !$readonly) {
|
||||
$table->head[$i] = html_print_checkbox ("all_validate_box", "1", false, true);
|
||||
$table->align[$i] = 'center';
|
||||
}
|
||||
|
@ -534,19 +534,21 @@ foreach ($result as $event) {
|
|||
|
||||
$i++;
|
||||
|
||||
if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EM", $event['clean_tags']) == 1) {
|
||||
//Checkbox
|
||||
// Class 'candeleted' must be the fist class to be parsed from javascript. Dont change
|
||||
$data[$i] = html_print_checkbox_extended ("validate_ids[]", $event['id_evento'], false, false, false, 'class="candeleted chk_val"', true);
|
||||
if(!$readonly) {
|
||||
if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EM", $event['clean_tags']) == 1) {
|
||||
//Checkbox
|
||||
// Class 'candeleted' must be the fist class to be parsed from javascript. Dont change
|
||||
$data[$i] = html_print_checkbox_extended ("validate_ids[]", $event['id_evento'], false, false, false, 'class="candeleted chk_val"', true);
|
||||
}
|
||||
else if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EW", $event['clean_tags']) == 1) {
|
||||
//Checkbox
|
||||
$data[$i] = html_print_checkbox_extended ("validate_ids[]", $event['id_evento'], false, false, false, 'class="chk_val"', true);
|
||||
}
|
||||
else if (isset($table->header[$i]) || true) {
|
||||
$data[$i] = '';
|
||||
}
|
||||
}
|
||||
else if (tags_check_acl ($config["id_user"], $event["id_grupo"], "EW", $event['clean_tags']) == 1) {
|
||||
//Checkbox
|
||||
$data[$i] = html_print_checkbox_extended ("validate_ids[]", $event['id_evento'], false, false, false, 'class="chk_val"', true);
|
||||
}
|
||||
else if (isset($table->header[$i]) || true) {
|
||||
$data[$i] = '';
|
||||
}
|
||||
|
||||
|
||||
$table->cellstyle[count($table->data)][$i] = 'background: #F3F3F3;';
|
||||
}
|
||||
|
||||
|
|
|
@ -185,51 +185,53 @@ html_print_div(array('hidden' => true,
|
|||
html_print_div(array('hidden' => true,
|
||||
'id' => 'load_filter_text', 'content' => __('Load filter')));
|
||||
|
||||
// Save filter div for dialog
|
||||
echo '<div id="save_filter_layer" style="display: none">';
|
||||
$table->id = 'save_filter_form';
|
||||
$table->width = '98%';
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 4;
|
||||
$table->class = 'databox';
|
||||
$table->styleTable = 'font-weight: bold; color: #555; text-align:left;';
|
||||
$table->style[0] = 'width: 50%; width:50%;';
|
||||
if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0, "EM") ) {
|
||||
// Save filter div for dialog
|
||||
echo '<div id="save_filter_layer" style="display: none">';
|
||||
$table->id = 'save_filter_form';
|
||||
$table->width = '98%';
|
||||
$table->cellspacing = 4;
|
||||
$table->cellpadding = 4;
|
||||
$table->class = 'databox';
|
||||
$table->styleTable = 'font-weight: bold; color: #555; text-align:left;';
|
||||
$table->style[0] = 'width: 50%; width:50%;';
|
||||
|
||||
$data = array();
|
||||
$table->rowid[0] = 'update_save_selector';
|
||||
$data[0] = html_print_radio_button('filter_mode', 'new', '', true, true) . __('New filter') . '<br><br>';
|
||||
$data[1] = html_print_radio_button('filter_mode', 'update', '', false, true) . __('Update filter') . '<br><br>';
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
$data = array();
|
||||
$table->rowid[0] = 'update_save_selector';
|
||||
$data[0] = html_print_radio_button('filter_mode', 'new', '', true, true) . __('New filter') . '<br><br>';
|
||||
$data[1] = html_print_radio_button('filter_mode', 'update', '', false, true) . __('Update filter') . '<br><br>';
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = array();
|
||||
$table->rowid[1] = 'save_filter_row1';
|
||||
$data[0] = __('Filter name') . '<br>';
|
||||
$data[0] .= html_print_input_text ('id_name', '', '', 15, 255, true);
|
||||
$data[1] = __('Filter group') . '<br>';
|
||||
$data[1] .= html_print_select_groups($config["id_user"], "ER", true, 'id_group', $id_group, '', '', 0, true, false, false, 'w130');
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
$data = array();
|
||||
$table->rowid[1] = 'save_filter_row1';
|
||||
$data[0] = __('Filter name') . '<br>';
|
||||
$data[0] .= html_print_input_text ('id_name', '', '', 15, 255, true);
|
||||
$data[1] = __('Filter group') . '<br>';
|
||||
$data[1] .= html_print_select_groups($config["id_user"], "ER", true, 'id_group', $id_group, '', '', 0, true, false, false, 'w130');
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = array();
|
||||
$table->rowid[2] = 'save_filter_row2';
|
||||
$data[0] = html_print_submit_button (__('Save filter'), 'save_filter', false, 'class="sub upd"', true);
|
||||
$table->colspan[2][0] = 2;
|
||||
$table->cellstyle[2][0] = 'text-align:right;';
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
$data = array();
|
||||
$table->rowid[2] = 'save_filter_row2';
|
||||
$data[0] = html_print_submit_button (__('Save filter'), 'save_filter', false, 'class="sub upd"', true);
|
||||
$table->colspan[2][0] = 2;
|
||||
$table->cellstyle[2][0] = 'text-align:right;';
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
$data = array();
|
||||
$table->rowid[3] = 'update_filter_row1';
|
||||
$data[0] = __("Overwrite filter") . '<br>';
|
||||
$data[0] .= html_print_select ($filters, "overwrite_filter", '', '', '', 0, true);
|
||||
$data[1] = html_print_submit_button (__('Update filter'), 'update_filter', false, 'class="sub upd"', true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
$data = array();
|
||||
$table->rowid[3] = 'update_filter_row1';
|
||||
$data[0] = __("Overwrite filter") . '<br>';
|
||||
$data[0] .= html_print_select ($filters, "overwrite_filter", '', '', '', 0, true);
|
||||
$data[1] = html_print_submit_button (__('Update filter'), 'update_filter', false, 'class="sub upd"', true);
|
||||
$table->data[] = $data;
|
||||
$table->rowclass[] = '';
|
||||
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
echo '</div>';
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Load filter div for dialog
|
||||
echo '<div id="load_filter_layer" style="display: none">';
|
||||
|
@ -449,7 +451,9 @@ $table->rowclass[] = '';
|
|||
|
||||
$data = array();
|
||||
$data[0] = '<div style="width:100%; text-align:left">';
|
||||
$data[0] .= '<a href="javascript:" onclick="show_save_filter_dialog();">' . html_print_image("images/disk.png", true, array("border" => '0', "title" => __('Save filter'), "alt" => __('Save filter'))) . '</a> ';
|
||||
if (check_acl ($config["id_user"], 0, "EW") || check_acl ($config["id_user"], 0, "EM") ) {
|
||||
$data[0] .= '<a href="javascript:" onclick="show_save_filter_dialog();">' . html_print_image("images/disk.png", true, array("border" => '0', "title" => __('Save filter'), "alt" => __('Save filter'))) . '</a> ';
|
||||
}
|
||||
$data[0] .= '<a href="javascript:" onclick="show_load_filter_dialog();">' . html_print_image("images/load.png", true, array("border" => '0', "title" => __('Load filter'), "alt" => __('Load filter'))) . '</a><br>';
|
||||
if (empty($id_name)) {
|
||||
$data[0] .= '[<span id="filter_loaded_span" style="font-weight: normal">' . __('No filter loaded') . '</span>]';
|
||||
|
|
Loading…
Reference in New Issue