Merge branch 'ent-8827-cambios-visuales-en-widget-agents-modules' into 'develop'
fixed modal size configuration widgets pandora_enterprise#8827 See merge request artica/pandorafms!4893
This commit is contained in:
commit
a1cae74fa8
|
@ -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 .= '<div class="white_box">';
|
||||
}
|
||||
if (empty($blocks) === false) {
|
||||
$output .= '<div class="container-block-column">';
|
||||
foreach ($blocks as $valueblock) {
|
||||
$output .= '<ul class="wizard">';
|
||||
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 .= '<ul class="wizard">';
|
||||
|
||||
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 .= '</ul>';
|
||||
}
|
||||
}
|
||||
|
||||
$output .= '</ul>';
|
||||
|
||||
// There is possible add raw inputs for this form.
|
||||
if (empty($rawInputs) === false) {
|
||||
$output .= $rawInputs;
|
||||
}
|
||||
|
||||
if ($print_white_box === true) {
|
||||
$output .= '</div>';
|
||||
} else {
|
||||
if ($print_white_box === true) {
|
||||
$output .= '<div class="white_box">';
|
||||
}
|
||||
|
||||
$output .= '<ul class="wizard">';
|
||||
|
||||
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 .= '</ul>';
|
||||
|
||||
// There is possible add raw inputs for this form.
|
||||
if (empty($rawInputs) === false) {
|
||||
$output .= $rawInputs;
|
||||
}
|
||||
|
||||
if ($print_white_box === true) {
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
||||
$output .= '<ul class="wizard">'.$output_submit.'</ul>';
|
||||
}
|
||||
|
||||
$output .= '<ul class="wizard">'.$output_submit.'</ul>';
|
||||
$output .= html_print_csrf_hidden(true);
|
||||
$output .= '</form>';
|
||||
$output .= '<script>'.$js.'</script>';
|
||||
|
|
|
@ -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']),
|
||||
|
|
|
@ -254,7 +254,7 @@ function initialiceLayout(data) {
|
|||
confirmDialog({
|
||||
title: "Are you sure?",
|
||||
message:
|
||||
"<h4 style='text-align: center;padding-top: 20px;'>All changes made to this widget will be lost</h4>",
|
||||
"<h3 style='text-align: center;padding-top: 20px;'>All changes made to this widget will be lost</h3>",
|
||||
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:
|
||||
"<h4 style='text-align: center;padding-top: 20px;'>All changes made to this widget will be lost</h4>",
|
||||
"<h3 style='text-align: center;padding-top: 20px;'>All changes made to this widget will be lost</h3>",
|
||||
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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -319,7 +319,7 @@ class MonitorHealthWidget extends Widget
|
|||
20
|
||||
);
|
||||
|
||||
$output = '<div class="container-center mw200px min-height-320px">';
|
||||
$output = '<div>';
|
||||
$output .= \html_print_table($table, true);
|
||||
$output .= '</div>';
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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 .= '<div class="container-center">';
|
||||
$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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ $form = [
|
|||
HTML::printForm(
|
||||
[
|
||||
'form' => $form,
|
||||
'blocks' => $blocks,
|
||||
'inputs' => $htmlInputs,
|
||||
'js' => $js,
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue