File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed 
public/pages/DetectorDetail/containers Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,10 @@ export const DetectorDetail = (props: DetectorDetailProps) => {
161161        core . notifications . toasts . addDanger ( 'Error getting all indices' ) ; 
162162      } ) ; 
163163    } ; 
164-     getInitialIndices ( ) ; 
164+     // only need to check if indices exist after detector finishes loading 
165+     if  ( ! isLoadingDetector )  { 
166+       getInitialIndices ( ) ; 
167+     } 
165168  } ,  [ detector ] ) ; 
166169
167170  useEffect ( ( )  =>  { 
@@ -188,7 +191,7 @@ export const DetectorDetail = (props: DetectorDetailProps) => {
188191  // If the detector state was changed after opening the stop detector modal, 
189192  // re-check if any jobs are running, and close the modal if it's not needed anymore 
190193  useEffect ( ( )  =>  { 
191-     if  ( ! isRTJobRunning  &&  ! isHistoricalJobRunning )  { 
194+     if  ( ! isRTJobRunning  &&  ! isHistoricalJobRunning   &&   ! isEmpty ( detector ) )  { 
192195      hideStopDetectorModal ( ) ; 
193196    } 
194197  } ,  [ detector ] ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments