diff --git a/webui/.eslintrc.cjs b/webui/.eslintrc.cjs
index b64731a0..5ee7e2ac 100644
--- a/webui/.eslintrc.cjs
+++ b/webui/.eslintrc.cjs
@@ -3,12 +3,11 @@ require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
- 'extends': [
- 'plugin:vue/vue3-essential',
- 'eslint:recommended',
- '@vue/eslint-config-prettier/skip-formatting'
- ],
+ extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-prettier/skip-formatting'],
parserOptions: {
ecmaVersion: 'latest'
+ },
+ rules: {
+ 'vue/multi-word-component-names': 'off'
}
}
diff --git a/webui/src/components/FunctionCapabilities.vue b/webui/src/components/FunctionCapabilities.vue
index 0e8ecaa2..1e4b66f9 100644
--- a/webui/src/components/FunctionCapabilities.vue
+++ b/webui/src/components/FunctionCapabilities.vue
@@ -68,11 +68,6 @@ const filterMode = ref('lenient')
const sourceDialogVisible = ref(false)
const currentSource = ref('')
-const showSource = (source) => {
- currentSource.value = source
- sourceDialogVisible.value = true
-}
-
import { parseFunctionCapabilities } from '../utils/rdocParser'
const tableData = computed(() => parseFunctionCapabilities(props.data, props.showLibraryRules))
diff --git a/webui/src/components/NamespaceChart.vue b/webui/src/components/NamespaceChart.vue
index 47fea3bf..0d53dd90 100644
--- a/webui/src/components/NamespaceChart.vue
+++ b/webui/src/components/NamespaceChart.vue
@@ -28,7 +28,7 @@ const createSunburstData = (rules) => {
let currentId = ''
let parent = ''
- parts.forEach((part, index) => {
+ parts.forEach((part) => {
currentId = currentId ? `${currentId}/${part}` : part
if (!data.ids.includes(currentId)) {
diff --git a/webui/src/components/RuleMatchesTable.vue b/webui/src/components/RuleMatchesTable.vue
index 514b3ab0..899f1155 100644
--- a/webui/src/components/RuleMatchesTable.vue
+++ b/webui/src/components/RuleMatchesTable.vue
@@ -47,21 +47,17 @@
:class="{ 'w-3': col.field === 'mbc', 'w-full': col.field === 'name' }"
filterMatchMode="contains"
>
-
-
-
-
-
- {{ slotProps.node.data.address }}
+
+
+
+ {{ slotProps.node.data.type === 'match location' ? '' : slotProps.node.data.address }}
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
{{ slotProps.node.data.namespace }}
+
diff --git a/webui/src/tests/rdocParser.test.js b/webui/src/tests/rdocParser.test.js
index 51fa9e21..97022500 100644
--- a/webui/src/tests/rdocParser.test.js
+++ b/webui/src/tests/rdocParser.test.js
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest'
-import { parseRules, parseFunctionCapabilities, parseProcessCapabilities } from '../utils/rdocParser'
+import { parseRules, parseFunctionCapabilities } from '../utils/rdocParser'
describe('parseRules', () => {
it('should return an empty array for empty rules', () => {
diff --git a/webui/src/utils/rdocParser.js b/webui/src/utils/rdocParser.js
index 51ef6414..0808ef3a 100644
--- a/webui/src/utils/rdocParser.js
+++ b/webui/src/utils/rdocParser.js
@@ -7,7 +7,7 @@
* @returns {Array} - Parsed tree data for the TreeTable component
*/
export function parseRules(rules, flavor, layout, maxMatches = 1) {
- return Object.entries(rules).map(([ruleName, rule], index) => {
+ return Object.entries(rules).map(([, rule], index) => {
const ruleNode = {
key: `${index}`,
data: {
@@ -253,18 +253,22 @@ function parseNode(node, key, rules, lib, layout) {
return result
}
+// TODO(s-ff): decide if we want to show call info or not
+// e.g. explorer.exe{id:0,tid:10,pid:100,ppid:1000}
function getCallInfo(node, layout) {
if (!node.locations || node.locations.length === 0) return null
const location = node.locations[0]
if (location.type !== 'call') return null
+ // eslint-disable-next-line no-unused-vars
const [ppid, pid, tid, callId] = location.value
+ // eslint-disable-next-line no-unused-vars
const callName = node.node.feature.api
const pname = getProcessName(layout, location)
const cname = getCallName(layout, location)
-
+ // eslint-disable-next-line no-unused-vars
const [fname, separator, restWithArgs] = partition(cname, '(')
const [args, , returnValueWithParen] = rpartition(restWithArgs, ')')
@@ -441,9 +445,10 @@ function formatAddress(address) {
return `file+${formatHex(address.value)}`
case 'dn_token':
return `token(${formatHex(address.value)})`
- case 'dn_token_offset':
+ case 'dn_token_offset': {
const [token, offset] = address.value
return `token(${formatHex(token)})+${formatHex(offset)}`
+ }
case 'process':
//const [ppid, pid] = address.value;
//return `process{pid:${pid}}`;
diff --git a/webui/vite.config.js b/webui/vite.config.js
index 6923600e..f80858ef 100644
--- a/webui/vite.config.js
+++ b/webui/vite.config.js
@@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { viteSingleFile } from 'vite-plugin-singlefile'
+// eslint-disable-next-line no-unused-vars
export default defineConfig(({ command, mode }) => {
const isBundle = mode === 'bundle'