138138 </el-button >
139139 </el-tooltip >
140140 </span >
141+ <span class =" ml-1" >
142+ <el-tooltip
143+ v-if =" mode !== 'upgrade'"
144+ effect =" dark"
145+ :content =" $t('menu.terminal')"
146+ placement =" top"
147+ >
148+ <el-button
149+ type =" primary"
150+ link
151+ @click =" openTerminal(installed)"
152+ :disabled =" installed.status !== 'Running'"
153+ >
154+ <el-icon >
155+ <SvgIcon iconName =" p-terminal2" />
156+ </el-icon >
157+ </el-button >
158+ </el-tooltip >
159+ </span >
141160 <span class =" ml-1" v-if =" mode === 'installed'" >
142161 <el-tooltip
143162 effect =" dark"
392411 <PortJumpDialog ref =" dialogPortJumpRef" />
393412 <AppIgnore ref =" ignoreRef" @close =" search" />
394413 <ComposeLogs ref =" composeLogRef" />
414+ <TerminalDialog ref =" dialogTerminalRef" />
395415 <TaskLog ref =" taskLogRef" @close =" search" />
396416 <Detail ref =" detailRef" />
397417 <IgnoreApp ref =" ignoreAppRef" @close =" search" />
@@ -411,6 +431,7 @@ import AppParams from './detail/index.vue';
411431import AppUpgrade from ' ./upgrade/index.vue' ;
412432import AppIgnore from ' ./ignore/index.vue' ;
413433import ComposeLogs from ' @/components/log/compose/index.vue' ;
434+ import TerminalDialog from ' @/views/container/container/terminal/index.vue' ;
414435import { App } from ' @/api/interface/app' ;
415436import Status from ' @/components/status/index.vue' ;
416437import { getAge , jumpToPath , toLink } from ' @/utils/util' ;
@@ -422,6 +443,7 @@ import Detail from '@/views/app-store/detail/index.vue';
422443import IgnoreApp from ' @/views/app-store/installed/ignore/create/index.vue' ;
423444import { getAgentSettingByKey } from ' @/api/modules/setting' ;
424445import Tags from ' @/views/app-store/components/tag.vue' ;
446+ import SvgIcon from ' @/components/svg-icon/svg-icon.vue' ;
425447
426448const data = ref <any >();
427449const loading = ref (false );
@@ -449,6 +471,7 @@ const upgradeRef = ref();
449471const ignoreRef = ref ();
450472const dialogPortJumpRef = ref ();
451473const composeLogRef = ref ();
474+ const dialogTerminalRef = ref ();
452475const taskLogRef = ref ();
453476const searchReq = reactive ({
454477 page: 1 ,
@@ -707,6 +730,10 @@ const openLog = (row: any) => {
707730 }
708731};
709732
733+ const openTerminal = (row : any ) => {
734+ dialogTerminalRef .value ! .acceptParams ({ containerID: row .container , container: row .container });
735+ };
736+
710737const getConfig = async () => {
711738 try {
712739 const res = await getAgentSettingByKey (' SystemIP' );
@@ -785,4 +812,9 @@ onUnmounted(() => {
785812 margin-left : 0 ;
786813 }
787814}
815+ .svg-icon {
816+ width : 100% ;
817+ height : 100% ;
818+ padding : 0 ;
819+ }
788820 </style >
0 commit comments