Justin Rhee 3 лет назад
Родитель
Сommit
62ccec71b4

+ 1 - 0
api/server/handlers/stacks/create_porter_app.go

@@ -50,6 +50,7 @@ func (c *CreatePorterAppHandler) ServeHTTP(w http.ResponseWriter, r *http.Reques
 		Builder:      request.Builder,
 		Buildpacks:   request.Buildpacks,
 		Dockerfile:   request.Dockerfile,
+		ImageRepoURI: request.ImageRepoURI,
 	}
 
 	_, err := c.Repo().PorterApp().CreatePorterApp(app)

+ 0 - 3
api/server/handlers/stacks/get_porter_app.go

@@ -1,7 +1,6 @@
 package stacks
 
 import (
-	"fmt"
 	"net/http"
 
 	"github.com/porter-dev/porter/api/server/authz"
@@ -39,7 +38,5 @@ func (c *GetPorterAppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
 		return
 	}
 
-	fmt.Println("got here", app)
-
 	c.WriteResult(w, r, app.ToPorterAppType())
 }

+ 1 - 0
api/types/stacks.go

@@ -33,6 +33,7 @@ type CreatePorterAppRequest struct {
 	Builder      string `json:"builder"`
 	Buildpacks   string `json:"buildpacks"`
 	Dockerfile   string `json:"dockerfile"`
+	ImageRepoURI string `json:"image_repo_uri"`
 }
 
 // swagger:model

+ 4 - 2
dashboard/src/main/home/app-dashboard/expanded-app/ExpandedApp.tsx

@@ -43,6 +43,7 @@ const ExpandedApp: React.FC<Props> = ({
           name: appName,
         }
       );
+      console.log(resPorterApp)
       const resChartData = await api.getChart(
         "<token>",
         {},
@@ -66,7 +67,8 @@ const ExpandedApp: React.FC<Props> = ({
   }
 
   useEffect(() => {
-    if (currentCluster) {
+    const { appName } = props.match.params as any;
+    if (currentCluster && appName && currentProject) {
       getPorterApp();
     }
   }, [currentCluster]);
@@ -115,7 +117,7 @@ const ExpandedApp: React.FC<Props> = ({
           <Container row>
             <Icon src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/nodejs/nodejs-plain.svg" />
             <Text size={21}>
-              {appData.name}
+              {appData.app.name}
             </Text>
             <Spacer inline x={1} />
             <Text size={13}>

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

@@ -170,6 +170,7 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
           builder: (buildConfig as any)?.builder,
           buildpacks: (buildConfig as any)?.buildPacks,
           dockerfile: dockerfilePath,
+          image_repo_uri: imageUrl,
         },
         {
           cluster_id: currentCluster.id,

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

@@ -185,6 +185,7 @@ const createPorterApp = baseApi<
     builder: string;
     buildpacks: string;
     dockerfile: string;
+    image_repo_uri: string;
   },
   {
     project_id: number;