Skip to content

Commit

Permalink
Merge pull request #149 from SelfhostedPro/updating
Browse files Browse the repository at this point in the history
added notes to deploy form
  • Loading branch information
SelfhostedPro authored Oct 6, 2020
2 parents 1f47f82 + 5c07052 commit 9917f3b
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions frontend/src/components/applications/ApplicationsForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<v-icon>mdi-plus</v-icon> From Template
</v-btn>
</h1>
<v-card v-if="notes" color="blue-grey darken-2" class="mb-2">
<v-card-title>Note:</v-card-title>
<v-card-text v-html="notes"></v-card-text>
</v-card>
<v-stepper v-model="deployStep" alt-labels non-linear>
<v-fade-transition>
<v-progress-linear
Expand Down Expand Up @@ -641,13 +645,13 @@ import { ValidationObserver, ValidationProvider } from "vee-validate";
export default {
components: {
ValidationProvider,
ValidationObserver
ValidationObserver,
},
data() {
return {
deployStep: 1,
deploySteps: 4,
notes: "",
form: {
name: "",
image: "",
Expand All @@ -658,7 +662,7 @@ export default {
devices: [],
labels: [],
sysctls: [],
cap_add: []
cap_add: [],
},
isLoading: false,
cap_options: [
Expand All @@ -684,16 +688,16 @@ export default {
"SYS_BOOT",
"LEASE",
"WAKE_ALARM",
"BLOCK_SUSPEND"
]
"BLOCK_SUSPEND",
],
};
},
methods: {
...mapActions({
readApp: "templates/readApp"
readApp: "templates/readApp",
}),
...mapMutations({
setErr: "snackbar/setErr"
setErr: "snackbar/setErr",
}),
addPort() {
this.form.ports.push({ hport: "", cport: "", proto: "tcp" });
Expand Down Expand Up @@ -755,7 +759,7 @@ export default {
this.isLoading = false;
this.$router.push({ name: "View Applications" });
})
.catch(err => {
.catch((err) => {
this.isLoading = false;
this.setErr(err);
});
Expand All @@ -775,20 +779,21 @@ export default {
devices: app.devices || [],
labels: app.labels || [],
sysctls: app.sysctls || [],
cap_add: app.cap_add || []
cap_add: app.cap_add || [],
};
this.notes = app.notes || null;
} catch (error) {
console.error(error, error.response);
this.setErr(error);
}
} else {
console.log("No app selected");
}
}
},
},
async created() {
await this.populateForm();
}
},
};
</script>

Expand Down

0 comments on commit 9917f3b

Please sign in to comment.