likyh commented on code in PR #3916:
URL: 
https://github.com/apache/incubator-devlake/pull/3916#discussion_r1046588112


##########
config-ui/src/hooks/usePipelineManager.jsx:
##########
@@ -179,41 +179,48 @@ function usePipelineManager(
     }
   }, [])
 
-  const fetchAllPipelines = useCallback((blueprintId, status = null, 
fetchTimeout = 500) => {
-    try {
-      setIsFetchingAll(true)
-      setErrors([])
-      ToastNotification.clear()
-      console.log('>> FETCHING ALL PIPELINE RUNS...')
-      const fetchAll = async () => {
-        let queryParams = '?blueprint_id=' + blueprintId
-        queryParams +=
-          status &&
-          ['TASK_COMPLETED', 'TASK_RUNNING', 'TASK_FAILED'].includes(status)
-            ? `&status=${status}&`
-            : ''
-        const p = await request.get(
-          `${DEVLAKE_ENDPOINT}/pipelines${queryParams}`
-        )
-        console.log('>> RAW PIPELINES RUN DATA FROM API...', p.data?.pipelines)
-        let pipelines = p.data && p.data.pipelines ? [...p.data.pipelines] : []
-        // @todo: remove "ID" fallback key when no longer needed
-        pipelines = pipelines.map((p) => ({ ...p, ID: p.id }))
-        setPipelines(pipelines)
-        setPipelineCount(p.data ? p.data.count : 0)
-        setTimeout(() => {
-          setIsFetchingAll(false)
-        }, fetchTimeout)
+  const fetchAllPipelines = useCallback(

Review Comment:
   fotmat by lint



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to