Ivan Galakhov 4 năm trước cách đây
mục cha
commit
a435522143

+ 12 - 1
dashboard/src/components/porter-form/PorterFormContextProvider.tsx

@@ -132,7 +132,18 @@ export const PorterFormContextProvider: React.FC<Props> = (props) => {
         })
         })
       )
       )
     );
     );
-    return ret;
+    console.log(context.currentCluster);
+    return {
+      ...ret,
+      ...{
+        "currentCluster.service.is_gcp":
+          context.currentCluster?.service == "gke",
+        "currentCluster.service.is_aws":
+          context.currentCluster?.service == "eks",
+        "currentCluster.service.is_do":
+          context.currentCluster?.service == "doks",
+      },
+    };
   };
   };
 
 
   const getInitialValidation = (data: PorterFormData) => {
   const getInitialValidation = (data: PorterFormData) => {