fix: update logging and templates

This commit is contained in:
Arman
2025-03-26 16:54:20 +01:00
parent 7611c76516
commit 8aff3a3af4
3 changed files with 31 additions and 10 deletions
@@ -33,9 +33,11 @@
if (deployment.status === 'failed') {
return 'Your deployment has failed.';
} else if (deployment.status === 'building') {
return 'Build is starting.';
return 'Preparing for build ...';
} else if (deployment.status === 'waiting') {
return 'Preparing for build ...';
} else if (deployment.status === 'processing') {
return 'Your deployment is processing.';
return 'Preparing for build ...';
} else {
return emptyCopy;
}
@@ -100,17 +100,31 @@
<Accordion title="Framework" open>
<Layout.Stack>
{#each [...data.frameworks] as framework}
{#if !framework.toLowerCase().includes('other')}
<Layout.Stack direction="row" gap="s">
<Selector.Checkbox
id={framework}
size="s"
label={framework?.split('-')?.join(' ')}
checked={$page.url.searchParams
.getAll('framework')
.includes(framework)}
on:change={(e) => applyFilter('framework', framework, e)} />
</Layout.Stack>
{/if}
{/each}
{#if data.frameworks.includes('Other')}
<Layout.Stack direction="row" gap="s">
<Selector.Checkbox
id={framework}
id="other"
size="s"
label={framework?.split('-')?.join(' ')}
label="Other"
checked={$page.url.searchParams
.getAll('framework')
.includes(framework)}
on:change={(e) => applyFilter('framework', framework, e)} />
.includes('Other')}
on:change={(e) => applyFilter('framework', 'Other', e)} />
</Layout.Stack>
{/each}
{/if}
</Layout.Stack>
</Accordion>
</Layout.Stack>
@@ -154,7 +168,10 @@
hidePagination
target="templates"
search={$page.url.searchParams.get('search')}>
<Button secondary on:click={clearSearch}>Clear search</Button>
<Button
secondary
href={`${base}/project-${$page.params.project}/sites/create-site/templates`}
>Clear search</Button>
</EmptySearch>
{/if}
@@ -19,7 +19,7 @@
site.name,
site.framework as Framework,
site.enabled || undefined,
site.logging || undefined,
logging,
site.timeout || undefined,
site.installCommand || undefined,
site.buildCommand || undefined,
@@ -48,11 +48,13 @@
trackError(error, Submit.SiteUpdateLogging);
}
}
$: console.log(logging);
</script>
<Form onSubmit={update}>
<CardGrid>
<svelte:fragment slot="title">Execution logs</svelte:fragment>
<svelte:fragment slot="title">Logging</svelte:fragment>
<svelte:fragment slot="aside">
<InputSwitch label="Logs" id="logging" bind:value={logging} />
<Typography.Text>