diff options
Diffstat (limited to 'src/views/_sila/Logs/EventLogs/EventLogs.vue')
-rw-r--r-- | src/views/_sila/Logs/EventLogs/EventLogs.vue | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/views/_sila/Logs/EventLogs/EventLogs.vue b/src/views/_sila/Logs/EventLogs/EventLogs.vue index bc276b29..b036303e 100644 --- a/src/views/_sila/Logs/EventLogs/EventLogs.vue +++ b/src/views/_sila/Logs/EventLogs/EventLogs.vue @@ -2,11 +2,18 @@ <b-container fluid="xl"> <page-title /> <b-row class="align-items-start"> - <b-col sm="8" xl="6" class="search-block d-sm-flex align-items-end mb-4"> + <b-col + sm="12" + xl="6" + class="search-block-1200 d-sm-flex align-items-end mb-4" + > <search :placeholder="$t('pageEventLogs.table.searchLogs')" + :show-search-by="true" + :select-options="searchSelectOptions" data-test-id="eventLogs-input-searchLogs" @change-search="onChangeSearchInput" + @search-by="onSearchBy" @clear-search="onClearSearchInput" /> <div class="ml-sm-4"> @@ -83,6 +90,8 @@ :per-page="perPage" :current-page="currentPage" :filter="searchFilter" + :filter-included-fields="filterIncludedFields" + :filter-debounce="300" :busy="isBusy" @filtered="onFiltered" @row-selected="onRowSelected($event, filteredLogs.length)" @@ -360,6 +369,20 @@ export default { tdClass: 'text-right text-nowrap', }, ], + searchSelectOptions: [ + { + value: 'all', + text: this.$t('pageEventLogs.table.all'), + }, + { + value: 'id', + text: this.$t('pageEventLogs.table.id'), + }, + { + value: 'description', + text: this.$t('pageEventLogs.table.description'), + }, + ], tableFilters: [ { key: 'severity', @@ -386,6 +409,7 @@ export default { itemsPerPageOptions: itemsPerPageOptions, perPage: perPage, searchFilter: searchFilter, + filterIncludedFields: null, searchTotalFilteredRows: 0, selectedRows: selectedRows, tableHeaderCheckboxModel: tableHeaderCheckboxModel, @@ -443,6 +467,9 @@ export default { }); }, methods: { + onSearchBy(field) { + this.filterIncludedFields = field === 'all' ? null : [field]; + }, changelogStatus(row) { this.$store .dispatch('eventLog/updateEventLogStatus', { |