Minor changes

This commit is contained in:
Jose Gonzalez 2023-02-28 17:54:22 +01:00
commit fa354ff8e6
13 changed files with 639 additions and 322 deletions

View File

@ -269,26 +269,13 @@ $table->cellspacing = 0;
$table->cellpadding = 0;
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->class = 'databox filters events-filters-create';
$table->class = 'databox filters events-filters-create pdd_10px';
$table->style[0] = 'vertical-align: top;';
$table->rowspan = [];
$table->rowspan[3][0] = 2;
$table->valign[1] = 'top';
if (is_metaconsole()) {
if ($id) {
$table->head[0] = __('Update Filter');
} else {
$table->head[0] = __('Create Filter');
}
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
$table->style[0] = '';
$table->valign[1] = '';
}
$table->data = [];
$table->data[0][0] = html_print_label_input_block(

View File

@ -82,36 +82,32 @@ if ($event_response_id > 0) {
}
$table = new stdClass();
$table->styleTable = 'margin: 10px 10px 0';
$table->styleTable = 'margin: 10px 10px 10px';
$table->class = 'databox filters';
$table->colspan[4][1] = 3;
if (is_metaconsole()) {
$table->head[0] = __('Edit event responses');
$table->head_colspan[0] = 5;
$table->headstyle[0] = 'text-align: center';
}
$table->size = [];
$table->style[0] = 'font-weight: bold;';
$table->style[2] = 'font-weight: bold;';
$table->cellspacing = 0;
$table->cellpadding = 0;
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->data = [];
$data = [];
$data[0] = __('Name');
$data[1] = html_print_input_text(
'name',
$event_response['name'],
'',
50,
255,
true,
false,
true
$data[0] = html_print_label_input_block(
__('Name'),
'<div class="w100p margin-top-10">'.html_print_input_text(
'name',
$event_response['name'],
'',
false,
255,
true,
false,
true,
'',
'w100p'
).html_print_input_hidden('id_response', $event_response['id'], true).'</div>'
);
$data[1] .= html_print_input_hidden('id_response', $event_response['id'], true);
$return_all_group = false;
@ -119,32 +115,64 @@ if (users_can_manage_group_all('PM') === true) {
$return_all_group = true;
}
$data[2] = __('Group');
$data[3] = html_print_select_groups(false, 'PM', $return_all_group, 'id_group', $event_response['id_group'], '', '', '', true);
$data[1] = html_print_label_input_block(
__('Group'),
'<div class="w100p margin-top-10">'.html_print_select_groups(
false,
'PM',
$return_all_group,
'id_group',
$event_response['id_group'],
'',
'',
'',
true,
false,
false,
'w100p'
).'</div>'
);
$table->data[0] = $data;
$data = [];
$table->colspan[1][1] = 3;
$data[0] = __('Description');
$data[1] = html_print_textarea(
'description',
5,
40,
$event_response['description'],
'class="'.$class_description.'"',
true
$table->colspan[1][0] = 2;
$data[0] = html_print_label_input_block(
__('Description'),
'<div class="w100p margin-top-10">'.html_print_textarea(
'description',
5,
1,
$event_response['description'],
'class="'.$class_description.' w100p"',
true,
'w100p'
).'</div>'
);
$table->data[1] = $data;
$data = [];
$data[0] = __('Location').ui_print_help_tip(__('For Command type Modal Window mode is enforced'), true);
$locations = [
__('Modal window'),
__('New window'),
];
$data[1] = html_print_select($locations, 'new_window', $event_response['new_window'], '', '', '', true);
$data[0] = html_print_label_input_block(
__('Location').ui_print_help_tip(__('For Command type Modal Window mode is enforced'), true),
'<div class="w100p margin-top-10">'.html_print_select(
$locations,
'new_window',
$event_response['new_window'],
'',
'',
'',
true,
false,
true,
'w100p'
).'</div>'
);
$data[2] = '<span class="size">'.__('Size').'</span>';
$data[1] = '<span class="size">'.__('Size').'</span>';
if ($event_response['modal_width'] == 0) {
$event_response['modal_width'] = 620;
}
@ -153,40 +181,88 @@ if ($event_response['modal_height'] == 0) {
$event_response['modal_height'] = 500;
}
$data[3] = '<span class="size">'.__('Width').' (px) </span>';
$data[3] .= '<span class="size">'.html_print_input_text('modal_width', $event_response['modal_width'], '', 4, 5, true).'</span>';
$data[3] .= '<span class="size">'.__('Height').' (px) </span>';
$data[3] .= '<span class="size">'.html_print_input_text('modal_height', $event_response['modal_height'], '', 4, 5, true).'</span>';
$data[1] = '<div class="flex flex-space-around">';
$data[1] .= html_print_label_input_block(
__('Width').' (px) ',
'<div class="w100p margin-top-10">'.html_print_input_text(
'modal_width',
$event_response['modal_width'],
'',
4,
5,
true
).'</div>',
['div_class' => 'mgn_tp_0_imp']
);
$data[1] .= html_print_label_input_block(
__('Height').' (px) ',
'<div class="w100p margin-top-10">'.html_print_input_text(
'modal_height',
$event_response['modal_height'],
'',
4,
5,
true
).'</div>'
);
$data[1] .= '</div>';
$table->data[2] = $data;
$data = [];
$data[0] = __('Parameters');
$data[1] = html_print_input_text(
'params',
$event_response['params'],
'',
50,
255,
true
$data[0] = html_print_label_input_block(
__('Parameters'),
'<div class="w100p margin-top-10">'.html_print_input_text(
'params',
$event_response['params'],
'',
50,
255,
true,
false,
false,
'',
'w100p'
).'</div>'
);
$types = [
'url' => __('URL'),
'command' => __('Command'),
];
$data[2] = __('Type');
$data[3] = html_print_select($types, 'type', $event_response['type'], '', '', '', true);
$data[1] = html_print_label_input_block(
__('Type'),
'<div class="w100p margin-top-10">'.html_print_select(
$types,
'type',
$event_response['type'],
'',
'',
'',
true,
false,
true,
'w100p',
false,
'width: 100%'
).'</div>'
);
$table->data[3] = $data;
$data = [];
$data[0] = '<span id="command_label" class="labels">'.__('Command').'</span><span id="url_label" class="labels invisible">'.__('URL').'</span>'.ui_print_help_icon('response_macros', true);
$data[1] = html_print_textarea(
'target',
3,
1,
$event_response['target'],
'class="mh_initial w100p"',
true
$table->colspan[4][0] = 2;
$data[0] = html_print_label_input_block(
__('Command').'<span id="url_label" class="labels invisible">'.__('URL').'</span>'.ui_print_help_icon('response_macros', true),
'<div class="w100p margin-top-10">'.html_print_textarea(
'target',
3,
1,
$event_response['target'],
'class="mh_initial w100p"',
true
).'</div>'
);
$table->data[4] = $data;
$servers_to_exec = [];
$servers_to_exec[0] = __('Local console');
@ -206,24 +282,43 @@ if (enterprise_installed()) {
}
}
$data[2] = '<div id="server_to_exec_label" class="labels invisible">'.__('Server to execute command').'</div>';
$data[3] = '<div id="server_to_exec_value" class="invisible" >'.html_print_select($servers_to_exec, 'server_to_exec', $event_response['server_to_exec'], '', '', '', true).'</div>';
$table->data[4] = $data;
$data = [];
$data[0] = '<div id="command_timeout_label" class="labels invisible">'.__('Command timeout (s)');
$data[1] = '<div id="command_timeout_value" class="invisible">'.html_print_input_text('command_timeout', $event_response['command_timeout'], '', 4, 5, true);
$data[0] = html_print_label_input_block(
'<div id="server_to_exec_label" class="labels invisible">'.__('Server to execute command').'</div>',
'<div id="server_to_exec_value" class="invisible" >'.html_print_select(
$servers_to_exec,
'server_to_exec',
$event_response['server_to_exec'],
'',
'',
'',
true
).'</div>'
);
$data[1] = html_print_label_input_block(
'<div id="command_timeout_label" class="labels invisible">'.__('Command timeout (s)'),
'<div id="command_timeout_value" class="invisible">'.html_print_input_text(
'command_timeout',
$event_response['command_timeout'],
'',
4,
5,
true
)
);
$table->data[5] = $data;
$data = [];
$data[0] = __('Display command').ui_print_help_tip(__('If enabled the command will be displayed to any user that can execute this event response'), true);
$data[1] = html_print_checkbox_switch(
'display_command',
1,
$event_response['display_command'],
true
$data[0] = html_print_label_input_block(
__('Display command').ui_print_help_tip(__('If enabled the command will be displayed to any user that can execute this event response'), true),
'<div class="w100p margin-top-10">'.html_print_checkbox_switch(
'display_command',
1,
$event_response['display_command'],
true
).'</div>'
);
$table->data[6] = $data;

View File

@ -31,7 +31,7 @@ global $config;
check_login();
enterprise_hook('open_meta_frame');
if (!check_acl($config['id_user'], 0, 'EW') && !check_acl($config['id_user'], 0, 'EM') && ! check_acl($config['id_user'], 0, 'PM')) {
db_pandora_audit(
@ -125,28 +125,25 @@ switch ($section) {
break;
}
if (is_metaconsole() === false) {
ui_print_standard_header(
$subpage,
'images/gm_events.png',
false,
'',
true,
(array) $buttons,
ui_print_standard_header(
$subpage,
'images/gm_events.png',
false,
'',
true,
(array) $buttons,
[
[
[
'link' => '',
'label' => __('Configuration'),
],
[
'link' => '',
'label' => __('Events'),
],
]
);
} else {
ui_meta_print_header(__('Manage events').$subpage, '', $buttons);
}
'link' => '',
'label' => __('Configuration'),
],
[
'link' => '',
'label' => __('Events'),
],
]
);
require_once $config['homedir'].'/include/functions_events.php';
@ -168,5 +165,3 @@ switch ($section) {
include_once $config['homedir'].'/godmode/events/event_responses.php';
break;
}
enterprise_hook('close_meta_frame');

View File

@ -42,7 +42,7 @@ switch ($action) {
default:
case 'new':
$actionButtons = html_print_submit_button(
__('Save'),
__('Create'),
'add',
false,
[ 'icon' => 'next' ],
@ -66,39 +66,26 @@ switch ($action) {
$table = new stdClass();
$table->width = '100%';
$table->id = 'add_alert_table';
$table->class = 'databox filters';
$table->head = [];
$table->data = [];
$table->size = [];
if (is_metaconsole() === true) {
$table->class = 'databox filters';
$table->head[0] = __('Main data');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';
}
$table->data = [];
$table->size = [];
$table->size = [];
$table->size[0] = '15%';
$table->size[1] = '90%';
if (is_metaconsole() === false) {
$table->size[0] = '15%';
$table->size[1] = '90%';
$table->style[0] = 'font-weight: bold; vertical-align: top;';
} else {
$table->style[0] = 'font-weight: bold;';
$table->class = 'filter-table-adv databox';
$table->size[0] = '50%';
$table->size[1] = '50%';
$table->size[2] = '50%';
$table->size[3] = '50%';
}
$table->data['name'][0] = __('Name');
$table->data['name'][1] = html_print_input_text(
'name',
$reportName,
__('Name'),
80,
100,
true,
false,
true
);
$table->data['group'][0] = __('Group');
$write_groups = users_get_groups_for_select(
false,
'AR',
@ -108,6 +95,36 @@ $write_groups = users_get_groups_for_select(
'id_grupo'
);
if (is_metaconsole() === true) {
$table->data['name'][0] = __('Name');
$table->data['name'][1] = html_print_input_text(
'name',
$reportName,
__('Name'),
80,
100,
true,
false,
true
);
$table->data['group'][0] = __('Group');
} else {
$table->data[0][0] = html_print_label_input_block(
__('Name'),
html_print_input_text(
'name',
$reportName,
__('Name'),
false,
100,
true,
false,
true
)
);
}
// If the report group is not among the
// RW groups (special permission) we add it.
if (isset($write_groups[$idGroupReport]) === false && $idGroupReport) {
@ -120,23 +137,44 @@ if (users_can_manage_group_all('RW') === true) {
$return_all_group = true;
}
$table->data['group'][1] = '<div class="w290px inline">';
$table->data['group'][1] .= html_print_input(
[
'type' => 'select_groups',
'id_user' => $config['id_user'],
'privilege' => 'AR',
'returnAllGroup' => $return_all_group,
'name' => 'id_group',
'selected' => $idGroupReport,
'script' => '',
'nothing' => '',
'nothing_value' => '',
'return' => true,
'required' => true,
]
);
$table->data['group'][1] .= '</div>';
if (is_metaconsole() === true) {
$table->data['group'][1] = '<div class="w290px inline">';
$table->data['group'][1] .= html_print_input(
[
'type' => 'select_groups',
'id_user' => $config['id_user'],
'privilege' => 'AR',
'returnAllGroup' => $return_all_group,
'name' => 'id_group',
'selected' => $idGroupReport,
'script' => '',
'nothing' => '',
'nothing_value' => '',
'return' => true,
'required' => true,
]
);
$table->data['group'][1] .= '</div>';
} else {
$table->data[0][1] = html_print_label_input_block(
__('Group'),
html_print_input(
[
'type' => 'select_groups',
'id_user' => $config['id_user'],
'privilege' => 'AR',
'returnAllGroup' => $return_all_group,
'name' => 'id_group',
'selected' => $idGroupReport,
'script' => '',
'nothing' => '',
'nothing_value' => '',
'return' => true,
'required' => true,
]
)
);
}
if ($report_id_user == $config['id_user']
|| is_user_admin($config['id_user'])
@ -147,41 +185,81 @@ if ($report_id_user == $config['id_user']
'group_edit' => __('The next group can edit the report'),
'user_edit' => __('Only the user and admin user can edit the report'),
];
$table->data['access'][0] = __('Write Access');
$table->data['access'][0] .= ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true
);
$table->data['access'][1] = html_print_select(
$type_access,
'type_access',
$type_access_selected,
'change_type_access(this)',
'',
0,
true
);
if (is_metaconsole() === true) {
$table->data['access'][0] = __('Write Access');
$table->data['access'][0] .= ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true
);
$table->data['access'][1] = html_print_select(
$type_access,
'type_access',
$type_access_selected,
'change_type_access(this)',
'',
0,
true
);
$style = 'display: none;';
if ($type_access_selected == 'group_edit') {
$style = '';
$class = ' invisible_important ';
if ($type_access_selected == 'group_edit') {
$class = '';
}
$table->data['access'][1] .= '<span class="access_subform'.$class.'" id="group_edit">';
$table->data['access'][1] .= '<div class="w290px inline">';
$table->data['access'][1] .= html_print_select_groups(
false,
'RW',
false,
'id_group_edit',
$id_group_edit,
false,
'',
'',
true
);
$table->data['access'][1] .= '</div>';
$table->data['access'][1] .= '</span>';
} else {
$table->data[1][0] = html_print_label_input_block(
__('Write Access').ui_print_help_tip(
__('For example, you want a report that the people of "All" groups can see but you want to edit only for you or your group.'),
true
),
html_print_select(
$type_access,
'type_access',
$type_access_selected,
'change_type_access(this)',
'',
0,
true
)
);
$options['div_class'] = 'invisible_important';
$options['div_id'] = 'group_edit';
if ($type_access_selected == 'group_edit') {
$options['div_class'] = '';
}
$table->data[1][1] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
'RW',
false,
'id_group_edit',
$id_group_edit,
false,
'',
'',
true
),
$options
);
}
$table->data['access'][1] .= '<span style="'.$style.'" class="access_subform" id="group_edit">';
$table->data['access'][1] .= '<div class="w290px inline">';
$table->data['access'][1] .= html_print_select_groups(
false,
'RW',
false,
'id_group_edit',
$id_group_edit,
false,
'',
'',
true
);
$table->data['access'][1] .= '</div>';
$table->data['access'][1] .= '</span>';
}
if ($enterpriseEnable) {
@ -190,41 +268,89 @@ if ($enterpriseEnable) {
$non_interactive_check = $non_interactive;
}
$table->data['interactive_report'][0] = __('Non interactive report');
$table->data['interactive_report'][1] .= html_print_checkbox_switch(
'non_interactive',
1,
$non_interactive_check,
if (is_metaconsole() === true) {
$table->data['interactive_report'][0] = __('Non interactive report');
$table->data['interactive_report'][1] .= html_print_checkbox_switch(
'non_interactive',
1,
$non_interactive_check,
true
);
} else {
$table->data[2][0] = html_print_label_input_block(
__('Non interactive report'),
html_print_checkbox_switch(
'non_interactive',
1,
$non_interactive_check,
true
)
);
}
}
if (is_metaconsole() === true) {
$table->data['description'][0] = __('Description');
$table->data['description'][1] = html_print_textarea(
'description',
2,
80,
$description,
'',
true
);
} else {
$table->data[2][1] = html_print_label_input_block(
__('Description'),
html_print_textarea(
'description',
2,
1,
$description,
'',
true
)
);
}
$table->data['description'][0] = __('Description');
$table->data['description'][1] = html_print_textarea(
'description',
2,
80,
$description,
'',
true
);
if (enterprise_installed() === true) {
$table->data['cover'][0] = __('Generate cover page in PDF render');
$table->data['cover'][1] = html_print_checkbox_switch(
'cover_page_render',
1,
$cover_page_render,
true
);
if (is_metaconsole() === true) {
$table->data['cover'][0] = __('Generate cover page in PDF render');
$table->data['cover'][1] = html_print_checkbox_switch(
'cover_page_render',
1,
$cover_page_render,
true
);
$table->data['index'][0] = __('Generate index in PDF render');
$table->data['index'][1] = html_print_checkbox_switch(
'index_render',
1,
$index_render,
true
);
$table->data['index'][0] = __('Generate index in PDF render');
$table->data['index'][1] = html_print_checkbox_switch(
'index_render',
1,
$index_render,
true
);
} else {
$table->data[3][0] = html_print_label_input_block(
__('Generate cover page in PDF render'),
html_print_checkbox_switch(
'cover_page_render',
1,
$cover_page_render,
true
)
);
$table->data[3][1] = html_print_label_input_block(
__('Generate index in PDF render'),
html_print_checkbox_switch(
'index_render',
1,
$index_render,
true
)
);
}
}
echo '<form class="" method="post">';
@ -238,11 +364,10 @@ echo '</div></form>';
?>
<script type="text/javascript">
function change_type_access(select_item) {
$(".access_subform").hide();
if ($(select_item).val() == "group_edit") {
$("#group_edit").show()
$("#group_edit").removeClass('invisible_important');
} else {
$("#group_edit").hide()
$("#group_edit").addClass('invisible_important');
}
}

View File

@ -46,35 +46,14 @@ function dialog_message(message_id) {
});
});
$('[id^=checkbox-massive_report_check]').change(function(){
if($(this).parent().parent().parent().hasClass('checkselected')){
$(this).parent().parent().parent().removeClass('checkselected');
}
else{
$(this).parent().parent().parent().addClass('checkselected');
}
});
$('[id^=checkbox-all_delete]').change(function(){
if ($("#checkbox-all_delete").prop("checked")) {
$('[id^=checkbox-massive_report_check]')
.parent()
.parent()
.parent()
.addClass('checkselected');
$(".check_delete").prop("checked", true);
console.log($('.check_delete'));
$('.check_delete').each(function(){
$('#hidden-id_report_'+$(this).val()).prop("disabled", false);
});
}
else{
$('[id^=checkbox-massive_report_check]')
.parent()
.parent()
.parent()
.removeClass('checkselected');
console.log($('.check_delete'));
$(".check_delete").prop("checked", false);
}
});
@ -752,55 +731,100 @@ switch ($action) {
$table_aux = new stdClass();
$table_aux->width = '100%';
$table_aux->class = 'databox filters';
$table_aux->cellpadding = 0;
$table_aux->cellspacing = 0;
if (is_metaconsole()) {
$table_aux->class = 'databox filters';
$table_aux->colspan[0][0] = 4;
$table_aux->data[0][0] = '<b>'.__('Group').'</b>';
$table_aux->colspan[0][0] = 4;
$table_aux->data[0][0] = '<b>'.__('Group').'</b>';
$table_aux->data[0][1] = html_print_select_groups(
false,
$access,
true,
'id_group',
$id_group,
'',
'',
'',
true,
false,
true,
'',
false,
'',
false,
false,
'id_grupo'
).'<br>';
$table_aux->data[0][1] = html_print_select_groups(
false,
$access,
true,
'id_group',
$id_group,
'',
'',
'',
true,
false,
true,
'',
false,
'',
false,
false,
'id_grupo'
).'<br>';
$table_aux->data[0][2] = '<b>'.__('Free text for search: ');
$table_aux->data[0][2] .= ui_print_help_tip(
__('Search by report name or description, list matches.'),
true
);
$table_aux->data[0][2] .= '</b>';
$table_aux->data[0][3] = html_print_input_text(
'search',
$search,
'',
30,
'',
true
);
$table_aux->data[0][2] = '<b>'.__('Free text for search: ');
$table_aux->data[0][2] .= ui_print_help_tip(
__('Search by report name or description, list matches.'),
true
);
$table_aux->data[0][2] .= '</b>';
$table_aux->data[0][3] = html_print_input_text(
__('search'),
$search,
'',
30,
'',
true
);
} else {
$table_aux->class = 'filter-table-adv';
$table_aux->size[0] = '30%';
$table_aux->size[1] = '30%';
$table_aux->size[2] = '30%';
$table_aux->data[0][6] = html_print_submit_button(
__('Search'),
'search_submit',
false,
'class="sub upd"',
true
);
$table_aux->data[0][0] = html_print_label_input_block(
__('Group'),
html_print_select_groups(
false,
$access,
true,
'id_group',
$id_group,
'',
'',
'',
true,
false,
true,
'',
false,
'',
false,
false,
'id_grupo'
)
);
$table_aux->data[0][1] = html_print_label_input_block(
__('Free text for search: ').ui_print_help_tip(
__('Search by report name or description, list matches.'),
true
),
html_print_input_text(
__('search'),
$search,
'',
30,
'',
true
)
);
}
if (is_metaconsole()) {
$table_aux->data[0][6] = html_print_submit_button(
__('Search'),
'search_submit',
false,
'class="sub upd"',
true
);
}
$url_rb = 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder';
if (is_metaconsole()) {
@ -809,9 +833,37 @@ switch ($action) {
$filter .= '</form>';
ui_toggle($filter, __('Show Option'));
} else {
echo '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">';
html_print_table($table_aux);
echo '</form>';
$searchForm = '<form action="'.$url_rb.'&id_group='.$id_group.'&pure='.$pure.'" method="post">';
$searchForm .= html_print_table($table_aux, true);
$searchForm .= html_print_div(
[
'class' => 'action-buttons',
'content' => html_print_submit_button(
__('Search'),
'search_submit',
false,
[
'mode' => 'mini',
'icon' => 'search',
],
true
),
],
true
);
$searchForm .= '</form>';
ui_toggle(
$searchForm,
'<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form',
'',
false,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
}
ui_require_jquery_file('pandora.controls');
@ -1116,7 +1168,13 @@ switch ($action) {
$data[$next] = ui_print_group_icon(
$report['id_group'],
true
true,
'',
'',
true,
false,
false,
'invert_filter'
);
$next++;
}

View File

@ -2279,7 +2279,7 @@ if ($process_buffers === true) {
'',
true,
true,
'white_box white_box_opened fixed_filter_bar',
'white_box white_box_opened no_border',
'no-border flex-row'
);

View File

@ -6745,6 +6745,7 @@ function html_print_label_input_block(
):string {
$div_class = '';
$label_class = '';
$div_id = '';
if (empty($options) === false) {
if (isset($options['div_class']) === true) {

View File

@ -3958,7 +3958,7 @@ function ui_print_datatable(array $parameters)
ui_require_css_file('datatables.min', 'include/styles/js/');
ui_require_css_file('tables');
if (is_metaconsole()) {
ui_require_css_file('tables_meta', ENTERPRISE_DIR.'/include/styles/');
ui_require_css_file('meta_tables', ENTERPRISE_DIR.'/include/styles/');
}
ui_require_javascript_file('datatables.min');
@ -3986,10 +3986,10 @@ function ui_print_datatable(array $parameters)
);
$output .= '"/>';
if (is_metaconsole() === true) {
// Load tables_meta.css.
// Load meta_tables.css.
$output .= '<link rel="stylesheet" href="';
$output .= ui_get_full_url(
ENTERPRISE_DIR.'/include/styles/tables_meta.css',
ENTERPRISE_DIR.'/include/styles/meta_tables.css',
false,
false,
false

View File

@ -613,7 +613,9 @@ function snmp_browser_create_modules(module_target, return_post = true) {
var oids = [];
id_check.forEach(function(product, index) {
var oid = $("#" + product)
.siblings("a")
.parent()
.parent()
.find("a")
.attr("href");
if (oid.indexOf('javascript: snmpGet("') != -1) {
oid = oid.replace('javascript: snmpGet("', "");
@ -657,23 +659,29 @@ function snmp_browser_create_modules(module_target, return_post = true) {
params["page"] = "include/ajax/snmp_browser.ajax";
params["snmp_extradata"] = snmp_data;
$("input[name=create_modules_" + module_target + "]").removeClass(
$("button[name=create_modules_" + module_target + "]").removeClass(
"sub add"
);
$("input[name=create_modules_" + module_target + "]").addClass("sub spinn");
$("button[name=create_modules_" + module_target + "]").addClass(
"sub spinn"
);
$("#dialog_error").on("dialogclose", function(event) {
$("input[name=create_modules_" + module_target + "]").removeClass(
$("button[name=create_modules_" + module_target + "]").removeClass(
"sub spinn"
);
$("input[name=create_modules_" + module_target + "]").addClass("sub add");
$("button[name=create_modules_" + module_target + "]").addClass(
"sub add"
);
});
$("#dialog_success").on("dialogclose", function(event) {
$("input[name=create_modules_" + module_target + "]").removeClass(
$("button[name=create_modules_" + module_target + "]").removeClass(
"sub spinn"
);
$("input[name=create_modules_" + module_target + "]").addClass("sub add");
$("button[name=create_modules_" + module_target + "]").addClass(
"sub add"
);
});
$.ajax({

View File

@ -169,6 +169,7 @@ body {
body * {
font-family: "lato";
}
body.body-report {
display: block;
}
@ -1023,6 +1024,7 @@ select:-internal-list-box {
border: 1px solid #e5e9ed;
border-radius: 8px;
}
.align-top td {
vertical-align: top;
}
@ -1165,6 +1167,7 @@ p.center {
margin-left: 10px;
margin-right: 10px;
}
.img_help {
cursor: help;
margin: 0 5px;
@ -2773,6 +2776,7 @@ td.cellBig {
right: 0;
margin: 0 10px;
}
/* Standard styles for status colos (groups, events, backgrounds...) */
.opacity_cell {
filter: alpha(opacity=80);
@ -5955,6 +5959,7 @@ div#bullets_modules div {
.agent_details_first_row.agent_details_line {
margin: 0;
}
.agent_details_line {
display: flex;
margin: 20px 0 0;
@ -9208,6 +9213,7 @@ div.stat-win-spinner img {
.line_height_26 {
line-height: 26px;
}
.line_height_0pt {
line-height: 10pt !important;
}
@ -9891,6 +9897,7 @@ div#err_msg_centralised {
display: flex;
flex-direction: column;
}
.div-col {
width: 33%;
display: flex;
@ -9973,6 +9980,7 @@ textarea[list],
select[list] {
line-height: initial;
}
textarea {
padding: 10px;
height: auto;
@ -10350,14 +10358,17 @@ button div.load {
mask: url(../../images/logs@svg.svg) no-repeat center / contain;
-webkit-mask: url(../../images/logs@svg.svg) no-repeat center / contain;
}
button div.camera {
mask: url(../../images/picture.svg) no-repeat center / contain;
-webkit-mask: url(../../images/picture.svg) no-repeat center / contain;
}
button div.alert {
mask: url(../../images/alert@svg.svg) no-repeat center / contain;
-webkit-mask: url(../../images/alert@svg.svg) no-repeat center / contain;
}
button div.ok {
mask: url(../../images/ok.svg) no-repeat center / contain;
-webkit-mask: url(../../images/ok.svg) no-repeat center / contain;
@ -10417,6 +10428,7 @@ button div.info {
mask: url(../../images/info@svg.svg) no-repeat center / contain;
-webkit-mask: url(../../images/info@svg.svg) no-repeat center / contain;
}
button div.signin {
mask: url(../../images/signin.svg) no-repeat center / contain;
-webkit-mask: url(../../images/signin.svg) no-repeat center / contain;
@ -10456,6 +10468,7 @@ button div.cog.rotation {
transform: rotate(359deg);
}
}
.ui-dialog-buttonset {
width: 100%;
display: flex;
@ -10567,7 +10580,8 @@ table#simple tr td,
table#advanced tr td,
table.principal_table tr td,
.white_table_flex > table tr td,
.table_section table tr td {
.table_section table tr td,
#agent_controls {
display: flex;
flex-direction: row;
align-items: center;
@ -10920,6 +10934,7 @@ tr.bring_next_field {
.external_tools_title {
padding: 0 10px;
}
pre.external_tools_output {
padding: 0 10px;
/*
@ -11009,6 +11024,7 @@ pre.external_tools_output {
margin-right: 10px;
font-size: 10pt;
}
/*
.filter_table input,
.table_modal_alternate input,
@ -11144,6 +11160,7 @@ table.table_modal_alternate
span.subsection_header_title {
height: 18px;
}
.subsection_header_title.secondary {
font-size: 14px;
}
@ -11151,6 +11168,7 @@ span.subsection_header_title {
span.subsection_header_title.secondary {
height: 14px;
}
.regular_font {
font-family: "lato" !important;
}
@ -11400,3 +11418,17 @@ div[role="dialog"] {
.filter-list-adv fieldset.several-fields {
margin-left: 10px;
}
.display-grid {
display: grid;
}
.flex-colum-center {
display: flex;
flex-direction: column;
align-items: center;
}
.flex-colum-center > img {
margin: 5px;
}

View File

@ -712,3 +712,18 @@ td:has(div > .no-margin-top) {
.no-margin-top {
margin-top: 0px !important;
}
tr.datos > td.datos > div > label,
tr.datos2 > td.datos2 > div > label,
tr.datos2 > td.datos2 > div > div > label {
font-size: 13px;
line-height: 16px;
}
tr.datos2 > td.datos2 > div > div {
margin-top: 10px;
}
.mgn_tp_0_imp {
margin-top: 0px !important;
}

View File

@ -74,7 +74,8 @@ $readonly = false;
ui_require_css_file('events');
ui_require_css_file('tables');
if (is_metaconsole() === true) {
ui_require_css_file('meta_tables', ENTERPRISE_DIR.'/meta/styles/');
ui_require_css_file('tables');
// ui_require_css_file('meta_tables', ENTERPRISE_DIR.'/meta/styles/');
ui_require_css_file('meta_events', ENTERPRISE_DIR.'/meta/styles/');
}

View File

@ -111,7 +111,7 @@ $(document).on('DOMSubtreeModified', "#snmp_create_module", function() {
});
$(document).on("click", 'div#snmp_create_buttons > input', function (event) {
$(document).on("click", 'div#snmp_create_buttons > button', function (event) {
var source_button = this.name;
var target = "";
@ -254,55 +254,55 @@ function snmp_show_result_message(data) {
var dato = JSON.parse(data);
if (dato.length !== 0) {
$("#error_text").text("");
$("#error_text").text("");
if (dato[0] === -1) {
$("#dialog_no_agents_selected").dialog({
if (dato[0] === -1) {
$("#dialog_no_agents_selected").dialog({
resizable: true,
draggable: true,
modal: true,
height: 300,
width: 500,
close: function(e, ui) {
$("input[name=create_modules_network_component]").removeClass("sub spinn");
$("input[name=create_modules_network_component]").addClass("sub add");
$("button[name=create_modules_network_component]").removeClass("sub spinn");
$("button[name=create_modules_network_component]").addClass("sub add");
},
overlay: {
opacity: 0.5,
background: "black"
opacity: 0.5,
background: "black"
}
});
} else {
$("#error_text").text("");
});
} else {
$("#error_text").text("");
dato.forEach(function (valor, indice, array) {
dato.forEach(function (valor, indice, array) {
$("#error_text").append("<br/>" + valor);
});
$("#dialog_error").dialog({
});
$("#dialog_error").dialog({
resizable: true,
draggable: true,
modal: true,
height: 300,
width: 500,
overlay: {
opacity: 0.5,
background: "black"
opacity: 0.5,
background: "black"
}
});
}
});
}
} else {
$("#dialog_success").dialog({
$("#dialog_success").dialog({
resizable: true,
draggable: true,
modal: true,
height: 250,
width: 500,
overlay: {
opacity: 0.5,
background: "black"
opacity: 0.5,
background: "black"
}
});
});
}
}
/**