196196 <el-tab-pane :label =" $t('container.mount')" >
197197 <el-form-item >
198198 <el-table v-if =" form.volumes.length !== 0" :data =" form.volumes" >
199- <el-table-column :label =" $t('container.server')" min-width =" 120 " >
199+ <el-table-column :label =" $t('container.server')" min-width =" 150 " >
200200 <template #default =" { row } " >
201201 <el-radio-group v-model =" row.type" >
202202 <el-radio-button value =" volume" >
234234 <el-input v-else v-model =" row.sourceDir" />
235235 </template >
236236 </el-table-column >
237- <el-table-column :label =" $t('container.mode')" min-width =" 120 " >
237+ <el-table-column :label =" $t('container.mode')" min-width =" 130 " >
238238 <template #default =" { row } " >
239239 <el-radio-group v-model =" row.mode" >
240240 <el-radio value =" rw" >{{ $t('container.modeRW') }}</el-radio >
425425 </LayoutContent >
426426 <Command ref =" commandRef" />
427427 <Confirm ref =" confirmRef" @submit =" submit" />
428+ <TaskLog ref =" taskLogRef" width =" 70%" />
428429 </div >
429430</template >
430431
@@ -446,14 +447,16 @@ import {
446447 loadContainerInfo ,
447448} from ' @/api/modules/container' ;
448449import { Container } from ' @/api/interface/container' ;
449- import { MsgError , MsgSuccess } from ' @/utils/message' ;
450- import { checkIpV4V6 , checkPort } from ' @/utils/util' ;
450+ import { MsgError } from ' @/utils/message' ;
451+ import TaskLog from ' @/components/task-log/index.vue' ;
452+ import { checkIpV4V6 , checkPort , newUUID } from ' @/utils/util' ;
451453import router from ' @/routers' ;
452454
453455const loading = ref (false );
454456const isCreate = ref ();
455457const confirmRef = ref ();
456458const form = reactive <Container .ContainerHelper >({
459+ taskID: ' ' ,
457460 containerID: ' ' ,
458461 name: ' ' ,
459462 image: ' ' ,
@@ -557,6 +560,7 @@ const search = async () => {
557560};
558561
559562const commandRef = ref ();
563+ const taskLogRef = ref ();
560564const images = ref ();
561565const volumes = ref ();
562566const networks = ref ();
@@ -654,6 +658,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
654658};
655659const submit = async () => {
656660 form .cmd = [];
661+ form .taskID = newUUID ();
657662 if (form .cmdStr ) {
658663 let itemCmd = splitStringIgnoringQuotes (form .cmdStr );
659664 for (const item of itemCmd ) {
@@ -682,8 +687,7 @@ const submit = async () => {
682687 await createContainer (form )
683688 .then (() => {
684689 loading .value = false ;
685- MsgSuccess (i18n .global .t (' commons.msg.operationSuccess' ));
686- goBack ();
690+ openTaskLog (form .taskID );
687691 })
688692 .catch (() => {
689693 loading .value = false ;
@@ -692,8 +696,7 @@ const submit = async () => {
692696 await updateContainer (form )
693697 .then (() => {
694698 loading .value = false ;
695- MsgSuccess (i18n .global .t (' commons.msg.operationSuccess' ));
696- goBack ();
699+ openTaskLog (form .taskID );
697700 })
698701 .catch (() => {
699702 updateContainerID ();
@@ -702,6 +705,10 @@ const submit = async () => {
702705 }
703706};
704707
708+ const openTaskLog = (taskID : string ) => {
709+ taskLogRef .value .openWithTaskID (taskID );
710+ };
711+
705712const updateContainerID = async () => {
706713 let params = {
707714 page: 1 ,
0 commit comments