mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-23 01:49:11 +02:00
Wizard RC1 with filtering and improved comm
This commit is contained in:
parent
3dc699e8fd
commit
7bb68abbad
@ -3594,6 +3594,8 @@ class AgentWizard extends HTML
|
|||||||
) {
|
) {
|
||||||
$output = '';
|
$output = '';
|
||||||
foreach ($blocks as $idBlock => $block) {
|
foreach ($blocks as $idBlock => $block) {
|
||||||
|
$md5IdBlock = hash('md5', $idBlock);
|
||||||
|
|
||||||
// Data with all components.
|
// Data with all components.
|
||||||
$blockData = $block['data'];
|
$blockData = $block['data'];
|
||||||
|
|
||||||
@ -3627,7 +3629,7 @@ class AgentWizard extends HTML
|
|||||||
'',
|
'',
|
||||||
'form="form-create-modules" class="interfaz_select"',
|
'form="form-create-modules" class="interfaz_select"',
|
||||||
true,
|
true,
|
||||||
''
|
$md5IdBlock
|
||||||
);
|
);
|
||||||
$blockTitle .= '<b>'.$block['name'];
|
$blockTitle .= '<b>'.$block['name'];
|
||||||
$blockTitle .= ' ';
|
$blockTitle .= ' ';
|
||||||
@ -3813,7 +3815,7 @@ class AgentWizard extends HTML
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
'',
|
$md5IdBlock,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
@ -3853,7 +3855,7 @@ class AgentWizard extends HTML
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
'',
|
$md5IdBlock,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
@ -3876,7 +3878,7 @@ class AgentWizard extends HTML
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
'',
|
$md5IdBlock,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
@ -3919,7 +3921,7 @@ class AgentWizard extends HTML
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
'',
|
$md5IdBlock,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
@ -3942,7 +3944,7 @@ class AgentWizard extends HTML
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
'',
|
'',
|
||||||
'',
|
$md5IdBlock,
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
@ -4024,7 +4026,7 @@ class AgentWizard extends HTML
|
|||||||
'module-active-'.$uniqueId,
|
'module-active-'.$uniqueId,
|
||||||
$module['module_enabled'],
|
$module['module_enabled'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4033,7 +4035,7 @@ class AgentWizard extends HTML
|
|||||||
'module-type-'.$uniqueId,
|
'module-type-'.$uniqueId,
|
||||||
$module['type'],
|
$module['type'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4042,7 +4044,7 @@ class AgentWizard extends HTML
|
|||||||
'module-unit-'.$uniqueId,
|
'module-unit-'.$uniqueId,
|
||||||
$module['unit'],
|
$module['unit'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4051,7 +4053,7 @@ class AgentWizard extends HTML
|
|||||||
'module-value-'.$uniqueId,
|
'module-value-'.$uniqueId,
|
||||||
$module['value'],
|
$module['value'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4060,7 +4062,7 @@ class AgentWizard extends HTML
|
|||||||
'module-macros-'.$uniqueId,
|
'module-macros-'.$uniqueId,
|
||||||
base64_encode($module['macros']),
|
base64_encode($module['macros']),
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4069,7 +4071,7 @@ class AgentWizard extends HTML
|
|||||||
'module-name-oid-'.$uniqueId,
|
'module-name-oid-'.$uniqueId,
|
||||||
$module['name_oid'],
|
$module['name_oid'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4078,7 +4080,7 @@ class AgentWizard extends HTML
|
|||||||
'module-scan_type-'.$uniqueId,
|
'module-scan_type-'.$uniqueId,
|
||||||
$module['scan_type'],
|
$module['scan_type'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4087,7 +4089,7 @@ class AgentWizard extends HTML
|
|||||||
'module-execution_type-'.$uniqueId,
|
'module-execution_type-'.$uniqueId,
|
||||||
$module['execution_type'],
|
$module['execution_type'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4096,7 +4098,7 @@ class AgentWizard extends HTML
|
|||||||
'module-query_class-'.$uniqueId,
|
'module-query_class-'.$uniqueId,
|
||||||
$module['query_class'],
|
$module['query_class'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4105,7 +4107,7 @@ class AgentWizard extends HTML
|
|||||||
'module-query_key_field-'.$uniqueId,
|
'module-query_key_field-'.$uniqueId,
|
||||||
$module['query_key_field'],
|
$module['query_key_field'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4114,7 +4116,7 @@ class AgentWizard extends HTML
|
|||||||
'module-scan_filters-'.$uniqueId,
|
'module-scan_filters-'.$uniqueId,
|
||||||
$module['scan_filters'],
|
$module['scan_filters'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4123,7 +4125,7 @@ class AgentWizard extends HTML
|
|||||||
'module-query_filters-'.$uniqueId,
|
'module-query_filters-'.$uniqueId,
|
||||||
base64_encode($module['query_filters']),
|
base64_encode($module['query_filters']),
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4134,7 +4136,7 @@ class AgentWizard extends HTML
|
|||||||
'module-default_name-'.$uniqueId,
|
'module-default_name-'.$uniqueId,
|
||||||
$module['name'],
|
$module['name'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -4142,7 +4144,7 @@ class AgentWizard extends HTML
|
|||||||
'module-default_description-'.$uniqueId,
|
'module-default_description-'.$uniqueId,
|
||||||
$module['description'],
|
$module['description'],
|
||||||
true,
|
true,
|
||||||
false,
|
$md5IdBlock,
|
||||||
'form="form-create-modules"'
|
'form="form-create-modules"'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -5235,10 +5237,25 @@ class AgentWizard extends HTML
|
|||||||
var loading = "<?php echo __('Loading'); ?>" + "...";
|
var loading = "<?php echo __('Loading'); ?>" + "...";
|
||||||
var datas = {};
|
var datas = {};
|
||||||
|
|
||||||
let inputs = document.getElementsByTagName("input");
|
let inputs = document.querySelectorAll("input,textarea");
|
||||||
|
|
||||||
for (let input of inputs) {
|
for (let input of inputs) {
|
||||||
|
let id = input.className;
|
||||||
|
let chkbox =document.getElementById('interfaz_select_'+id);
|
||||||
|
if (chkbox != undefined
|
||||||
|
&& chkbox.checked == false
|
||||||
|
) {
|
||||||
|
// Skip disabled containers.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input.type != "checkbox") {
|
||||||
datas[input.name] = input.value;
|
datas[input.name] = input.value;
|
||||||
|
}
|
||||||
|
if (input.type == "checkbox" && input.checked) {
|
||||||
|
datas[input.name] = input.value;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
@ -3586,7 +3586,7 @@ function html_print_checkbox_switch_extended(
|
|||||||
if ($id == '') {
|
if ($id == '') {
|
||||||
$output .= ' id="checkbox-'.$id_aux.'"';
|
$output .= ' id="checkbox-'.$id_aux.'"';
|
||||||
} else {
|
} else {
|
||||||
$output .= ' '.$id.'"';
|
$output .= ' id="'.$id.'"';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($script != '') {
|
if ($script != '') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user