diff --git a/apps/api/src/routes/api/v1/services/handlers.ts b/apps/api/src/routes/api/v1/services/handlers.ts index 36156c1b2..71dcf3628 100644 --- a/apps/api/src/routes/api/v1/services/handlers.ts +++ b/apps/api/src/routes/api/v1/services/handlers.ts @@ -189,7 +189,7 @@ export async function parseAndFindServiceTemplates(service: any, workdir?: strin const variable = foundTemplate.variables.find(v => v.id === proxyValue.domain) if (variable) { const { id, name, label, description, defaultValue, required = false } = variable - const found = await prisma.serviceSetting.findFirst({ where: { variableName: proxyValue.domain } }) + const found = await prisma.serviceSetting.findFirst({ where: { serviceId: service.id , variableName: proxyValue.domain } }) parsedTemplate[realKey].fqdns.push( { id, name, value: found?.value || '', label, description, defaultValue, required } ) diff --git a/apps/ui/src/lib/components/svg/services/ServiceIcons.svelte b/apps/ui/src/lib/components/svg/services/ServiceIcons.svelte index 6aa42f59b..d47411c1c 100644 --- a/apps/ui/src/lib/components/svg/services/ServiceIcons.svelte +++ b/apps/ui/src/lib/components/svg/services/ServiceIcons.svelte @@ -1,6 +1,6 @@ diff --git a/apps/ui/src/routes/index.svelte b/apps/ui/src/routes/index.svelte index 52d5adebc..7c0a14f24 100644 --- a/apps/ui/src/routes/index.svelte +++ b/apps/ui/src/routes/index.svelte @@ -41,6 +41,7 @@ import ServiceIcons from '$lib/components/svg/services/ServiceIcons.svelte'; import { dev } from '$app/env'; import NewResource from './_NewResource.svelte'; + import { onMount } from 'svelte'; let numberOfGetStatus = 0; let status: any = {}; @@ -54,8 +55,13 @@ services: false, databases: false }; + let searchInput: HTMLInputElement; doSearch(); - + onMount(() => { + setTimeout(() => { + searchInput.focus(); + }, 100); + }); async function refreshStatusApplications() { noInitialStatus.applications = false; numberOfGetStatus = 0; @@ -563,6 +569,7 @@ { + setTimeout(() => { + searchInput.focus(); + }, 100); + }); async function handleSubmit(service: any) { try { await post(`/services/${id}/configuration/type`, { type: service.type }); @@ -51,8 +58,10 @@ filteredServices = services.filter( (service: any) => service.name.toLowerCase().includes(search.toLowerCase()) || - service.labels?.some((label: string) => label.toLowerCase().includes(search.toLowerCase())) || - service.description.toLowerCase().includes(search.toLowerCase()) + service.labels?.some((label: string) => + label.toLowerCase().includes(search.toLowerCase()) + ) || + service.description.toLowerCase().includes(search.toLowerCase()) ); } function cleanupSearch() { @@ -95,8 +104,9 @@ handleSubmit(service)} - class="box-selection relative text-xl font-bold hover:bg-primary " + class="box-selection relative text-xl font-bold hover:bg-primary" >