mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-27 17:26:03 +08:00
parent
1716e42ffe
commit
5d25f972ee
3 changed files with 10 additions and 8 deletions
|
|
@ -302,6 +302,8 @@ export namespace Container {
|
||||||
name: string;
|
name: string;
|
||||||
path: string;
|
path: string;
|
||||||
content: string;
|
content: string;
|
||||||
|
env: Array<string>;
|
||||||
|
createdBy: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TemplateCreate {
|
export interface TemplateCreate {
|
||||||
|
|
|
||||||
|
|
@ -73,21 +73,19 @@ const onSubmitEdit = async () => {
|
||||||
name: name.value,
|
name: name.value,
|
||||||
path: path.value,
|
path: path.value,
|
||||||
content: content.value,
|
content: content.value,
|
||||||
env: environmentStr.value,
|
|
||||||
createdBy: createdBy.value,
|
createdBy: createdBy.value,
|
||||||
|
env: environmentStr.value?.split('\n') || [],
|
||||||
};
|
};
|
||||||
if (environmentStr.value != undefined) {
|
|
||||||
param.env = environmentStr.value.split('\n');
|
|
||||||
emit('search');
|
|
||||||
}
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await composeUpdate(param)
|
await composeUpdate(param)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = false;
|
|
||||||
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
|
||||||
composeVisible.value = false;
|
composeVisible.value = false;
|
||||||
|
if (environmentStr.value) {
|
||||||
|
emit('search');
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.finally(() => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@
|
||||||
</template>
|
</template>
|
||||||
</LayoutContent>
|
</LayoutContent>
|
||||||
|
|
||||||
<EditDialog ref="dialogEditRef" />
|
<EditDialog ref="dialogEditRef" @search="search" />
|
||||||
<CreateDialog @search="search" ref="dialogRef" />
|
<CreateDialog @search="search" ref="dialogRef" />
|
||||||
<DeleteDialog @search="search" ref="dialogDelRef" />
|
<DeleteDialog @search="search" ref="dialogDelRef" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -190,6 +190,8 @@ const onEdit = async (row: Container.ComposeInfo) => {
|
||||||
name: row.name,
|
name: row.name,
|
||||||
path: row.path,
|
path: row.path,
|
||||||
content: res.data,
|
content: res.data,
|
||||||
|
env: row.env,
|
||||||
|
createdBy: row.createdBy,
|
||||||
};
|
};
|
||||||
dialogEditRef.value!.acceptParams(params);
|
dialogEditRef.value!.acceptParams(params);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue