Browse Source

Merge branch 'stacks-v1' of github.com:porter-dev/porter into stacks-v1

Soham Dessai 3 years ago
parent
commit
5af594814f

+ 9 - 9
dashboard/src/components/image-selector/ImageList.tsx

@@ -56,7 +56,7 @@ export default class ImageList extends Component<PropsType, StateType> {
 
     if (!this.props.registry) {
       api
-        .getProjectRegistries("<token>", {}, { id: currentProject.id })
+        .getProjectRegistries("<token>", {}, { id: currentProject?.id })
         .then((res) => {
           let registries = res.data;
           if (registries.length === 0) {
@@ -72,8 +72,8 @@ export default class ImageList extends Component<PropsType, StateType> {
                     "<token>",
                     {},
                     {
-                      project_id: currentProject.id,
-                      registry_id: registry.id,
+                      project_id: currentProject?.id,
+                      registry_id: registry?.id,
                     }
                   )
                   .then((res) => {
@@ -87,14 +87,14 @@ export default class ImageList extends Component<PropsType, StateType> {
                           kind: registry.service,
                           source: img.uri,
                           name: img.name,
-                          registryId: registry.id,
+                          registryId: registry?.id,
                         });
                       }
                       return {
                         kind: registry.service,
                         source: img.uri,
                         name: img.name,
-                        registryId: registry.id,
+                        registryId: registry?.id,
                       };
                     });
                     images.push(...newImg);
@@ -137,8 +137,8 @@ export default class ImageList extends Component<PropsType, StateType> {
           "<token>",
           {},
           {
-            project_id: currentProject.id,
-            registry_id: this.props.registry.id,
+            project_id: currentProject?.id,
+            registry_id: this.props.registry?.id,
           }
         )
         .then((res) => {
@@ -150,14 +150,14 @@ export default class ImageList extends Component<PropsType, StateType> {
                 kind: this.props.registry.service,
                 source: img.uri,
                 name: img.name,
-                registryId: this.props.registry.id,
+                registryId: this.props.registry?.id,
               });
             }
             return {
               kind: this.props.registry.service,
               source: img.uri,
               name: img.name,
-              registryId: this.props.registry.id,
+              registryId: this.props.registry?.id,
             };
           });
           images.push(...newImg);

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

@@ -404,11 +404,8 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
               */
               <Button
                 onClick={() => {
-                  // TODO: remove
-                  deployPorterApp();
-
                   if (imageUrl) {
-                    // deployPorterApp();
+                    deployPorterApp();
                   } else {
                     setShowGHAModal(true);
                   }