jnfrati 4 лет назад
Родитель
Сommit
51e3fd676f

+ 10 - 10
dashboard/src/main/home/cluster-dashboard/preview-environments/PreviewEnvironmentsHome.tsx

@@ -31,16 +31,16 @@ const PreviewEnvironmentsHome = () => {
 
   useEffect(() => {
     let isSubscribed = true;
-    // api
-    //   .listEnvironments(
-    //     "<token>",
-    //     {},
-    //     {
-    //       project_id: currentProject?.id,
-    //       cluster_id: currentCluster?.id,
-    //     }
-    //   )
-    mockRequest()
+    api
+      .listEnvironments(
+        "<token>",
+        {},
+        {
+          project_id: currentProject?.id,
+          cluster_id: currentCluster?.id,
+        }
+      )
+      // mockRequest()
       .then(({ data }) => {
         if (isSubscribed) {
           setIsEnabled(true);

+ 9 - 9
dashboard/src/main/home/cluster-dashboard/preview-environments/deployments/DeploymentList.tsx

@@ -43,15 +43,15 @@ const DeploymentList = ({ environments }: { environments: Environment[] }) => {
   const history = useHistory();
 
   const getPRDeploymentList = () => {
-    // return api.getPRDeploymentList(
-    //   "<token>",
-    //   {},
-    //   {
-    //     project_id: currentProject.id,
-    //     cluster_id: currentCluster.id,
-    //   }
-    // );
-    return mockRequest();
+    return api.getPRDeploymentList(
+      "<token>",
+      {},
+      {
+        project_id: currentProject.id,
+        cluster_id: currentCluster.id,
+      }
+    );
+    // return mockRequest();
   };
 
   useEffect(() => {