feat: only show expose if no proxy conf defined in template
This commit is contained in:
parent
aac6981304
commit
94cc77ebca
@ -38,6 +38,11 @@
|
|||||||
import Wordpress from './_Services/wordpress.svelte';
|
import Wordpress from './_Services/wordpress.svelte';
|
||||||
|
|
||||||
const { id } = $page.params;
|
const { id } = $page.params;
|
||||||
|
let hostPorts = Object.keys(template).filter((key) => {
|
||||||
|
if (template[key]?.hostPorts?.length > 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
$: isDisabled =
|
$: isDisabled =
|
||||||
!$appSession.isAdmin ||
|
!$appSession.isAdmin ||
|
||||||
$status.service.overallStatus === 'degraded' ||
|
$status.service.overallStatus === 'degraded' ||
|
||||||
@ -389,22 +394,24 @@
|
|||||||
on:click={() => !$status.service.isRunning && changeSettings('dualCerts')}
|
on:click={() => !$status.service.isRunning && changeSettings('dualCerts')}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid grid-cols-2 items-center">
|
{#if hostPorts.length === 0}
|
||||||
<label for="exposePort"
|
<div class="grid grid-cols-2 items-center">
|
||||||
>Exposed Port <Explainer
|
<label for="exposePort"
|
||||||
explanation={'You can expose your application to a port on the host system.<br><br>Useful if you would like to use your own reverse proxy or tunnel and also in development mode. Otherwise leave empty.'}
|
>Exposed Port <Explainer
|
||||||
/></label
|
explanation={'You can expose your application to a port on the host system.<br><br>Useful if you would like to use your own reverse proxy or tunnel and also in development mode. Otherwise leave empty.'}
|
||||||
>
|
/></label
|
||||||
<input
|
>
|
||||||
class="w-full"
|
<input
|
||||||
readonly={isDisabled}
|
class="w-full"
|
||||||
disabled={isDisabled}
|
readonly={isDisabled}
|
||||||
name="exposePort"
|
disabled={isDisabled}
|
||||||
id="exposePort"
|
name="exposePort"
|
||||||
bind:value={service.exposePort}
|
id="exposePort"
|
||||||
placeholder="12345"
|
bind:value={service.exposePort}
|
||||||
/>
|
placeholder="12345"
|
||||||
</div>
|
/>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-6">
|
<div class="pt-6">
|
||||||
{#each Object.keys(template) as oneService}
|
{#each Object.keys(template) as oneService}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user