diff --git a/frontend/src/components/container-log/index.vue b/frontend/src/components/container-log/index.vue index 455f8baff..daff35ee1 100644 --- a/frontend/src/components/container-log/index.vue +++ b/frontend/src/components/container-log/index.vue @@ -1,6 +1,6 @@ @@ -45,18 +35,10 @@ import i18n from '@/lang'; import { dateFormatForName, downloadWithContent } from '@/utils/util'; import { onBeforeUnmount, reactive, ref } from 'vue'; import { MsgError, MsgSuccess } from '@/utils/message'; -import { GlobalStore } from '@/store'; -const globalStore = GlobalStore(); +import LogPro from '@/components/log-pro/index.vue'; const logInfo = ref(); const terminalSocket = ref(); -const editorRef = ref(); -const scrollerElement = ref(null); -const showLog = ref(false); - -const loadHeight = () => { - return globalStore.openMenuTabs ? '405px' : '375px'; -}; const logSearch = reactive({ isWatch: false, @@ -102,9 +84,6 @@ const searchLogs = async () => { ); terminalSocket.value.onmessage = (event) => { logInfo.value += event.data; - nextTick(() => { - scrollerElement.value.scrollTop = scrollerElement.value.scrollHeight; - }); }; }; @@ -152,17 +131,6 @@ onBeforeUnmount(() => { terminalSocket.value?.send('close conn'); }); -onMounted(async () => { - await nextTick(() => { - showLog.value = true; - }); - if (editorRef.value) { - scrollerElement.value = editorRef.value.$el as HTMLElement; - let hljsDom = scrollerElement.value.querySelector('.hljs') as HTMLElement; - hljsDom.style['min-height'] = '500px'; - } -}); - defineExpose({ acceptParams, }); diff --git a/frontend/src/components/log-pro/index.vue b/frontend/src/components/log-pro/index.vue new file mode 100644 index 000000000..596198c58 --- /dev/null +++ b/frontend/src/components/log-pro/index.vue @@ -0,0 +1,61 @@ + + + diff --git a/frontend/src/views/container/container/log/index.vue b/frontend/src/views/container/container/log/index.vue index fc23457fe..597e7a4ee 100644 --- a/frontend/src/views/container/container/log/index.vue +++ b/frontend/src/views/container/container/log/index.vue @@ -31,7 +31,7 @@ -
+
{{ $t('commons.button.watch') }} @@ -43,14 +43,7 @@ {{ $t('commons.button.clean') }}
- - +