#10321 create token events_per_query for limit consult sql
This commit is contained in:
parent
64c27cdd0f
commit
5927687ad3
|
@ -528,6 +528,19 @@ $table_other->data[$i++][1] = html_print_input_text(
|
|||
true
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Limit of events per query');
|
||||
$table_other->data[$i++][1] = html_print_input(
|
||||
[
|
||||
'type' => 'number',
|
||||
'size' => 5,
|
||||
'max' => 10000,
|
||||
'name' => 'events_per_query',
|
||||
'value' => $config['events_per_query'],
|
||||
'return' => true,
|
||||
'style' => 'width:50px',
|
||||
]
|
||||
);
|
||||
|
||||
$table_other->data[$i][0] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
$table_other->data[$i++][1] = html_print_input_text(
|
||||
'step_compact',
|
||||
|
|
|
@ -848,6 +848,10 @@ function config_update_config()
|
|||
$error_update[] = __('Item limit for realtime reports)');
|
||||
}
|
||||
|
||||
if (config_update_value('events_per_query', (int) get_parameter('events_per_query'), true) === false) {
|
||||
$error_update[] = __('Limit of events per query');
|
||||
}
|
||||
|
||||
if (config_update_value('step_compact', (int) get_parameter('step_compact'), true) === false) {
|
||||
$error_update[] = __('Compact interpolation in hours (1 Fine-20 bad)');
|
||||
}
|
||||
|
@ -1986,6 +1990,10 @@ function config_process_config()
|
|||
config_update_value('report_limit', 100);
|
||||
}
|
||||
|
||||
if (!isset($config['events_per_query'])) {
|
||||
config_update_value('events_per_query', 5000);
|
||||
}
|
||||
|
||||
if (!isset($config['loginhash_pwd'])) {
|
||||
config_update_value('loginhash_pwd', io_input_password((rand(0, 1000) * rand(0, 1000)).'pandorahash'));
|
||||
}
|
||||
|
|
|
@ -324,9 +324,11 @@ if (is_ajax() === true) {
|
|||
$start = get_parameter('start', 0);
|
||||
$length = get_parameter(
|
||||
'length',
|
||||
$config['block_size']
|
||||
$config['events_per_query']
|
||||
);
|
||||
|
||||
$length = ($length === '-1') ? $config['events_per_query'] : $length;
|
||||
|
||||
if ($get_events !== 0) {
|
||||
try {
|
||||
ob_start();
|
||||
|
|
Loading…
Reference in New Issue