Преглед изворни кода

Show create cluster when none are connected (#2804)

* install github app button

* show create cluster when no clusters are connected
jusrhee пре 3 година
родитељ
комит
dffedb907b
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 2 2
      dashboard/src/main/home/dashboard/ClusterSection.tsx
  2. 1 0
      dashboard/src/shared/types.tsx

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

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

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

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