Skip to content

Commit

Permalink
hotfix internal url (#3798)
Browse files Browse the repository at this point in the history
  • Loading branch information
Feroze Mohideen authored Oct 11, 2023
1 parent e867bc8 commit 3602c36
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const Overview: React.FC<Props> = ({ buttonStatus }) => {
serviceVersionStatus={serviceVersionStatus}
maxCPU={currentClusterResources.maxCPU}
maxRAM={currentClusterResources.maxRAM}
namespace={deploymentTarget.namespace}
/>
<Spacer y={0.75} />
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ interface ServiceProps {
status?: PorterAppVersionStatus[];
maxCPU: number;
maxRAM: number;
namespace: string;
}

const ServiceContainer: React.FC<ServiceProps> = ({
Expand All @@ -37,6 +38,7 @@ const ServiceContainer: React.FC<ServiceProps> = ({
status,
maxCPU,
maxRAM,
namespace,
}) => {
const [height, setHeight] = useState<Height>(service.expanded ? "auto" : 0);

Expand All @@ -63,7 +65,7 @@ const ServiceContainer: React.FC<ServiceProps> = ({
const renderTabs = (service: ClientService) => {
return match(service)
.with({ config: { type: "web" } }, (svc) => (
<WebTabs index={index} service={svc} maxCPU={maxCPU} maxRAM={maxRAM} />
<WebTabs index={index} service={svc} maxCPU={maxCPU} maxRAM={maxRAM} namespace={namespace} />
))
.with({ config: { type: "worker" } }, (svc) => (
<WorkerTabs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type ServiceListProps = {
serviceVersionStatus?: Record<string, PorterAppVersionStatus[]>;
maxCPU: number;
maxRAM: number;
namespace?: string;
};

const ServiceList: React.FC<ServiceListProps> = ({
Expand All @@ -62,6 +63,7 @@ const ServiceList: React.FC<ServiceListProps> = ({
serviceVersionStatus,
maxCPU,
maxRAM,
namespace = "",
}) => {
// top level app form
const { control: appControl } = useFormContext<PorterAppFormData>();
Expand Down Expand Up @@ -195,6 +197,7 @@ const ServiceList: React.FC<ServiceListProps> = ({
status={serviceVersionStatus?.[svc.name.value]}
maxCPU={maxCPU}
maxRAM={maxRAM}
namespace={namespace}
/>
) : null;
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ interface Props {
chart?: any;
maxRAM: number;
maxCPU: number;
namespace: string;
}

const WebTabs: React.FC<Props> = ({ index, service, maxRAM, maxCPU }) => {
const WebTabs: React.FC<Props> = ({ index, service, maxRAM, maxCPU, namespace }) => {
const [currentTab, setCurrentTab] = React.useState<
"main" | "resources" | "networking" | "advanced"
>("main");

const { deploymentTarget: { namespace } } = useLatestRevision();

return (
<>
<TabSelector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const AppTemplateForm: React.FC<Props> = ({ existingTemplate }) => {
servicesFromYaml,
clusterId,
projectId,
deploymentTarget,
} = useLatestRevision();

const { data: baseEnvGroups = [] } = useQuery(
Expand Down Expand Up @@ -279,6 +280,7 @@ const AppTemplateForm: React.FC<Props> = ({ existingTemplate }) => {
fieldArrayName={"app.services"}
maxCPU={currentClusterResources.maxCPU}
maxRAM={currentClusterResources.maxRAM}
namespace={deploymentTarget.namespace}
/>
</>,
<>
Expand Down

0 comments on commit 3602c36

Please sign in to comment.