Skip to content

Commit

Permalink
🐛 : fix the save and run on stack creation
Browse files Browse the repository at this point in the history
  • Loading branch information
juwit committed Apr 10, 2020
1 parent 0cc5419 commit 0095823
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/main/client/app/pages/stacks/stack-creation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
v-if="props.isLastStep"
:style="props.fillButtonStyle"
class="wizard-footer-right finish-button ml-3"
@click.native="run"
@click.native="saveAndRun"
>
<font-awesome-icon icon="rocket" /> Save and run
</wizard-button>
Expand All @@ -91,7 +91,7 @@

<script>
import { getModule } from '@/shared/api/modules-api';
import { createStack } from '@/shared/api/stacks-api';
import { createStack, runStack } from '@/shared/api/stacks-api';
import AppStackVariable from './stack-variable.vue';
Expand Down Expand Up @@ -155,17 +155,17 @@
});
},
async saveStack() {
this.stackVariablesMgmt();
return createStack(this.stack);
},
async save() {
this.stackVariablesMgmt();
const stack = await this.saveStack();
this.$router.push({ name: 'stack_edition', params: { stackId: stack.id } });
const { id: stackId } = await this.saveStack();
this.$router.push({ name: 'stack_edition', params: { stackId } });
},
async run() {
this.stackVariablesMgmt();
const stack = await this.saveStack();
this.$router.push({ path: `/stacks/${stack.id}/RUN` });
async saveAndRun() {
const { id: stackId } = await this.saveStack();
const { jobId } = await runStack(stackId);
this.$router.push({ name: 'job', params: { stackId, jobId } });
},
},
};
Expand Down

0 comments on commit 0095823

Please sign in to comment.