#10283 fixed filter design in snmp console

This commit is contained in:
Daniel Cebrian 2023-02-02 11:18:47 +01:00
parent 3bc593e58a
commit 18f2cee2a7
2 changed files with 74 additions and 53 deletions

View File

@ -416,8 +416,8 @@ class SnmpConsole extends HTML
'label' => __('Alert'), 'label' => __('Alert'),
'type' => 'select', 'type' => 'select',
'id' => 'filter_alert', 'id' => 'filter_alert',
'input_class' => 'filter_input_datatable',
'name' => 'filter_alert', 'name' => 'filter_alert',
'class' => 'w200px',
'fields' => $show_alerts, 'fields' => $show_alerts,
'return' => true, 'return' => true,
'selected' => $this->filter_alert, 'selected' => $this->filter_alert,
@ -426,8 +426,8 @@ class SnmpConsole extends HTML
'label' => __('Severity'), 'label' => __('Severity'),
'type' => 'select', 'type' => 'select',
'id' => 'filter_severity', 'id' => 'filter_severity',
'input_class' => 'filter_input_datatable',
'name' => 'filter_severity', 'name' => 'filter_severity',
'class' => 'w200px',
'fields' => $severities, 'fields' => $severities,
'return' => true, 'return' => true,
'selected' => $this->filter_severity, 'selected' => $this->filter_severity,
@ -435,8 +435,8 @@ class SnmpConsole extends HTML
[ [
'label' => __('Free search'), 'label' => __('Free search'),
'type' => 'text', 'type' => 'text',
'class' => 'w400px',
'id' => 'filter_free_search', 'id' => 'filter_free_search',
'input_class' => 'filter_input_datatable',
'name' => 'filter_free_search', 'name' => 'filter_free_search',
'value' => $this->filter_free_search, 'value' => $this->filter_free_search,
], ],
@ -444,8 +444,8 @@ class SnmpConsole extends HTML
'label' => __('Status'), 'label' => __('Status'),
'type' => 'select', 'type' => 'select',
'id' => 'filter_status', 'id' => 'filter_status',
'input_class' => 'filter_input_datatable',
'name' => 'filter_status', 'name' => 'filter_status',
'class' => 'w200px',
'fields' => $status_array, 'fields' => $status_array,
'return' => true, 'return' => true,
'selected' => $this->filter_status, 'selected' => $this->filter_status,
@ -458,6 +458,7 @@ class SnmpConsole extends HTML
'disabled' => false, 'disabled' => false,
'return' => true, 'return' => true,
'id' => 'filter_group_by', 'id' => 'filter_group_by',
'input_class' => 'filter_input_datatable',
'fields' => [ 'fields' => [
0 => __('No'), 0 => __('No'),
1 => __('Yes'), 1 => __('Yes'),
@ -466,8 +467,8 @@ class SnmpConsole extends HTML
[ [
'label' => __('Max. hours old'), 'label' => __('Max. hours old'),
'type' => 'text', 'type' => 'text',
'class' => 'w200px',
'id' => 'filter_hours_ago', 'id' => 'filter_hours_ago',
'input_class' => 'filter_input_datatable',
'name' => 'filter_hours_ago', 'name' => 'filter_hours_ago',
'value' => $this->filter_hours_ago, 'value' => $this->filter_hours_ago,
], ],
@ -475,8 +476,8 @@ class SnmpConsole extends HTML
'label' => __('Trap type'), 'label' => __('Trap type'),
'type' => 'select', 'type' => 'select',
'id' => 'filter_trap_type', 'id' => 'filter_trap_type',
'input_class' => 'filter_input_datatable',
'name' => 'filter_trap_type', 'name' => 'filter_trap_type',
'class' => 'w200px',
'fields' => $trap_types, 'fields' => $trap_types,
'return' => true, 'return' => true,
'selected' => $this->filter_trap_type, 'selected' => $this->filter_trap_type,

View File

@ -323,6 +323,25 @@ a.pandora_pagination.current:hover {
cursor: default; cursor: default;
} }
.filter_input_datatable {
width: 45% !important;
display: flex;
flex-wrap: nowrap;
flex-direction: row;
max-width: 450px;
min-width: 400px;
}
.filter_input_datatable input {
flex: 1;
}
.filter_input_datatable label {
width: 93px;
max-width: 100%;
}
.filter_input_datatable .select2.select2-container {
flex: 1;
}
/* Default datatable filter style */ /* Default datatable filter style */
.datatable_filter.content { .datatable_filter.content {
display: flex; display: flex;
@ -336,7 +355,8 @@ a.pandora_pagination.current:hover {
} }
.datatable_filter.content li { .datatable_filter.content li {
flex: 1 1 auto; flex: 1 1 auto;
margin: 1em auto; margin: 1em 0;
padding: 0px 10px;
} }
.sorting_desc { .sorting_desc {
background: url(../../images/sort_down_green.png) no-repeat; background: url(../../images/sort_down_green.png) no-repeat;