diff --git a/frontend/src/views/app-store/installed/index.vue b/frontend/src/views/app-store/installed/index.vue
index d7cfcb4e8..a4de4fbe8 100644
--- a/frontend/src/views/app-store/installed/index.vue
+++ b/frontend/src/views/app-store/installed/index.vue
@@ -131,6 +131,25 @@
+
+
+
+
+
+
+
+
+
+
@@ -404,6 +424,7 @@ import AppParams from './detail/index.vue';
import AppUpgrade from './upgrade/index.vue';
import AppIgnore from './ignore/index.vue';
import ComposeLogs from '@/components/log/compose/index.vue';
+import TerminalDialog from '@/views/container/container/terminal/index.vue';
import { App } from '@/api/interface/app';
import Status from '@/components/status/index.vue';
import { getAge, jumpToPath, toLink } from '@/utils/util';
@@ -415,6 +436,7 @@ import Detail from '@/views/app-store/detail/index.vue';
import IgnoreApp from '@/views/app-store/installed/ignore/create/index.vue';
import { getAgentSettingByKey } from '@/api/modules/setting';
import Tags from '@/views/app-store/components/tag.vue';
+import SvgIcon from '@/components/svg-icon/svg-icon.vue';
const data = ref();
const loading = ref(false);
@@ -442,6 +464,7 @@ const upgradeRef = ref();
const ignoreRef = ref();
const dialogPortJumpRef = ref();
const composeLogRef = ref();
+const dialogTerminalRef = ref();
const taskLogRef = ref();
const searchReq = reactive({
page: 1,
@@ -700,6 +723,11 @@ const openLog = (row: any) => {
}
};
+const openTerminal = (row: any) => {
+ const title = i18n.global.t('app.app') + ' ' + row.name;
+ dialogTerminalRef.value!.acceptParams({ containerID: row.container, title: title });
+};
+
const getConfig = async () => {
try {
const res = await getAgentSettingByKey('SystemIP');
@@ -778,4 +806,9 @@ onUnmounted(() => {
margin-left: 0;
}
}
+.svg-icon {
+ width: 100%;
+ height: 100%;
+ padding: 0;
+}
diff --git a/frontend/src/views/container/compose/detail/index.vue b/frontend/src/views/container/compose/detail/index.vue
index c6c41fc96..6dfc220b0 100644
--- a/frontend/src/views/container/compose/detail/index.vue
+++ b/frontend/src/views/container/compose/detail/index.vue
@@ -298,7 +298,8 @@ const onMonitor = (row: any) => {
const dialogTerminalRef = ref();
const onTerminal = (row: any) => {
- dialogTerminalRef.value!.acceptParams({ containerID: row.containerID, container: row.name });
+ const title = i18n.global.t('menu.container') + ' ' + row.name;
+ dialogTerminalRef.value!.acceptParams({ containerID: row.containerID, title: title });
};
const buttons = [
diff --git a/frontend/src/views/container/container/index.vue b/frontend/src/views/container/container/index.vue
index 03bfd2d4b..e75bf8c8e 100644
--- a/frontend/src/views/container/container/index.vue
+++ b/frontend/src/views/container/container/index.vue
@@ -614,7 +614,8 @@ const onMonitor = (row: any) => {
const dialogTerminalRef = ref();
const onTerminal = (row: any) => {
- dialogTerminalRef.value!.acceptParams({ containerID: row.containerID, container: row.name });
+ const title = i18n.global.t('menu.container') + ' ' + row.name;
+ dialogTerminalRef.value!.acceptParams({ containerID: row.containerID, title: title });
};
const onInspect = async (id: string) => {
diff --git a/frontend/src/views/container/container/terminal/index.vue b/frontend/src/views/container/container/terminal/index.vue
index 663a8590f..db37b9728 100644
--- a/frontend/src/views/container/container/terminal/index.vue
+++ b/frontend/src/views/container/container/terminal/index.vue
@@ -9,6 +9,11 @@
>
+
+
+
+
+
@@ -67,18 +72,20 @@ const form = reactive({
command: '',
user: '',
containerID: '',
+ containerIDList: [],
});
const formRef = ref();
const terminalRef = ref | null>(null);
interface DialogProps {
containerID: string;
- container: string;
+ title: string;
}
const acceptParams = async (params: DialogProps): Promise => {
terminalVisible.value = true;
- form.containerID = params.containerID;
- title.value = params.container;
+ form.containerIDList = params.containerID.split(',');
+ form.containerID = form.containerIDList[0];
+ title.value = params.title;
form.isCustom = false;
form.user = '';
form.command = '/bin/sh';