Procházet zdrojové kódy

Merge pull request #2562 from porter-dev/fix/check-for-agent-addon

fix: check for agent addon
Porter Support před 3 roky
rodič
revize
08218a5578

+ 6 - 2
dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx

@@ -728,7 +728,11 @@ const ExpandedChart: React.FC<Props> = (props) => {
 
   // Check if porter agent is installed. If not installed hide the `Logs` component
   useEffect(() => {
-    if (!currentCluster.agent_integration_enabled) {
+    if (
+      !currentCluster.agent_integration_enabled ||
+      // If chart is an add on, we don't need to check if agent is installed
+      !["web", "worker", "job"].includes(currentChart?.chart?.metadata?.name)
+    ) {
       return;
     }
 
@@ -757,7 +761,7 @@ const ExpandedChart: React.FC<Props> = (props) => {
           );
         }
       });
-  }, []);
+  }, [currentChart]);
 
   useEffect(() => {
     if (logData.revision) {