Browse Source

fix status casing and continue button

Alexander Belanger 4 years ago
parent
commit
74b08c50e2

+ 4 - 1
dashboard/src/components/ProvisionerStatus.tsx

@@ -103,7 +103,10 @@ const ProvisionerStatus: React.FC<Props> = ({ modules }) => {
         }
       }
 
-      const width = 100 * (provisionedResources / (totalResources * 1.0)) || 0;
+      const width =
+        val.status == "created"
+          ? 100
+          : 100 * (provisionedResources / (totalResources * 1.0)) || 0;
 
       let error = null;
 

+ 2 - 2
dashboard/src/main/home/onboarding/steps/ProvisionResources/ProvisionResources.tsx

@@ -50,7 +50,7 @@ const ProvisionResources: React.FC<Props> = ({
   }>(null);
 
   const renderSaveButton = () => {
-    if (!infraStatus?.hasError) {
+    if (infraStatus && !infraStatus.hasError) {
       return (
         <>
           <Br height="15px" />
@@ -65,7 +65,7 @@ const ProvisionResources: React.FC<Props> = ({
           />
         </>
       );
-    } else {
+    } else if (infraStatus) {
       return (
         <>
           <Br height="15px" />

+ 4 - 0
internal/kubernetes/provisioner/global_stream.go

@@ -106,9 +106,13 @@ func GlobalStreamListener(
 
 		// parse messages from the global stream
 		for _, msg := range xstreams[0].Messages {
+			fmt.Println("GOT REDIS GLOBAL MSG", msg, msg.Values["id"], msg.Values["status"])
+
 			// parse the id to identify the infra
 			kind, projID, infraID, err := models.ParseUniqueName(fmt.Sprintf("%v", msg.Values["id"]))
 
+			fmt.Println("PARSED DATA IS", kind, projID, infraID, err)
+
 			if fmt.Sprintf("%v", msg.Values["status"]) == "created" {
 				infra, err := repo.Infra().ReadInfra(projID, infraID)