Skip to content

Commit 7389aad

Browse files
HynoRssongliu
andauthored
feat: Add ComposeDetail view for enhanced container management (#10981)
* feat: Add ComposeDetail view for enhanced container management * feat: Update container log management with new table layout and improved stats display * feat: Update log search mode to 'all' for comprehensive log retrieval * cleanup * feat: Enhance log container and compose management with new UI components and improved functionality * refactor: Remove unused ComposeDetail route and enhance UI components in container management * refactor: Improve UI styling and interaction for compose list items in container management * refactor: Update styling and hover effects for compose list items in container management * refactor: Enhance container compose header with additional context and improve port handling in inspect view * refactor: Update .env label to use translation for improved localization in container compose view * refactor: Adjust height and placeholder text for YAML editor in container compose view * refactor: Adjust docker compose layout --------- Co-authored-by: ssongliu <songlius11@163.com>
1 parent bf095c6 commit 7389aad

File tree

3 files changed

+403
-187
lines changed

3 files changed

+403
-187
lines changed

frontend/src/components/log/container/index.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div>
2+
<div v-if="showControl">
33
<el-select @change="searchLogs" class="fetchClass" v-model="logSearch.mode">
44
<template #prefix>{{ $t('container.fetch') }}</template>
55
<el-option v-for="item in timeOptions" :key="item.label" :value="item.value" :label="item.label" />
@@ -41,7 +41,7 @@
4141
import { cleanContainerLog, DownloadFile } from '@/api/modules/container';
4242
import i18n from '@/lang';
4343
import { dateFormatForName } from '@/utils/util';
44-
import { onUnmounted, reactive, ref } from 'vue';
44+
import { computed, nextTick, onMounted, onUnmounted, reactive, ref } from 'vue';
4545
import { ElMessageBox } from 'element-plus';
4646
import { MsgError, MsgSuccess } from '@/utils/message';
4747
import hightlight from '@/components/log/custom-hightlight/index.vue';
@@ -69,6 +69,14 @@ const props = defineProps({
6969
type: String,
7070
default: '',
7171
},
72+
showControl: {
73+
type: Boolean,
74+
default: true,
75+
},
76+
defaultFollow: {
77+
type: Boolean,
78+
default: false,
79+
},
7280
});
7381
7482
const styleVars = computed(() => ({
@@ -80,10 +88,10 @@ const logContainer = ref<HTMLElement | null>(null);
8088
const logs = ref<string[]>([]);
8189
let eventSource: EventSource | null = null;
8290
const logSearch = reactive({
83-
isWatch: true,
91+
isWatch: props.defaultFollow ? true : true,
8492
container: '',
8593
mode: 'all',
86-
tail: 100,
94+
tail: props.defaultFollow ? 0 : 100,
8795
compose: '',
8896
});
8997
const logHeight = 20;

0 commit comments

Comments
 (0)