diff --git a/pandora_console/include/class/HTML.class.php b/pandora_console/include/class/HTML.class.php
index 7396f813b5..6b4d153a7a 100644
--- a/pandora_console/include/class/HTML.class.php
+++ b/pandora_console/include/class/HTML.class.php
@@ -777,6 +777,7 @@ class HTML
) {
$form = ($data['form'] ?? null);
$inputs = ($data['inputs'] ?? []);
+ $blocks = ($data['blocks'] ?? []);
$rawInputs = ($data['rawInputs'] ?? null);
$js = ($data['js'] ?? null);
$rawjs = ($data['js_block'] ?? null);
@@ -843,36 +844,59 @@ class HTML
$output_submit = '';
$output = '';
- if ($print_white_box === true) {
- $output .= '
';
- }
+ if (empty($blocks) === false) {
+ $output .= '
';
+ foreach ($blocks as $valueblock) {
+ $output .= '
';
+ foreach ($inputs[$valueblock] as $input) {
+ if (is_array(($input['arguments'] ?? null)) === true
+ && isset($input['arguments']) === true
+ && isset($input['arguments']['type']) === true
+ && $input['arguments']['type'] === 'submit'
+ ) {
+ $output_submit .= self::printBlock($input, true);
+ } else {
+ $output .= self::printBlock($input, true);
+ }
+ }
- $output .= '';
-
- foreach ($inputs as $input) {
- if (is_array(($input['arguments'] ?? null)) === true
- && isset($input['arguments']) === true
- && isset($input['arguments']['type']) === true
- && $input['arguments']['type'] === 'submit'
- ) {
- $output_submit .= self::printBlock($input, true);
- } else {
- $output .= self::printBlock($input, true);
+ $output .= '
';
}
- }
- $output .= '
';
-
- // There is possible add raw inputs for this form.
- if (empty($rawInputs) === false) {
- $output .= $rawInputs;
- }
-
- if ($print_white_box === true) {
$output .= '
';
+ } else {
+ if ($print_white_box === true) {
+ $output .= '
';
+ }
+
+ $output .= '
';
+
+ foreach ($inputs as $input) {
+ if (is_array(($input['arguments'] ?? null)) === true
+ && isset($input['arguments']) === true
+ && isset($input['arguments']['type']) === true
+ && $input['arguments']['type'] === 'submit'
+ ) {
+ $output_submit .= self::printBlock($input, true);
+ } else {
+ $output .= self::printBlock($input, true);
+ }
+ }
+
+ $output .= '
';
+
+ // There is possible add raw inputs for this form.
+ if (empty($rawInputs) === false) {
+ $output .= $rawInputs;
+ }
+
+ if ($print_white_box === true) {
+ $output .= '
';
+ }
+
+ $output .= '
';
}
- $output .= '
';
$output .= html_print_csrf_hidden(true);
$output .= '';
$output .= '';
diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php
index 86ef05d894..c3dea8d961 100644
--- a/pandora_console/include/functions_html.php
+++ b/pandora_console/include/functions_html.php
@@ -1685,7 +1685,9 @@ function html_print_select_multiple_modules_filtered(array $data):string
);
}
- if ($data['mAgents'] !== null) {
+ if (empty($data['mAgents']) === false
+ && empty($data['mModuleGroup'] === false)
+ ) {
$all_modules = get_modules_agents(
$data['mModuleGroup'],
explode(',', $data['mAgents']),
diff --git a/pandora_console/include/javascript/pandora_dashboards.js b/pandora_console/include/javascript/pandora_dashboards.js
index e8240443d8..f6e4445744 100644
--- a/pandora_console/include/javascript/pandora_dashboards.js
+++ b/pandora_console/include/javascript/pandora_dashboards.js
@@ -254,7 +254,7 @@ function initialiceLayout(data) {
confirmDialog({
title: "Are you sure?",
message:
- "
All changes made to this widget will be lost
",
+ "
All changes made to this widget will be lost
",
cancel: "Cancel",
ok: "Ok",
onAccept: function() {
@@ -266,7 +266,7 @@ function initialiceLayout(data) {
});
$("#configure-widget-" + id).click(function() {
- configurationWidget(id, widgetId);
+ getSizeModalConfiguration(id, widgetId);
});
},
error: function(error) {
@@ -275,6 +275,29 @@ function initialiceLayout(data) {
});
}
+ function getSizeModalConfiguration(cellId, widgetId) {
+ $.ajax({
+ method: "post",
+ url: data.url,
+ data: {
+ page: data.page,
+ method: "getSizeModalConfiguration",
+ dashboardId: data.dashboardId,
+ cellId: cellId,
+ widgetId: widgetId
+ },
+ dataType: "json",
+ success: function(size) {
+ configurationWidget(cellId, widgetId, size);
+ },
+ error: function(error) {
+ console.log(error);
+ return [];
+ }
+ });
+ return false;
+ }
+
function saveLayout() {
var items = $(".grid-stack > .grid-stack-item:visible")
.map(function(i, el) {
@@ -370,7 +393,7 @@ function initialiceLayout(data) {
});
}
- function configurationWidget(cellId, widgetId) {
+ function configurationWidget(cellId, widgetId, size) {
load_modal({
target: $("#modal-config-widget"),
form: "form-config-widget",
@@ -388,12 +411,9 @@ function initialiceLayout(data) {
dashboardId: data.dashboardId,
widgetId: widgetId
},
- width:
- widgetId == 14 || widgetId == 2 || widgetId == 23 || widgetId == 16
- ? 750
- : 450,
- maxHeight: 650,
- minHeight: widgetId == 16 ? 450 : 400
+ width: size.width,
+ maxHeight: size.height,
+ minHeight: size.height
},
onsubmit: {
page: data.page,
@@ -698,7 +718,7 @@ function initialiceLayout(data) {
confirmDialog({
title: "Are you sure?",
message:
- "
All changes made to this widget will be lost
",
+ "
All changes made to this widget will be lost
",
cancel: "Cancel",
ok: "Ok",
onAccept: function() {
@@ -710,7 +730,7 @@ function initialiceLayout(data) {
});
$("#configure-widget-" + cellId).click(function() {
- configurationWidget(cellId, widgetId);
+ getSizeModalConfiguration(cellId, widgetId);
});
saveLayout();
diff --git a/pandora_console/include/lib/Dashboard/Manager.php b/pandora_console/include/lib/Dashboard/Manager.php
index 33cd0a3c2c..843f30e94a 100644
--- a/pandora_console/include/lib/Dashboard/Manager.php
+++ b/pandora_console/include/lib/Dashboard/Manager.php
@@ -180,6 +180,7 @@ class Manager implements PublicLogin
'imageIconDashboardAjax',
'formSlides',
'callWidgetMethod',
+ 'getSizeModalConfiguration',
];
@@ -1374,7 +1375,14 @@ class Manager implements PublicLogin
global $config;
$instance = $this->instanceWidget();
+ $blocks = [];
$htmlInputs = $instance->getFormInputs([]);
+
+ if (isset($htmlInputs['blocks']) === true) {
+ $blocks = $htmlInputs['blocks'];
+ $htmlInputs = $htmlInputs['inputs'];
+ }
+
$js = $instance->getFormJS();
View::render(
@@ -1382,6 +1390,7 @@ class Manager implements PublicLogin
[
'dashboardId' => $this->dashboardId,
'cellId' => $this->cellId,
+ 'blocks' => $blocks,
'htmlInputs' => $htmlInputs,
'js' => $js,
]
@@ -1524,4 +1533,22 @@ class Manager implements PublicLogin
}
+ /**
+ * Size configuration modal (ajax only).
+ *
+ * @return void.
+ */
+ public function getSizeModalConfiguration():void
+ {
+ $result = [];
+ $widget = $this->instanceWidget();
+ $result = $widget->getSizeModalConfiguration();
+
+ echo json_encode($result);
+
+ return;
+
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widget.php b/pandora_console/include/lib/Dashboard/Widget.php
index 1c5904e74a..3e04913884 100644
--- a/pandora_console/include/lib/Dashboard/Widget.php
+++ b/pandora_console/include/lib/Dashboard/Widget.php
@@ -516,7 +516,9 @@ class Widget
if (empty($values['background']) === true) {
$values['background'] = '#ffffff';
- if ($config['style'] === 'pandora_black' && !is_metaconsole()) {
+ if ($config['style'] === 'pandora_black'
+ && is_metaconsole() === false
+ ) {
$values['background'] = '#222222';
}
}
@@ -763,4 +765,20 @@ class Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration():array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 650,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php
index dbc0c1dcf5..bda15566ca 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/agent_module.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/agent_module.php
@@ -285,12 +285,12 @@ class AgentModuleWidget extends Widget
'arguments' => [
'type' => 'select_multiple_modules_filtered',
'uniqId' => $this->cellId,
- 'mGroup' => $this->values['mGroup'],
- 'mRecursion' => $this->values['mRecursion'],
- 'mModuleGroup' => $this->values['mModuleGroup'],
- 'mAgents' => $this->values['mAgents'],
- 'mShowCommonModules' => $this->values['mShowCommonModules'],
- 'mModules' => $this->values['mModules'],
+ 'mGroup' => (isset($this->values['mGroup']) === true) ? $this->values['mGroup'] : '',
+ 'mRecursion' => (isset($this->values['mRecursion']) === true) ? $this->values['mRecursion'] : '',
+ 'mModuleGroup' => (isset($this->values['mModuleGroup']) === true) ? $this->values['mModuleGroup'] : '',
+ 'mAgents' => (isset($this->values['mAgents']) === true) ? $this->values['mAgents'] : '',
+ 'mShowCommonModules' => (isset($this->values['mShowCommonModules']) === true) ? $this->values['mShowCommonModules'] : '',
+ 'mModules' => (isset($this->values['mModules']) === true) ? $this->values['mModules'] : '',
'mShowSelectedOtherGroups' => true,
'mReturnAllGroup' => $return_all_group,
'mMetaFields' => ((bool) is_metaconsole()),
@@ -852,4 +852,20 @@ class AgentModuleWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 800,
+ 'height' => 580,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/alerts_fired.php b/pandora_console/include/lib/Dashboard/Widgets/alerts_fired.php
index fdb5c3648a..abdacf5322 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/alerts_fired.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/alerts_fired.php
@@ -372,4 +372,20 @@ class AlertsFiredWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => (is_metaconsole() === true) ? 330 : 260,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/clock.php b/pandora_console/include/lib/Dashboard/Widgets/clock.php
index 5d90f0f863..7567a79ac5 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/clock.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/clock.php
@@ -322,4 +322,20 @@ class ClockWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 270,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/custom_graph.php b/pandora_console/include/lib/Dashboard/Widgets/custom_graph.php
index c2515d1088..ed9f1fd4bd 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/custom_graph.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/custom_graph.php
@@ -533,4 +533,20 @@ class CustomGraphWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 440,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/events_list.php b/pandora_console/include/lib/Dashboard/Widgets/events_list.php
index acdf98ccb8..d0cccd3d73 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/events_list.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/events_list.php
@@ -289,8 +289,19 @@ class EventsListWidget extends Widget
// Retrieve global - common inputs.
$inputs = parent::getFormInputs();
+ $blocks = [
+ 'row1',
+ 'row2',
+ ];
+
+ $inputs['blocks'] = $blocks;
+
+ foreach ($inputs as $kInput => $vInput) {
+ $inputs['inputs']['row1'][] = $vInput;
+ }
+
// Select pre built filter.
- $inputs[] = [
+ $inputs['inputs']['row1'][] = [
'label' => \__('Custom filters'),
'arguments' => [
'type' => 'select',
@@ -317,7 +328,7 @@ class EventsListWidget extends Widget
}
// Event Type.
- $inputs[] = [
+ $inputs['inputs']['row1'][] = [
'label' => \__('Event type'),
'arguments' => [
'type' => 'select',
@@ -332,7 +343,7 @@ class EventsListWidget extends Widget
];
// Max. hours old. Default 8.
- $inputs[] = [
+ $inputs['inputs']['row1'][] = [
'label' => \__('Max. hours old'),
'arguments' => [
'name' => 'maxHours',
@@ -355,7 +366,7 @@ class EventsListWidget extends Widget
($config['block_size'] * 3) => ($config['block_size'] * 3),
];
- $inputs[] = [
+ $inputs['inputs']['row1'][] = [
'label' => \__('Limit'),
'arguments' => [
'type' => 'select',
@@ -374,7 +385,7 @@ class EventsListWidget extends Widget
0 => \__('Only pending'),
];
- $inputs[] = [
+ $inputs['inputs']['row1'][] = [
'label' => \__('Event status'),
'arguments' => [
'type' => 'select',
@@ -389,7 +400,7 @@ class EventsListWidget extends Widget
// Severity.
$fields = \get_priorities();
- $inputs[] = [
+ $inputs['inputs']['row1'][] = [
'label' => \__('Severity'),
'arguments' => [
'type' => 'select',
@@ -416,7 +427,7 @@ class EventsListWidget extends Widget
}
// Groups.
- $inputs[] = [
+ $inputs['inputs']['row2'][] = [
'label' => \__('Groups'),
'arguments' => [
'type' => 'select_groups',
@@ -432,7 +443,7 @@ class EventsListWidget extends Widget
];
// Group recursion.
- $inputs[] = [
+ $inputs['inputs']['row2'][] = [
'label' => \__('Group recursion'),
'arguments' => [
'type' => 'switch',
@@ -446,7 +457,7 @@ class EventsListWidget extends Widget
// Tags.
$fields = \tags_get_user_tags($config['id_user'], 'AR');
- $inputs[] = [
+ $inputs['inputs']['row2'][] = [
'label' => \__('Tags'),
'arguments' => [
'type' => 'select',
@@ -668,7 +679,6 @@ class EventsListWidget extends Widget
'columns' => $fields,
'ajax_return_operation' => 'buffers',
'ajax_return_operation_function' => 'process_buffers',
- // 'drawCallback' => 'process_datatables_callback(this, settings)',
'return' => true,
'csv' => 0,
]
@@ -700,4 +710,20 @@ class EventsListWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 800,
+ 'height' => (is_metaconsole() === true) ? 600 : 550,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/example.php b/pandora_console/include/lib/Dashboard/Widgets/example.php
index 3a4ec40fb6..e7ca6e5ada 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/example.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/example.php
@@ -289,4 +289,20 @@ class WelcomeWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 500,
+ 'height' => 220,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/graph_module_histogram.php b/pandora_console/include/lib/Dashboard/Widgets/graph_module_histogram.php
index dba9035877..2918c73f5d 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/graph_module_histogram.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/graph_module_histogram.php
@@ -443,4 +443,20 @@ class GraphModuleHistogramWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 480,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/groups_status.php b/pandora_console/include/lib/Dashboard/Widgets/groups_status.php
index af25b2c056..c250da93da 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/groups_status.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/groups_status.php
@@ -493,4 +493,20 @@ class GroupsStatusWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 270,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php b/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
index 0b5667e491..40b47dce4b 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
@@ -535,4 +535,20 @@ class MapsMadeByUser extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => (is_metaconsole() === true) ? 330 : 270,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/maps_status.php b/pandora_console/include/lib/Dashboard/Widgets/maps_status.php
index 2f59a29f0a..2c2faa3147 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/maps_status.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/maps_status.php
@@ -400,4 +400,20 @@ class MapsStatusWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 425,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_icon.php b/pandora_console/include/lib/Dashboard/Widgets/module_icon.php
index cb3d8086e8..a4ec3a09c6 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/module_icon.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/module_icon.php
@@ -552,4 +552,20 @@ class ModuleIconWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 700,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_status.php b/pandora_console/include/lib/Dashboard/Widgets/module_status.php
index 0a0fe65615..c022d09018 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/module_status.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/module_status.php
@@ -550,4 +550,20 @@ class ModuleStatusWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 650,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_table_value.php b/pandora_console/include/lib/Dashboard/Widgets/module_table_value.php
index 0039768a30..2281553b73 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/module_table_value.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/module_table_value.php
@@ -409,4 +409,20 @@ class ModuleTableValueWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 430,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/module_value.php b/pandora_console/include/lib/Dashboard/Widgets/module_value.php
index b005863b24..ecc770eb01 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/module_value.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/module_value.php
@@ -378,7 +378,7 @@ class ModuleValueWidget extends Widget
{
global $config;
- $output .= '';
+ $output = '';
$id_agent = $this->values['agentId'];
$id_group = agents_get_agent_group($id_agent);
@@ -445,4 +445,20 @@ class ModuleValueWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 490,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php b/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php
index c8a62feafa..03d54700be 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/monitor_health.php
@@ -319,7 +319,7 @@ class MonitorHealthWidget extends Widget
20
);
- $output = '
';
+ $output = '
';
$output .= \html_print_table($table, true);
$output .= '
';
@@ -349,4 +349,20 @@ class MonitorHealthWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 220,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/network_map.php b/pandora_console/include/lib/Dashboard/Widgets/network_map.php
index c07e09758f..f295a1cb7c 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/network_map.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/network_map.php
@@ -490,4 +490,20 @@ class NetworkMapWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 430,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/os_quick_report.php b/pandora_console/include/lib/Dashboard/Widgets/os_quick_report.php
index c1bad5c63f..892d1f219a 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/os_quick_report.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/os_quick_report.php
@@ -347,4 +347,20 @@ class OsQuickReportWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 205,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/post.php b/pandora_console/include/lib/Dashboard/Widgets/post.php
index 584c1af782..b6d35b24dd 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/post.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/post.php
@@ -288,4 +288,20 @@ class PostWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 500,
+ 'height' => 500,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/reports.php b/pandora_console/include/lib/Dashboard/Widgets/reports.php
index 8611665128..81422c41c3 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/reports.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/reports.php
@@ -499,4 +499,20 @@ class ReportsWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => (is_metaconsole() === true) ? 330 : 260,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/service_map.php b/pandora_console/include/lib/Dashboard/Widgets/service_map.php
index 9fafaf6751..2b4487b93a 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/service_map.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/service_map.php
@@ -258,6 +258,9 @@ class ServiceMapWidget extends Widget
$inputs = parent::getFormInputs();
$services_res = services_get_services();
+ if ($services_res === false) {
+ $services_res = [];
+ }
// If currently selected report is not included in fields array (it belongs to a group over which user has no permissions), then add it to fields array.
// This is aimed to avoid overriding this value when a user with narrower permissions edits widget configuration.
@@ -358,6 +361,7 @@ class ServiceMapWidget extends Widget
$size = parent::getSize();
$output = '';
+
if (check_acl($config['id_user'], 0, 'AR') === 0) {
$output .= '
';
$output .= \ui_print_error_message(
@@ -449,4 +453,20 @@ class ServiceMapWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 320,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/service_view.php b/pandora_console/include/lib/Dashboard/Widgets/service_view.php
index d838861659..e588e01d69 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/service_view.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/service_view.php
@@ -468,4 +468,20 @@ class ServiceViewWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 270,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/single_graph.php b/pandora_console/include/lib/Dashboard/Widgets/single_graph.php
index bc92ade1f8..6531c16831 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/single_graph.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/single_graph.php
@@ -406,4 +406,20 @@ class SingleGraphWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 430,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/sla_percent.php b/pandora_console/include/lib/Dashboard/Widgets/sla_percent.php
index ae1434891e..33d89b7489 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/sla_percent.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/sla_percent.php
@@ -494,4 +494,20 @@ class SLAPercentWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 550,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php b/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php
index 57b4f90fb3..c3b768424c 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/system_group_status.php
@@ -634,4 +634,20 @@ class SystemGroupStatusWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 520,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/tactical.php b/pandora_console/include/lib/Dashboard/Widgets/tactical.php
index 74d72d0c5c..f5f664fb70 100755
--- a/pandora_console/include/lib/Dashboard/Widgets/tactical.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/tactical.php
@@ -494,4 +494,20 @@ class TacticalWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 370,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/top_n.php b/pandora_console/include/lib/Dashboard/Widgets/top_n.php
index 0406a4e214..8e5aba52c0 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/top_n.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/top_n.php
@@ -540,4 +540,20 @@ class TopNWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 530,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_group.php b/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_group.php
index 9329fb749a..9e84cbbc31 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_group.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_group.php
@@ -514,4 +514,20 @@ class TopNEventByGroupWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 520,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_module.php b/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_module.php
index f110c4ea52..e5400f6b3b 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_module.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/top_n_events_by_module.php
@@ -549,4 +549,20 @@ class TopNEventByModuleWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 400,
+ 'height' => 540,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php
index fe76b94ec0..9327c7c132 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/tree_view.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/tree_view.php
@@ -726,4 +726,20 @@ class TreeViewWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => (is_metaconsole() === true) ? 500 : 590,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/url.php b/pandora_console/include/lib/Dashboard/Widgets/url.php
index 41a3420d0a..7b1e4043fa 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/url.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/url.php
@@ -298,4 +298,20 @@ class UrlWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 270,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php
index 5026a240f5..cf64cfa222 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction.php
@@ -176,7 +176,7 @@ class WuxWidget extends Widget
// Must be configured before using.
$this->configurationRequired = false;
if (empty($this->options) === true) {
- $this->configuration_required = true;
+ $this->configurationRequired = true;
}
$this->overflow_scrollbars = false;
@@ -430,4 +430,20 @@ class WuxWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 330,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction_stats.php b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction_stats.php
index e75a0012d3..f53ea0e135 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/wux_transaction_stats.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/wux_transaction_stats.php
@@ -390,4 +390,20 @@ class WuxStatsWidget extends Widget
}
+ /**
+ * Get size Modal Configuration.
+ *
+ * @return array
+ */
+ public function getSizeModalConfiguration(): array
+ {
+ $size = [
+ 'width' => 450,
+ 'height' => 370,
+ ];
+
+ return $size;
+ }
+
+
}
diff --git a/pandora_console/include/styles/dashboards.css b/pandora_console/include/styles/dashboards.css
index f6a280dd50..585efe2cdd 100644
--- a/pandora_console/include/styles/dashboards.css
+++ b/pandora_console/include/styles/dashboards.css
@@ -577,3 +577,17 @@ div#main_pure {
width: 98%;
margin-top: 5px;
}
+
+.ui-dialog .ui-dialog-title {
+ top: 0px !important;
+}
+
+.ui-dialog .ui-dialog-content {
+ padding: 0em 1em !important;
+ margin-bottom: 0 !important;
+}
+
+.ui-dialog .ui-dialog-buttonpane {
+ margin-top: 0px !important;
+ padding: 0.5em 1em 0em 0em !important;
+}
diff --git a/pandora_console/include/styles/form.css b/pandora_console/include/styles/form.css
index 56e872aab6..935b796b76 100644
--- a/pandora_console/include/styles/form.css
+++ b/pandora_console/include/styles/form.css
@@ -289,6 +289,19 @@ ul.wizard li > textarea {
display: inline-block;
}
+.container-block-column {
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ height: 100%;
+ align-items: center;
+ justify-content: space-around;
+}
+
+.container-block-column ul.wizard {
+ width: 100%;
+}
+
.hidden {
display: none;
}
diff --git a/pandora_console/views/dashboard/configurationWidgets.php b/pandora_console/views/dashboard/configurationWidgets.php
index d912027d53..a48a3acd8e 100644
--- a/pandora_console/views/dashboard/configurationWidgets.php
+++ b/pandora_console/views/dashboard/configurationWidgets.php
@@ -50,6 +50,7 @@ $form = [
HTML::printForm(
[
'form' => $form,
+ 'blocks' => $blocks,
'inputs' => $htmlInputs,
'js' => $js,
]