mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Visual changes on dashboard agent/modules configuration menu
This commit is contained in:
parent
4fc73cd7b7
commit
e2b3cd2dab
@ -1574,17 +1574,30 @@ function html_print_select_multiple_modules_filtered(array $data):string
|
|||||||
0 => __('Show common modules'),
|
0 => __('Show common modules'),
|
||||||
1 => __('Show all modules'),
|
1 => __('Show all modules'),
|
||||||
];
|
];
|
||||||
$output .= html_print_input(
|
|
||||||
[
|
if (empty($data['commonModulesSwitch']) === false && $data['commonModulesSwitch'] === true) {
|
||||||
'label' => __('Show common modules'),
|
$output .= html_print_input(
|
||||||
'type' => 'select',
|
[
|
||||||
'fields' => $selection,
|
|
||||||
'name' => 'filtered-module-show-common-modules-'.$uniqId,
|
'label' => __('Common/all modules'),
|
||||||
'selected' => $data['mShowCommonModules'],
|
'type' => 'switch',
|
||||||
'return' => true,
|
'id' => 'filtered-module-show-common-modules-'.$uniqId,
|
||||||
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
'return' => true,
|
||||||
]
|
'onchange' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
||||||
);
|
]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
$output .= html_print_input(
|
||||||
|
[
|
||||||
|
'label' => __('Show common modules'),
|
||||||
|
'type' => 'select',
|
||||||
|
'fields' => $selection,
|
||||||
|
'name' => 'filtered-module-show-common-modules-'.$uniqId,
|
||||||
|
'return' => true,
|
||||||
|
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($data['mAgents'] !== null) {
|
if ($data['mAgents'] !== null) {
|
||||||
$all_modules = get_modules_agents(
|
$all_modules = get_modules_agents(
|
||||||
|
@ -214,9 +214,22 @@ function fmAgentChange(uniqId) {
|
|||||||
function fmModuleChange(uniqId, isMeta) {
|
function fmModuleChange(uniqId, isMeta) {
|
||||||
var idModuleGroup = $("#filtered-module-module-group-" + uniqId).val();
|
var idModuleGroup = $("#filtered-module-module-group-" + uniqId).val();
|
||||||
var idAgents = $("#filtered-module-agents-" + uniqId).val();
|
var idAgents = $("#filtered-module-agents-" + uniqId).val();
|
||||||
var showCommonModules = $(
|
var commonSelectorType = $(
|
||||||
"#filtered-module-show-common-modules-" + uniqId
|
"#filtered-module-show-common-modules-" + uniqId
|
||||||
).val();
|
).attr("type");
|
||||||
|
|
||||||
|
var showCommonModules = 0;
|
||||||
|
|
||||||
|
if (commonSelectorType != "checkbox") {
|
||||||
|
showCommonModules = $(
|
||||||
|
"#filtered-module-show-common-modules-" + uniqId
|
||||||
|
).val();
|
||||||
|
} else {
|
||||||
|
showCommonModules = +$(
|
||||||
|
"#filtered-module-show-common-modules-" + uniqId
|
||||||
|
).prop("checked");
|
||||||
|
}
|
||||||
|
|
||||||
jQuery.post(
|
jQuery.post(
|
||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
|
@ -388,9 +388,12 @@ function initialiceLayout(data) {
|
|||||||
dashboardId: data.dashboardId,
|
dashboardId: data.dashboardId,
|
||||||
widgetId: widgetId
|
widgetId: widgetId
|
||||||
},
|
},
|
||||||
width: widgetId == 14 || widgetId == 2 || widgetId == 23 ? 750 : 450,
|
width:
|
||||||
|
widgetId == 14 || widgetId == 2 || widgetId == 23 || widgetId == 16
|
||||||
|
? 750
|
||||||
|
: 450,
|
||||||
maxHeight: 610,
|
maxHeight: 610,
|
||||||
minHeight: 400
|
minHeight: widgetId == 16 ? 450 : 400
|
||||||
},
|
},
|
||||||
onsubmit: {
|
onsubmit: {
|
||||||
page: data.page,
|
page: data.page,
|
||||||
|
@ -267,6 +267,7 @@ class AgentModuleWidget extends Widget
|
|||||||
'mShowSelectedOtherGroups' => true,
|
'mShowSelectedOtherGroups' => true,
|
||||||
'mReturnAllGroup' => $return_all_group,
|
'mReturnAllGroup' => $return_all_group,
|
||||||
'mMetaFields' => ((bool) is_metaconsole()),
|
'mMetaFields' => ((bool) is_metaconsole()),
|
||||||
|
'commonModulesSwitch' => true,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -516,6 +516,12 @@ div#main_pure {
|
|||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#select_multiple_modules_filtered {
|
||||||
|
border: 1px solid #c1c1c1;
|
||||||
|
border-radius: 10px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
#select_multiple_modules_filtered > div {
|
#select_multiple_modules_filtered > div {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -523,7 +529,7 @@ div#main_pure {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
flex: 1 1 320px;
|
flex: 1 2 750px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#select_multiple_modules_filtered > div > div {
|
#select_multiple_modules_filtered > div > div {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user