mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
fix: 修复某些情况下编辑流水线,没有立即展示变更效果的bug
This commit is contained in:
@@ -56,7 +56,7 @@ const pipelineOptions: PipelineOptions = {
|
||||
},
|
||||
|
||||
async doSave(pipelineConfig: any) {
|
||||
await api.Save({
|
||||
return await api.Save({
|
||||
id: pipelineConfig.id,
|
||||
content: JSON.stringify(pipelineConfig),
|
||||
});
|
||||
|
||||
@@ -739,6 +739,10 @@ export default defineComponent({
|
||||
async onOk() {
|
||||
//@ts-ignore
|
||||
await changeCurrentHistory(null);
|
||||
if (histories.value.length > 0) {
|
||||
pipeline.value = histories.value[0].pipeline;
|
||||
}
|
||||
|
||||
await props.options.doTrigger({ pipelineId: pipeline.value.id, stepId: stepId });
|
||||
notification.success({ message: "管道已经开始运行" });
|
||||
},
|
||||
@@ -837,7 +841,11 @@ export default defineComponent({
|
||||
return item.tasks.length === 0;
|
||||
});
|
||||
|
||||
await props.options.doSave(pipeline.value);
|
||||
const { version } = await props.options.doSave(pipeline.value);
|
||||
if (version) {
|
||||
pipeline.value.version = version;
|
||||
currentPipeline.value.version = version;
|
||||
}
|
||||
}
|
||||
if (offEdit) {
|
||||
toggleEditMode(false);
|
||||
|
||||
Reference in New Issue
Block a user