mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-23 00:00:52 +00:00
@@ -701,7 +701,7 @@ func (u *ContainerService) ContainerLogs(wsConn *websocket.Conn, containerType,
|
||||
return
|
||||
}
|
||||
global.LOG.Errorf("read bytes from log failed, err: %v", err)
|
||||
continue
|
||||
return
|
||||
}
|
||||
if !utf8.Valid(buffer[:n]) {
|
||||
continue
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<script lang="ts" setup>
|
||||
import i18n from '@/lang';
|
||||
import { dateFormatForName, downloadWithContent } from '@/utils/util';
|
||||
import { computed, reactive, ref, shallowRef, watch } from 'vue';
|
||||
import { computed, onBeforeUnmount, reactive, ref, shallowRef, watch } from 'vue';
|
||||
import { Codemirror } from 'vue-codemirror';
|
||||
import { javascript } from '@codemirror/lang-javascript';
|
||||
import { oneDark } from '@codemirror/theme-one-dark';
|
||||
@@ -128,6 +128,7 @@ const searchLogs = async () => {
|
||||
MsgError(i18n.global.t('container.linesHelper'));
|
||||
return;
|
||||
}
|
||||
terminalSocket.value?.send('close conn');
|
||||
terminalSocket.value?.close();
|
||||
logInfo.value = '';
|
||||
const href = window.location.href;
|
||||
@@ -180,6 +181,10 @@ const acceptParams = (props: DialogProps): void => {
|
||||
}
|
||||
};
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
handleClose();
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
acceptParams,
|
||||
});
|
||||
|
||||
@@ -102,6 +102,7 @@ const searchLogs = async () => {
|
||||
MsgError(i18n.global.t('container.linesHelper'));
|
||||
return;
|
||||
}
|
||||
terminalSocket.value?.send('close conn');
|
||||
terminalSocket.value?.close();
|
||||
logInfo.value = '';
|
||||
const href = window.location.href;
|
||||
|
||||
Reference in New Issue
Block a user