Skip to content

Commit

Permalink
Call submit callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Maëlys Bras de fer committed Jul 13, 2021
1 parent dbcaaf4 commit 6b379ec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dockers/manager/front/src/components/Auth/2FA.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default {
},
data: () => ({ totp: "" }),
methods: {
async submit() {
submit() {
if (!+this.totp) return;
this.mutate({
Expand Down
10 changes: 6 additions & 4 deletions dockers/manager/front/src/components/Docker/Network/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,17 @@ export default {
validate() {
return this.$refs.name.validate();
},
async submit() {
submit(done) {
this.mutate({
mutation: api.docker.networks.CREATE_NETWORK,
variables: { input: this.form },
refetchQueries: [{ query: api.docker.networks.LIST_NETWORKS }],
message: `Network ${this.form.name} created.`
}).then(r => {
this.$emit("ok", this.form.name);
});
})
.then(() => {
this.$emit("ok", this.form.name);
})
.finally(done);
}
}
};
Expand Down
12 changes: 7 additions & 5 deletions dockers/manager/front/src/components/Shell/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,17 @@ export default {
environment: KeyValueListInput
},
methods: {
submit() {
submit(done) {
this.mutate({
mutation: api.docker.shells.SPAWN_SHELL,
variables: { input: this.form },
refetchQueries: [{ query: api.docker.shells.LIST_SHELLS }]
}).then(result => {
const id = result.nodeId;
this.$router.push({ name: "shellId", params: { id } });
});
})
.then(result => {
const id = result.nodeId;
this.$router.push({ name: "shellId", params: { id } });
})
.finally(done);
},
validate() {
return this.$refs.containerName.validate();
Expand Down

0 comments on commit 6b379ec

Please sign in to comment.