diff --git a/frontend/src/components/InterfacePane.vue b/frontend/src/components/InterfacePane.vue index 65451d0..b69c311 100644 --- a/frontend/src/components/InterfacePane.vue +++ b/frontend/src/components/InterfacePane.vue @@ -16,11 +16,12 @@ setup() { const store = processStore(); - const { selectedProcess, selectedInterface } = storeToRefs(store); - return { store, selectedProcess, selectedInterface } + const { interfaceFilter, selectedProcess, selectedInterface } = storeToRefs(store); + return { store, interfaceFilter, selectedProcess, selectedInterface } }, - components: { + components: + { VueSimpleContextMenu, }, @@ -31,6 +32,33 @@ this.selectedInterface = intf; }, + applyFilter(filter, intf) + { + if (!filter) + { + return true; + } + + filter = filter.toLowerCase(); + + if (!filter.includes(':')) + { + let inverse = false; + + if (filter.startsWith('!')) + { + filter = filter.substring(1); + inverse = true; + } + + return (intf.uuid.toLowerCase().includes(filter) || intf.location.toLowerCase().includes(filter) || + intf.decs.toLowerCase().includes(filter) || intf.name.toLowerCase().includes(filter) || + intf.annotation.toLowerCase().includes(filter)) != inverse; + } + + return true; + }, + interfaceClick(e, item) { if (item.typ != 'rpc') @@ -63,6 +91,9 @@