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