Skip to content

Commit 06c37b1

Browse files
committed
feat(ui): add HaRP exapp_direct deploy config option
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
1 parent 052b9cf commit 06c37b1

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

src/components/DaemonConfig/DaemonConfigDetailsModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<p><b>{{ t('app_api', 'Name') }}: </b>{{ daemon.name }}</p>
2121
<p><b>{{ t('app_api', 'Protocol') }}: </b>{{ daemon.protocol }}</p>
2222
<p><b>{{ t('app_api', 'Host') }}: </b>{{ daemon.host }}</p>
23+
<p v-if="daemon.deploy_config.harp"><b>{{ t('app_api', 'ExApp direct communication (FRP disabled)') }}: </b>{{ daemon.deploy_config.harp.exapp_direct ?? false }}</p>
2324

2425
<h3>{{ t('app_api', 'Deploy config') }}</h3>
2526
<p><b>{{ t('app_api', 'Docker network') }}: </b>{{ daemon.deploy_config.net }}</p>

src/components/DaemonConfig/ManageDaemonConfigModal.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,20 @@
156156
:placeholder="t('app_api', 'Docker socket proxy port')"
157157
:aria-label="t('app_api', 'Docker socket proxy port')" />
158158
</div>
159+
<div class="external-label" :aria-label="t('app_api', 'Disable FRP')">
160+
<label for="disable-frp">
161+
{{ t('app_api', 'Disable FRP') }}
162+
<InfoTooltip :text="t('app_api', 'Flag for the advanced setups only. Disables the FRP tunnel between ExApps and HaRP.')" />
163+
</label>
164+
<NcCheckboxRadioSwitch
165+
id="disable-frp"
166+
:checked.sync="deployConfig.harp.exapp_direct"
167+
:disabled="isEdit"
168+
:placeholder="t('app_api', 'Disable FRP')"
169+
:aria-label="t('app_api', 'Disable FRP')">
170+
{{ t('app_api', 'Disabled') }}
171+
</NcCheckboxRadioSwitch>
172+
</div>
159173
</div>
160174
<template v-if="!isPureManual">
161175
<div class="external-label"

src/constants/daemonTemplates.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const DAEMON_TEMPLATES = [
2222
harp: {
2323
frp_address: 'localhost:8782',
2424
docker_socket_port: 24000,
25+
exapp_direct: false,
2526
},
2627
},
2728
deployConfigSettingsOpened: true,
@@ -45,6 +46,7 @@ export const DAEMON_TEMPLATES = [
4546
harp: {
4647
frp_address: 'appapi-harp:8782',
4748
docker_socket_port: 24000,
49+
exapp_direct: false,
4850
},
4951
},
5052
deployConfigSettingsOpened: true,
@@ -68,6 +70,7 @@ export const DAEMON_TEMPLATES = [
6870
harp: {
6971
frp_address: 'nextcloud-aio-harp:8782',
7072
docker_socket_port: 24000,
73+
exapp_direct: false,
7174
},
7275
},
7376
deployConfigSettingsOpened: false,
@@ -91,6 +94,7 @@ export const DAEMON_TEMPLATES = [
9194
harp: {
9295
frp_address: 'localhost:8782',
9396
docker_socket_port: 24000,
97+
exapp_direct: false,
9498
},
9599
},
96100
deployConfigSettingsOpened: true,

0 commit comments

Comments
 (0)