mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
#13059 fix bugs dashboard agent module view
This commit is contained in:
parent
7cdca7e622
commit
1a58501af9
@ -1926,7 +1926,7 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
$output .= '</div>';
|
$output .= '</div>';
|
||||||
$output .= '<div class="recursive-modules">';
|
$output .= '<div class="recursive-modules mrgn_lft_20px_important">';
|
||||||
|
|
||||||
// Recursion.
|
// Recursion.
|
||||||
$output .= html_print_input(
|
$output .= html_print_input(
|
||||||
@ -2048,6 +2048,7 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin
|
|||||||
'style' => 'min-width: 200px;max-width:200px;',
|
'style' => 'min-width: 200px;max-width:200px;',
|
||||||
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
||||||
'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '',
|
'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '',
|
||||||
|
'truncate_size' => 300,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@ -2064,6 +2065,7 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin
|
|||||||
'style' => 'min-width: 200px;max-width:200px;',
|
'style' => 'min-width: 200px;max-width:200px;',
|
||||||
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
||||||
'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '',
|
'placeholder' => (isset($data['placeholderAgents']) === true) ? $data['placeholderAgents'] : '',
|
||||||
|
'truncate_size' => 300,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -2075,8 +2077,9 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin
|
|||||||
$data['mModuleGroup'],
|
$data['mModuleGroup'],
|
||||||
explode(',', $data['mAgents']),
|
explode(',', $data['mAgents']),
|
||||||
!$commonModules,
|
!$commonModules,
|
||||||
false,
|
true,
|
||||||
true
|
(bool) $commonModules,
|
||||||
|
false
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
$all_modules = [];
|
$all_modules = [];
|
||||||
@ -2108,6 +2111,7 @@ function html_print_select_multiple_modules_filtered_formated(array $data):strin
|
|||||||
'multiple' => true,
|
'multiple' => true,
|
||||||
'style' => 'max-width:98%;',
|
'style' => 'max-width:98%;',
|
||||||
'input_class' => 'flex-colum-center-important',
|
'input_class' => 'flex-colum-center-important',
|
||||||
|
'truncate_size' => 300,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -2162,6 +2166,7 @@ function html_print_select_from_sql(
|
|||||||
$class='',
|
$class='',
|
||||||
$required=false,
|
$required=false,
|
||||||
$placeholder='',
|
$placeholder='',
|
||||||
|
$title=false,
|
||||||
) {
|
) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -2209,7 +2214,8 @@ function html_print_select_from_sql(
|
|||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
null,
|
null,
|
||||||
$placeholder
|
$placeholder,
|
||||||
|
$title
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5989,6 +5995,7 @@ function html_print_input($data, $wrapper='div', $input_only=false)
|
|||||||
((isset($data['class']) === true) ? $data['class'] : ''),
|
((isset($data['class']) === true) ? $data['class'] : ''),
|
||||||
((isset($data['required']) === true) ? $data['required'] : false),
|
((isset($data['required']) === true) ? $data['required'] : false),
|
||||||
((isset($data['placeholder']) === true) ? $data['placeholder'] : null),
|
((isset($data['placeholder']) === true) ? $data['placeholder'] : null),
|
||||||
|
((isset($data['title']) === true) ? $data['title'] : false),
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -218,6 +218,7 @@ function fmModuleChange(uniqId, isMeta) {
|
|||||||
"#filtered-module-show-common-modules-" + uniqId
|
"#filtered-module-show-common-modules-" + uniqId
|
||||||
).attr("type");
|
).attr("type");
|
||||||
|
|
||||||
|
var select_mode = isMeta === 1 ? 0 : 1;
|
||||||
var showCommonModules = +(
|
var showCommonModules = +(
|
||||||
$("#filtered-module-show-common-modules-" + uniqId).prop("checked") == false
|
$("#filtered-module-show-common-modules-" + uniqId).prop("checked") == false
|
||||||
);
|
);
|
||||||
@ -229,7 +230,8 @@ function fmModuleChange(uniqId, isMeta) {
|
|||||||
get_modules_group_json: 1,
|
get_modules_group_json: 1,
|
||||||
id_module_group: idModuleGroup,
|
id_module_group: idModuleGroup,
|
||||||
id_agents: idAgents,
|
id_agents: idAgents,
|
||||||
selection: showCommonModules
|
selection: showCommonModules,
|
||||||
|
select_mode: select_mode
|
||||||
},
|
},
|
||||||
function(data) {
|
function(data) {
|
||||||
$("#filtered-module-modules-" + uniqId).html("");
|
$("#filtered-module-modules-" + uniqId).html("");
|
||||||
|
@ -330,7 +330,20 @@ function initialiceLayout(data) {
|
|||||||
},
|
},
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
addCell(data.cellId, 0, 0, 4, 4, true, 0, 2000, 0, 2000, 0, true);
|
addCell(
|
||||||
|
data.cellId,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
4,
|
||||||
|
4,
|
||||||
|
true,
|
||||||
|
0,
|
||||||
|
2000,
|
||||||
|
0,
|
||||||
|
2000,
|
||||||
|
original_widgetId,
|
||||||
|
true
|
||||||
|
);
|
||||||
},
|
},
|
||||||
error: function(xhr, textStatus, errorMessage) {
|
error: function(xhr, textStatus, errorMessage) {
|
||||||
console.log("ERROR" + errorMessage + textStatus + xhr);
|
console.log("ERROR" + errorMessage + textStatus + xhr);
|
||||||
|
@ -297,7 +297,7 @@ class AgentModuleWidget extends Widget
|
|||||||
}
|
}
|
||||||
|
|
||||||
$inputs[] = [
|
$inputs[] = [
|
||||||
'class' => 'flex flex-column',
|
'class' => 'flex-colum-center-important',
|
||||||
'id' => 'select_multiple_modules_filtered_formated',
|
'id' => 'select_multiple_modules_filtered_formated',
|
||||||
'arguments' => [
|
'arguments' => [
|
||||||
'type' => 'select_multiple_modules_filtered_formated',
|
'type' => 'select_multiple_modules_filtered_formated',
|
||||||
@ -514,6 +514,10 @@ class AgentModuleWidget extends Widget
|
|||||||
$array_names = [];
|
$array_names = [];
|
||||||
|
|
||||||
foreach ($allModules as $module_name) {
|
foreach ($allModules as $module_name) {
|
||||||
|
if (is_numeric($module_name)) {
|
||||||
|
$module_name = modules_get_agentmodule_name($module_name);
|
||||||
|
}
|
||||||
|
|
||||||
$file_name = ui_print_truncate_text(
|
$file_name = ui_print_truncate_text(
|
||||||
\io_safe_output($module_name),
|
\io_safe_output($module_name),
|
||||||
'module_small',
|
'module_small',
|
||||||
|
@ -7187,6 +7187,10 @@ div.graph div.legend table {
|
|||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mrgn_lft_20px_important {
|
||||||
|
margin-left: 20px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.mrgn_lft_23px {
|
.mrgn_lft_23px {
|
||||||
margin-left: 23px;
|
margin-left: 23px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user