mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Merge branch 'ent-8532-widget-agent-modulos-no-muestra-modulos' into 'develop'
Fix agentmodules widget conf style See merge request artica/pandorafms!4693
This commit is contained in:
commit
3092a00edb
@ -1659,17 +1659,31 @@ 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 (true) {
|
||||||
'label' => __('Show common modules'),
|
$output .= html_print_input(
|
||||||
'type' => 'select',
|
[
|
||||||
'fields' => $selection,
|
|
||||||
'name' => 'filtered-module-show-common-modules-'.$uniqId,
|
'label' => __('Only common modules'),
|
||||||
'selected' => $data['mShowCommonModules'],
|
'type' => 'switch',
|
||||||
'return' => true,
|
'value' => 'checked',
|
||||||
'script' => 'fmModuleChange(\''.$uniqId.'\', '.(int) is_metaconsole().')',
|
'id' => 'filtered-module-show-common-modules-'.$uniqId,
|
||||||
]
|
'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,14 @@ 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 = +(
|
||||||
|
$("#filtered-module-show-common-modules-" + uniqId).prop("checked") == false
|
||||||
|
);
|
||||||
|
|
||||||
jQuery.post(
|
jQuery.post(
|
||||||
"ajax.php",
|
"ajax.php",
|
||||||
{
|
{
|
||||||
@ -227,11 +232,15 @@ function fmModuleChange(uniqId, isMeta) {
|
|||||||
selection: showCommonModules
|
selection: showCommonModules
|
||||||
},
|
},
|
||||||
function(data) {
|
function(data) {
|
||||||
|
debugger;
|
||||||
$("#filtered-module-modules-" + uniqId).html("");
|
$("#filtered-module-modules-" + uniqId).html("");
|
||||||
if (data) {
|
if (data) {
|
||||||
jQuery.each(data, function(id, value) {
|
jQuery.each(data, function(id, value) {
|
||||||
var option = $("<option></option>");
|
var option = $("<option></option>");
|
||||||
if (isMeta === 1) {
|
if (isMeta === 1) {
|
||||||
|
if (value["id_node"] == null || value["id_node"] == "") {
|
||||||
|
option.attr("value", id).html(value);
|
||||||
|
}
|
||||||
option
|
option
|
||||||
.attr(
|
.attr(
|
||||||
"value",
|
"value",
|
||||||
|
@ -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:
|
||||||
maxHeight: 610,
|
widgetId == 14 || widgetId == 2 || widgetId == 23 || widgetId == 16
|
||||||
minHeight: 400
|
? 750
|
||||||
|
: 450,
|
||||||
|
maxHeight: 650,
|
||||||
|
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,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -493,7 +493,7 @@ div#main_pure {
|
|||||||
#form-config-widget .info_box,
|
#form-config-widget .info_box,
|
||||||
.content-widget .info_box {
|
.content-widget .info_box {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
width: 90%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#form-config-widget .info_box {
|
#form-config-widget .info_box {
|
||||||
@ -519,16 +519,17 @@ div#main_pure {
|
|||||||
#select_multiple_modules_filtered {
|
#select_multiple_modules_filtered {
|
||||||
border: 1px solid #c1c1c1;
|
border: 1px solid #c1c1c1;
|
||||||
border-radius: 10px;
|
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;
|
||||||
justify-content: space-around;
|
justify-content: space-between;
|
||||||
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 {
|
||||||
@ -537,12 +538,21 @@ div#main_pure {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
width: 250px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#select_multiple_modules_filtered > div > div > * {
|
#select_multiple_modules_filtered > div > div > * {
|
||||||
flex: auto;
|
flex: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#select_multiple_modules_filtered > div > div > select {
|
||||||
|
min-width: 250px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#select_multiple_modules_filtered > div > div > .select2 {
|
||||||
|
min-width: 250px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.visual-console-container-dashboard div.label strong {
|
.visual-console-container-dashboard div.label strong {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user