mirror of https://github.com/1Panel-dev/1Panel
fix: 镜像导出增加默认值 (#988)
parent
1e4ea2f8c3
commit
dbb94942df
|
@ -493,6 +493,7 @@ const message = {
|
||||||
imageBuild: 'Image build',
|
imageBuild: 'Image build',
|
||||||
pathSelect: 'Path',
|
pathSelect: 'Path',
|
||||||
label: 'Label',
|
label: 'Label',
|
||||||
|
imageTag: 'Image Tag',
|
||||||
push: 'Push',
|
push: 'Push',
|
||||||
fileName: 'FileName',
|
fileName: 'FileName',
|
||||||
export: 'Export',
|
export: 'Export',
|
||||||
|
|
|
@ -518,6 +518,7 @@ const message = {
|
||||||
build: '构建镜像',
|
build: '构建镜像',
|
||||||
pathSelect: '路径选择',
|
pathSelect: '路径选择',
|
||||||
label: '标签',
|
label: '标签',
|
||||||
|
imageTag: '镜像标签',
|
||||||
push: '推送',
|
push: '推送',
|
||||||
fileName: '文件名',
|
fileName: '文件名',
|
||||||
export: '导出',
|
export: '导出',
|
||||||
|
|
|
@ -173,6 +173,7 @@ const buttons = [
|
||||||
label: i18n.global.t('container.tag'),
|
label: i18n.global.t('container.tag'),
|
||||||
click: (row: Container.ImageInfo) => {
|
click: (row: Container.ImageInfo) => {
|
||||||
let params = {
|
let params = {
|
||||||
|
itemName: row.tags.length !== 0 ? row.tags[0].split(':')[0] : '',
|
||||||
repos: repos.value,
|
repos: repos.value,
|
||||||
sourceID: row.id,
|
sourceID: row.id,
|
||||||
};
|
};
|
||||||
|
|
|
@ -79,8 +79,8 @@ const dialogData = ref<DialogProps>({
|
||||||
const acceptParams = async (params: DialogProps): Promise<void> => {
|
const acceptParams = async (params: DialogProps): Promise<void> => {
|
||||||
drawerVisiable.value = true;
|
drawerVisiable.value = true;
|
||||||
form.tags = params.tags;
|
form.tags = params.tags;
|
||||||
|
form.tagName = form.tags.length !== 0 ? form.tags[0] : '';
|
||||||
form.path = '';
|
form.path = '';
|
||||||
form.tagName = '';
|
|
||||||
form.name = '';
|
form.name = '';
|
||||||
dialogData.value.repos = params.repos;
|
dialogData.value.repos = params.repos;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<el-drawer v-model="drawerVisiable" :destroy-on-close="true" :close-on-click-modal="false" size="50%">
|
<el-drawer v-model="drawerVisiable" :destroy-on-close="true" :close-on-click-modal="false" size="50%">
|
||||||
<template #header>
|
<template #header>
|
||||||
<DrawerHeader :header="$t('container.image') + ' Tag'" :back="handleClose" />
|
<DrawerHeader :header="$t('container.imageTag')" :resource="form.itemName" :back="handleClose" />
|
||||||
</template>
|
</template>
|
||||||
<el-form v-loading="loading" label-position="top" ref="formRef" :model="form" label-width="80px">
|
<el-form v-loading="loading" label-position="top" ref="formRef" :model="form" label-width="80px">
|
||||||
<el-row type="flex" justify="center">
|
<el-row type="flex" justify="center">
|
||||||
|
@ -56,6 +56,7 @@ const loading = ref(false);
|
||||||
const drawerVisiable = ref(false);
|
const drawerVisiable = ref(false);
|
||||||
const repos = ref();
|
const repos = ref();
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
|
itemName: '',
|
||||||
sourceID: '',
|
sourceID: '',
|
||||||
fromRepo: true,
|
fromRepo: true,
|
||||||
repoID: 1,
|
repoID: 1,
|
||||||
|
@ -63,6 +64,7 @@ const form = reactive({
|
||||||
});
|
});
|
||||||
|
|
||||||
interface DialogProps {
|
interface DialogProps {
|
||||||
|
itemName: string;
|
||||||
repos: Array<Container.RepoOptions>;
|
repos: Array<Container.RepoOptions>;
|
||||||
sourceID: string;
|
sourceID: string;
|
||||||
}
|
}
|
||||||
|
@ -70,6 +72,7 @@ interface DialogProps {
|
||||||
const acceptParams = async (params: DialogProps): Promise<void> => {
|
const acceptParams = async (params: DialogProps): Promise<void> => {
|
||||||
drawerVisiable.value = true;
|
drawerVisiable.value = true;
|
||||||
form.repoID = 1;
|
form.repoID = 1;
|
||||||
|
form.itemName = params.itemName;
|
||||||
form.sourceID = params.sourceID;
|
form.sourceID = params.sourceID;
|
||||||
form.targetName = '';
|
form.targetName = '';
|
||||||
form.fromRepo = true;
|
form.fromRepo = true;
|
||||||
|
|
Loading…
Reference in New Issue