From da53c0676831e845ae22d3c9147df32f2cbb9fc7 Mon Sep 17 00:00:00 2001
From: Konstantin <sulwirld@gmail.com>
Date: Mon, 6 Feb 2023 17:25:19 +0300
Subject: Fix bug in Overview endless loading

Bug description:
    Before this commit there was an endless loading
    on blue bar when user entering to the Overview.
    Problem was missing `if` statement
    after what that promise wasn't be able to finish.

Test:
    Step1. Launch webui on browser and see Overview page.
    Step2. Wait a while. Blue loading bar finished pulsing.

Change-Id: I2ea3b6f125ca24fcefeea8020c4a903ea018f4f7
Signed-off-by: Konstantin Maskov <sulwirld@gmail.com>
---
 src/views/Overview/Overview.vue | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/views/Overview/Overview.vue')

diff --git a/src/views/Overview/Overview.vue b/src/views/Overview/Overview.vue
index 9960f373..d999be4c 100644
--- a/src/views/Overview/Overview.vue
+++ b/src/views/Overview/Overview.vue
@@ -85,8 +85,7 @@ export default {
       this.$root.$on('overview-server-complete', () => resolve());
     });
 
-    Promise.all([
-      dumpsPromise,
+    const promises = [
       eventsPromise,
       firmwarePromise,
       inventoryPromise,
@@ -94,7 +93,9 @@ export default {
       powerPromise,
       quicklinksPromise,
       serverPromise,
-    ]).finally(() => this.endLoader());
+    ];
+    if (this.showDumps) promises.push(dumpsPromise);
+    Promise.all(promises).finally(() => this.endLoader());
   },
 };
 </script>
-- 
cgit v1.2.3

