diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 60be3d407..4373d0083 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -783,6 +783,7 @@ const message = { content: 'Content', contentEmpty: 'Compose content cannot be empty, please enter and try again!', containerNumber: 'Container number', + containerStatus: 'Container Status', down: 'Down', up: 'Up', composeDetailHelper: diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 1e56dd184..339311332 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -752,6 +752,7 @@ const message = { content: '內容', contentEmpty: '編排內容不能為空,請輸入後重試!', containerNumber: '容器數量', + containerStatus: '容器狀態', down: '刪除', up: '啟動', composeDetailHelper: '該 compose 為 1Panel 編排外部創建。暫不支持啟停操作。', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 7710ca8a0..5e4d55099 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -755,6 +755,7 @@ const message = { content: '内容', contentEmpty: '编排内容不能为空,请输入后重试!', containerNumber: '容器数量', + containerStatus: '容器状态', down: '删除', up: '启动', composeDetailHelper: '该 compose 为 1Panel 编排外部创建。暂不支持启停操作。', diff --git a/frontend/src/views/container/compose/index.vue b/frontend/src/views/container/compose/index.vue index 42747b2ae..84fdfde29 100644 --- a/frontend/src/views/container/compose/index.vue +++ b/frontend/src/views/container/compose/index.vue @@ -64,12 +64,13 @@ 1Panel - + + + { isOnDetail.value = true; composeDetailRef.value!.acceptParams(params); }; +const getContainerStatus = (containers) => { + const safeContainers = containers || []; + const runningCount = safeContainers.filter((container) => container.state.toLowerCase() === 'running').length; + const totalCount = safeContainers.length; + const statusText = runningCount > 0 ? 'Running' : 'Exited'; + return `${statusText} (${runningCount}/${totalCount})`; +}; const backList = async () => { isOnDetail.value = false; search(); diff --git a/frontend/src/views/container/template/detail/index.vue b/frontend/src/views/container/template/detail/index.vue index e57ad8f67..d917b35bf 100644 --- a/frontend/src/views/container/template/detail/index.vue +++ b/frontend/src/views/container/template/detail/index.vue @@ -7,9 +7,7 @@ size="50%" > { detailVisible.value = true; }; +const handleClose = () => { + detailVisible.value = false; +}; + defineExpose({ acceptParams, });