2
0
Эх сурвалжийг харах

Merge branch 'master' of github.com:porter-dev/porter into stacks-v2-add-back-activity-feed

Feroze Mohideen 2 жил өмнө
parent
commit
7b8c45cdd1

+ 0 - 2
dashboard/src/main/home/app-dashboard/expanded-app/status/StatusSection.tsx

@@ -136,8 +136,6 @@ const StatusSectionFC: React.FunctionComponent<Props> = ({
 
   return (
     <>
-      <Banner type="info">An improved debugging view is under construction. Unable to debug your application? <MyLink id={"intercom_help"}>Contact us</MyLink></Banner>
-      <Spacer y={1} />
       <StyledStatusSection>
         {renderStatusSection()}
       </StyledStatusSection>

+ 7 - 9
dashboard/src/main/home/sidebar/ProjectSelectionModal.tsx

@@ -6,7 +6,7 @@ import Modal from "components/porter/Modal";
 import Text from "components/porter/Text";
 import Spacer from "components/porter/Spacer";
 import { Context } from "shared/Context";
-import { DetailedClusterType, ProjectType } from "shared/types";
+import { DetailedClusterType, ProjectListType, ProjectType } from "shared/types";
 import { pushFiltered } from "shared/routing";
 import SearchBar from "components/porter/SearchBar";
 import _ from 'lodash';
@@ -103,19 +103,17 @@ const ProjectSelectionModal: React.FC<Props> = ({
             const clusters_list = await updateClusterList(project.id);
             if (clusters_list?.length > 0) {
               setCurrentCluster(clusters_list[0]);
-              if (project.simplified_view_enabled) {
-                pushFiltered(props, "/apps", ["project_id"], {});
-              }
-              else {
-                pushFiltered(props, "/applications", ["project_id"], {});
-              }
+              setCurrentProject(project, () => {
+                pushFiltered(props, "/dashboard", ["project_id"]);
+              });
             } else {
-              pushFiltered(props, "/apps", ["project_id"], {});
+              setCurrentProject(project, () => {
+                pushFiltered(props, "/dashboard", ["project_id"]);
+              });
             }
             closeModal();
           }}
         >
-          {/* <BlockIcon src={gradient} /> */}
           <BlockTitle>{projectListEntry.name}</BlockTitle>
 
 

+ 1 - 1
internal/porter_app/v1/types.go

@@ -5,7 +5,7 @@ type ServiceConfig struct {
 	Autoscaling      *Autoscaling      `yaml:"autoscaling,omitempty" validate:"excluded_if=Type job"`
 	Container        Container         `yaml:"container"`
 	Health           *Health           `yaml:"health,omitempty" validate:"excluded_unless=Type web"`
-	Ingress          Ingress           `yaml:"ingress"`
+	Ingress          *Ingress          `yaml:"ingress"`
 	ReplicaCount     string            `yaml:"replicaCount"`
 	Resources        Resources         `yaml:"resources"`
 	Service          KubernetesService `yaml:"service"`

+ 19 - 17
internal/porter_app/v1/yaml.go

@@ -344,24 +344,26 @@ func webConfigProtoFromConfig(service Service) (*porterv1.WebServiceConfig, erro
 
 	webConfig.HealthCheck = healthCheck
 
-	domains := make([]*porterv1.Domain, 0)
-	for _, domain := range service.Config.Ingress.Hosts {
-		hostName := domain
-		domains = append(domains, &porterv1.Domain{
-			Name: hostName,
-		})
+	if service.Config.Ingress != nil {
+		domains := make([]*porterv1.Domain, 0)
+		for _, domain := range service.Config.Ingress.Hosts {
+			hostName := domain
+			domains = append(domains, &porterv1.Domain{
+				Name: hostName,
+			})
+		}
+		for _, domain := range service.Config.Ingress.PorterHosts {
+			hostName := domain
+			domains = append(domains, &porterv1.Domain{
+				Name: hostName,
+			})
+		}
+		if service.Config.Ingress.Annotations != nil && len(service.Config.Ingress.Annotations) > 0 {
+			return nil, errors.New("annotations are not supported")
+		}
+		webConfig.Domains = domains
+		webConfig.Private = !service.Config.Ingress.Enabled
 	}
-	for _, domain := range service.Config.Ingress.PorterHosts {
-		hostName := domain
-		domains = append(domains, &porterv1.Domain{
-			Name: hostName,
-		})
-	}
-	if service.Config.Ingress.Annotations != nil && len(service.Config.Ingress.Annotations) > 0 {
-		return nil, errors.New("annotations are not supported")
-	}
-	webConfig.Domains = domains
-	webConfig.Private = !service.Config.Ingress.Enabled
 
 	return webConfig, nil
 }