Merge branch 'ent-9662-second-round' of brutus.artica.es:artica/pandorafms into ent-9662-second-round
This commit is contained in:
commit
c51c00f974
|
@ -325,7 +325,7 @@ if ($edit === false) {
|
||||||
|
|
||||||
$table_simple->data['module_n_type'][1] = '<span class="result_info_text">'.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')</span>';
|
$table_simple->data['module_n_type'][1] = '<span class="result_info_text">'.modules_get_moduletype_description($id_module_type).' ('.$type_names_hash[$id_module_type].')</span>';
|
||||||
} else {
|
} else {
|
||||||
$idModuleType = (isset($id_module_type) === true) ? $idModuleType : '';
|
$idModuleType = (isset($id_module_type) === true) ? $id_module_type : '';
|
||||||
// Removed web analysis and log4x from select.
|
// Removed web analysis and log4x from select.
|
||||||
$tipe_not_in = '24, 25';
|
$tipe_not_in = '24, 25';
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
|
|
|
@ -128,6 +128,7 @@ if ($page === 'enterprise/godmode/policies/policy_modules') {
|
||||||
|
|
||||||
// In ICMP modules, port is not configurable.
|
// In ICMP modules, port is not configurable.
|
||||||
if ($id_module_type !== 6 && $id_module_type !== 7) {
|
if ($id_module_type !== 6 && $id_module_type !== 7) {
|
||||||
|
$tcp_port = (empty($tcp_port) === false) ? $tcp_port : get_parameter('tcp_port');
|
||||||
$data[1] = html_print_input_text(
|
$data[1] = html_print_input_text(
|
||||||
'tcp_port',
|
'tcp_port',
|
||||||
$tcp_port,
|
$tcp_port,
|
||||||
|
|
|
@ -174,7 +174,7 @@ if (is_ajax()) {
|
||||||
5,
|
5,
|
||||||
1,
|
1,
|
||||||
'',
|
'',
|
||||||
'class="fields"',
|
'class="fields w100p"',
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
$is_management_allowed
|
$is_management_allowed
|
||||||
|
@ -307,7 +307,8 @@ if (is_ajax()) {
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'fields',
|
'fields',
|
||||||
$is_management_allowed
|
$is_management_allowed,
|
||||||
|
'width: 100%;'
|
||||||
);
|
);
|
||||||
|
|
||||||
$rfield .= html_print_select(
|
$rfield .= html_print_select(
|
||||||
|
@ -321,7 +322,8 @@ if (is_ajax()) {
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'fields',
|
'fields',
|
||||||
$is_management_allowed
|
$is_management_allowed,
|
||||||
|
'width: 100%;'
|
||||||
);
|
);
|
||||||
|
|
||||||
$ffield .= html_print_input_text('field'.$i.'_value[]', '', '', 10, 10, true, false, false, '', 'datepicker');
|
$ffield .= html_print_input_text('field'.$i.'_value[]', '', '', 10, 10, true, false, false, '', 'datepicker');
|
||||||
|
@ -487,7 +489,7 @@ if (is_ajax()) {
|
||||||
5,
|
5,
|
||||||
1,
|
1,
|
||||||
$fv[0],
|
$fv[0],
|
||||||
'style="'.$style.'" class="fields min-height-40px"',
|
'style="'.$style.'" class="fields min-height-40px w100p"',
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
$is_management_allowed
|
$is_management_allowed
|
||||||
|
@ -497,7 +499,7 @@ if (is_ajax()) {
|
||||||
5,
|
5,
|
||||||
1,
|
1,
|
||||||
$fv[0],
|
$fv[0],
|
||||||
'style="'.$style.'" class="fields_recovery min-height-40px',
|
'style="'.$style.'" class="fields_recovery min-height-40px w100p',
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
$is_management_allowed
|
$is_management_allowed
|
||||||
|
@ -510,7 +512,7 @@ if (is_ajax()) {
|
||||||
5,
|
5,
|
||||||
1,
|
1,
|
||||||
'',
|
'',
|
||||||
'style="'.$style.'" class="fields min-height-40px"',
|
'style="'.$style.'" class="fields min-height-40px w100p"',
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
$is_management_allowed
|
$is_management_allowed
|
||||||
|
@ -520,7 +522,7 @@ if (is_ajax()) {
|
||||||
5,
|
5,
|
||||||
1,
|
1,
|
||||||
'',
|
'',
|
||||||
'style="'.$style.'" class="fields_recovery min-height-40px"',
|
'style="'.$style.'" class="fields_recovery min-height-40px w100p"',
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
$is_management_allowed
|
$is_management_allowed
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -612,8 +612,8 @@ function snmp_browser_print_oid(
|
||||||
$table->head[1] = __('OID Information');
|
$table->head[1] = __('OID Information');
|
||||||
$output .= html_print_table($table, true);
|
$output .= html_print_table($table, true);
|
||||||
|
|
||||||
$url = 'index.php?'.'sec=gmodules&'.'sec2=godmode/modules/manage_network_components';
|
$url = 'index.php?sec=gmodules&sec2=godmode/modules/manage_network_components';
|
||||||
$output .= '<form id="snmp_create_module" class="center mrgn_10px" target="_blank" method="post" action="'.$url.'">';
|
$output .= '<form id="snmp_create_module" class="center mrgn_10px flex" target="_blank" method="post" action="'.$url.'">';
|
||||||
$output .= html_print_input_hidden('create_network_from_snmp_browser', 1, true);
|
$output .= html_print_input_hidden('create_network_from_snmp_browser', 1, true);
|
||||||
$output .= html_print_input_hidden('id_component_type', 2, true);
|
$output .= html_print_input_hidden('id_component_type', 2, true);
|
||||||
$output .= html_print_input_hidden('type', 17, true);
|
$output .= html_print_input_hidden('type', 17, true);
|
||||||
|
@ -638,19 +638,21 @@ function snmp_browser_print_oid(
|
||||||
__('Create network component'),
|
__('Create network component'),
|
||||||
'create_network_component',
|
'create_network_component',
|
||||||
false,
|
false,
|
||||||
'class="sub add float-left mrgn_right_20px"',
|
'class="buttonButton mrgn_right_20px"',
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
// Hidden by default.
|
if (isset($_POST['print_create_agent_module'])) {
|
||||||
$output .= html_print_button(
|
// Hidden by default.
|
||||||
__('Create agent module'),
|
$output .= html_print_button(
|
||||||
'create_module_agent_single',
|
__('Create agent module'),
|
||||||
false,
|
'create_module_agent_single',
|
||||||
'show_add_module()',
|
false,
|
||||||
'class="sub add invisible"',
|
'show_add_module()',
|
||||||
true
|
'class="sub add invisible"',
|
||||||
);
|
true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Select agent modal.
|
// Select agent modal.
|
||||||
$output .= snmp_browser_print_create_modules(true);
|
$output .= snmp_browser_print_create_modules(true);
|
||||||
|
@ -685,7 +687,8 @@ function snmp_browser_print_container(
|
||||||
$width='100%',
|
$width='100%',
|
||||||
$height='60%',
|
$height='60%',
|
||||||
$display='',
|
$display='',
|
||||||
$show_massive_buttons=false
|
$show_massive_buttons=false,
|
||||||
|
$toggle=false
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
@ -948,8 +951,22 @@ function snmp_browser_print_container(
|
||||||
);
|
);
|
||||||
$table->data[2] .= '</div>';
|
$table->data[2] .= '</div>';
|
||||||
|
|
||||||
|
if ($toggle == true) {
|
||||||
|
$print_create_agent_module = 1;
|
||||||
|
} else {
|
||||||
|
$print_create_agent_module = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$searchForm = '<form onsubmit="snmpBrowse(); return false;">';
|
$searchForm = '<form onsubmit="snmpBrowse(); return false;">';
|
||||||
$searchForm .= html_print_table($table, true);
|
$searchForm .= html_print_table($table, true);
|
||||||
|
$searchForm .= html_print_input_hidden(
|
||||||
|
'print_create_agent_module',
|
||||||
|
$print_create_agent_module,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
'print_create_agent_module'
|
||||||
|
);
|
||||||
$searchForm .= html_print_div(
|
$searchForm .= html_print_div(
|
||||||
[
|
[
|
||||||
'class' => 'action-buttons',
|
'class' => 'action-buttons',
|
||||||
|
@ -969,17 +986,19 @@ function snmp_browser_print_container(
|
||||||
|
|
||||||
$searchForm .= '</form>';
|
$searchForm .= '</form>';
|
||||||
|
|
||||||
ui_toggle(
|
if ($toggle == true) {
|
||||||
$searchForm,
|
ui_toggle(
|
||||||
'<span class="subsection_header_title">'.__('Filters').'</span>',
|
$searchForm,
|
||||||
'filter_form',
|
'<span class="subsection_header_title">'.__('Filters').'</span>',
|
||||||
'',
|
'filter_form',
|
||||||
false,
|
'',
|
||||||
false,
|
false,
|
||||||
'',
|
false,
|
||||||
'white-box-content',
|
'',
|
||||||
'box-flat white_table_graph fixed_filter_bar'
|
'white-box-content',
|
||||||
);
|
'box-flat white_table_graph fixed_filter_bar'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Search tools.
|
// Search tools.
|
||||||
$table2 = new stdClass();
|
$table2 = new stdClass();
|
||||||
|
@ -1101,6 +1120,62 @@ function snmp_browser_print_container(
|
||||||
);
|
);
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
|
|
||||||
|
if ($toggle === false) {
|
||||||
|
// This extra div that can be handled by jquery's dialog.
|
||||||
|
$output .= '<div id="snmp_browser_container" style="display:none">';
|
||||||
|
$output .= '<div style="text-align: left; width: '.$width.'; height: '.$height.';">';
|
||||||
|
$output .= '<div class="w100p">';
|
||||||
|
$output .= '<form onsubmit="snmpBrowse(); return false;">';
|
||||||
|
$output .= html_print_table($table, true);
|
||||||
|
$output .= html_print_div(
|
||||||
|
[
|
||||||
|
'class' => 'action-buttons',
|
||||||
|
'content' => html_print_submit_button(
|
||||||
|
__('Execute'),
|
||||||
|
'srcbutton',
|
||||||
|
false,
|
||||||
|
[
|
||||||
|
'mode' => 'mini',
|
||||||
|
'icon' => 'cog',
|
||||||
|
],
|
||||||
|
true
|
||||||
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$output .= '</form></div>';
|
||||||
|
|
||||||
|
if (isset($snmp_version) === false) {
|
||||||
|
$snmp_version = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($snmp_version == 3) {
|
||||||
|
$output .= '<div id="snmp3_browser_options">';
|
||||||
|
} else {
|
||||||
|
$output .= '<div id="snmp3_browser_options" style="display: none;">';
|
||||||
|
}
|
||||||
|
|
||||||
|
$output .= ui_toggle(
|
||||||
|
html_print_table($table3, true),
|
||||||
|
__('SNMP v3 options'),
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$output .= '</div>';
|
||||||
|
$output .= '<div class="search_options">';
|
||||||
|
$output .= ui_toggle(
|
||||||
|
html_print_table($table2, true),
|
||||||
|
__('Search options'),
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
);
|
||||||
|
$output .= '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
// SNMP tree container.
|
// SNMP tree container.
|
||||||
$output .= '<div class="snmp_tree_container" id="snmp_tree_container" style="display:none">';
|
$output .= '<div class="snmp_tree_container" id="snmp_tree_container" style="display:none">';
|
||||||
$output .= html_print_input_hidden('search_count', 0, true);
|
$output .= html_print_input_hidden('search_count', 0, true);
|
||||||
|
|
|
@ -257,6 +257,8 @@ function snmpGet(oid) {
|
||||||
var snmp3_privacy_pass = $("#password-snmp3_browser_privacy_pass").val();
|
var snmp3_privacy_pass = $("#password-snmp3_browser_privacy_pass").val();
|
||||||
var ajax_url = $("#hidden-ajax_url").val();
|
var ajax_url = $("#hidden-ajax_url").val();
|
||||||
var server_to_exec = $("#server_to_exec").val();
|
var server_to_exec = $("#server_to_exec").val();
|
||||||
|
var target_port = $("#target_port").val();
|
||||||
|
var print_create_agent_module = $("#print_create_agent_module").val();
|
||||||
|
|
||||||
// Check for a custom action
|
// Check for a custom action
|
||||||
var custom_action = $("#hidden-custom_action").val();
|
var custom_action = $("#hidden-custom_action").val();
|
||||||
|
@ -280,6 +282,8 @@ function snmpGet(oid) {
|
||||||
params["action"] = "snmpget";
|
params["action"] = "snmpget";
|
||||||
params["custom_action"] = custom_action;
|
params["custom_action"] = custom_action;
|
||||||
params["page"] = "include/ajax/snmp_browser.ajax";
|
params["page"] = "include/ajax/snmp_browser.ajax";
|
||||||
|
params["target_port"] = target_port;
|
||||||
|
params["print_create_agent_module"] = print_create_agent_module;
|
||||||
|
|
||||||
// SNMP get!
|
// SNMP get!
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
|
@ -560,7 +564,7 @@ function snmpBrowserWindow() {
|
||||||
background: "black"
|
background: "black"
|
||||||
},
|
},
|
||||||
width: 1000,
|
width: 1000,
|
||||||
height: 500
|
height: 800
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -682,6 +682,10 @@ select:-internal-list-box {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w88p {
|
||||||
|
width: 88%;
|
||||||
|
}
|
||||||
|
|
||||||
.w90p {
|
.w90p {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
}
|
}
|
||||||
|
@ -2377,7 +2381,7 @@ ol.steps li.visited span {
|
||||||
}
|
}
|
||||||
|
|
||||||
ol.steps li.current {
|
ol.steps li.current {
|
||||||
border-left: 5px solid #778866;
|
border-left: 5px solid var(--primary-color);
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background-color: #e9f3d2;
|
background-color: #e9f3d2;
|
||||||
|
@ -7848,6 +7852,10 @@ div.graph div.legend table {
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.height_15px {
|
||||||
|
height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.height_20px {
|
.height_20px {
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
|
@ -11540,7 +11548,7 @@ ul.tag-editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
.max-width-100p {
|
.max-width-100p {
|
||||||
max-width: 100% !important;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Datatables overrides */
|
/* Datatables overrides */
|
||||||
|
|
|
@ -236,3 +236,7 @@ form.alert-correlation > div > ul > li.flex-flex-end > input {
|
||||||
form.alert-correlation > div > ul > li.flex-flex-end > label {
|
form.alert-correlation > div > ul > li.flex-flex-end > label {
|
||||||
width: 50px !important;
|
width: 50px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
form.alert-correlation > div > ul > li.display-grid > textarea {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ ui_print_standard_header(
|
||||||
);
|
);
|
||||||
|
|
||||||
// SNMP tree container.
|
// SNMP tree container.
|
||||||
snmp_browser_print_container(false, '100%', '60%', '', true);
|
snmp_browser_print_container(false, '100%', '60%', '', true, true);
|
||||||
|
|
||||||
// Div for modal.
|
// Div for modal.
|
||||||
echo '<div id="modal" style="display:none"></div>';
|
echo '<div id="modal" style="display:none"></div>';
|
||||||
|
@ -655,7 +655,7 @@ function show_add_module() {
|
||||||
snmp3_auth_pass : $('#password-snmp3_browser_auth_pass').val(),
|
snmp3_auth_pass : $('#password-snmp3_browser_auth_pass').val(),
|
||||||
snmp3_privacy_method : $('#snmp3_browser_privacy_method').val(),
|
snmp3_privacy_method : $('#snmp3_browser_privacy_method').val(),
|
||||||
snmp3_privacy_pass : $('#password-snmp3_browser_privacy_pass').val(),
|
snmp3_privacy_pass : $('#password-snmp3_browser_privacy_pass').val(),
|
||||||
|
tcp_port : $('#target_port').val(),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Append values to form.
|
// Append values to form.
|
||||||
|
|
Loading…
Reference in New Issue