1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

fix(microk8s): PO ui fixes [EE-5900] (#10031)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2023-08-14 12:34:58 +12:00 committed by GitHub
parent c472fe9c18
commit 2a7a96f498
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 48 additions and 36 deletions

View file

@ -20,12 +20,12 @@ export function ApplicationEnvVarsTable({ namespace, app }: Props) {
<>
<div className="text-muted mb-4 mt-6 flex items-center">
<Icon icon={File} className="!mr-2" />
Configuration
Environment variables, ConfigMaps or Secrets
</div>
{appEnvVars.length === 0 && (
<TextTip color="blue">
This application is not using any environment variable or
configuration.
This application is not using any environment variable, ConfigMap or
Secret.
</TextTip>
)}
{appEnvVars.length > 0 && (

View file

@ -133,7 +133,11 @@ export function CreateIngressView() {
...group,
options: [
...group.options,
{ label: service.Name, value: service.Name },
{
label: service.Name,
selectedLabel: `${service.Name} (${service.Type})`,
value: service.Name,
},
],
};
}
@ -540,14 +544,14 @@ export function CreateIngressView() {
return (
<>
<PageHeader
title={isEdit ? 'Edit ingress' : 'Add ingress'}
title={isEdit ? 'Edit ingress' : 'Create ingress'}
breadcrumbs={[
{
link: 'kubernetes.ingresses',
label: 'Ingresses',
},
{
label: isEdit ? 'Edit ingress' : 'Add ingress',
label: isEdit ? 'Edit ingress' : 'Create ingress',
},
]}
/>

View file

@ -489,7 +489,10 @@ export function IngressForm({
path.ServiceName
? {
value: path.ServiceName,
label: path.ServiceName,
label: getServiceLabel(
serviceOptions,
path.ServiceName
),
}
: null
}
@ -728,3 +731,9 @@ export function IngressForm({
</Widget>
);
}
function getServiceLabel(options: GroupedServiceOptions, value: string) {
const allOptions = options.flatMap((group) => group.options);
const option = allOptions.find((o) => o.value === value);
return option?.selectedLabel || '';
}

View file

@ -32,7 +32,11 @@ export interface ServicePorts {
[serviceName: string]: Option<string>[];
}
interface ServiceOption extends Option<string> {
selectedLabel: string;
}
export type GroupedServiceOptions = {
label: string;
options: Option<string>[];
options: ServiceOption[];
}[];

View file

@ -30,6 +30,7 @@ export function confirmUpdateNamespace(
a service interruption for these applications.
</p>
)}
<p>Are you sure you want to continue?</p>
</>
);