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

prevent additional agent error from showing on app load when agent integration not enabled

Alexander Belanger 3 лет назад
Родитель
Сommit
97b7ecb2e5

+ 4 - 0
dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChart.tsx

@@ -710,6 +710,10 @@ 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) {
+      return;
+    }
+
     api
       .detectPorterAgent(
         "<token>",