11839-Add check global_block_size
This commit is contained in:
parent
0d4a097a48
commit
9603f90401
|
@ -621,7 +621,8 @@ class ConsoleSupervisor
|
||||||
'small_operation_step_datos_purge' => 'Small Operation Step to purge old data',
|
'small_operation_step_datos_purge' => 'Small Operation Step to purge old data',
|
||||||
'row_limit_csv' => 'Row limit in csv log',
|
'row_limit_csv' => 'Row limit in csv log',
|
||||||
'limit_parameters_massive' => 'Limit for bulk operations',
|
'limit_parameters_massive' => 'Limit for bulk operations',
|
||||||
'block_size' => 'Block size for pagination',
|
'block_size' => 'User block size for pagination',
|
||||||
|
'global_block_size' => 'Global block size for pagination',
|
||||||
'short_module_graph_data' => 'Data precision',
|
'short_module_graph_data' => 'Data precision',
|
||||||
'graph_precision' => 'Data precision in graphs',
|
'graph_precision' => 'Data precision in graphs',
|
||||||
];
|
];
|
||||||
|
@ -635,8 +636,14 @@ class ConsoleSupervisor
|
||||||
|
|
||||||
$message = '';
|
$message = '';
|
||||||
$limit_value = '';
|
$limit_value = '';
|
||||||
|
$url = '';
|
||||||
if ($config[$variable] > $values->max) {
|
if ($config[$variable] > $values->max) {
|
||||||
$message = 'Check the setting of %s, a value greater than %s is not recommended';
|
$message = 'Check the setting of %s, a value greater than %s is not recommended';
|
||||||
|
|
||||||
|
if ($variable === 'block_size') {
|
||||||
|
$message .= '. (User: '.$config['id_user'].')';
|
||||||
|
}
|
||||||
|
|
||||||
$limit_value = $values->max;
|
$limit_value = $values->max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -647,32 +654,39 @@ class ConsoleSupervisor
|
||||||
|
|
||||||
if ($limit_value !== '' && $message !== '') {
|
if ($limit_value !== '' && $message !== '') {
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
$this->notify(
|
$url = '__url__index.php?sec=advanced&sec2=advanced/metasetup';
|
||||||
[
|
|
||||||
'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable,
|
|
||||||
'title' => __('Incorrect config value'),
|
|
||||||
'message' => __(
|
|
||||||
$message,
|
|
||||||
$names[$variable],
|
|
||||||
$limit_value
|
|
||||||
),
|
|
||||||
'url' => '__url__index.php?sec=advanced&sec2=advanced/metasetup',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
$this->notify(
|
$url = '__url__/index.php?sec=general&sec2=godmode/setup/setup';
|
||||||
[
|
|
||||||
'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable,
|
|
||||||
'title' => __('Incorrect config value'),
|
|
||||||
'message' => __(
|
|
||||||
$message,
|
|
||||||
$names[$variable],
|
|
||||||
$limit_value
|
|
||||||
),
|
|
||||||
'url' => '__url__/index.php?sec=general&sec2=godmode/setup/setup',
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($variable === 'block_size') {
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$url = '__url__index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user='.$config['id_user'];
|
||||||
|
} else {
|
||||||
|
$url = '__url__/index.php?sec=gusuarios&sec2=godmode/users/configure_user&edit_user=1&pure=0&id_user='.$config['id_user'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($variable === 'global_block_size') {
|
||||||
|
if (is_metaconsole() === true) {
|
||||||
|
$url = '__url__index.php?sec=advanced&sec2=advanced/metasetup&pure=0&tab=visual';
|
||||||
|
} else {
|
||||||
|
$url = '__url__/index.php?sec=gsetup&sec2=godmode/setup/setup§ion=vis';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->notify(
|
||||||
|
[
|
||||||
|
'type' => 'NOTIF.VARIABLES.PERFORMANCE.'.$variable,
|
||||||
|
'title' => __('Incorrect config value'),
|
||||||
|
'message' => __(
|
||||||
|
$message,
|
||||||
|
$names[$variable],
|
||||||
|
$limit_value
|
||||||
|
),
|
||||||
|
'url' => $url,
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2561,6 +2561,10 @@ function config_process_config()
|
||||||
'max' => 200,
|
'max' => 200,
|
||||||
'min' => 10,
|
'min' => 10,
|
||||||
],
|
],
|
||||||
|
'global_block_size' => [
|
||||||
|
'max' => 200,
|
||||||
|
'min' => 10,
|
||||||
|
],
|
||||||
'short_module_graph_data' => [
|
'short_module_graph_data' => [
|
||||||
'max' => 20,
|
'max' => 20,
|
||||||
'min' => 1,
|
'min' => 1,
|
||||||
|
|
Loading…
Reference in New Issue