diff --git a/web-ui/arthasWebConsole/ui/src/arthas.d.ts b/web-ui/arthasWebConsole/ui/src/arthas.d.ts index c0be89090..bac0e14a7 100644 --- a/web-ui/arthasWebConsole/ui/src/arthas.d.ts +++ b/web-ui/arthasWebConsole/ui/src/arthas.d.ts @@ -422,6 +422,7 @@ type CommandResult = { } | { options: GlobalOptions[]; changeResult: { + "afterValue": unknown, "beforeValue": unknown, "name": string @@ -709,7 +710,9 @@ type ArthasRes = CommonRes | SessionRes | FailRes | AsyncRes; type BindQS = | { req: CommandReq; res: CommonRes } | { req: SessionReq; res: SessionRes } - | { req: AsyncReq; res: AsyncRes }; + | { req: AsyncReq; res: AsyncRes } + | { req: PullResults; res: ArthasRes }; + // autoComplete type Item = { name: string; value: unknown }; diff --git a/web-ui/arthasWebConsole/ui/src/components/NavHeader.vue b/web-ui/arthasWebConsole/ui/src/components/NavHeader.vue index 68063c5f7..8e16581ed 100644 --- a/web-ui/arthasWebConsole/ui/src/components/NavHeader.vue +++ b/web-ui/arthasWebConsole/ui/src/components/NavHeader.vue @@ -26,7 +26,10 @@ publicS.getCommonResEffect(fetchM, body => { const result = body.results[0] if (result.type === "version") { version.value = result.version - }}) + + } +}) + watchEffect(() => { if (!fetchS.wait) restBtnclass.value = "animate-spin-rev-pause" @@ -68,20 +71,12 @@ const logout = async () => { interruptEvent() - sessionM.send("SUBMIT", { - value: { - action: "close_session", - sessionId: undefined - } - }) + fetchS.closeSession() restBtnclass.value = "animate-spin-rev-pause" } -const login = async () => { - sessionM.send("SUBMIT", { - value: { - action: "init_session" - } - }) + +const login = () => { + fetchS.initSession() } const shutdown = () => { publicS.warnMessage = "Are you sure to stop the arthas? All the Arthas clients connecting to this server will be disconnected." @@ -134,6 +129,7 @@ const tabs = [ icon: TerminalIcon }, { + name:'terminal', url:'terminal', icon:TerminalIcon @@ -148,8 +144,8 @@ const tools: [string, () => void][] = [ const router = useRouter() const routePath = computed(() => useRoute().path) const toNext = (url: string) => { - if(url === "terminal") { - window.open("/","_blank") + if (url === "terminal") { + window.open("/", "_blank") } else router.push(url) } @@ -158,11 +154,11 @@ const toNext = (url: string) => {