diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue index 049613670..b0583b884 100644 --- a/src/components/common/VnLog.vue +++ b/src/components/common/VnLog.vue @@ -13,6 +13,7 @@ import VnAvatar from '../ui/VnAvatar.vue'; import VnJsonValue from '../common/VnJsonValue.vue'; import FetchData from '../FetchData.vue'; import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue'; +import VnSelectFilter from './VnSelectFilter.vue'; const stateStore = useStateStore(); const validationsStore = useValidator(); @@ -120,7 +121,6 @@ const validDate = new RegExp( /T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(.[0-9]+)?(Z)?$/.source ); -const filteredActions = ref([]); const filteredWorkers = ref([]); function castJsonValue(value) { @@ -361,40 +361,13 @@ async function clearFilter() { changeInput.value = undefined; dateFrom.value = undefined; dateTo.value = undefined; + userRadio.value = undefined; Object.keys(checkboxOptions.value).forEach( (opt) => (checkboxOptions.value[opt].selected = false) ); await applyFilter(); } -function filterFn(val, update, abortFn, type) { - if (!val) { - update(() => { - if (type === 'actions') filteredActions.value = actions.value; - if (type === 'workers') filteredWorkers.value = workers.value; - }); - return; - } - - update(() => { - const needle = val.toLowerCase(); - if (type === 'actions') - filteredActions.value = actions.value.filter((item) => - validations[item].locale.name.includes(needle) - ); - if (type === 'workers') { - if (isNaN(needle)) - filteredWorkers.value = workers.value.filter( - (item) => - item.name.toLowerCase().includes(needle) || - item.nickname.toLowerCase().includes(needle) - ); - else - filteredWorkers.value = workers.value.filter((item) => item.id == needle); - } - }); -} - setLogTree();