summaryrefslogtreecommitdiff
path: root/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-08-25 18:03:39 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-08-25 18:03:39 +0300
commit81e43ed3e15e2857faafc56edaf15ea1e1f63ec0 (patch)
tree07ea0e41c4f134bcd79f0faedcbfd8c41161f34e /src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue
parente8bf69b3d967a50fe01dc2af67c24d9e4e39b575 (diff)
parent3aa7a8ba3c0752b779c1c4f4d5bf3fffeb6dec52 (diff)
downloadwebui-vue-81e43ed3e15e2857faafc56edaf15ea1e1f63ec0.tar.xz
Merge branch 'sila' of git.sila.ru:pub/openbmc/webui-vue into sila
Diffstat (limited to 'src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue')
-rw-r--r--src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue24
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;