فهرست منبع

some cleanups good night

Feroze Mohideen 3 سال پیش
والد
کامیت
5e2e270318

+ 7 - 3
dashboard/src/main/home/app-dashboard/new-app-flow/GithubActionModal.tsx

@@ -18,6 +18,8 @@ interface GithubActionModalProps {
     githubRepoName?: string;
     branch?: string;
     stackName?: string;
+    projectId?: number;
+    clusterId?: number;
 }
 
 type Choice = "open_pr" | "copy";
@@ -28,7 +30,9 @@ const GithubActionModal: React.FC<GithubActionModalProps> = ({
     githubRepoOwner,
     githubRepoName,
     branch,
-    stackName
+    stackName,
+    projectId,
+    clusterId,
 }) => {
     const [choice, setChoice] = React.useState<Choice>("open_pr");
     const [loading, setLoading] = React.useState<boolean>(false);
@@ -48,8 +52,8 @@ const GithubActionModal: React.FC<GithubActionModalProps> = ({
                         open_pr: choice === "open_pr",
                     },
                     {
-                        project_id: currentProject.id,
-                        cluster_id: currentCluster.id,
+                        project_id: projectId,
+                        cluster_id: clusterId,
                         stack_name: stackName,
                     }
                 );

+ 2 - 0
dashboard/src/main/home/app-dashboard/new-app-flow/NewAppFlow.tsx

@@ -248,6 +248,8 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
           githubRepoName={actionConfig.git_repo.split("/")[1]}
           branch={branch}
           stackName={formState.applicationName}
+          projectId={currentProject.id}
+          clusterId={currentCluster.id}
         />
       )}
     </CenterWrapper>