restyling

This commit is contained in:
daniel 2023-02-23 10:24:03 +01:00
parent 0fbf50673a
commit ff9ee7a4f0
8 changed files with 146 additions and 33 deletions

View File

@ -383,12 +383,11 @@ class SnmpConsole extends HTML
5 => __('Other'),
];
$this->tableId = 'snmp_console';
$tableId = 'snmp_console';
// Load datatables user interface.
ui_print_datatable(
[
'id' => $this->tableId,
'id' => $tableId,
'class' => 'info_table',
'style' => 'width: 100%',
'columns' => $columns,
@ -490,16 +489,25 @@ class SnmpConsole extends HTML
echo $e->getMessage();
}
echo '<div class="w98p right">';
html_print_submit_button(__('Validate'), 'updatebt', false, 'class="sub ok"');
echo '&nbsp;';
html_print_submit_button(
$buttons[] = html_print_submit_button(
__('Validate'),
'updatebt',
false,
'class="sub ok"',
true
);
$buttons[] = html_print_submit_button(
__('Delete'),
'deletebt',
false,
'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"'
'class="sub delete" onClick="javascript:return confirm(\''.__('Are you sure?').'\')"',
true
);
html_print_action_buttons(
implode('', $buttons),
['type' => 'form_action']
);
echo '</div>';
echo '<div class="snmp_view_div">';
echo '<h3>'.__('Status').'</h3>';

View File

@ -6731,4 +6731,19 @@ function html_print_menu_button(array $options, bool $return=false)
],
$return
);
}
function html_print_label_input_block(?string $label, $calbackFn):string
{
$output = '<div>';
if ($label !== null) {
$output .= '<label>'.$label.'</label>';
}
$output .= $calbackFn;
$output .= '</div>';
return $output;
}

View File

@ -10909,6 +10909,11 @@ pre.external_tools_output {
margin: -25px -25px 25px -25px;
}
.white_table_graph.fixed_filter_bar {
border-radius: 0;
top: 110px;
}
/*
.fixed_filter_bar tr {
display: flex;
@ -10929,10 +10934,7 @@ pre.external_tools_output {
font-size: 10pt;
}
.fixed_filter_bar input,
.filter_table input,
.fixed_filter_bar .select2-container .select2-selection--single,
.filter_table .select2-container .select2-selection--single,
.table_modal_alternate input,
table.table_modal_alternate
span.select2

View File

@ -520,3 +520,18 @@ a.pandora_pagination.current:hover {
.datatable_form {
margin: 0 1em;
}
table.nueva-clase td > div {
display: flex;
flex-direction: column;
justify-content: center;
align-items: normal;
}
table.nueva-clase td > div label {
color: #161628;
font-size: 13px;
line-height: 16px;
text-align: left;
margin-bottom: 10px;
}

View File

@ -231,25 +231,79 @@ $searchForm = '';
$searchForm .= '<form method="post" action="?sec=view&sec2=operation/agentes/estado_agente&group_id='.$group_id.'">';
$table = new stdClass();
$table->style[0] = 'width: 15%';
$table->style[2] = 'width: 15%';
$table->class[0] = 'databox filters bolder';
$table->width = '100%';
$table->class = 'nueva-clase';
$table->data['group'][0] = __('Group');
$table->data['group'][1] = html_print_select_groups(false, $access, true, 'group_id', $group_id, 'this.form.submit()', '', '', true, false, true, '', false);
$table->data['group'][0] = '<div>';
$table->data['group'][0] .= '<label>'.__('Group').'</label>';
$table->data['group'][0] .= html_print_select_groups(
false,
$access,
true,
'group_id',
$group_id,
'this.form.submit()',
'',
'',
true,
false,
true,
'',
false
);
$table->data['group'][0] .= '</div>';
$table->data['group'][2] = __('Recursion');
$table->data['group'][3] = html_print_checkbox_switch('recursion', 1, $recursion, true);
$table->data['group'][1] = '<div>';
$table->data['group'][1] .= '<label>'.__('Recursion').'</label>';
$table->data['group'][1] .= html_print_checkbox_switch(
'recursion',
1,
$recursion,
true
);
$table->data['group'][1] .= '</div>';
$table->data['status'][0] = __('Status');
$table->data['status'][1] = html_print_select($fields, 'status', $status, 'this.form.submit()', __('All'), AGENT_STATUS_ALL, true, false, true, '', false, 'width: 90px;');
$table->data['group'][2] = html_print_label_input_block(
__('Status'),
html_print_select(
$fields,
'status',
$status,
'this.form.submit()',
__('All'),
AGENT_STATUS_ALL,
true,
false,
true,
'',
false
)
);
$table->data['search_fields'][0] = __('Search');
$table->data['search_fields'][1] = html_print_input_text('search', $search, '', 35, 255, true);
$table->data['search_fields'][0] = html_print_label_input_block(
__('Search'),
html_print_input_text(
'search',
$search,
'',
35,
255,
true
)
);
$table->data['search_fields'][1] = html_print_label_input_block(
__('Search in custom fields'),
html_print_input_text(
'search_custom',
$search_custom,
'',
35,
255,
true
)
);
$table->data['search_fields'][2] = __('Search in custom fields');
$table->data['search_fields'][3] = html_print_input_text('search_custom', $search_custom, '', 35, 255, true);
// $table->colspan['search_fields'][3] = '2';
$searchForm .= html_print_table($table, true);
$searchForm .= html_print_div(
[
@ -267,13 +321,18 @@ $searchForm .= html_print_div(
],
true
);
$searchForm .= '</form>';
ui_toggle(
$searchForm,
'<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form'
'filter_form',
'',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
if (empty($search) === false) {
@ -708,7 +767,6 @@ $tableAgents = new stdClass();
$tableAgents->cellpadding = 0;
$tableAgents->cellspacing = 0;
$tableAgents->id = 'agent_list';
$tableAgents->styleTable = 'margin: 0 10px';
$tableAgents->class = 'info_table tactical_table';
$tableAgents->head = [];

View File

@ -172,7 +172,12 @@ function print_filters($sec)
$filters,
__('Interface filter'),
__('Interface filter'),
'ui_toggle_if_filter'
'ui_toggle_if_filter',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
unset($table);

View File

@ -983,7 +983,17 @@ $tableFilter->data[4][2] = html_print_submit_button(
$filters = '<form method="post" action="index.php?sec='.$section.'&sec2=operation/agentes/status_monitor&refr='.$refr.'&ag_group='.$ag_group.'&ag_freestring='.$ag_freestring.'&module_option='.$module_option.'&ag_modulename='.$ag_modulename.'&moduletype='.$moduletype.'&datatype='.$datatype.'&status='.$status.'&sort_field='.$sortField.'&sort='.$sort.'&pure='.$config['pure'].$ag_custom_fields_params.'">';
$filters .= html_print_table($tableFilter, true);
$filters .= '</form>';
ui_toggle($filters, '<span class="subsection_header_title">'.__('Filters').'</span>');
ui_toggle(
$filters,
'<span class="subsection_header_title">'.__('Filters').'</span>',
'filter_form',
'',
true,
false,
'',
'white-box-content',
'box-flat white_table_graph fixed_filter_bar'
);
unset($table);
// End Build Search Form.

View File

@ -301,9 +301,9 @@ if (is_metaconsole() === true) {
false,
true,
false,
'box-flat agent_details_col',
'',
'white-box-content',
'mrgn_lft_20px mrgn_right_20px width_available'
'box-flat white_table_graph fixed_filter_bar'
);
}