|
55 | 55 | v-model="host" |
56 | 56 | :label="isHarp ? t('app_api', 'HaRP host') : t('app_api', 'Daemon host')" |
57 | 57 | :placeholder="daemonHostHelperText" |
| 58 | + :readonly="isEdit && isK8s" |
58 | 59 | :aria-label="daemonHostHelperText" /> |
59 | 60 | <InfoTooltip :text="daemonHostHelperText" /> |
60 | 61 | </div> |
|
66 | 67 | v-model="deployConfig.haproxy_password" |
67 | 68 | :label="isHarp ? t('app_api', 'HaRP shared key') : t('app_api', 'HaProxy password')" |
68 | 69 | :error="isHaProxyPasswordValid === false" |
| 70 | + :disabled="isEdit && isK8s" |
69 | 71 | :placeholder="haProxyPasswordHelperText" |
70 | 72 | :aria-label="haProxyPasswordHelperText" |
71 | 73 | :helper-text="!isHaProxyPasswordValid ? t('app_api', 'The password must be at least 12 characters long') : ''" |
|
77 | 79 | id="nextcloud-url" |
78 | 80 | v-model="nextcloud_url" |
79 | 81 | :label="t('app_api', 'Nextcloud URL')" |
| 82 | + :readonly="isEdit && isK8s" |
80 | 83 | :helper-text="getNextcloudUrlHelperText" |
81 | 84 | :input-class="getNextcloudUrlHelperText !== '' ? 'text-warning' : ''" |
82 | 85 | :placeholder="t('app_api', 'Nextcloud URL')" |
|
106 | 109 | </NcButton> |
107 | 110 | <div v-show="deployConfigSettingsOpened" class="deploy-config" :aria-label="t('app_api', 'Deploy options')"> |
108 | 111 | <NcFormBoxSwitch |
| 112 | + v-if="!isK8s || !isEdit" |
109 | 113 | v-model="isHarp" |
110 | 114 | @update:model-value="toggleHarp"> |
111 | 115 | {{ t('app_api', 'Enable HaRP') }} |
112 | 116 | </NcFormBoxSwitch> |
113 | 117 | <div v-if="isHarp" class="harp-options"> |
114 | | - <div class="row" :aria-label="t('app_api', 'FRP server address')"> |
| 118 | + <div v-if="!isK8s" class="row" :aria-label="t('app_api', 'FRP server address')"> |
115 | 119 | <NcInputField |
116 | 120 | id="frp-address" |
117 | 121 | v-model="deployConfig.harp.frp_address" |
|
120 | 124 | :aria-label="t('app_api', 'FRP server address')" /> |
121 | 125 | <InfoTooltip :text="t('app_api', 'The address (host:port) of the FRP server that should be reachable by the ExApp in the network defined in the \'Docker network\' section.')" /> |
122 | 126 | </div> |
123 | | - <div class="row" :aria-label="t('app_api', 'Docker socket proxy port')"> |
| 127 | + <div v-if="!isK8s" class="row" :aria-label="t('app_api', 'Docker socket proxy port')"> |
124 | 128 | <NcInputField |
125 | 129 | id="harp-dsp-port" |
126 | 130 | v-model="deployConfig.harp.docker_socket_port" |
|
129 | 133 | :aria-label="t('app_api', 'Docker socket proxy port')" /> |
130 | 134 | <InfoTooltip :text="t('app_api', 'The port in HaRP which the Docker socket proxy connects to. This should be exposed but for the in-built one, it is not required to be exposed or changed.')" /> |
131 | 135 | </div> |
132 | | - <div class="row-switch" :aria-label="t('app_api', 'Disable FRP')"> |
| 136 | + <div v-if="!isK8s" class="row-switch" :aria-label="t('app_api', 'Disable FRP')"> |
133 | 137 | <NcFormBoxSwitch |
134 | 138 | v-model="deployConfig.harp.exapp_direct" |
135 | 139 | class="switch" |
|
148 | 152 | v-model="deployConfig.net" |
149 | 153 | :label="t('app_api', 'Docker network')" |
150 | 154 | :placeholder="t('app_api', 'Docker network')" |
| 155 | + :readonly="isEdit && isK8s" |
151 | 156 | :aria-label="t('app_api', 'Docker network')" |
152 | 157 | :show-trailing-button="isEditDifferentNetwork" |
153 | 158 | :error="isHarp && !deployConfig.net" |
|
165 | 170 | id="compute-device" |
166 | 171 | v-model="deployConfig.computeDevice" |
167 | 172 | class="ncselect" |
| 173 | + :disabled="isEdit && isK8s" |
168 | 174 | :input-label="t('app_api', 'Compute device')" |
169 | 175 | :aria-label-combobox="t('app_api', 'Computation device')" |
170 | 176 | :options="computeDevices" /> |
|
179 | 185 | v-model="memoryLimit" |
180 | 186 | :label="t('app_api', 'Memory limit (in MiB)')" |
181 | 187 | :placeholder="t('app_api', 'Memory limit (in MiB)')" |
| 188 | + :readonly="isEdit && isK8s" |
182 | 189 | :aria-label="t('app_api', 'Memory limit (in MiB)')" |
183 | 190 | :error="isMemoryLimitValid === false" |
184 | 191 | :helper-text="isMemoryLimitValid === false ? t('app_api', 'Must be a positive integer') : ''" /> |
|
191 | 198 | v-model="cpuLimit" |
192 | 199 | :label="t('app_api', 'CPU limit')" |
193 | 200 | :placeholder="t('app_api', 'CPU limit as decimal value')" |
| 201 | + :readonly="isEdit && isK8s" |
194 | 202 | :aria-label="t('app_api', 'CPU limit')" |
195 | 203 | :error="isCpuLimitValid === false" |
196 | 204 | :helper-text="isCpuLimitValid === false ? t('app_api', 'Must be a positive number') : ''" /> |
197 | 205 | <InfoTooltip :text="t('app_api', 'Maximum number of CPU cores that the ExApp container can use (e.g. 0.5 for half a core, 2 for two cores)')" /> |
198 | 206 | </div> |
| 207 | + <div v-if="isK8s && isEdit && deployConfig.kubernetes" class="k8s-info"> |
| 208 | + <h4>{{ t('app_api', 'Kubernetes settings') }}</h4> |
| 209 | + <p><b>{{ t('app_api', 'Expose type') }}: </b>{{ deployConfig.kubernetes.expose_type }}</p> |
| 210 | + <p v-if="deployConfig.kubernetes.node_port"> |
| 211 | + <b>{{ t('app_api', 'Node port') }}: </b>{{ deployConfig.kubernetes.node_port }} |
| 212 | + </p> |
| 213 | + <p v-if="deployConfig.kubernetes.upstream_host"> |
| 214 | + <b>{{ t('app_api', 'Upstream host') }}: </b>{{ deployConfig.kubernetes.upstream_host }} |
| 215 | + </p> |
| 216 | + <p v-if="deployConfig.kubernetes.external_traffic_policy"> |
| 217 | + <b>{{ t('app_api', 'External traffic policy') }}: </b>{{ deployConfig.kubernetes.external_traffic_policy }} |
| 218 | + </p> |
| 219 | + <p v-if="deployConfig.kubernetes.load_balancer_ip"> |
| 220 | + <b>{{ t('app_api', 'Load balancer IP') }}: </b>{{ deployConfig.kubernetes.load_balancer_ip }} |
| 221 | + </p> |
| 222 | + <p><b>{{ t('app_api', 'Node address type') }}: </b>{{ deployConfig.kubernetes.node_address_type }}</p> |
| 223 | + </div> |
199 | 224 | <template v-if="additionalOptions.length > 0"> |
200 | 225 | <div class="row" style="flex-direction: column;"> |
201 | 226 | <div |
@@ -539,6 +564,9 @@ export default { |
539 | 564 | isPureManual() { |
540 | 565 | return this.acceptsDeployId === 'manual-install' && !this.isHarp |
541 | 566 | }, |
| 567 | + isK8s() { |
| 568 | + return this.acceptsDeployId === 'kubernetes-install' |
| 569 | + }, |
542 | 570 | }, |
543 | 571 | watch: { |
544 | 572 | configurationTab(newConfigurationTab) { |
@@ -784,6 +812,10 @@ export default { |
784 | 812 | margin-bottom: 10px; |
785 | 813 | } |
786 | 814 |
|
| 815 | + .k8s-info { |
| 816 | + margin-top: 16px; |
| 817 | + } |
| 818 | +
|
787 | 819 | .additional-options { |
788 | 820 | padding: 10px 0; |
789 | 821 | } |
|
0 commit comments