feat: only show expose if no proxy conf defined in template

This commit is contained in:
Andras Bacsai 2022-11-18 14:33:58 +01:00
parent aac6981304
commit 94cc77ebca

View File

@ -38,6 +38,11 @@
import Wordpress from './_Services/wordpress.svelte';
const { id } = $page.params;
let hostPorts = Object.keys(template).filter((key) => {
if (template[key]?.hostPorts?.length > 0) {
return true;
}
});
$: isDisabled =
!$appSession.isAdmin ||
$status.service.overallStatus === 'degraded' ||
@ -389,6 +394,7 @@
on:click={() => !$status.service.isRunning && changeSettings('dualCerts')}
/>
</div>
{#if hostPorts.length === 0}
<div class="grid grid-cols-2 items-center">
<label for="exposePort"
>Exposed Port <Explainer
@ -405,6 +411,7 @@
placeholder="12345"
/>
</div>
{/if}
</div>
<div class="pt-6">
{#each Object.keys(template) as oneService}