diff --git a/web-ui/arthasWebConsole/ui/src/stores/resTransform.ts b/web-ui/arthasWebConsole/ui/src/stores/resTransform.ts index 4a4a4989e..1a4d37653 100644 --- a/web-ui/arthasWebConsole/ui/src/stores/resTransform.ts +++ b/web-ui/arthasWebConsole/ui/src/stores/resTransform.ts @@ -4,6 +4,6 @@ export const transfromStore = defineStore("transformStore", { actions: { transformStackTrace(trace: StackTrace) { return `${trace.className}.${trace.methodName} (${trace.fileName}: ${trace.lineNumber})`; - }, + } }, }); diff --git a/web-ui/arthasWebConsole/ui/src/views/async/Watch.vue b/web-ui/arthasWebConsole/ui/src/views/async/Watch.vue index d6d6998dc..24aee67f0 100644 --- a/web-ui/arthasWebConsole/ui/src/views/async/Watch.vue +++ b/web-ui/arthasWebConsole/ui/src/views/async/Watch.vue @@ -4,8 +4,7 @@ import { useInterpret, useMachine } from '@xstate/vue'; import MethodInput from '@/components/input/MethodInput.vue'; import machine from '@/machines/consoleMachine'; import { fetchStore } from '@/stores/fetch'; -import { onBeforeMount, onBeforeUnmount, reactive, Ref, ref, watchEffect } from 'vue'; -import Tree from '@/components/show/Tree.vue'; +import { onBeforeMount, onBeforeUnmount, reactive, Ref, ref } from 'vue'; import Enhancer from '@/components/show/Enhancer.vue'; import { publicStore } from '@/stores/public'; const pollingM = useMachine(machine) @@ -50,51 +49,7 @@ const transform = (result: CommandResult) => { map.set(key, result[key]) } } - let raw = tranOgnl(result.value) - const stk: TreeNode[] = [] - // Tree的构建 - raw.forEach(v => { - let str = v.trim() - let match = 0 - for (let s of str) { - if (s === "[") { - match++ - } else if (s === "]") { - match-- - } - } - const root = { - children: [], - meta: str.substring(0, str.length - 1) - } as TreeNode - - if (match > 0) { - stk.push(root) - } else if (match === 0) { - let cur = stk.pop() - if (cur) { - cur.children!.push(root) - stk.push(cur) - } else { - stk.push(root) - } - - } else { - /// 默认每行只会一个] - //!可能会有bug - let cur = stk.pop()! - if (stk.length > 0) { - let parent = stk.pop()! - parent.children!.push(cur) - stk.push(parent) - } else { - // 构建结束 - stk.push(cur) - } - - } - }) - map.set("value", stk[0]) + map.set("value", result.value) return map } getPullResultsEffect( @@ -155,8 +110,8 @@ const submit = async (data: { classItem: Item, methodItem: Item, conditon: strin class="h-0 group-hover:h-auto group-focus-within:h-auto absolute overflow-clip transition z-10 top-full pt-2"> @@ -165,7 +120,7 @@ const submit = async (data: { classItem: Item, methodItem: Item, conditon: strin
- +
@@ -176,27 +131,19 @@ const submit = async (data: { classItem: Item, methodItem: Item, conditon: strin - {{v}} + {{ v }} - {{i+1}} - -
- {{map.get(key)}} + {{ i + 1 }} + +
+ {{ map.get(key) }}
- - - +
{{ map.get("value") }}
@@ -204,7 +151,7 @@ const submit = async (data: { classItem: Item, methodItem: Item, conditon: strin - {{v}} + {{ v }}