1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 13:29:41 +02:00

chore(deps): upgrade tailwind and prettier [EE-5218] (#10068)

This commit is contained in:
Chaim Lev-Ari 2023-09-04 16:20:36 +01:00 committed by GitHub
parent cb7377ead6
commit 0e2eb17220
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 444 additions and 316 deletions

View file

@ -196,14 +196,17 @@ function getUniqNames(appName: string, services: ServiceFormValues[]) {
function getServiceTypeCounts(
services: ServiceFormValues[]
): Record<ServiceTypeValue, number> {
return services.reduce((acc, service) => {
const type = serviceTypeEnumsToValues[service.Type];
const count = acc[type];
return {
...acc,
[type]: count ? count + 1 : 1,
};
}, {} as Record<ServiceTypeValue, number>);
return services.reduce(
(acc, service) => {
const type = serviceTypeEnumsToValues[service.Type];
const count = acc[type];
return {
...acc,
[type]: count ? count + 1 : 1,
};
},
{} as Record<ServiceTypeValue, number>
);
}
/**
@ -213,15 +216,18 @@ function getServiceTypeHasErrors(
services: ServiceFormValues[],
errors: FormikErrors<ServiceFormValues[] | undefined>
): Record<ServiceTypeValue, boolean> {
return services.reduce((acc, service, index) => {
const type = serviceTypeEnumsToValues[service.Type];
const serviceHasErrors = !!errors?.[index];
// if the service type already has an error, don't overwrite it
if (acc[type] === true) return acc;
// otherwise, set the error to the value of serviceHasErrors
return {
...acc,
[type]: serviceHasErrors,
};
}, {} as Record<ServiceTypeValue, boolean>);
return services.reduce(
(acc, service, index) => {
const type = serviceTypeEnumsToValues[service.Type];
const serviceHasErrors = !!errors?.[index];
// if the service type already has an error, don't overwrite it
if (acc[type] === true) return acc;
// otherwise, set the error to the value of serviceHasErrors
return {
...acc,
[type]: serviceHasErrors,
};
},
{} as Record<ServiceTypeValue, boolean>
);
}

View file

@ -30,7 +30,7 @@ export function PublishingExplaination() {
ingresses
</a>
:
<ul className="mt-3 ml-5 [&>li]:mb-3 [&>li>ul>li]:ml-5">
<ul className="ml-5 mt-3 [&>li>ul>li]:ml-5 [&>li]:mb-3">
<li>
<b>Inside</b> the cluster{' '}
<b>