diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-17 15:27:31 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-17 15:27:31 +0300 |
commit | ddb2658a9f4d8e01a18dde73bec377b04eb45073 (patch) | |
tree | 4c267aa77c4aa465f1769f23b12a53e862cd8676 /src/views/_sila/Operations/ServerPowerOperations | |
parent | f73b682a5cc44f2b4e60a4b22622b0c59a9b4a9a (diff) | |
parent | a9d60bb1b1110e32cdb24c0ab36dfe0d93d61a7e (diff) | |
download | webui-vue-ddb2658a9f4d8e01a18dde73bec377b04eb45073.tar.xz |
Merge branch 'sila' of git.sila.ru:pub/openbmc/webui-vue into sila
Diffstat (limited to 'src/views/_sila/Operations/ServerPowerOperations')
-rw-r--r-- | src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue b/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue index 1288af0a..99c5aa43 100644 --- a/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue +++ b/src/views/_sila/Operations/ServerPowerOperations/BootSettings.vue @@ -31,6 +31,22 @@ > {{ $t('pageServerPowerOperations.bootSettings.enableOneTimeBoot') }} </b-form-checkbox> + <b-form-group :label="$t('pageServerPowerOperations.serverBootMode')"> + <b-form-radio-group + id="boot-settings-mode" + v-model="form.bootMode" + :disabled="$store.getters['authentication/role'] === 'ReadOnly'" + stacked + > + <b-form-radio class="mb-1" :value="bootModeOptions[0]"> + {{ $t(`${bootModeOptions[0]}`) }} + </b-form-radio> + + <b-form-radio class="mb-1" :value="bootModeOptions[1]"> + {{ $t(`${bootModeOptions[1]}`) }} + </b-form-radio> + </b-form-radio-group> + </b-form-group> <b-form-group :label="$t('pageServerPowerOperations.bootSettings.tpmRequiredPolicy')" > @@ -73,6 +89,7 @@ export default { return { form: { bootOption: this.$store.getters['serverBootSettings/bootSource'], + bootMode: this.$store.getters['serverBootSettings/bootMode'], oneTimeBoot: this.$store.getters['serverBootSettings/overrideEnabled'], tpmPolicyOn: this.$store.getters['serverBootSettings/tpmEnabled'], }, @@ -81,7 +98,9 @@ export default { computed: { ...mapState('serverBootSettings', [ 'bootSourceOptions', + 'bootModeOptions', 'bootSource', + 'bootMode', 'overrideEnabled', 'tpmEnabled', ]), @@ -90,6 +109,9 @@ export default { bootSource: function (value) { this.form.bootOption = value; }, + bootMode: function (value) { + this.form.bootMode = value; + }, overrideEnabled: function (value) { this.form.oneTimeBoot = value; }, @@ -102,6 +124,7 @@ export default { // to check for changed values form: { bootOption: {}, + bootMode: {}, oneTimeBoot: {}, tpmPolicyOn: {}, }, @@ -120,10 +143,11 @@ export default { let settings; let bootSource = this.form.bootOption; let overrideEnabled = this.form.oneTimeBoot; + let bootMode = this.bootMode; let tpmEnabled = null; if (tpmPolicyChanged) tpmEnabled = this.form.tpmPolicyOn; - settings = { bootSource, overrideEnabled, tpmEnabled }; + settings = { bootSource, overrideEnabled, tpmEnabled, bootMode }; this.$store .dispatch('serverBootSettings/saveSettings', settings) |