diff options
author | Maksim Zakharov <m.zakharov@IBS.RU> | 2022-08-25 15:32:34 +0300 |
---|---|---|
committer | Maksim Zakharov <m.zakharov@IBS.RU> | 2022-08-25 15:32:34 +0300 |
commit | 58c43653761a5ec3dd84f155c7af37c6abb420fb (patch) | |
tree | c321e487395bf08977e1b764826fb05a126f23be /src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue | |
parent | d4209faba8fddc6ab840e020b2129fad308d4384 (diff) | |
download | webui-vue-58c43653761a5ec3dd84f155c7af37c6abb420fb.tar.xz |
rename None in BootSettings
Diffstat (limited to 'src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue')
-rw-r--r-- | src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue b/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue index 7ef83b5d..826d8607 100644 --- a/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue +++ b/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue @@ -15,7 +15,7 @@ bootSourceOptions.length === 0 || $store.getters['authentication/role'] === 'ReadOnly' " - :options="bootSourceOptions" + :options="bootSourceOptionsReplaced" @change="onChangeSelect" > </b-form-select> @@ -24,7 +24,7 @@ v-model="form.oneTimeBoot" class="mb-4" :disabled=" - form.bootOption === 'None' || + form.bootOption === 'Отключено' || $store.getters['authentication/role'] === 'ReadOnly' " @change="$v.form.oneTimeBoot.$touch()" @@ -39,11 +39,11 @@ stacked > <b-form-radio class="mb-1" :value="bootModeOptions[0]"> - {{ $t(`${bootModeOptions[0]}`) }} + {{ `${bootModeOptions[0]}` }} </b-form-radio> <b-form-radio class="mb-1" :value="bootModeOptions[1]"> - {{ $t(`${bootModeOptions[1]}`) }} + {{ `${bootModeOptions[1]}` }} </b-form-radio> </b-form-radio-group> </b-form-group> @@ -81,6 +81,11 @@ import { mapState } from 'vuex'; import BVToastMixin from '@/components/_sila/Mixins/BVToastMixin'; import LoadingBarMixin from '@/components/_sila/Mixins/LoadingBarMixin'; +import { + replaceNone, + replaceRevert, + replaceNoneArr, +} from '@/utilities/_sila/transformBootOption.js'; export default { name: 'BootSettings', @@ -88,7 +93,9 @@ export default { data() { return { form: { - bootOption: this.$store.getters['serverBootSettings/bootSource'], + bootOption: replaceNone( + this.$store.getters['serverBootSettings/bootSource'] + ), bootMode: this.$store.getters['serverBootSettings/bootMode'], oneTimeBoot: this.$store.getters['serverBootSettings/overrideEnabled'], tpmPolicyOn: this.$store.getters['serverBootSettings/tpmEnabled'], @@ -104,10 +111,13 @@ export default { 'overrideEnabled', 'tpmEnabled', ]), + bootSourceOptionsReplaced() { + return replaceNoneArr(this.bootSourceOptions); + }, }, watch: { bootSource: function (value) { - this.form.bootOption = value; + this.form.bootOption = replaceNone(value); }, bootMode: function (value) { this.form.bootMode = value; @@ -141,7 +151,7 @@ export default { this.startLoader(); const tpmPolicyChanged = this.$v.form.tpmPolicyOn.$dirty; let settings; - let bootSource = this.form.bootOption; + let bootSource = replaceRevert(this.form.bootOption); let overrideEnabled = this.form.oneTimeBoot; let bootMode = this.form.bootMode; let tpmEnabled = null; |