ui: fixes

This commit is contained in:
Andras Bacsai 2022-04-08 14:03:21 +02:00
parent ce71dccbc1
commit 13acf09dcc
6 changed files with 16 additions and 12 deletions

View File

@ -54,6 +54,10 @@
return errorNotification(error);
}
}
async function newSource() {
const { id } = await post('/sources/new', {});
return await goto(`/sources/${id}`, { replaceState: true });
}
</script>
<div class="flex space-x-1 p-6 font-bold">
@ -64,7 +68,7 @@
<div class="flex-col">
<div class="pb-2 text-center">No configurable Git Source found</div>
<div class="flex justify-center">
<a href="/new/source" sveltekit:prefetch class="add-icon bg-orange-600 hover:bg-orange-500">
<button on:click={newSource} class="add-icon bg-orange-600 hover:bg-orange-500">
<svg
class="w-6"
xmlns="http://www.w3.org/2000/svg"
@ -78,7 +82,7 @@
d="M12 6v6m0 0v6m0-6h6m-6 0H6"
/></svg
>
</a>
</button>
</div>
</div>
{:else}

View File

@ -58,7 +58,7 @@
{/if}
</div>
<div class="flex flex-wrap justify-center">
{#if !applications || applications.length === 0}
{#if !applications || ownApplications.length === 0}
<div class="flex-col">
<div class="text-center text-xl font-bold">No applications found</div>
</div>
@ -107,7 +107,7 @@
<div class="truncate text-center">Team {application.teams[0].name}</div>
{/if}
{#if application.fqdn}
<div class="truncate text-center">{getDomain(application.fqdn)}</div>
<div class="truncate text-center">{getDomain(application.fqdn) || ''}</div>
{/if}
{#if !application.gitSourceId || !application.destinationDockerId || !application.fqdn}
<div class="truncate text-center font-bold text-red-500 group-hover:text-white">
@ -163,7 +163,7 @@
<div class="truncate text-center">Team {application.teams[0].name}</div>
{/if}
{#if application.fqdn}
<div class="truncate text-center">{getDomain(application.fqdn)}</div>
<div class="truncate text-center">{getDomain(application.fqdn) || ''}</div>
{/if}
{#if !application.gitSourceId || !application.destinationDockerId || !application.fqdn}
<div class="truncate text-center font-bold text-red-500 group-hover:text-white">

View File

@ -46,7 +46,7 @@
</div>
<div class="flex flex-wrap justify-center">
{#if !databases || databases.length === 0}
{#if !databases || ownDatabases.length === 0}
<div class="flex-col">
<div class="text-center text-xl font-bold">No databases found</div>
</div>

View File

@ -57,7 +57,7 @@
{/if}
</div>
<div class="flex justify-center">
{#if !destinations || destinations.length === 0}
{#if !destinations || ownDestinations.length === 0}
<div class="flex-col">
<div class="text-center text-xl font-bold">No destination found</div>
</div>

View File

@ -52,7 +52,7 @@
</div>
<div class="flex flex-wrap justify-center">
{#if !services || services.length === 0}
{#if !services || ownServices.length === 0}
<div class="flex-col">
<div class="text-center text-xl font-bold">No services found</div>
</div>
@ -92,7 +92,7 @@
<div class="text-center truncate">{service.teams[0].name}</div>
{/if}
{#if service.fqdn}
<div class="truncate text-center">{getDomain(service.fqdn)}</div>
<div class="truncate text-center">{getDomain(service.fqdn) || ''}</div>
{/if}
{#if !service.type || !service.fqdn}
<div class="font-bold text-center truncate text-red-500 group-hover:text-white">
@ -139,7 +139,7 @@
<div class="text-center truncate">{service.teams[0].name}</div>
{/if}
{#if service.fqdn}
<div class="truncate text-center">{getDomain(service.fqdn)}</div>
<div class="truncate text-center">{getDomain(service.fqdn) || ''}</div>
{/if}
{#if !service.type || !service.fqdn}
<div class="font-bold text-center truncate text-red-500 group-hover:text-white">

View File

@ -62,7 +62,7 @@
{/if}
</div>
<div class="flex justify-center">
{#if !sources || sources.length === 0}
{#if !sources || ownSources.length === 0}
<div class="flex-col">
<div class="text-center text-xl font-bold">No git sources found</div>
</div>
@ -86,7 +86,7 @@
Configuration missing
</div>
{:else}
<div class="truncate text-center">{getDomain(source.htmlUrl)}</div>
<div class="truncate text-center">{getDomain(source.htmlUrl) || ''}</div>
{/if}
</div>
</a>