Jelajahi Sumber

add back provision fe logging

Justin Rhee 3 tahun lalu
induk
melakukan
15f3e79758

+ 1 - 1
dashboard/src/components/CredentialsForm.tsx

@@ -138,7 +138,7 @@ const CredentialsForm: React.FC<Props> = ({
         <StyledForm>
           {
             awsCredentials.length > 0 && (
-              <CloseButton width="172px" onClick={() => setShowCreateForm(false)}>
+              <CloseButton onClick={() => setShowCreateForm(false)}>
                 <i className="material-icons">close</i>
               </CloseButton>
             )

+ 8 - 0
dashboard/src/components/ProvisionerSettings.tsx

@@ -115,6 +115,7 @@ const ProvisionerSettings: React.FC<Props> = props => {
       data["cluster"]["clusterId"] = props.clusterId;
     }
 
+    console.log(0);
     try {
       const res = await api.createContract(
         "<token>",
@@ -122,8 +123,12 @@ const ProvisionerSettings: React.FC<Props> = props => {
         { project_id: currentProject.id }
       );
 
+      console.log("res is:", res);
+      console.log("cluster id is:", res.data.contract_revision?.cluster_id);
+
       // Only refresh and set clusters on initial create
       if (!props.clusterId) {
+        console.log(1);
         setShouldRefreshClusters(true);
         api.getClusters(
           "<token>",
@@ -131,9 +136,12 @@ const ProvisionerSettings: React.FC<Props> = props => {
           { id: currentProject.id },
         )
           .then(({ data }) => {
+            console.log(2);
             data.forEach((cluster: ClusterType) => {
+              console.log("cluster id:", cluster.id)
               if (cluster.id === res.data.contract_revision?.cluster_id) {
                 // setHasFinishedOnboarding(true);
+                console.log(3);
                 setCurrentCluster(cluster);
                 OFState.actions.goTo("clean_up");
                 pushFiltered(props, "/cluster-dashboard", ["project_id"], {