From c05ff648da07d8e2221d67eac83b6c6581d371a0 Mon Sep 17 00:00:00 2001
From: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Date: Wed, 26 Feb 2020 14:23:15 -0800
Subject: Add host boot settings to power operations page

Added BootSettingsStore and component to handle changing boot
source, boot override option and TPM required option.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I885dd6008aceb34b319953a2e9b6416d848baf16
---
 .../ServerPowerOperations/ServerPowerOperations.vue  | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

(limited to 'src/views/Control/ServerPowerOperations/ServerPowerOperations.vue')

diff --git a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
index c9b02b3e..e63d0732 100644
--- a/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
+++ b/src/views/Control/ServerPowerOperations/ServerPowerOperations.vue
@@ -2,7 +2,7 @@
   <b-container fluid>
     <page-title />
     <b-row>
-      <b-col md="8" lg="8" xl="6">
+      <b-col md="8" xl="6">
         <page-section
           :section-title="$t('pageServerPowerOperations.currentStatus')"
         >
@@ -26,10 +26,20 @@
       </b-col>
     </b-row>
     <b-row>
-      <b-col md="8" lg="7" xl="8">
+      <b-col sm="8" md="6" xl="4">
+        <page-section
+          :section-title="$t('pageServerPowerOperations.hostOsBootSettings')"
+        >
+          <boot-settings />
+        </page-section>
+      </b-col>
+      <b-col sm="8" md="6" xl="7">
         <page-section
           :section-title="$t('pageServerPowerOperations.operations')"
         >
+          <b-alert :show="oneTimeBootEnabled" variant="warning">
+            {{ $t('pageServerPowerOperations.oneTimeBootWarning') }}
+          </b-alert>
           <template v-if="isOperationInProgress">
             {{ $t('pageServerPowerOperations.operationInProgress') }}
           </template>
@@ -101,10 +111,11 @@
 import PageTitle from '../../../components/Global/PageTitle';
 import PageSection from '../../../components/Global/PageSection';
 import BVToastMixin from '../../../components/Mixins/BVToastMixin';
+import BootSettings from './BootSettings';
 
 export default {
   name: 'ServerPowerOperations',
-  components: { PageTitle, PageSection },
+  components: { PageTitle, PageSection, BootSettings },
   mixins: [BVToastMixin],
   data() {
     return {
@@ -123,6 +134,9 @@ export default {
     },
     isOperationInProgress() {
       return this.$store.getters['controls/isOperationInProgress'];
+    },
+    oneTimeBootEnabled() {
+      return this.$store.getters['hostBootSettings/overrideEnabled'];
     }
   },
   created() {
-- 
cgit v1.2.3

