From b252ca2b1b5faeda4512f3f6721afbdef38aeadf Mon Sep 17 00:00:00 2001 From: xudaotutou <13435638964@163.com> Date: Thu, 3 Nov 2022 21:40:51 -0500 Subject: [PATCH] chore(web ui):ref tunnel modules (#2331) --- web-ui/arthasWebConsole/.env.tunnel | 3 +- web-ui/arthasWebConsole/.env.ui | 3 +- web-ui/arthasWebConsole/{src => all}/env.d.ts | 2 +- .../{public => all/share/assert}/arthas.png | Bin .../{public => all/share/assert}/fullsc.png | Bin .../share/component/Console.vue} | 141 +++++++--- web-ui/arthasWebConsole/all/share/main.css | 3 + .../{ => all/share}/public/favicon.ico | Bin .../arthasWebConsole/all/tunnel/agents.html | 17 ++ web-ui/arthasWebConsole/all/tunnel/apps.html | 16 ++ .../{ => all/tunnel}/index.html | 0 .../arthasWebConsole/all/tunnel/src/Agent.vue | 60 ++++ .../arthasWebConsole/all/tunnel/src/Apps.vue | 42 +++ .../arthasWebConsole/all/tunnel/src/agents.ts | 6 + .../arthasWebConsole/all/tunnel/src/apps.ts | 5 + .../arthasWebConsole/all/tunnel/src/main.css | 3 + .../arthasWebConsole/all/tunnel/src/main.ts | 7 + .../arthasWebConsole/all/tunnel/tunnel.d.ts | 6 + web-ui/arthasWebConsole/all/ui/index.html | 16 ++ .../{ => all/ui}/src/main.css | 0 .../arthasWebConsole/{ => all/ui}/src/main.ts | 4 +- .../{ => all/ui}/ui/index.html | 0 .../{ => all/ui}/ui/src/App.vue | 7 +- .../{ => all/ui}/ui/src/arthas.d.ts | 0 .../ui}/ui/src/components/NavHeader.vue | 50 ++-- .../ui/src/components/dialog/ErrDialog.vue | 0 .../ui/src/components/dialog/InputDialog.vue | 0 .../src/components/dialog/SuccessDialog.vue | 0 .../ui/src/components/dialog/WarnDialog.vue | 0 .../ui/src/components/input/AutoComplete.vue | 0 .../ui/src/components/input/ClassInput.vue | 0 .../ui/src/components/input/MethodInput.vue | 0 .../ui}/ui/src/components/input/PlayStop.vue | 0 .../ui/src/components/input/SwitchInput.vue | 0 .../ui}/ui/src/components/input/TodoList.vue | 0 .../ui/src/components/routeTo/SelectCmd.vue | 0 .../ui}/ui/src/components/show/CmdResMenu.vue | 0 .../ui}/ui/src/components/show/Enhancer.vue | 0 .../src/components/show/OptionConfigMenu.vue | 0 .../ui}/ui/src/components/show/ResTable.vue | 0 .../ui}/ui/src/components/show/Tree.vue | 0 .../ui}/ui/src/machines/consoleMachine.ts | 0 .../ui}/ui/src/machines/perRequestMachine.ts | 0 .../ui/src/machines/transformConfigMachine.ts | 0 .../{ => all/ui}/ui/src/main.ts | 2 +- .../{ => all/ui}/ui/src/router/index.ts | 0 .../{ => all/ui}/ui/src/router/routes.ts | 0 .../{ => all/ui}/ui/src/stores/fetch.ts | 0 .../{ => all/ui}/ui/src/stores/public.ts | 0 .../all/ui/ui/src/utils/transform.ts | 3 + .../ui}/ui/src/views/Asynchronize.vue | 0 .../{ => all/ui}/ui/src/views/Config.vue | 0 .../{ => all/ui}/ui/src/views/Console.vue | 0 .../{ => all/ui}/ui/src/views/DashBoard.vue | 87 +++--- .../{ => all/ui}/ui/src/views/Synchronize.vue | 3 - .../ui}/ui/src/views/async/Monitor.vue | 0 .../ui}/ui/src/views/async/Profiler.vue | 0 .../{ => all/ui}/ui/src/views/async/Stack.vue | 11 +- .../{ => all/ui}/ui/src/views/async/Trace.vue | 0 .../{ => all/ui}/ui/src/views/async/Tt.vue | 0 .../{ => all/ui}/ui/src/views/async/Watch.vue | 0 .../{ => all/ui}/ui/src/views/config/Jvm.vue | 0 .../ui}/ui/src/views/config/Options.vue | 0 .../ui}/ui/src/views/config/PerCounter.vue | 0 .../ui}/ui/src/views/config/Sysenv.vue | 0 .../ui}/ui/src/views/config/Sysprop.vue | 0 .../ui}/ui/src/views/config/Vmoption.vue | 0 .../ui}/ui/src/views/sync/ClassInfo.vue | 1 - .../ui}/ui/src/views/sync/ClassLoader.vue | 266 +++++++++--------- .../ui}/ui/src/views/sync/HeapDump.vue | 0 .../{ => all/ui}/ui/src/views/sync/Jad.vue | 0 .../{ => all/ui}/ui/src/views/sync/Mbean.vue | 0 .../{ => all/ui}/ui/src/views/sync/Memory.vue | 0 .../{ => all/ui}/ui/src/views/sync/Ognl.vue | 0 .../{ => all/ui}/ui/src/views/sync/Reset.vue | 0 .../ui}/ui/src/views/sync/Retransform.vue | 0 .../{ => all/ui}/ui/src/views/sync/Thread.vue | 122 ++++---- .../{ => all/ui}/ui/src/views/sync/Vmtool.vue | 0 web-ui/arthasWebConsole/package.json | 8 +- web-ui/arthasWebConsole/tailwind.config.js | 5 +- web-ui/arthasWebConsole/tsconfig.json | 13 +- web-ui/arthasWebConsole/tsconfig.node.json | 2 +- web-ui/arthasWebConsole/ui/src/env.d.ts | 8 - web-ui/arthasWebConsole/ui/src/index.css | 12 - .../ui/src/stores/resTransform.ts | 9 - web-ui/arthasWebConsole/vite.config.ts | 52 ++-- web-ui/pom.xml | 13 +- 87 files changed, 639 insertions(+), 369 deletions(-) rename web-ui/arthasWebConsole/{src => all}/env.d.ts (91%) rename web-ui/arthasWebConsole/{public => all/share/assert}/arthas.png (100%) rename web-ui/arthasWebConsole/{public => all/share/assert}/fullsc.png (100%) rename web-ui/arthasWebConsole/{src/App.vue => all/share/component/Console.vue} (59%) create mode 100644 web-ui/arthasWebConsole/all/share/main.css rename web-ui/arthasWebConsole/{ => all/share}/public/favicon.ico (100%) create mode 100644 web-ui/arthasWebConsole/all/tunnel/agents.html create mode 100644 web-ui/arthasWebConsole/all/tunnel/apps.html rename web-ui/arthasWebConsole/{ => all/tunnel}/index.html (100%) create mode 100644 web-ui/arthasWebConsole/all/tunnel/src/Agent.vue create mode 100644 web-ui/arthasWebConsole/all/tunnel/src/Apps.vue create mode 100644 web-ui/arthasWebConsole/all/tunnel/src/agents.ts create mode 100644 web-ui/arthasWebConsole/all/tunnel/src/apps.ts create mode 100644 web-ui/arthasWebConsole/all/tunnel/src/main.css create mode 100644 web-ui/arthasWebConsole/all/tunnel/src/main.ts create mode 100644 web-ui/arthasWebConsole/all/tunnel/tunnel.d.ts create mode 100644 web-ui/arthasWebConsole/all/ui/index.html rename web-ui/arthasWebConsole/{ => all/ui}/src/main.css (100%) rename web-ui/arthasWebConsole/{ => all/ui}/src/main.ts (54%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/index.html (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/App.vue (82%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/arthas.d.ts (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/NavHeader.vue (75%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/dialog/ErrDialog.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/dialog/InputDialog.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/dialog/SuccessDialog.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/dialog/WarnDialog.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/input/AutoComplete.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/input/ClassInput.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/input/MethodInput.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/input/PlayStop.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/input/SwitchInput.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/input/TodoList.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/routeTo/SelectCmd.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/show/CmdResMenu.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/show/Enhancer.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/show/OptionConfigMenu.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/show/ResTable.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/components/show/Tree.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/machines/consoleMachine.ts (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/machines/perRequestMachine.ts (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/machines/transformConfigMachine.ts (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/main.ts (92%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/router/index.ts (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/router/routes.ts (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/stores/fetch.ts (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/stores/public.ts (100%) create mode 100644 web-ui/arthasWebConsole/all/ui/ui/src/utils/transform.ts rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/Asynchronize.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/Config.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/Console.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/DashBoard.vue (84%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/Synchronize.vue (92%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/async/Monitor.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/async/Profiler.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/async/Stack.vue (91%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/async/Trace.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/async/Tt.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/async/Watch.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/config/Jvm.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/config/Options.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/config/PerCounter.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/config/Sysenv.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/config/Sysprop.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/config/Vmoption.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/ClassInfo.vue (99%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/ClassLoader.vue (53%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/HeapDump.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/Jad.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/Mbean.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/Memory.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/Ognl.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/Reset.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/Retransform.vue (100%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/Thread.vue (71%) rename web-ui/arthasWebConsole/{ => all/ui}/ui/src/views/sync/Vmtool.vue (100%) delete mode 100644 web-ui/arthasWebConsole/ui/src/env.d.ts delete mode 100644 web-ui/arthasWebConsole/ui/src/index.css delete mode 100644 web-ui/arthasWebConsole/ui/src/stores/resTransform.ts diff --git a/web-ui/arthasWebConsole/.env.tunnel b/web-ui/arthasWebConsole/.env.tunnel index 5aaf1f490..1fe3c3366 100644 --- a/web-ui/arthasWebConsole/.env.tunnel +++ b/web-ui/arthasWebConsole/.env.tunnel @@ -1,2 +1,3 @@ # NODE_ENV=production -VITE_AGENT=true \ No newline at end of file +VITE_ARTHAS_PORT=7777 +VITE_ARTHAS_PROXY_PORT=8080 \ No newline at end of file diff --git a/web-ui/arthasWebConsole/.env.ui b/web-ui/arthasWebConsole/.env.ui index 04da6f0fd..6767c1da4 100644 --- a/web-ui/arthasWebConsole/.env.ui +++ b/web-ui/arthasWebConsole/.env.ui @@ -1,2 +1,3 @@ # NODE_ENV=production -VITE_AGENT=false \ No newline at end of file +VITE_ARTHAS_PORT=8563 +VITE_ARTHAS_PROXY_PORT=8563 \ No newline at end of file diff --git a/web-ui/arthasWebConsole/src/env.d.ts b/web-ui/arthasWebConsole/all/env.d.ts similarity index 91% rename from web-ui/arthasWebConsole/src/env.d.ts rename to web-ui/arthasWebConsole/all/env.d.ts index 4f9c20631..df4a71947 100644 --- a/web-ui/arthasWebConsole/src/env.d.ts +++ b/web-ui/arthasWebConsole/all/env.d.ts @@ -6,7 +6,7 @@ declare module '*.vue' { export default component } interface ImportMetaEnv { - readonly VITE_AGENT:string + readonly VITE_ARTHAS_PORT:string } interface ImportMeta { diff --git a/web-ui/arthasWebConsole/public/arthas.png b/web-ui/arthasWebConsole/all/share/assert/arthas.png similarity index 100% rename from web-ui/arthasWebConsole/public/arthas.png rename to web-ui/arthasWebConsole/all/share/assert/arthas.png diff --git a/web-ui/arthasWebConsole/public/fullsc.png b/web-ui/arthasWebConsole/all/share/assert/fullsc.png similarity index 100% rename from web-ui/arthasWebConsole/public/fullsc.png rename to web-ui/arthasWebConsole/all/share/assert/fullsc.png diff --git a/web-ui/arthasWebConsole/src/App.vue b/web-ui/arthasWebConsole/all/share/component/Console.vue similarity index 59% rename from web-ui/arthasWebConsole/src/App.vue rename to web-ui/arthasWebConsole/all/share/component/Console.vue index 0e6ed4adf..a04ddcdb0 100644 --- a/web-ui/arthasWebConsole/src/App.vue +++ b/web-ui/arthasWebConsole/all/share/component/Console.vue @@ -1,21 +1,31 @@ diff --git a/web-ui/arthasWebConsole/all/share/main.css b/web-ui/arthasWebConsole/all/share/main.css new file mode 100644 index 000000000..bd6213e1d --- /dev/null +++ b/web-ui/arthasWebConsole/all/share/main.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/web-ui/arthasWebConsole/public/favicon.ico b/web-ui/arthasWebConsole/all/share/public/favicon.ico similarity index 100% rename from web-ui/arthasWebConsole/public/favicon.ico rename to web-ui/arthasWebConsole/all/share/public/favicon.ico diff --git a/web-ui/arthasWebConsole/all/tunnel/agents.html b/web-ui/arthasWebConsole/all/tunnel/agents.html new file mode 100644 index 000000000..a2ce24e97 --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/agents.html @@ -0,0 +1,17 @@ + + + + + + + Arthas Tutorials + + + + +
+
+ + + + \ No newline at end of file diff --git a/web-ui/arthasWebConsole/all/tunnel/apps.html b/web-ui/arthasWebConsole/all/tunnel/apps.html new file mode 100644 index 000000000..92c093be0 --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/apps.html @@ -0,0 +1,16 @@ + + + + + + + Arthas Tutorials + + + +
+
+ + + + \ No newline at end of file diff --git a/web-ui/arthasWebConsole/index.html b/web-ui/arthasWebConsole/all/tunnel/index.html similarity index 100% rename from web-ui/arthasWebConsole/index.html rename to web-ui/arthasWebConsole/all/tunnel/index.html diff --git a/web-ui/arthasWebConsole/all/tunnel/src/Agent.vue b/web-ui/arthasWebConsole/all/tunnel/src/Agent.vue new file mode 100644 index 000000000..bbfde0039 --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/src/Agent.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/web-ui/arthasWebConsole/all/tunnel/src/Apps.vue b/web-ui/arthasWebConsole/all/tunnel/src/Apps.vue new file mode 100644 index 000000000..7802892de --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/src/Apps.vue @@ -0,0 +1,42 @@ + + + + + \ No newline at end of file diff --git a/web-ui/arthasWebConsole/all/tunnel/src/agents.ts b/web-ui/arthasWebConsole/all/tunnel/src/agents.ts new file mode 100644 index 000000000..a94303218 --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/src/agents.ts @@ -0,0 +1,6 @@ +import { createApp } from "vue"; +import App from "./Agent.vue"; +const app = createApp(App); +import "~/main.css"; +app + .mount("#app"); diff --git a/web-ui/arthasWebConsole/all/tunnel/src/apps.ts b/web-ui/arthasWebConsole/all/tunnel/src/apps.ts new file mode 100644 index 000000000..6ef530d37 --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/src/apps.ts @@ -0,0 +1,5 @@ +import App from "./Apps.vue" +import { createApp } from "vue" +import "~/main.css"; +createApp(App) + .mount("#app"); \ No newline at end of file diff --git a/web-ui/arthasWebConsole/all/tunnel/src/main.css b/web-ui/arthasWebConsole/all/tunnel/src/main.css new file mode 100644 index 000000000..bd6213e1d --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/src/main.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/web-ui/arthasWebConsole/all/tunnel/src/main.ts b/web-ui/arthasWebConsole/all/tunnel/src/main.ts new file mode 100644 index 000000000..c5a78b68a --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/src/main.ts @@ -0,0 +1,7 @@ +import { createApp, h } from "vue"; +import App from "~/component/Console.vue"; +const app = createApp(h(App, { isTunnel: true })); +import "xterm/css/xterm.css"; +import "~/main.css"; +app + .mount("#app"); diff --git a/web-ui/arthasWebConsole/all/tunnel/tunnel.d.ts b/web-ui/arthasWebConsole/all/tunnel/tunnel.d.ts new file mode 100644 index 000000000..6b7934781 --- /dev/null +++ b/web-ui/arthasWebConsole/all/tunnel/tunnel.d.ts @@ -0,0 +1,6 @@ +type AgentInfo = { + clientConnectHost:string, + host:string, + port:number, + arthasVersion:string +} \ No newline at end of file diff --git a/web-ui/arthasWebConsole/all/ui/index.html b/web-ui/arthasWebConsole/all/ui/index.html new file mode 100644 index 000000000..19b1b7432 --- /dev/null +++ b/web-ui/arthasWebConsole/all/ui/index.html @@ -0,0 +1,16 @@ + + + + + + + + Arthas Console + + + +
+ + + + \ No newline at end of file diff --git a/web-ui/arthasWebConsole/src/main.css b/web-ui/arthasWebConsole/all/ui/src/main.css similarity index 100% rename from web-ui/arthasWebConsole/src/main.css rename to web-ui/arthasWebConsole/all/ui/src/main.css diff --git a/web-ui/arthasWebConsole/src/main.ts b/web-ui/arthasWebConsole/all/ui/src/main.ts similarity index 54% rename from web-ui/arthasWebConsole/src/main.ts rename to web-ui/arthasWebConsole/all/ui/src/main.ts index 11b4c0c76..21378c90c 100644 --- a/web-ui/arthasWebConsole/src/main.ts +++ b/web-ui/arthasWebConsole/all/ui/src/main.ts @@ -1,7 +1,7 @@ import { createApp } from "vue"; -import App from "./App.vue"; +import App from "~/component/Console.vue"; const app = createApp(App); import "xterm/css/xterm.css" -import "./main.css" +import "~/main.css" app .mount("#app"); \ No newline at end of file diff --git a/web-ui/arthasWebConsole/ui/index.html b/web-ui/arthasWebConsole/all/ui/ui/index.html similarity index 100% rename from web-ui/arthasWebConsole/ui/index.html rename to web-ui/arthasWebConsole/all/ui/ui/index.html diff --git a/web-ui/arthasWebConsole/ui/src/App.vue b/web-ui/arthasWebConsole/all/ui/ui/src/App.vue similarity index 82% rename from web-ui/arthasWebConsole/ui/src/App.vue rename to web-ui/arthasWebConsole/all/ui/ui/src/App.vue index 6e3ebe4d9..f064f356a 100644 --- a/web-ui/arthasWebConsole/ui/src/App.vue +++ b/web-ui/arthasWebConsole/all/ui/ui/src/App.vue @@ -18,14 +18,9 @@ onBeforeUnmount(() => {