restyling
This commit is contained in:
parent
929680eb17
commit
1be0fb94b0
|
@ -21,26 +21,26 @@
|
||||||
*/
|
*/
|
||||||
function print_filters($sec)
|
function print_filters($sec)
|
||||||
{
|
{
|
||||||
|
global $config;
|
||||||
|
|
||||||
$table = new StdClass();
|
$table = new StdClass();
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->cellspacing = 0;
|
$table->rowspan = [];
|
||||||
$table->cellpadding = 0;
|
$table->size = [];
|
||||||
$table->class = 'databox filters';
|
$table->size[0] = '33%';
|
||||||
|
$table->size[1] = '33%';
|
||||||
|
$table->size[2] = '33%';
|
||||||
|
$table->class = 'filter-table-adv';
|
||||||
|
|
||||||
if ($sec === 'view') {
|
if ($sec === 'view') {
|
||||||
$table->style[0] = 'font-weight: bold;';
|
$table->data[0][0] = html_print_label_input_block(
|
||||||
$table->style[1] = 'font-weight: bold;';
|
__('Group'),
|
||||||
$table->style[2] = 'font-weight: bold;';
|
html_print_select_groups(
|
||||||
$table->style[3] = 'font-weight: bold;';
|
|
||||||
$table->style[4] = 'font-weight: bold;';
|
|
||||||
|
|
||||||
$table->data[0][0] = __('Group');
|
|
||||||
$table->data[0][1] .= html_print_select_groups(
|
|
||||||
$config['id_user'],
|
$config['id_user'],
|
||||||
'AR',
|
'AR',
|
||||||
true,
|
true,
|
||||||
'group_id',
|
'group_id',
|
||||||
$ag_group,
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
'0',
|
'0',
|
||||||
|
@ -54,30 +54,29 @@ function print_filters($sec)
|
||||||
false,
|
false,
|
||||||
'id_grupo',
|
'id_grupo',
|
||||||
false
|
false
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$table->data[0][2] = __('Recursion');
|
$table->data[0][0] .= html_print_label_input_block(
|
||||||
|
__('Recursion'),
|
||||||
$table->data[0][2] .= html_print_input(
|
html_print_input(
|
||||||
[
|
[
|
||||||
'type' => 'checkbox',
|
'type' => 'switch',
|
||||||
'name' => 'recursion',
|
'name' => 'recursion',
|
||||||
'return' => true,
|
'return' => true,
|
||||||
'checked' => $recursion,
|
'checked' => false,
|
||||||
'value' => 1,
|
'value' => 1,
|
||||||
]
|
]
|
||||||
|
),
|
||||||
|
[
|
||||||
|
'div_class' => 'add-input-reverse',
|
||||||
|
'label_class' => 'label-thin',
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
$table->rowspan[0][1] = 2;
|
||||||
$table->data[1][0] = __('Filter Agents');
|
$table->data[0][1] = html_print_label_input_block(
|
||||||
$table->data[1][1] = html_print_input_text('filter_agents', '', '', 20, 255, true);
|
__('Agents'),
|
||||||
|
html_print_select(
|
||||||
$table->data[2][0] = __('Agents');
|
|
||||||
|
|
||||||
if (empty($agents) === true || $agents == -1) {
|
|
||||||
$agents = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
$table->data[2][1] = html_print_select(
|
|
||||||
[],
|
[],
|
||||||
'selected_agents[]',
|
'selected_agents[]',
|
||||||
'',
|
'',
|
||||||
|
@ -89,15 +88,17 @@ function print_filters($sec)
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
'min-width: 180px; max-width: 200px;'
|
'width:100%'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Interfaces.
|
$table->rowspan[0][2] = 2;
|
||||||
$table->data[2][3] = '<b>'.__('Interfaces').'</b>';
|
$table->data[0][2] = html_print_label_input_block(
|
||||||
$table->data[2][4] = html_print_select(
|
__('Interfaces'),
|
||||||
|
html_print_select(
|
||||||
[],
|
[],
|
||||||
'selected_interfaces[]',
|
'selected_interfaces[]',
|
||||||
$selected_interfaces,
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
|
@ -106,26 +107,42 @@ function print_filters($sec)
|
||||||
true,
|
true,
|
||||||
'',
|
'',
|
||||||
false,
|
false,
|
||||||
'min-width: 180px; max-width: 200px;'
|
'width:100%'
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$filters = '<form method="post" action="'.ui_get_url_refresh(
|
$table->data[1][0] = html_print_label_input_block(
|
||||||
[
|
__('Filter Agents'),
|
||||||
'selected_agents' => $selected_agents,
|
html_print_input_text(
|
||||||
'selected_interfaces' => $selected_interfaces,
|
'filter_agents',
|
||||||
'selected_group_id' => $selected_group_id,
|
'',
|
||||||
]
|
'',
|
||||||
).'">';
|
20,
|
||||||
|
255,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
$filters = '<form method="post" action="'.ui_get_url_refresh().'">';
|
||||||
|
|
||||||
$filters .= html_print_table($table, true);
|
$filters .= html_print_table($table, true);
|
||||||
|
|
||||||
$filters .= "<div class='height_100p right'>".html_print_submit_button(
|
$filters .= html_print_div(
|
||||||
__('Show'),
|
[
|
||||||
'uptbutton',
|
'class' => 'action-buttons',
|
||||||
|
'content' => html_print_submit_button(
|
||||||
|
__('Filter'),
|
||||||
|
'srcbutton',
|
||||||
false,
|
false,
|
||||||
'class="sub search mgn_tp_0"',
|
[
|
||||||
|
'icon' => 'search',
|
||||||
|
'mode' => 'mini',
|
||||||
|
],
|
||||||
true
|
true
|
||||||
).'</div>';
|
),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
$filters .= '</form>';
|
$filters .= '</form>';
|
||||||
} else {
|
} else {
|
||||||
|
@ -135,7 +152,7 @@ function print_filters($sec)
|
||||||
$table->data[0][1] = html_print_select(
|
$table->data[0][1] = html_print_select(
|
||||||
[],
|
[],
|
||||||
'selected_interfaces[]',
|
'selected_interfaces[]',
|
||||||
$selected_interfaces,
|
'',
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
0,
|
0,
|
||||||
|
@ -147,13 +164,7 @@ function print_filters($sec)
|
||||||
'min-width: 180px; max-width: 200px;'
|
'min-width: 180px; max-width: 200px;'
|
||||||
);
|
);
|
||||||
|
|
||||||
$filters = '<form method="post" action="'.ui_get_url_refresh(
|
$filters = '<form method="post" action="'.ui_get_url_refresh().'">';
|
||||||
[
|
|
||||||
'selected_agents' => $selected_agents,
|
|
||||||
'selected_interfaces' => $selected_interfaces,
|
|
||||||
'selected_group_id' => $selected_group_id,
|
|
||||||
]
|
|
||||||
).'">';
|
|
||||||
|
|
||||||
$filters .= html_print_table($table, true);
|
$filters .= html_print_table($table, true);
|
||||||
|
|
||||||
|
@ -170,7 +181,7 @@ function print_filters($sec)
|
||||||
|
|
||||||
ui_toggle(
|
ui_toggle(
|
||||||
$filters,
|
$filters,
|
||||||
__('Interface filter'),
|
'<span class="subsection_header_title">'.__('Interface filter').'</span>',
|
||||||
__('Interface filter'),
|
__('Interface filter'),
|
||||||
'ui_toggle_if_filter',
|
'ui_toggle_if_filter',
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -99,7 +99,7 @@ if ($autosearch === true) {
|
||||||
$result = agents_get_network_interfaces($selected_agents);
|
$result = agents_get_network_interfaces($selected_agents);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false || empty($result) === true) {
|
||||||
$result = [];
|
$result = [];
|
||||||
} else {
|
} else {
|
||||||
ui_pagination(
|
ui_pagination(
|
||||||
|
|
Loading…
Reference in New Issue