fix: ui variables

This commit is contained in:
Andras Bacsai 2022-09-08 11:44:23 +02:00
parent 794329dcad
commit cce67d274e
3 changed files with 54 additions and 53 deletions

View File

@ -38,13 +38,13 @@
<ul
id="new"
tabindex="0"
class="dropdown-content menu p-2 shadow bg-coolgray-300 rounded-box w-52"
class="dropdown-content menu p-2 shadow bg-coolgray-300 rounded w-52"
>
<li>
<button on:click={newApplication} class="no-underline hover:bg-applications">
<button on:click={newApplication} class="no-underline hover:bg-applications rounded-none ">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
class="h-6 w-6"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentcolor"
@ -62,10 +62,10 @@
>
</li>
<li>
<button on:click={newService} class="no-underline hover:bg-services">
<button on:click={newService} class="no-underline hover:bg-services rounded-none ">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
class="h-6 w-6"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
@ -79,10 +79,10 @@
>
</li>
<li>
<button on:click={newDatabase} class="no-underline hover:bg-databases">
<button on:click={newDatabase} class="no-underline hover:bg-databases rounded-none ">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
class="h-6 w-6"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
@ -98,10 +98,10 @@
>
</li>
<li>
<a href="/sources/new" class="no-underline hover:bg-sources">
<a href="/sources/new" class="no-underline hover:bg-sources rounded-none ">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
class="h-6 w-6"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
@ -120,10 +120,10 @@
>
</li>
<li>
<a href="/destinations/new" class="no-underline hover:bg-destinations">
<a href="/destinations/new" class="no-underline hover:bg-destinations rounded-none ">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-8"
class="h-6 w-6"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"

View File

@ -170,6 +170,7 @@
if ($status.application.isRunning) return;
isBot = !isBot;
application.settings.isBot = isBot;
application.fqdn = null;
setLocation(application, settings);
}
if (name === 'isDBBranching') {

View File

@ -400,7 +400,7 @@
<div class="w-full flex flex-col">
<h1 class="font-bold text-lg lg:text-xl truncate">
{application.name}
{#if application.settings.isBot}
{#if application.settings?.isBot}
<span class="text-xs badge bg-coolblack border-none text-applications"
>BOT</span
>
@ -409,20 +409,20 @@
<div class="h-10 text-xs">
{#if application?.fqdn}
<h2>{application?.fqdn.replace('https://', '').replace('http://', '')}</h2>
{:else if !application.settings.isBot && !application?.fqdn}
{:else if !application.settings?.isBot && !application?.fqdn}
<h2 class="text-red-500">Not configured</h2>
{/if}
{#if application.destinationDocker?.name}
<div class="truncate">{application.destinationDocker.name}</div>
<div class="truncate">{application.destinationDocker?.name}</div>
{/if}
{#if application.teams.length > 0 && application.teams[0].name}
<div class="truncate">{application.teams[0].name}</div>
{#if application.teams.length > 0 && application.teams[0]?.name}
<div class="truncate">{application.teams[0]?.name}</div>
{/if}
</div>
<div class="flex justify-end items-end space-x-2 h-10">
{#if application.fqdn}
<a href={application.fqdn} target="_blank" class="icons hover:bg-green-500">
{#if application?.fqdn}
<a href={application?.fqdn} target="_blank" class="icons hover:bg-green-500">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
@ -441,7 +441,7 @@
</a>
{/if}
{#if application.settings.isBot && application.exposePort}
{#if application.settings?.isBot && application.exposePort}
<a
href={`http://${dev ? 'localhost' : settings.ipv4}:${
application.exposePort
@ -506,7 +506,7 @@
<div class="w-full flex flex-col">
<h1 class="font-bold text-lg lg:text-xl truncate">
{application.name}
{#if application.settings.isBot}
{#if application.settings?.isBot}
<span class="text-xs badge bg-coolblack border-none text-applications">BOT</span
>
{/if}
@ -514,20 +514,20 @@
<div class="h-10 text-xs">
{#if application?.fqdn}
<h2>{application?.fqdn.replace('https://', '').replace('http://', '')}</h2>
{:else if !application.settings.isBot && !application?.fqdn}
{:else if !application.settings?.isBot && !application?.fqdn}
<h2 class="text-red-500">Not configured</h2>
{/if}
{#if application.destinationDocker?.name}
<div class="truncate">{application.destinationDocker.name}</div>
<div class="truncate">{application.destinationDocker?.name}</div>
{/if}
{#if application.teams.length > 0 && application.teams[0].name}
<div class="truncate">{application.teams[0].name}</div>
{#if application.teams.length > 0 && application.teams[0]?.name}
<div class="truncate">{application.teams[0]?.name}</div>
{/if}
</div>
<div class="flex justify-end items-end space-x-2 h-10">
{#if application.fqdn}
<a href={application.fqdn} target="_blank" class="icons hover:bg-green-500">
{#if application?.fqdn}
<a href={application?.fqdn} target="_blank" class="icons hover:bg-green-500">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
@ -546,7 +546,7 @@
</a>
{/if}
{#if application.settings.isBot && application.exposePort}
{#if application.settings?.isBot && application.exposePort}
<a
href={`http://${dev ? 'localhost' : settings.ipv4}:${application.exposePort}`}
target="_blank"
@ -611,15 +611,15 @@
<h2 class="text-red-500">URL not configured</h2>
{/if}
{#if service.destinationDocker?.name}
<div class="truncate">{service.destinationDocker.name}</div>
<div class="truncate">{service.destinationDocker?.name}</div>
{/if}
{#if service.teams.length > 0 && service.teams[0].name}
<div class="truncate">{service.teams[0].name}</div>
{#if service.teams.length > 0 && service.teams[0]?.name}
<div class="truncate">{service.teams[0]?.name}</div>
{/if}
</div>
<div class="flex justify-end items-end space-x-2 h-10">
{#if service.fqdn}
<a href={service.fqdn} target="_blank" class="icons hover:bg-pink-500">
{#if service?.fqdn}
<a href={service?.fqdn} target="_blank" class="icons hover:bg-pink-500">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
@ -683,15 +683,15 @@
<h2 class="text-red-500">URL not configured</h2>
{/if}
{#if service.destinationDocker?.name}
<div class="truncate">{service.destinationDocker.name}</div>
<div class="truncate">{service.destinationDocker?.name}</div>
{/if}
{#if service.teams.length > 0 && service.teams[0].name}
<div class="truncate">{service.teams[0].name}</div>
{#if service.teams.length > 0 && service.teams[0]?.name}
<div class="truncate">{service.teams[0]?.name}</div>
{/if}
</div>
<div class="flex justify-end items-end space-x-2 h-10">
{#if service.fqdn}
<a href={service.fqdn} target="_blank" class="icons hover:bg-pink-500">
{#if service?.fqdn}
<a href={service?.fqdn} target="_blank" class="icons hover:bg-pink-500">
<svg
xmlns="http://www.w3.org/2000/svg"
class="h-6 w-6"
@ -752,15 +752,15 @@
<h2 class="text-red-500">Not version not configured</h2>
{/if}
{#if database.destinationDocker?.name}
<div class="truncate">{database.destinationDocker.name}</div>
<div class="truncate">{database.destinationDocker?.name}</div>
{/if}
{#if database.teams.length > 0 && database.teams[0].name}
<div class="truncate">{database.teams[0].name}</div>
{#if database.teams.length > 0 && database.teams[0]?.name}
<div class="truncate">{database.teams[0]?.name}</div>
{/if}
</div>
</div>
<div class="flex justify-end items-end space-x-2 h-10">
{#if database.settings.isPublic}
{#if database.settings?.isPublic}
<div title="Public">
<svg
xmlns="http://www.w3.org/2000/svg"
@ -828,15 +828,15 @@
<h2 class="text-red-500">Not version not configured</h2>
{/if}
{#if database.destinationDocker?.name}
<div class="truncate">{database.destinationDocker.name}</div>
<div class="truncate">{database.destinationDocker?.name}</div>
{/if}
{#if database.teams.length > 0 && database.teams[0].name}
<div class="truncate">{database.teams[0].name}</div>
{#if database.teams.length > 0 && database.teams[0]?.name}
<div class="truncate">{database.teams[0]?.name}</div>
{/if}
</div>
</div>
<div class="flex justify-end items-end space-x-2 h-10">
{#if database.settings.isPublic}
{#if database.settings?.isPublic}
<div title="Public">
<svg
xmlns="http://www.w3.org/2000/svg"
@ -920,8 +920,8 @@
<div class="w-full flex flex-col">
<div class="h-10">
<h1 class="font-bold text-lg lg:text-xl truncate">{source.name}</h1>
{#if source.teams.length > 0 && source.teams[0].name}
<div class="truncate text-xs">{source.teams[0].name}</div>
{#if source.teams.length > 0 && source.teams[0]?.name}
<div class="truncate text-xs">{source.teams[0]?.name}</div>
{/if}
</div>
@ -992,8 +992,8 @@
<div class="w-full flex flex-col">
<div class="h-10">
<h1 class="font-bold text-lg lg:text-xl truncate">{source.name}</h1>
{#if source.teams.length > 0 && source.teams[0].name}
<div class="truncate text-xs">{source.teams[0].name}</div>
{#if source.teams.length > 0 && source.teams[0]?.name}
<div class="truncate text-xs">{source.teams[0]?.name}</div>
{/if}
</div>
<div class="flex justify-end items-end space-x-2 h-10" />
@ -1071,8 +1071,8 @@
{#if destination.remoteEngine && !destination.sshKeyId}
<h2 class="text-red-500">SSH key missing</h2>
{/if}
{#if destination.teams.length > 0 && destination.teams[0].name}
<div class="truncate">{destination.teams[0].name}</div>
{#if destination.teams.length > 0 && destination.teams[0]?.name}
<div class="truncate">{destination.teams[0]?.name}</div>
{/if}
</div>
</div>
@ -1153,8 +1153,8 @@
{#if destination.remoteEngine && !destination.sshKeyId}
<h2 class="text-red-500">SSH key missing</h2>
{/if}
{#if destination.teams.length > 0 && destination.teams[0].name}
<div class="truncate">{destination.teams[0].name}</div>
{#if destination.teams.length > 0 && destination.teams[0]?.name}
<div class="truncate">{destination.teams[0]?.name}</div>
{/if}
</div>
</div>