فهرست منبع

fix: always show the metrics settings

Jose Diaz-Gonzalez 2 سال پیش
والد
کامیت
f9b6fcd65a
1فایلهای تغییر یافته به همراه22 افزوده شده و 24 حذف شده
  1. 22 24
      dashboard/src/main/home/app-dashboard/expanded-app/MetricsSection.tsx

+ 22 - 24
dashboard/src/main/home/app-dashboard/expanded-app/MetricsSection.tsx

@@ -164,35 +164,33 @@ const MetricsSection: React.FunctionComponent<PropsType> = ({
   };
 
   const renderMetricsSettings = () => {
-    if (showMetricsSettings && true) {
-      if (selectedMetric == "nginx:errors") {
-        return (
-          <>
-              <SelectRow
-                displayFlex={true}
-                label="Target Ingress"
-                value={selectedIngress}
-                setActiveValue={(x: any) => setSelectedIngress(x)}
-                options={ingressOptions}
-                width="100%"
-              />
-          </>
-        );
-      }
-
+    if (selectedMetric == "nginx:errors") {
       return (
         <>
-          <SelectRow
-            displayFlex={true}
-            label="Service"
-            value={selectedController}
-            setActiveValue={(x: any) => setSelectedController(x)}
-            options={controllerOptions}
-            width="100%"
-          />
+            <SelectRow
+              displayFlex={true}
+              label="Target Ingress"
+              value={selectedIngress}
+              setActiveValue={(x: any) => setSelectedIngress(x)}
+              options={ingressOptions}
+              width="100%"
+            />
         </>
       );
     }
+
+    return (
+      <>
+        <SelectRow
+          displayFlex={true}
+          label="Service"
+          value={selectedController}
+          setActiveValue={(x: any) => setSelectedController(x)}
+          options={controllerOptions}
+          width="100%"
+        />
+      </>
+    );
   };