setup Performance visual changes

This commit is contained in:
Jonathan 2023-03-17 13:35:43 +01:00
parent fd5347e893
commit de538a10cb
1 changed files with 441 additions and 386 deletions

View File

@ -254,188 +254,187 @@ if ($config['history_db_enabled'] == 1) {
$table = new StdClass(); $table = new StdClass();
$table->width = '100%'; $table->width = '100%';
$table->class = 'databox filters'; $table->class = 'filter-table-adv';
$table->data = []; $table->data = [];
$table->style[0] = 'font-weight: bold'; $table->size[0] = '50%';
$table->size[1] = '50%';
$table->size[0] = '70%'; $table->data[0][0] = html_print_label_input_block(
$table->size[1] = '30%'; __('Max. days before delete events'),
html_print_input(
$table->data[1][0] = __('Max. days before delete events'); [
$table->data[1][1] = html_print_input( 'type' => 'number',
[ 'size' => 5,
'type' => 'number', 'max' => $performance_variables_control['event_purge']->max,
'size' => 5, 'name' => 'event_purge',
'max' => $performance_variables_control['event_purge']->max, 'value' => $config['event_purge'],
'name' => 'event_purge', 'return' => true,
'value' => $config['event_purge'], 'min' => $performance_variables_control['event_purge']->min,
'return' => true, ]
'min' => $performance_variables_control['event_purge']->min, )
'style' => 'width:43px',
]
); );
$table->data[2][0] = __('Max. days before delete traps'); $table->data[0][1] = html_print_label_input_block(
$table->data[2][1] = html_print_input( __('Max. days before delete traps'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['trap_purge']->max, 'size' => 5,
'name' => 'trap_purge', 'max' => $performance_variables_control['trap_purge']->max,
'value' => $config['trap_purge'], 'name' => 'trap_purge',
'return' => true, 'value' => $config['trap_purge'],
'min' => $performance_variables_control['trap_purge']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['trap_purge']->min,
] ]
)
); );
$table->data[3][0] = __('Max. days before delete audit events'); $table->data[1][0] = html_print_label_input_block(
$table->data[3][1] = html_print_input( __('Max. days before delete audit events'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['audit_purge']->max, 'size' => 5,
'name' => 'audit_purge', 'max' => $performance_variables_control['audit_purge']->max,
'value' => $config['audit_purge'], 'name' => 'audit_purge',
'return' => true, 'value' => $config['audit_purge'],
'min' => $performance_variables_control['audit_purge']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['audit_purge']->min,
] ]
)
); );
$table->data[4][0] = __('Max. days before delete string data'); $table->data[1][1] = html_print_label_input_block(
$table->data[4][1] = html_print_input( __('Max. days before delete string data'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['string_purge']->max, 'size' => 5,
'name' => 'string_purge', 'max' => $performance_variables_control['string_purge']->max,
'value' => $config['string_purge'], 'name' => 'string_purge',
'return' => true, 'value' => $config['string_purge'],
'min' => $performance_variables_control['string_purge']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['string_purge']->min,
] ]
)
); );
$table->data[5][0] = __('Max. days before delete GIS data'); $table->data[2][0] = html_print_label_input_block(
$table->data[5][1] = html_print_input( __('Max. days before delete GIS data'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['gis_purge']->max, 'size' => 5,
'name' => 'gis_purge', 'max' => $performance_variables_control['gis_purge']->max,
'value' => $config['gis_purge'], 'name' => 'gis_purge',
'return' => true, 'value' => $config['gis_purge'],
'min' => $performance_variables_control['gis_purge']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['gis_purge']->min,
] ]
)
); );
$table->data[6][0] = __('Max. days before purge'); $table->data[2][1] = html_print_label_input_block(
$table->data[6][1] = html_print_input( __('Max. days before purge'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['days_purge']->max, 'size' => 5,
'name' => 'days_purge', 'max' => $performance_variables_control['days_purge']->max,
'value' => $config['days_purge'], 'name' => 'days_purge',
'return' => true, 'value' => $config['days_purge'],
'min' => $performance_variables_control['days_purge']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['days_purge']->min,
] ]
)
); );
$table->data[7][0] = __('Max. days before compact data'); $table->data[3][0] = html_print_label_input_block(
$table->data[7][1] = html_print_input( __('Max. days before compact data'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['days_compact']->max, 'size' => 5,
'name' => 'days_compact', 'max' => $performance_variables_control['days_compact']->max,
'value' => $config['days_compact'], 'name' => 'days_compact',
'return' => true, 'value' => $config['days_compact'],
'min' => $performance_variables_control['days_compact']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['days_compact']->min,
] ]
)
); );
$table->data[8][0] = __('Max. days before delete unknown modules'); $table->data[3][1] = html_print_label_input_block(
$table->data[8][1] = html_print_input( __('Max. days before delete unknown modules'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['days_delete_unknown']->max, 'size' => 5,
'name' => 'days_delete_unknown', 'max' => $performance_variables_control['days_delete_unknown']->max,
'value' => $config['days_delete_unknown'], 'name' => 'days_delete_unknown',
'return' => true, 'value' => $config['days_delete_unknown'],
'min' => $performance_variables_control['days_delete_unknown']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['days_delete_unknown']->min,
] ]
)
); );
$table->data[4][0] = html_print_label_input_block(
$table->data[9][0] = __('Max. days before delete not initialized modules'); __('Max. days before delete not initialized modules'),
$table->data[9][1] = html_print_input( html_print_input(
[ [
'type' => 'number', 'type' => 'number',
'size' => 5, 'size' => 5,
'max' => $performance_variables_control['days_delete_not_initialized']->max, 'max' => $performance_variables_control['days_delete_not_initialized']->max,
'name' => 'days_delete_not_initialized', 'name' => 'days_delete_not_initialized',
'value' => $config['days_delete_not_initialized'], 'value' => $config['days_delete_not_initialized'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['days_delete_not_initialized']->min, 'min' => $performance_variables_control['days_delete_not_initialized']->min,
'style' => 'width:43px', ]
] )
); );
$table->data[10][0] = __('Max. days before delete autodisabled agents'); $table->data[4][1] = html_print_label_input_block(
$table->data[10][1] = html_print_input( __('Max. days before delete autodisabled agents'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['days_autodisable_deletion']->max, 'size' => 5,
'name' => 'days_autodisable_deletion', 'max' => $performance_variables_control['days_autodisable_deletion']->max,
'value' => $config['days_autodisable_deletion'], 'name' => 'days_autodisable_deletion',
'return' => true, 'value' => $config['days_autodisable_deletion'],
'min' => $performance_variables_control['days_autodisable_deletion']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['days_autodisable_deletion']->min,
] ]
)
); );
$table->data[11][0] = __('Retention period of past special days'); $table->data[5][0] = html_print_label_input_block(
$table->data[11][1] = html_print_input_text( __('Retention period of past special days'),
'num_past_special_days', html_print_input_text(
$config['num_past_special_days'], 'num_past_special_days',
'', $config['num_past_special_days'],
5,
5,
true
);
$table->data[12][0] = __('Max. macro data fields');
$table->data[12][1] = html_print_input_text(
'max_macro_fields',
$config['max_macro_fields'],
'',
5,
5,
true,
false,
false,
'onChange="change_macro_fields()"'
);
if (enterprise_installed()) {
$table->data[13][0] = __('Max. days before delete inventory data');
$table->data[13][1] = html_print_input_text(
'inventory_purge',
$config['inventory_purge'],
'', '',
5, false,
5, 5,
true true
); )
} );
$table->data[5][1] = html_print_label_input_block(
__('Max. macro data fields'),
html_print_input_text(
'max_macro_fields',
$config['max_macro_fields'],
'',
false,
5,
true,
false,
false,
'onChange="change_macro_fields()"'
)
);
if ($config['history_db_enabled'] == 1) { if ($config['history_db_enabled'] == 1) {
if (! isset($config['history_db_connection']) if (! isset($config['history_db_connection'])
@ -459,86 +458,94 @@ if ($config['history_db_enabled'] == 1) {
$table_historical = new StdClass(); $table_historical = new StdClass();
$table_historical->width = '100%'; $table_historical->width = '100%';
$table_historical->class = 'databox filters'; $table_historical->class = 'filter-table-adv';
$table_historical->data = []; $table_historical->data = [];
$table_historical->style[0] = 'font-weight: bold';
$table_historical->size[0] = '70%'; $table_historical->size[0] = '50%';
$table_historical->size[1] = '30%'; $table_historical->size[1] = '50%';
enterprise_hook('enterprise_warnings_history_days'); enterprise_hook('enterprise_warnings_history_days');
$table_historical->data[0][0] = __('Max. days before purge'); $table_historical->data[0][0] = html_print_label_input_block(
$table_historical->data[0][1] = html_print_input_text( __('Max. days before purge'),
'historical_days_purge', html_print_input_text(
$config_history['days_purge'], 'historical_days_purge',
'', $config_history['days_purge'],
5, '',
5, false,
true 5,
true
)
); );
$table_historical->data[1][0] = __('Max. days before compact data'); $table_historical->data[0][1] = html_print_label_input_block(
$table_historical->data[1][1] = html_print_input_text( __('Max. days before compact data'),
'historical_days_compact', html_print_input_text(
$config_history['days_compact'], 'historical_days_compact',
'', $config_history['days_compact'],
5, '',
5, false,
true 5,
true
)
); );
$table_historical->data[2][0] = __('Compact interpolation in hours (1 Fine-20 bad)'); $table_historical->data[1][0] = html_print_label_input_block(
$table_historical->data[2][1] = html_print_input_text( __('Compact interpolation in hours (1 Fine-20 bad)'),
'historical_step_compact', html_print_input_text(
$config_history['step_compact'], 'historical_step_compact',
'', $config_history['step_compact'],
5, '',
5, false,
true 5,
true
)
); );
$table_historical->data[3][0] = __('Max. days before delete events'); $table_historical->data[1][1] = html_print_label_input_block(
$table_historical->data[3][1] = html_print_input_text( __('Max. days before delete events'),
'historical_event_purge', html_print_input_text(
$config_history['event_purge'], 'historical_event_purge',
'', $config_history['event_purge'],
5, '',
5, false,
true 5,
true
)
); );
$table_historical->data[4][0] = __('Max. days before delete string data'); $table_historical->data[2][0] = html_print_label_input_block(
$table_historical->data[4][1] = html_print_input_text( __('Max. days before delete string data'),
'historical_string_purge', html_print_input_text(
$config_history['string_purge'], 'historical_string_purge',
'', $config_history['string_purge'],
5, '',
5, 5,
true 5,
true
)
); );
$table_historical->data[4][1] .= html_print_input_hidden( $table_historical->data[2][0] .= html_print_input_hidden(
'historical_history_db_enabled', 'historical_history_db_enabled',
0, 0,
true true
); );
} }
$table->data[] = [ $table->data[6][0] = html_print_label_input_block(
__('Max. days before delete old messages'), __('Max. days before delete old messages'),
html_print_input_text( html_print_input_text(
'delete_old_messages', 'delete_old_messages',
$config['delete_old_messages'], $config['delete_old_messages'],
'', '',
5, false,
5, 5,
true true
), )
]; );
$table->data[6][1] = html_print_label_input_block(
$table->data[] = [
__('Max. days before delete old network matrix data'), __('Max. days before delete old network matrix data'),
html_print_input( html_print_input(
[ [
@ -549,55 +556,71 @@ $table->data[] = [
'value' => $config['delete_old_network_matrix'], 'value' => $config['delete_old_network_matrix'],
'return' => true, 'return' => true,
'min' => $performance_variables_control['delete_old_network_matrix']->min, 'min' => $performance_variables_control['delete_old_network_matrix']->min,
'style' => 'width:43px',
] ]
), )
]; );
if (enterprise_installed()) {
$table->data[7][0] = html_print_label_input_block(
__('Max. days before delete inventory data'),
html_print_input_text(
'inventory_purge',
$config['inventory_purge'],
'',
false,
5,
true
)
);
}
$table_other = new stdClass(); $table_other = new stdClass();
$table_other->width = '100%'; $table_other->width = '100%';
$table_other->class = 'databox filters'; $table_other->class = 'filter-table-adv';
$table_other->data = []; $table_other->data = [];
$table_other->style[0] = 'font-weight: bold';
$table_other->size[0] = '70%'; $table_other->size[0] = '50%';
$table_other->size[1] = '30%'; $table_other->size[1] = '50%';
$i = 0;
$table_other->data[$i][0] = __('Item limit for realtime reports'); $table_other->data[0][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Item limit for realtime reports'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['report_limit']->max, 'size' => 5,
'name' => 'report_limit', 'max' => $performance_variables_control['report_limit']->max,
'value' => $config['report_limit'], 'name' => 'report_limit',
'return' => true, 'value' => $config['report_limit'],
'min' => $performance_variables_control['report_limit']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['report_limit']->min,
] ]
)
); );
$table_other->data[$i][0] = __('Limit of events per query'); $table_other->data[0][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Limit of events per query'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => 10000, 'size' => 5,
'name' => 'events_per_query', 'max' => 10000,
'value' => $config['events_per_query'], 'name' => 'events_per_query',
'return' => true, 'value' => $config['events_per_query'],
'style' => 'width:50px', 'return' => true,
] ]
)
); );
$table_other->data[$i][0] = __('Compact interpolation in hours (1 Fine-20 bad)'); $table_other->data[1][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Compact interpolation in hours (1 Fine-20 bad)'),
'step_compact', html_print_input_text(
$config['step_compact'], 'step_compact',
'', $config['step_compact'],
5, '',
5, false,
true 5,
true
)
); );
$intervals = []; $intervals = [];
@ -610,140 +633,172 @@ $intervals[SECONDS_1WEEK] = __('Last week');
$intervals[SECONDS_2WEEK] = __('2 weeks'); $intervals[SECONDS_2WEEK] = __('2 weeks');
$intervals[SECONDS_1MONTH] = __('Last month'); $intervals[SECONDS_1MONTH] = __('Last month');
$table_other->data[$i][0] = __('Default hours for event view'); $table_other->data[1][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Default hours for event view'),
[ html_print_input(
'type' => 'number', [
'size' => 5, 'type' => 'number',
'max' => $performance_variables_control['event_view_hr']->max, 'size' => 5,
'name' => 'event_view_hr', 'max' => $performance_variables_control['event_view_hr']->max,
'value' => $config['event_view_hr'], 'name' => 'event_view_hr',
'return' => true, 'value' => $config['event_view_hr'],
'min' => $performance_variables_control['event_view_hr']->min, 'return' => true,
'style' => 'width:43px', 'min' => $performance_variables_control['event_view_hr']->min,
] ]
)
); );
$table_other->data[$i][0] = __('Use realtime statistics'); $table_other->data[2][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_checkbox_switch( __('Use realtime statistics'),
'realtimestats', html_print_checkbox_switch(
1, 'realtimestats',
$config['realtimestats'], 1,
true $config['realtimestats'],
true
)
); );
$table_other->data[$i][0] = __('Batch statistics period (secs)'); $table_other->data[2][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Batch statistics period (secs)'),
'stats_interval', html_print_input_text(
$config['stats_interval'], 'stats_interval',
'', $config['stats_interval'],
5, '',
5, false,
true 5,
true
)
); );
$table_other->data[$i][0] = __('Use agent access graph'); $table_other->data[3][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_checkbox_switch('agentaccess', 1, $config['agentaccess'], true, $disable_agentaccess); __('Use agent access graph'),
html_print_checkbox_switch(
$table_other->data[$i][0] = __('Max. recommended number of files in attachment directory'); 'agentaccess',
$table_other->data[$i++][1] = html_print_input_text( 1,
'num_files_attachment', $config['agentaccess'],
$config['num_files_attachment'], true,
'', $disable_agentaccess
5, )
5,
true
); );
$table_other->data[$i][0] = __('Delete not init modules'); $table_other->data[3][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_checkbox_switch('delete_notinit', 1, $config['delete_notinit'], true); __('Max. recommended number of files in attachment directory'),
html_print_input_text(
$table_other->data[$i][0] = __('Big Operation Step to purge old data'); 'num_files_attachment',
$table_other->data[$i++][1] = html_print_input( $config['num_files_attachment'],
[ '',
'type' => 'number', false,
'size' => 5, 5,
'max' => $performance_variables_control['big_operation_step_datos_purge']->max, true
'name' => 'big_operation_step_datos_purge', )
'value' => $config['big_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['big_operation_step_datos_purge']->min,
'style' => 'width:50px',
]
); );
$table_other->data[4][0] = html_print_label_input_block(
__('Delete not init modules'),
$table_other->data[$i][0] = __('Small Operation Step to purge old data'); html_print_checkbox_switch(
$table_other->data[$i++][1] = html_print_input( 'delete_notinit',
[ 1,
'type' => 'number', $config['delete_notinit'],
'size' => 5, true
'max' => $performance_variables_control['small_operation_step_datos_purge']->max, )
'name' => 'small_operation_step_datos_purge',
'value' => $config['small_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['small_operation_step_datos_purge']->min,
'style' => 'width:50px',
]
); );
$table_other->data[$i][0] = __('Graph container - Max. Items'); $table_other->data[4][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Big Operation Step to purge old data'),
'max_graph_container', html_print_input(
$config['max_graph_container'], [
'', 'type' => 'number',
5, 'size' => 5,
5, 'max' => $performance_variables_control['big_operation_step_datos_purge']->max,
true 'name' => 'big_operation_step_datos_purge',
'value' => $config['big_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['big_operation_step_datos_purge']->min,
]
)
); );
$table_other->data[$i][0] = __('Events response max. execution'); $table_other->data[5][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Small Operation Step to purge old data'),
'max_execution_event_response', html_print_input(
$config['max_execution_event_response'], [
'', 'type' => 'number',
5, 'size' => 5,
5, 'max' => $performance_variables_control['small_operation_step_datos_purge']->max,
true 'name' => 'small_operation_step_datos_purge',
'value' => $config['small_operation_step_datos_purge'],
'return' => true,
'min' => $performance_variables_control['small_operation_step_datos_purge']->min,
]
)
); );
$table_other->data[$i][0] = __('Row limit in csv log'); $table_other->data[5][1] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input( __('Graph container - Max. Items'),
[ html_print_input_text(
'type' => 'number', 'max_graph_container',
'size' => 5, $config['max_graph_container'],
'max' => $performance_variables_control['row_limit_csv']->max, '',
'name' => 'row_limit_csv', false,
'value' => $config['row_limit_csv'], 5,
'return' => true, true
'min' => $performance_variables_control['row_limit_csv']->min, )
'style' => 'width:63px',
]
); );
$table_other->data[$i][0] = __('SNMP walk binary'); $table_other->data[6][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('Events response max. execution'),
'snmpwalk', html_print_input_text(
$config['snmpwalk'], 'max_execution_event_response',
'', $config['max_execution_event_response'],
50, '',
10, false,
true 5,
true
)
);
$table_other->data[6][1] = html_print_label_input_block(
__('Row limit in csv log'),
html_print_input(
[
'type' => 'number',
'size' => 5,
'max' => $performance_variables_control['row_limit_csv']->max,
'name' => 'row_limit_csv',
'value' => $config['row_limit_csv'],
'return' => true,
'min' => $performance_variables_control['row_limit_csv']->min,
]
)
);
$table_other->data[7][0] = html_print_label_input_block(
__('SNMP walk binary'),
html_print_input_text(
'snmpwalk',
$config['snmpwalk'],
'',
false,
10,
true
)
); );
$tip = ui_print_help_tip( $tip = ui_print_help_tip(
__('SNMP bulk walk is not able to request V1 SNMP, this option will be used instead (by default snmpwalk, slower).'), __('SNMP bulk walk is not able to request V1 SNMP, this option will be used instead (by default snmpwalk, slower).'),
true true
); );
$table_other->data[$i][0] = __('SNMP walk binary (fallback)').$tip;
$table_other->data[$i++][1] = html_print_input_text( $table_other->data[7][1] = html_print_label_input_block(
'snmpwalk_fallback', __('SNMP walk binary (fallback)').$tip,
$config['snmpwalk_fallback'], html_print_input_text(
'', 'snmpwalk_fallback',
50, $config['snmpwalk_fallback'],
10, '',
true false,
10,
true
)
); );
$tip = ui_print_help_tip( $tip = ui_print_help_tip(
@ -754,36 +809,40 @@ $tip = ui_print_help_tip(
true true
); );
$table_other->data[$i][0] = __('WMI binary'); $table_other->data[8][0] = html_print_label_input_block(
$table_other->data[$i++][1] = html_print_input_text( __('WMI binary'),
'wmiBinary', html_print_input_text(
$config['wmiBinary'], 'wmiBinary',
'', $config['wmiBinary'],
50, '',
50, false,
true 50,
true
)
); );
// Agent Wizard defaults. // Agent Wizard defaults.
$defaultAgentWizardOptions = json_decode(io_safe_output($config['agent_wizard_defaults'])); $defaultAgentWizardOptions = json_decode(io_safe_output($config['agent_wizard_defaults']));
$tableSnmpWizard = new stdClass(); $tableSnmpWizard = new stdClass();
$tableSnmpWizard->width = '100%'; $tableSnmpWizard->width = '100%';
$tableSnmpWizard->class = 'databox filters'; $tableSnmpWizard->class = 'filter-table-adv';
$tableSnmpWizard->data = []; $tableSnmpWizard->data = [];
$tableSnmpWizard->style[0] = 'font-weight: bold'; $tableSnmpWizard->size[0] = '50%';
$tableSnmpWizard->style[2] = 'font-weight: bold'; $tableSnmpWizard->size[1] = '50%';
$tableSnmpWizard->size[0] = '30%';
$tableSnmpWizard->size[2] = '30%';
$i = 0; $i = 0;
$j = 0; $j = 0;
foreach ($defaultAgentWizardOptions as $key => $value) { foreach ($defaultAgentWizardOptions as $key => $value) {
$tableSnmpWizard->data[$i][$j++] = $key; if ($i > 1) {
$tableSnmpWizard->data[$i][$j++] = html_print_checkbox_switch('agent_wizard_defaults_'.$key, 1, $value, true); $i = 0;
if ($j >= 3) { $j++;
$j = 0;
$i++;
} }
$tableSnmpWizard->data[$j][$i] = html_print_label_input_block(
$key,
html_print_checkbox_switch('agent_wizard_defaults_'.$key, 1, $value, true)
);
$i++;
} }
echo '<form id="form_setup" method="post">'; echo '<form id="form_setup" method="post">';
@ -817,18 +876,14 @@ echo '</fieldset>';
echo '<div class="action-buttons" style="width: '.$table->width.'">'; echo '<div class="action-buttons" style="width: '.$table->width.'">';
html_print_input_hidden('update_config', 1); html_print_input_hidden('update_config', 1);
html_print_div( $actionButtons = html_print_submit_button(
[ __('Update'),
'class' => 'action-buttons w100p', 'update_button',
'content' => html_print_submit_button( false,
__('Update'), [ 'icon' => 'update' ],
'update_button', true
false,
[ 'icon' => 'update' ],
true
),
]
); );
html_print_action_buttons($actionButtons, ['type' => 'form_action']);
echo '</form>'; echo '</form>';
?> ?>