Explorar o código

fixed delete routing and inactive loading

portersupport %!s(int64=4) %!d(string=hai) anos
pai
achega
786bcad088

+ 25 - 6
dashboard/src/main/home/cluster-dashboard/preview-environments/deployments/DeploymentCard.tsx

@@ -172,20 +172,18 @@ const DeploymentCard: React.FC<{
                 )}
                 )}
               </ActionButton>
               </ActionButton>
             ) : (
             ) : (
-              <RowButton
-                to={"#"}
-                key={deployment.subdomain}
-                onClick={() =>
+              <Button
+                onClick={() => {
                   setCurrentOverlay({
                   setCurrentOverlay({
                     message: `Are you sure you want to delete this deployment?`,
                     message: `Are you sure you want to delete this deployment?`,
                     onYes: deleteDeployment,
                     onYes: deleteDeployment,
                     onNo: () => setCurrentOverlay(null),
                     onNo: () => setCurrentOverlay(null),
                   })
                   })
-                }
+                }}
               >
               >
                 <i className="material-icons">delete</i>
                 <i className="material-icons">delete</i>
                 Delete
                 Delete
-              </RowButton>
+              </Button>
             )}
             )}
           </>
           </>
         ) : (
         ) : (
@@ -350,6 +348,27 @@ const RowButton = styled(DynamicLink)`
   }
   }
 `;
 `;
 
 
+const Button = styled.div`
+  font-size: 12px;
+  padding: 8px 10px;
+  margin-left: 10px;
+  border-radius: 5px;
+  color: #ffffff;
+  border: 1px solid #aaaabb;
+  display: flex;
+  align-items: center;
+  background: #ffffff08;
+  cursor: pointer;
+  :hover {
+    background: #ffffff22;
+  }
+
+  > i {
+    font-size: 14px;
+    margin-right: 8px;
+  }
+`;
+
 const Status = styled.span`
 const Status = styled.span`
   font-size: 13px;
   font-size: 13px;
   display: flex;
   display: flex;

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

@@ -235,6 +235,7 @@ const DeploymentList = ({ environments }: { environments: Environment[] }) => {
   };
   };
 
 
   const handleStatusFilterChange = (value: string) => {
   const handleStatusFilterChange = (value: string) => {
+    setIsLoading(true);
     pushQueryParams({ status_filter: value });
     pushQueryParams({ status_filter: value });
     setStatusSelectorVal(value);
     setStatusSelectorVal(value);
   };
   };