diff --git a/web-ui/arthasWebConsole/.env b/web-ui/arthasWebConsole/.env new file mode 100644 index 00000000..056f5e2c --- /dev/null +++ b/web-ui/arthasWebConsole/.env @@ -0,0 +1,2 @@ +VITE_ARTHAS_PROXY_IP=localhost +VITE_ARTHAS_PROXY_PORT=8563 \ No newline at end of file diff --git a/web-ui/arthasWebConsole/src/App.vue b/web-ui/arthasWebConsole/src/App.vue index 37e1d82b..a2d4481d 100644 --- a/web-ui/arthasWebConsole/src/App.vue +++ b/web-ui/arthasWebConsole/src/App.vue @@ -5,20 +5,22 @@ import { FitAddon } from 'xterm-addon-fit'; import {WebglAddon} from "xterm-addon-webgl" let ws: WebSocket | undefined; -let xterm = new Terminal({allowProposedApi: true}) + const DEFAULT_SCROLL_BACK = 1000 const MAX_SCROLL_BACK = 9999999 const MIN_SCROLL_BACK = 1 -const webglAddon = new WebglAddon(); -const ip = ref("127.0.0.1") -const port = ref('3568') +const ARTHAS_PORT = '8563' +const ip = ref("") +const port = ref('') const iframe = ref(true) const fullSc = ref(true) -let fitAddon = new FitAddon(); +const fitAddon = new FitAddon(); +const webglAddon = new WebglAddon(); +let xterm = new Terminal({allowProposedApi: true}) onMounted(() => { ip.value = getUrlParam('ip') ?? window.location.hostname; - port.value = getUrlParam('port') ?? '8563'; + port.value = getUrlParam('port') ?? ARTHAS_PORT; let _iframe = getUrlParam('iframe') if (_iframe && _iframe.trim() !== 'false') iframe.value = false diff --git a/web-ui/arthasWebConsole/src/env.d.ts b/web-ui/arthasWebConsole/src/env.d.ts index 7eeb043a..8bdc147e 100644 --- a/web-ui/arthasWebConsole/src/env.d.ts +++ b/web-ui/arthasWebConsole/src/env.d.ts @@ -4,12 +4,4 @@ declare module '*.vue' { // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types const component: DefineComponent<{}, {}, any> export default component -} -interface ImportMetaEnv { - readonly VITE_APP_TITLE: string - // 更多环境变量... -} - -interface ImportMeta { - readonly env: ImportMetaEnv } \ No newline at end of file diff --git a/web-ui/arthasWebConsole/ui/src/assets/arthas.png b/web-ui/arthasWebConsole/ui/src/assets/arthas.png deleted file mode 100644 index 73317782..00000000 Binary files a/web-ui/arthasWebConsole/ui/src/assets/arthas.png and /dev/null differ diff --git a/web-ui/arthasWebConsole/ui/src/assets/favicon.ico b/web-ui/arthasWebConsole/ui/src/assets/favicon.ico deleted file mode 100644 index df9b02e1..00000000 Binary files a/web-ui/arthasWebConsole/ui/src/assets/favicon.ico and /dev/null differ diff --git a/web-ui/arthasWebConsole/ui/src/env.d.ts b/web-ui/arthasWebConsole/ui/src/env.d.ts index 3af921ad..d92149da 100644 --- a/web-ui/arthasWebConsole/ui/src/env.d.ts +++ b/web-ui/arthasWebConsole/ui/src/env.d.ts @@ -5,12 +5,4 @@ declare module '*.vue' { // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types const component: DefineComponent<{}, {}, any> export default component -} -interface ImportMetaEnv { - readonly VITE_APP_TITLE: string - // 更多环境变量... -} - -interface ImportMeta { - readonly env: ImportMetaEnv } \ No newline at end of file diff --git a/web-ui/arthasWebConsole/ui/src/stores/fetch.ts b/web-ui/arthasWebConsole/ui/src/stores/fetch.ts index 91269130..d5d6fa75 100644 --- a/web-ui/arthasWebConsole/ui/src/stores/fetch.ts +++ b/web-ui/arthasWebConsole/ui/src/stores/fetch.ts @@ -202,7 +202,7 @@ export const fetchStore = defineStore("fetch", { }); } this.jobRunning = false; - return Promise.reject("There art not job running"); + return Promise.reject("There are not jobs running"); }, openJobRun() { this.jobRunning = true; diff --git a/web-ui/arthasWebConsole/ui/src/views/async/Profiler.vue b/web-ui/arthasWebConsole/ui/src/views/async/Profiler.vue index fcf645aa..6200ee9c 100644 --- a/web-ui/arthasWebConsole/ui/src/views/async/Profiler.vue +++ b/web-ui/arthasWebConsole/ui/src/views/async/Profiler.vue @@ -197,7 +197,7 @@ onBeforeUnmount(() => {