Просмотр исходного кода

Fix eternal loading on metrics section

jnfrati 4 лет назад
Родитель
Сommit
bb5ebf7302

+ 3 - 2
dashboard/src/main/home/cluster-dashboard/expanded-chart/metrics/MetricsSection.tsx

@@ -184,14 +184,15 @@ const MetricsSection: React.FunctionComponent<PropsType> = ({
       }
       }
       i += 1;
       i += 1;
     }
     }
-    selectors.push(selector);
 
 
-    setIsLoading((prev) => prev + 1);
+    selectors.push(selector);
 
 
     if (selectors[0] === "") {
     if (selectors[0] === "") {
       return;
       return;
     }
     }
 
 
+    setIsLoading((prev) => prev + 1);
+
     api
     api
       .getMatchingPods(
       .getMatchingPods(
         "<token>",
         "<token>",