diff options
author | Yoshie Muranaka <yoshiemuranaka@gmail.com> | 2020-12-03 21:58:35 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2021-01-05 22:54:01 +0300 |
commit | 22d4d527af48d87ca70a8766bacc5b1ec0cfe9b7 (patch) | |
tree | 2dbd60576be6d264634f6f85c5bf063483177ce3 /src/env/components/Dumps/DumpsForm.vue | |
parent | c0a1ddd10f21ba353106d2b3522b925862e4018f (diff) | |
download | webui-vue-22d4d527af48d87ca70a8766bacc5b1ec0cfe9b7.tar.xz |
Add dumps page to IBM env
Adds a non-functional dumps page with majority of layout and
user flows in place. Page visible with IBM dotenv configurations.
Includes:
- Initial GET for BMC dumps
- Table search, sort, filter, batch and row action flows
- New dump form, validations, and toast notification
Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Id59ec4327744f4e10cc99e4e3c0b2db5b0476f9c
Diffstat (limited to 'src/env/components/Dumps/DumpsForm.vue')
-rw-r--r-- | src/env/components/Dumps/DumpsForm.vue | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/env/components/Dumps/DumpsForm.vue b/src/env/components/Dumps/DumpsForm.vue new file mode 100644 index 00000000..ed81b3a8 --- /dev/null +++ b/src/env/components/Dumps/DumpsForm.vue @@ -0,0 +1,61 @@ +<template> + <div class="form-background p-3"> + <b-form id="form-new-dump" novalidate @submit.prevent="handleSubmit"> + <b-form-group + :label="$t('pageDumps.form.selectDumpType')" + label-for="selectDumpType" + > + <b-form-select + id="selectDumpType" + v-model="selectedDumpType" + :options="dumpTypeOptions" + :state="getValidationState($v.selectedDumpType)" + > + <template #first> + <b-form-select-option :value="null" disabled> + {{ $t('global.form.selectAnOption') }} + </b-form-select-option> + </template> + </b-form-select> + <b-form-invalid-feedback role="alert"> + {{ $t('global.form.required') }} + </b-form-invalid-feedback> + </b-form-group> + <b-button variant="primary" type="submit" form="form-new-dump"> + {{ $t('pageDumps.form.createNewDump') }} + </b-button> + </b-form> + </div> +</template> + +<script> +import { required } from 'vuelidate/lib/validators'; + +import BVToastMixin from '@/components/Mixins/BVToastMixin'; +import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; + +export default { + mixins: [BVToastMixin, VuelidateMixin], + data() { + return { + selectedDumpType: null, + dumpTypeOptions: [ + { value: 'bmc', text: this.$t('pageDumps.form.bmcDump') }, + { value: 'system', text: this.$t('pageDumps.form.systemDump') }, + ], + }; + }, + validations() { + return { + selectedDumpType: { required }, + }; + }, + methods: { + handleSubmit() { + this.$v.$touch(); + if (this.$v.$invalid) return; + this.successToast(this.$t('pageDumps.toast.successStartDump')); + }, + }, +}; +</script> |