From be0941c5e3e23affe415be5f50c1a467f1b2058e Mon Sep 17 00:00:00 2001
From: Alexandr Ilenko <AIlenko@IBS.RU>
Date: Thu, 15 Sep 2022 18:17:33 +0300
Subject: [SILABMC-248] Fix: add redfish transition state polling for
 VirtualMedia (views: _sila)

---
 src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

(limited to 'src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue')

diff --git a/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue b/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue
index e283867c..7f957a18 100644
--- a/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue
+++ b/src/views/_sila/Operations/VirtualMedia/VirtualMedia.vue
@@ -74,14 +74,14 @@
               >
                 <b-button
                   variant="primary"
-                  :disabled="device.isActive || isNotAdmin"
+                  :disabled="device.isConnected || isNotAdmin"
                   @click="configureConnection(device)"
                 >
                   {{ $t('pageVirtualMedia.configureConnection') }}
                 </b-button>
               </b-form-group>
               <b-button
-                v-if="!device.isActive"
+                v-if="!device.isConnected"
                 variant="primary"
                 :disabled="!device.serverUri"
                 @click="startLegacy(device)"
@@ -95,6 +95,16 @@
               >
                 {{ $t('pageVirtualMedia.stop') }}
               </b-button>
+              <b-button
+                v-if="device.isConnected && !device.isActive"
+                variant="primary"
+                :disabled="true"
+              >
+                {{
+                  $t('pageVirtualMedia.start') +
+                  ` (${device.legacyDeviceTransitionStateTimeout})`
+                }}
+              </b-button>
             </b-col>
           </b-row>
         </page-section>
@@ -192,7 +202,7 @@ export default {
           this.successToast(
             this.$t('pageVirtualMedia.toast.serverConnectionEstablished')
           );
-          connectionData.isActive = true;
+          connectionData.isConnected = true;
         })
         .catch(() => {
           this.errorToast(this.$t('pageVirtualMedia.toast.errorMounting'));
-- 
cgit v1.2.3

