File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed
Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -731,7 +731,8 @@ const openLog = (row: any) => {
731731};
732732
733733const openTerminal = (row : any ) => {
734- dialogTerminalRef .value ! .acceptParams ({ containerID: row .container , container: row .container });
734+ const title = i18n .global .t (' app.app' ) + ' ' + row .name ;
735+ dialogTerminalRef .value ! .acceptParams ({ containerID: row .container , title: title });
735736};
736737
737738const getConfig = async () => {
Original file line number Diff line number Diff line change @@ -298,7 +298,8 @@ const onMonitor = (row: any) => {
298298
299299const dialogTerminalRef = ref ();
300300const onTerminal = (row : any ) => {
301- dialogTerminalRef .value ! .acceptParams ({ containerID: row .containerID , container: row .name });
301+ const title = i18n .global .t (' menu.container' ) + ' ' + row .name ;
302+ dialogTerminalRef .value ! .acceptParams ({ containerID: row .containerID , title: title });
302303};
303304
304305const buttons = [
Original file line number Diff line number Diff line change @@ -614,7 +614,8 @@ const onMonitor = (row: any) => {
614614
615615const dialogTerminalRef = ref ();
616616const onTerminal = (row : any ) => {
617- dialogTerminalRef .value ! .acceptParams ({ containerID: row .containerID , container: row .name });
617+ const title = i18n .global .t (' menu.container' ) + ' ' + row .name ;
618+ dialogTerminalRef .value ! .acceptParams ({ containerID: row .containerID , title: title });
618619};
619620
620621const onInspect = async (id : string ) => {
Original file line number Diff line number Diff line change 99 >
1010 <template #content >
1111 <el-form ref =" formRef" :model =" form" label-position =" top" >
12+ <el-form-item :label =" $t('menu.container')" prop =" containerID" v-if =" form.containerIDList.length > 1" >
13+ <el-select placeholder =" container" clearable v-model =" form.containerID" >
14+ <el-option v-for =" item in form.containerIDList" :key =" item" :label =" item" :value =" item" />
15+ </el-select >
16+ </el-form-item >
1217 <el-form-item :label =" $t('commons.table.user')" prop =" user" >
1318 <el-input placeholder =" root" clearable v-model =" form.user" />
1419 </el-form-item >
@@ -67,18 +72,20 @@ const form = reactive({
6772 command: ' ' ,
6873 user: ' ' ,
6974 containerID: ' ' ,
75+ containerIDList: [],
7076});
7177const formRef = ref ();
7278const terminalRef = ref <InstanceType <typeof Terminal > | null >(null );
7379
7480interface DialogProps {
7581 containerID: string ;
76- container : string ;
82+ title : string ;
7783}
7884const acceptParams = async (params : DialogProps ): Promise <void > => {
7985 terminalVisible .value = true ;
80- form .containerID = params .containerID ;
81- title .value = params .container ;
86+ form .containerIDList = params .containerID .split (' ,' );
87+ form .containerID = form .containerIDList [0 ];
88+ title .value = params .title ;
8289 form .isCustom = false ;
8390 form .user = ' ' ;
8491 form .command = ' /bin/sh' ;
You can’t perform that action at this time.
0 commit comments