2
0
Эх сурвалжийг харах

Merge pull request #2145 from porter-dev/nico/stacks-hotfixes

Fix get namespaces using old api version
abelanger5 3 жил өмнө
parent
commit
89fa744c7f

+ 7 - 9
dashboard/src/main/home/cluster-dashboard/stacks/launch/Overview.tsx

@@ -46,14 +46,12 @@ const Overview = () => {
       )
       .then((res) => {
         if (res.data) {
-          const availableNamespaces = res.data.items.filter(
-            (namespace: any) => {
-              return namespace.status.phase !== "Terminating";
-            }
-          );
+          const availableNamespaces = res.data.filter((namespace: any) => {
+            return namespace.status !== "Terminating";
+          });
           const namespaceOptions = availableNamespaces.map(
-            (x: { metadata: { name: string } }) => {
-              return { label: x.metadata.name, value: x.metadata.name };
+            (x: { name: string }) => {
+              return { label: x.name, value: x.name };
             }
           );
           if (availableNamespaces.length > 0) {
@@ -203,7 +201,7 @@ const ClusterSection = styled.div`
 
 const Br = styled.div<{ height?: string }>`
   width: 100%;
-  height: ${props => props.height || "1px"};
+  height: ${(props) => props.height || "1px"};
 `;
 
 const Required = styled.div`
@@ -230,4 +228,4 @@ const StyledLaunchFlow = styled.div`
   margin-top: ${(props: { disableMarginTop?: boolean }) =>
     props.disableMarginTop ? "inherit" : "calc(50vh - 380px)"};
   padding-bottom: 150px;
-`;
+`;