Przeglądaj źródła

Show create cluster when none are connected (#2804)

* install github app button

* show create cluster when no clusters are connected
jusrhee 3 lat temu
rodzic
commit
dffedb907b

+ 2 - 2
dashboard/src/main/home/dashboard/ClusterSection.tsx

@@ -14,7 +14,7 @@ type Props = {
 };
 
 const ClusterSection = (props: Props) => {
-  const { usage } = useContext(Context);
+  const { usage, currentCluster } = useContext(Context);
 
   const [currentStep, setCurrentStep] = useState("");
 
@@ -93,7 +93,7 @@ const ClusterSection = (props: Props) => {
   }
   return (
     <>
-      {usage?.current.cluster > 1 && (
+      {(usage?.current.cluster > 1 || !currentCluster) && (
         <Button onClick={() => setCurrentStep("cloud")}>
           <i className="material-icons">add</i> Create a cluster
         </Button>

+ 1 - 0
dashboard/src/shared/types.tsx

@@ -306,6 +306,7 @@ export type ActionConfigType = {
   git_repo: string;
   git_branch: string;
   image_repo_uri: string;
+  dockerfile_path?: string;
 } & (
   | {
       kind: "gitlab";