diff options
author | Anna Tsyganova <ATSyganova@IBS.RU> | 2022-07-08 11:32:33 +0300 |
---|---|---|
committer | Anna Tsyganova <ATSyganova@IBS.RU> | 2022-07-08 11:32:33 +0300 |
commit | f12e602ab84f2a4ae28a064ed2058f57b9cf9bc3 (patch) | |
tree | 02fb24ee79bc558eebc374aa77c6aed7964a69d2 /src/views/_sila/Settings/Network/ModalDns.vue | |
parent | 40c493597703305ae732b414bda83a4f00b25745 (diff) | |
download | webui-vue-f12e602ab84f2a4ae28a064ed2058f57b9cf9bc3.tar.xz |
Fix a little global components
Issue: SILABMC-191
Diffstat (limited to 'src/views/_sila/Settings/Network/ModalDns.vue')
-rw-r--r-- | src/views/_sila/Settings/Network/ModalDns.vue | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/src/views/_sila/Settings/Network/ModalDns.vue b/src/views/_sila/Settings/Network/ModalDns.vue deleted file mode 100644 index 7f127173..00000000 --- a/src/views/_sila/Settings/Network/ModalDns.vue +++ /dev/null @@ -1,92 +0,0 @@ -<template> - <b-modal - id="modal-dns" - ref="modal" - :title="$t('pageNetwork.table.addDnsAddress')" - @hidden="resetForm" - > - <b-form id="form-dns" @submit.prevent="handleSubmit"> - <b-row> - <b-col sm="6"> - <b-form-group - :label="$t('pageNetwork.modal.staticDns')" - label-for="staticDns" - > - <b-form-input - id="staticDns" - v-model="form.staticDns" - type="text" - :state="getValidationState($v.form.staticDns)" - @input="$v.form.staticDns.$touch()" - /> - <b-form-invalid-feedback role="alert"> - <template v-if="!$v.form.staticDns.required"> - {{ $t('global.form.fieldRequired') }} - </template> - <template v-if="!$v.form.staticDns.ipAddress"> - {{ $t('global.form.invalidFormat') }} - </template> - </b-form-invalid-feedback> - </b-form-group> - </b-col> - </b-row> - </b-form> - <template #modal-footer="{ cancel }"> - <b-button variant="secondary" @click="cancel()"> - {{ $t('global.action.cancel') }} - </b-button> - <b-button form="form-dns" type="submit" variant="primary" @click="onOk"> - {{ $t('global.action.add') }} - </b-button> - </template> - </b-modal> -</template> - -<script> -import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js'; -import { ipAddress, required } from 'vuelidate/lib/validators'; - -export default { - mixins: [VuelidateMixin], - data() { - return { - form: { - staticDns: null, - }, - }; - }, - validations() { - return { - form: { - staticDns: { - required, - ipAddress, - }, - }, - }; - }, - methods: { - handleSubmit() { - this.$v.$touch(); - if (this.$v.$invalid) return; - this.$emit('ok', [this.form.staticDns]); - this.closeModal(); - }, - closeModal() { - this.$nextTick(() => { - this.$refs.modal.hide(); - }); - }, - resetForm() { - this.form.staticDns = null; - this.$v.$reset(); - this.$emit('hidden'); - }, - onOk(bvModalEvt) { - // prevent modal close - bvModalEvt.preventDefault(); - this.handleSubmit(); - }, - }, -}; -</script> |