@kong-ui-public/entities-upstreams-targets 3.14.41 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,412 +1,34 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useAxios as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { BookIcon as
|
|
5
|
-
import { createI18n as
|
|
6
|
-
const Lt = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
id: "ID",
|
|
10
|
-
name: "Name",
|
|
11
|
-
slots: "Slots",
|
|
12
|
-
tags: "Tags"
|
|
13
|
-
},
|
|
14
|
-
empty_state: {
|
|
15
|
-
title: "Configure a new upstream",
|
|
16
|
-
description: "Upstreams are used to load balance incoming requests."
|
|
17
|
-
},
|
|
18
|
-
empty_state_v2: {
|
|
19
|
-
title: "Configure your first upstream",
|
|
20
|
-
description: "Upstreams route traffic to multiple backend services, handling load balancing, health checks, and circuit breaking for reliability.",
|
|
21
|
-
create_cta: "New upstream",
|
|
22
|
-
group: "Upstreams created in gateways within this group will automatically appear here.",
|
|
23
|
-
learn_more: "Learn more"
|
|
24
|
-
},
|
|
25
|
-
toolbar_actions: {
|
|
26
|
-
new_upstream: "New upstream"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
title: "Upstreams",
|
|
30
|
-
search: {
|
|
31
|
-
placeholder: "Filter by exact name or ID"
|
|
32
|
-
},
|
|
33
|
-
actions: {
|
|
34
|
-
create: "New upstream",
|
|
35
|
-
copy_id: "Copy ID",
|
|
36
|
-
copy_json: "Copy JSON",
|
|
37
|
-
edit: "Edit",
|
|
38
|
-
delete: "Delete",
|
|
39
|
-
view: "View Details"
|
|
40
|
-
},
|
|
41
|
-
delete: {
|
|
42
|
-
title: "Delete an upstream",
|
|
43
|
-
description: "This action cannot be reversed so make sure to check upstream usage before deleting."
|
|
44
|
-
},
|
|
45
|
-
errors: {
|
|
46
|
-
general: "Upstreams could not be retrieved",
|
|
47
|
-
delete: "The upstream could not be deleted at this time.",
|
|
48
|
-
copy: "Failed to copy to clipboard"
|
|
49
|
-
},
|
|
50
|
-
copy: {
|
|
51
|
-
success: "Copied {val} to clipboard",
|
|
52
|
-
success_brief: "Successfully copied to clipboard"
|
|
53
|
-
},
|
|
54
|
-
form: {
|
|
55
|
-
errors: {
|
|
56
|
-
name_required: "Name is required",
|
|
57
|
-
should_be_integer: "Field should contain an integer",
|
|
58
|
-
in_range: "Accepts an integer in the range of 10 - 65536"
|
|
59
|
-
},
|
|
60
|
-
general_info: {
|
|
61
|
-
title: "General information",
|
|
62
|
-
help: "General information will help identify and manage this upstream."
|
|
63
|
-
},
|
|
64
|
-
load_balancing: {
|
|
65
|
-
title: "Load balancing",
|
|
66
|
-
help: "Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."
|
|
67
|
-
},
|
|
68
|
-
health_check: {
|
|
69
|
-
title: "Health checks & circuit breakers",
|
|
70
|
-
help: "Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."
|
|
71
|
-
},
|
|
72
|
-
active_health_check: {
|
|
73
|
-
title: "Active health checks",
|
|
74
|
-
help: "Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets."
|
|
75
|
-
},
|
|
76
|
-
passive_health_check: {
|
|
77
|
-
title: "Passive health checks",
|
|
78
|
-
help: "Passive health checks, also known as circuit breakers, are checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."
|
|
79
|
-
},
|
|
80
|
-
buttons: {
|
|
81
|
-
view_documentation: "View documentation"
|
|
82
|
-
},
|
|
83
|
-
algorithms: {
|
|
84
|
-
round_robin_label: "Round robin",
|
|
85
|
-
least_connections_label: "Least connections",
|
|
86
|
-
consistent_hashing_label: "Consistent hashing",
|
|
87
|
-
latency_label: "Latency",
|
|
88
|
-
sticky_sessions_label: "Sticky sessions"
|
|
89
|
-
},
|
|
90
|
-
hash_labels: {
|
|
91
|
-
none: "None",
|
|
92
|
-
consumer: "Consumer",
|
|
93
|
-
ip: "IP",
|
|
94
|
-
header: "Header",
|
|
95
|
-
cookie: "Cookie",
|
|
96
|
-
path: "Path",
|
|
97
|
-
query_argument: "Query argument",
|
|
98
|
-
uri_capture: "URI capture"
|
|
99
|
-
},
|
|
100
|
-
hash_tooltips: {
|
|
101
|
-
hash_on_header: {
|
|
102
|
-
text: "The header name to take the value from as hash input. Only required when {hash_on} is set to {header}",
|
|
103
|
-
hash_on: "hash_on",
|
|
104
|
-
header: "header"
|
|
105
|
-
},
|
|
106
|
-
hash_on_uri_capture: {
|
|
107
|
-
text: "The name of the route URI capture to take the value from as hash input. Only required when {hash_on} is set to {uri_capture}",
|
|
108
|
-
hash_on: "hash_on",
|
|
109
|
-
uri_capture: "uri_capture"
|
|
110
|
-
},
|
|
111
|
-
hash_on_query_arg: {
|
|
112
|
-
text: "The name of the query string argument to take the value from as hash input. Only required when {hash_on} is set to {query_arg}",
|
|
113
|
-
hash_on: "hash_on",
|
|
114
|
-
query_arg: "query_arg"
|
|
115
|
-
},
|
|
116
|
-
hash_on_cookie: {
|
|
117
|
-
text: "The cookie name to take the value from as hash input. Only required when {hash_on} or {hash_fallback} is set to {cookie}. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.",
|
|
118
|
-
hash_on: "hash_on",
|
|
119
|
-
hash_fallback: "hash_fallback",
|
|
120
|
-
cookie: "cookie"
|
|
121
|
-
},
|
|
122
|
-
hash_on_cookie_path: {
|
|
123
|
-
text: "The cookie path to set in the response headers. Only required when {hash_on} or {hash_fallback} is set to {cookie}.",
|
|
124
|
-
hash_on: "hash_on",
|
|
125
|
-
hash_fallback: "hash_fallback",
|
|
126
|
-
cookie: "cookie"
|
|
127
|
-
},
|
|
128
|
-
slots: {
|
|
129
|
-
text: "The number of slots in the load balancer algorithm. If {algorithm} is set to {round_robin}, this setting determines the maximum number of slots. If {algorithm} is set to {consistent_hashing}, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range {min}-{max}",
|
|
130
|
-
algorithm: "algorithm",
|
|
131
|
-
round_robin: "round-robin",
|
|
132
|
-
consistent_hashing: "consistent-hashing"
|
|
133
|
-
},
|
|
134
|
-
tags: "An optional set of strings associated with the upstream for grouping and filtering.",
|
|
135
|
-
hash_fallback: {
|
|
136
|
-
text: "What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}",
|
|
137
|
-
hash_on: "hash_on",
|
|
138
|
-
cookie: "cookie"
|
|
139
|
-
},
|
|
140
|
-
hash_fallback_header: {
|
|
141
|
-
text: "The header name to take the value from as hash input. Only required when {hash_fallback} is set to {header}",
|
|
142
|
-
hash_fallback: "hash_fallback",
|
|
143
|
-
header: "header"
|
|
144
|
-
},
|
|
145
|
-
hash_fallback_query_arg: {
|
|
146
|
-
text: "The name of the query string argument to take the value from as hash input. Only required when {hash_fallback} is set to {query_arg}",
|
|
147
|
-
hash_fallback: "hash_fallback",
|
|
148
|
-
query_arg: "query_arg"
|
|
149
|
-
},
|
|
150
|
-
hash_fallback_uri_capture: {
|
|
151
|
-
text: "The name of the route URI capture to take the value from as hash input. Only required when {hash_fallback} is set to {uri_capture}",
|
|
152
|
-
hash_fallback: "hash_fallback",
|
|
153
|
-
uri_capture: "uri_capture"
|
|
154
|
-
},
|
|
155
|
-
host_header: {
|
|
156
|
-
text: "The hostname to be used as {host} header when proxying requests through Kong.",
|
|
157
|
-
host: "Host"
|
|
158
|
-
},
|
|
159
|
-
client_certificate: "If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."
|
|
160
|
-
},
|
|
161
|
-
healthcheck_type_labels: {
|
|
162
|
-
http: "HTTP",
|
|
163
|
-
https: "HTTPS",
|
|
164
|
-
tcp: "TCP",
|
|
165
|
-
grsp: "gRPC",
|
|
166
|
-
grsps: "gRPCs"
|
|
167
|
-
},
|
|
168
|
-
healthy: {
|
|
169
|
-
label: "Healthy",
|
|
170
|
-
help: "The counter thresholds to determine whether targets are healthy."
|
|
171
|
-
},
|
|
172
|
-
unhealthy: {
|
|
173
|
-
label: "Unhealthy",
|
|
174
|
-
help: "The counter thresholds to determine whether targets are unhealthy."
|
|
175
|
-
},
|
|
176
|
-
passive_healthy: {
|
|
177
|
-
label: "Healthy",
|
|
178
|
-
help: "The counter thresholds to determine whether targets are healthy."
|
|
179
|
-
},
|
|
180
|
-
passive_unhealthy: {
|
|
181
|
-
label: "Unhealthy",
|
|
182
|
-
help: "The counter thresholds to determine whether targets are unhealthy."
|
|
183
|
-
},
|
|
184
|
-
fields: {
|
|
185
|
-
name: {
|
|
186
|
-
label: "Name",
|
|
187
|
-
placeholder: "Enter or select a host",
|
|
188
|
-
tooltip: "This is a hostname, which must be equal to the {host} of a Service.",
|
|
189
|
-
host: "host"
|
|
190
|
-
},
|
|
191
|
-
host_header: {
|
|
192
|
-
label: "Host header"
|
|
193
|
-
},
|
|
194
|
-
client_certificate: {
|
|
195
|
-
label: "Client certificate",
|
|
196
|
-
placeholder: "Select or enter a certificate ID",
|
|
197
|
-
tooltip: "If set, the certificate to be used as client certificate while TLS handshaking to the upstream server."
|
|
198
|
-
},
|
|
199
|
-
tags: {
|
|
200
|
-
label: "Tags",
|
|
201
|
-
placeholder: "Enter a list of tags separated by comma",
|
|
202
|
-
help: "e.g. tag1, tag2, tag3",
|
|
203
|
-
tooltip: "An optional set of strings associated with the Upstream for grouping and filtering."
|
|
204
|
-
},
|
|
205
|
-
algorithm: {
|
|
206
|
-
label: "Algorithm",
|
|
207
|
-
tooltip: "Which load balancing algorithm to use."
|
|
208
|
-
},
|
|
209
|
-
sticky_sessions_cookie: {
|
|
210
|
-
label: "Sticky sessions cookie",
|
|
211
|
-
tooltip: "The cookie name to keep sticky sessions."
|
|
212
|
-
},
|
|
213
|
-
sticky_sessions_cookie_path: {
|
|
214
|
-
label: "Sticky sessions cookie path",
|
|
215
|
-
tooltip: "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)."
|
|
216
|
-
},
|
|
217
|
-
slots: {
|
|
218
|
-
label: "Slots",
|
|
219
|
-
help: "Accepts an integer in the range of 10 - 65536"
|
|
220
|
-
},
|
|
221
|
-
hash_on: {
|
|
222
|
-
label: "Hash on",
|
|
223
|
-
help: "What to use as hashing input.",
|
|
224
|
-
tooltip: "What to use as hashing input. Using {result} results in a weighted-round-robin scheme with no hashing."
|
|
225
|
-
},
|
|
226
|
-
hash_fallback: {
|
|
227
|
-
label: "Hash fallback",
|
|
228
|
-
help: "What to use as hashing input if the primary hash_on does not return a hash",
|
|
229
|
-
tooltip: "What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no consumer identified). Not available if {hash_on} is set to {cookie}.",
|
|
230
|
-
hash_on: "hash_on",
|
|
231
|
-
cookie: "cookie"
|
|
232
|
-
},
|
|
233
|
-
active_health_checks: {
|
|
234
|
-
label: "Active health checks",
|
|
235
|
-
help: "Actively probe the targets for their health."
|
|
236
|
-
},
|
|
237
|
-
passive_health_checks: {
|
|
238
|
-
label: "Passive health checks / Circuit breakers",
|
|
239
|
-
help: "Checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated."
|
|
240
|
-
},
|
|
241
|
-
healthchecks_threshold: {
|
|
242
|
-
label: "Healthchecks threshold"
|
|
243
|
-
},
|
|
244
|
-
header: {
|
|
245
|
-
label: "Header"
|
|
246
|
-
},
|
|
247
|
-
headers: {
|
|
248
|
-
label: "Headers",
|
|
249
|
-
tooltip_active: "Header values can be separated by commas (value1, value2, value3)."
|
|
250
|
-
},
|
|
251
|
-
cookie: {
|
|
252
|
-
label: "Cookie"
|
|
253
|
-
},
|
|
254
|
-
cookie_path: {
|
|
255
|
-
label: "Cookie path"
|
|
256
|
-
},
|
|
257
|
-
query_argument: {
|
|
258
|
-
label: "Query argument"
|
|
259
|
-
},
|
|
260
|
-
uri_capture: {
|
|
261
|
-
label: "URI capture"
|
|
262
|
-
},
|
|
263
|
-
active_healthcheck_type: {
|
|
264
|
-
label: "Active health check type"
|
|
265
|
-
},
|
|
266
|
-
http_path: {
|
|
267
|
-
label: "HTTP path"
|
|
268
|
-
},
|
|
269
|
-
timeout: {
|
|
270
|
-
label: "Timeout"
|
|
271
|
-
},
|
|
272
|
-
concurrency: {
|
|
273
|
-
label: "Concurrency"
|
|
274
|
-
},
|
|
275
|
-
https_sni: {
|
|
276
|
-
label: "HTTPS SNI"
|
|
277
|
-
},
|
|
278
|
-
verify_ssl: {
|
|
279
|
-
label: "Verify the SSL certificate when performing active health checks using HTTPS"
|
|
280
|
-
},
|
|
281
|
-
interval: {
|
|
282
|
-
label: "Interval",
|
|
283
|
-
help: "A value of zero indicates that active probes for healthy targets are disabled."
|
|
284
|
-
},
|
|
285
|
-
successes: {
|
|
286
|
-
label: "Successes"
|
|
287
|
-
},
|
|
288
|
-
http_statuses: {
|
|
289
|
-
label: "HTTP statuses"
|
|
290
|
-
},
|
|
291
|
-
http_failures: {
|
|
292
|
-
label: "HTTP failures"
|
|
293
|
-
},
|
|
294
|
-
tcp_failures: {
|
|
295
|
-
label: "TCP failures"
|
|
296
|
-
},
|
|
297
|
-
timeouts: {
|
|
298
|
-
label: "Timeouts"
|
|
299
|
-
},
|
|
300
|
-
passive_health_check_type: {
|
|
301
|
-
label: "Passive health check type"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
},
|
|
305
|
-
labels: {
|
|
306
|
-
created_at: "Created at"
|
|
307
|
-
}
|
|
308
|
-
}, jt = {
|
|
309
|
-
list: {
|
|
310
|
-
table_headers: {
|
|
311
|
-
id: "ID",
|
|
312
|
-
target_address: "Target address",
|
|
313
|
-
weight: "Weight",
|
|
314
|
-
tags: "Tags",
|
|
315
|
-
target_type: "Target type"
|
|
316
|
-
},
|
|
317
|
-
empty_state: {
|
|
318
|
-
title: "Configure a new target",
|
|
319
|
-
description: "A target is an IP address/hostname with a port that identifies an instance of a backend service."
|
|
320
|
-
},
|
|
321
|
-
toolbar_actions: {
|
|
322
|
-
new_target: "New target"
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
title: "Targets",
|
|
326
|
-
actions: {
|
|
327
|
-
create: "New target",
|
|
328
|
-
copy_id: "Copy ID",
|
|
329
|
-
copy_json: "Copy JSON",
|
|
330
|
-
edit: "Edit",
|
|
331
|
-
delete: "Delete",
|
|
332
|
-
mark_healthy: "Mark healthy",
|
|
333
|
-
mark_unhealthy: "Mark unhealthy"
|
|
334
|
-
},
|
|
335
|
-
delete: {
|
|
336
|
-
title: "Delete a target",
|
|
337
|
-
description: "This action cannot be reversed so make sure to check target usage before deleting."
|
|
338
|
-
},
|
|
339
|
-
errors: {
|
|
340
|
-
general: "Targets could not be retrieved",
|
|
341
|
-
delete: "The target could not be deleted at this time.",
|
|
342
|
-
copy: "Failed to copy to clipboard",
|
|
343
|
-
weight: "Value must be in range 0 to 65535"
|
|
344
|
-
},
|
|
345
|
-
copy: {
|
|
346
|
-
success: "Copied {val} to clipboard",
|
|
347
|
-
success_brief: "Successfully copied to clipboard"
|
|
348
|
-
},
|
|
349
|
-
form: {
|
|
350
|
-
create: {
|
|
351
|
-
title: "New target"
|
|
352
|
-
},
|
|
353
|
-
edit: {
|
|
354
|
-
title: "Edit target"
|
|
355
|
-
},
|
|
356
|
-
buttons: {
|
|
357
|
-
save: "Save",
|
|
358
|
-
cancel: "Cancel"
|
|
359
|
-
},
|
|
360
|
-
fields: {
|
|
361
|
-
target: {
|
|
362
|
-
label: "Target address",
|
|
363
|
-
placeholder: "Enter IP/hostname and port",
|
|
364
|
-
tooltip: "The target address (IP or hostname) and port. If omitted the port defaults to 8000."
|
|
365
|
-
},
|
|
366
|
-
weight: {
|
|
367
|
-
label: "Weight",
|
|
368
|
-
tooltip: "The weight of this target in relation to other targets in the upstream. Value must be in range 0 to 65535, defaults to 100."
|
|
369
|
-
},
|
|
370
|
-
tags: {
|
|
371
|
-
label: "Tags",
|
|
372
|
-
placeholder: "Enter a list of tags separated by comma",
|
|
373
|
-
help: "e.g. tag1, tag2, tag3"
|
|
374
|
-
},
|
|
375
|
-
failover: {
|
|
376
|
-
label: "Failover target",
|
|
377
|
-
load_balance_target: "Load balance",
|
|
378
|
-
failover_target: "Failover",
|
|
379
|
-
help: "Whether to use this target only as backup.",
|
|
380
|
-
unsupported: "The current load balance algorithm does not support failover."
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}, Qt = {
|
|
385
|
-
upstreams: Lt,
|
|
386
|
-
targets: jt
|
|
1
|
+
import { ref as A, defineComponent as ee, computed as S, watch as oe, onBeforeMount as Me, resolveComponent as T, openBlock as H, createElementBlock as X, createVNode as n, unref as e, createSlots as _e, withCtx as o, createTextVNode as E, toDisplayString as m, createElementVNode as b, createBlock as O, Teleport as De, createCommentVNode as P, reactive as Ce, renderSlot as Le, Fragment as be, renderList as lt, normalizeClass as st } from "vue";
|
|
2
|
+
import { useAxios as Fe, useTableState as ot, useFetcher as je, useDeleteUrlBuilder as Qe, FetcherStatus as We, EntityBaseTable as Je, PermissionsWrapper as se, TableTags as Ge, EntityFilter as it, EntityDeleteModal as ze, EntityTypes as Xe, useErrors as Ye, EntityBaseFormType as le, EntityBaseForm as Ze, SupportedEntityType as Ve, useDebouncedFilter as Ee, EntityFormSection as ke, useHelpers as rt, ConfigurationSchemaType as nt, ConfigurationSchemaSection as ae, EntityBaseConfigCard as ht } from "@kong-ui-public/entities-shared";
|
|
3
|
+
import { useRouter as et } from "vue-router";
|
|
4
|
+
import { BookIcon as Ne, AddIcon as Se, CloudUploadIcon as ut, TrashIcon as ct } from "@kong/icons";
|
|
5
|
+
import { createI18n as dt, i18nTComponent as pt } from "@kong-ui-public/i18n";
|
|
6
|
+
const ft = { list: { table_headers: { id: "ID", name: "Name", slots: "Slots", tags: "Tags" }, empty_state: { title: "Configure a new upstream", description: "Upstreams are used to load balance incoming requests." }, empty_state_v2: { title: "Configure your first upstream", description: "Upstreams route traffic to multiple backend services, handling load balancing, health checks, and circuit breaking for reliability.", create_cta: "New upstream", group: "Upstreams created in gateways within this group will automatically appear here.", learn_more: "Learn more" }, toolbar_actions: { new_upstream: "New upstream" } }, title: "Upstreams", search: { placeholder: "Filter by exact name or ID" }, actions: { create: "New upstream", copy_id: "Copy ID", copy_json: "Copy JSON", edit: "Edit", delete: "Delete", view: "View Details" }, delete: { title: "Delete an upstream", description: "This action cannot be reversed so make sure to check upstream usage before deleting." }, errors: { general: "Upstreams could not be retrieved", delete: "The upstream could not be deleted at this time.", copy: "Failed to copy to clipboard" }, copy: { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, form: { errors: { name_required: "Name is required", should_be_integer: "Field should contain an integer", in_range: "Accepts an integer in the range of 10 - 65536" }, general_info: { title: "General information", help: "General information will help identify and manage this upstream." }, load_balancing: { title: "Load balancing", help: "Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets." }, health_check: { title: "Health checks & circuit breakers", help: "Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets." }, active_health_check: { title: "Active health checks", help: "Active health checks actively probe targets for their health. Currently only support HTTP/HTTPS targets." }, passive_health_check: { title: "Passive health checks", help: "Passive health checks, also known as circuit breakers, are checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated." }, buttons: { view_documentation: "View documentation" }, algorithms: { round_robin_label: "Round robin", least_connections_label: "Least connections", consistent_hashing_label: "Consistent hashing", latency_label: "Latency", sticky_sessions_label: "Sticky sessions" }, hash_labels: { none: "None", consumer: "Consumer", ip: "IP", header: "Header", cookie: "Cookie", path: "Path", query_argument: "Query argument", uri_capture: "URI capture" }, hash_tooltips: { hash_on_header: { text: "The header name to take the value from as hash input. Only required when {hash_on} is set to {header}", hash_on: "hash_on", header: "header" }, hash_on_uri_capture: { text: "The name of the route URI capture to take the value from as hash input. Only required when {hash_on} is set to {uri_capture}", hash_on: "hash_on", uri_capture: "uri_capture" }, hash_on_query_arg: { text: "The name of the query string argument to take the value from as hash input. Only required when {hash_on} is set to {query_arg}", hash_on: "hash_on", query_arg: "query_arg" }, hash_on_cookie: { text: "The cookie name to take the value from as hash input. Only required when {hash_on} or {hash_fallback} is set to {cookie}. If the specified cookie is not in the request, Kong will generate a value and set the cookie in the response.", hash_on: "hash_on", hash_fallback: "hash_fallback", cookie: "cookie" }, hash_on_cookie_path: { text: "The cookie path to set in the response headers. Only required when {hash_on} or {hash_fallback} is set to {cookie}.", hash_on: "hash_on", hash_fallback: "hash_fallback", cookie: "cookie" }, slots: { text: "The number of slots in the load balancer algorithm. If {algorithm} is set to {round_robin}, this setting determines the maximum number of slots. If {algorithm} is set to {consistent_hashing}, this setting determines the actual number of slots in the algorithm. Accepts an integer in the range {min}-{max}", algorithm: "algorithm", round_robin: "round-robin", consistent_hashing: "consistent-hashing" }, tags: "An optional set of strings associated with the upstream for grouping and filtering.", hash_fallback: { text: "What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no Consumer identified). Not available if {hash_on} is set to {cookie}", hash_on: "hash_on", cookie: "cookie" }, hash_fallback_header: { text: "The header name to take the value from as hash input. Only required when {hash_fallback} is set to {header}", hash_fallback: "hash_fallback", header: "header" }, hash_fallback_query_arg: { text: "The name of the query string argument to take the value from as hash input. Only required when {hash_fallback} is set to {query_arg}", hash_fallback: "hash_fallback", query_arg: "query_arg" }, hash_fallback_uri_capture: { text: "The name of the route URI capture to take the value from as hash input. Only required when {hash_fallback} is set to {uri_capture}", hash_fallback: "hash_fallback", uri_capture: "uri_capture" }, host_header: { text: "The hostname to be used as {host} header when proxying requests through Kong.", host: "Host" }, client_certificate: "If set, the certificate to be used as client certificate while TLS handshaking to the upstream server." }, healthcheck_type_labels: { http: "HTTP", https: "HTTPS", tcp: "TCP", grsp: "gRPC", grsps: "gRPCs" }, healthy: { label: "Healthy", help: "The counter thresholds to determine whether targets are healthy." }, unhealthy: { label: "Unhealthy", help: "The counter thresholds to determine whether targets are unhealthy." }, passive_healthy: { label: "Healthy", help: "The counter thresholds to determine whether targets are healthy." }, passive_unhealthy: { label: "Unhealthy", help: "The counter thresholds to determine whether targets are unhealthy." }, fields: { name: { label: "Name", placeholder: "Enter or select a host", tooltip: "This is a hostname, which must be equal to the {host} of a Service.", host: "host" }, host_header: { label: "Host header" }, client_certificate: { label: "Client certificate", placeholder: "Select or enter a certificate ID", tooltip: "If set, the certificate to be used as client certificate while TLS handshaking to the upstream server." }, tags: { label: "Tags", placeholder: "Enter a list of tags separated by comma", help: "e.g. tag1, tag2, tag3", tooltip: "An optional set of strings associated with the Upstream for grouping and filtering." }, algorithm: { label: "Algorithm", tooltip: "Which load balancing algorithm to use." }, sticky_sessions_cookie: { label: "Sticky sessions cookie", tooltip: "The cookie name to keep sticky sessions." }, sticky_sessions_cookie_path: { label: "Sticky sessions cookie path", tooltip: "A string representing a URL path, such as /path/to/resource. Must start with a forward slash (/) and must not contain empty segments (i.e., two consecutive forward slashes)." }, slots: { label: "Slots", help: "Accepts an integer in the range of 10 - 65536" }, hash_on: { label: "Hash on", help: "What to use as hashing input.", tooltip: "What to use as hashing input. Using {result} results in a weighted-round-robin scheme with no hashing." }, hash_fallback: { label: "Hash fallback", help: "What to use as hashing input if the primary hash_on does not return a hash", tooltip: "What to use as hashing input if the primary {hash_on} does not return a hash (eg. header is missing, or no consumer identified). Not available if {hash_on} is set to {cookie}.", hash_on: "hash_on", cookie: "cookie" }, active_health_checks: { label: "Active health checks", help: "Actively probe the targets for their health." }, passive_health_checks: { label: "Passive health checks / Circuit breakers", help: "Checks performed based on the requests being proxied by Kong (HTTP/HTTPS/TCP), with no additional traffic being generated." }, healthchecks_threshold: { label: "Healthchecks threshold" }, header: { label: "Header" }, headers: { label: "Headers", tooltip_active: "Header values can be separated by commas (value1, value2, value3)." }, cookie: { label: "Cookie" }, cookie_path: { label: "Cookie path" }, query_argument: { label: "Query argument" }, uri_capture: { label: "URI capture" }, active_healthcheck_type: { label: "Active health check type" }, http_path: { label: "HTTP path" }, timeout: { label: "Timeout" }, concurrency: { label: "Concurrency" }, https_sni: { label: "HTTPS SNI" }, verify_ssl: { label: "Verify the SSL certificate when performing active health checks using HTTPS" }, interval: { label: "Interval", help: "A value of zero indicates that active probes for healthy targets are disabled." }, successes: { label: "Successes" }, http_statuses: { label: "HTTP statuses" }, http_failures: { label: "HTTP failures" }, tcp_failures: { label: "TCP failures" }, timeouts: { label: "Timeouts" }, passive_health_check_type: { label: "Passive health check type" } } }, labels: { created_at: "Created at" } }, mt = { list: { table_headers: { id: "ID", target_address: "Target address", weight: "Weight", tags: "Tags", target_type: "Target type" }, empty_state: { title: "Configure a new target", description: "A target is an IP address/hostname with a port that identifies an instance of a backend service." }, toolbar_actions: { new_target: "New target" } }, title: "Targets", actions: { create: "New target", copy_id: "Copy ID", copy_json: "Copy JSON", edit: "Edit", delete: "Delete", mark_healthy: "Mark healthy", mark_unhealthy: "Mark unhealthy" }, delete: { title: "Delete a target", description: "This action cannot be reversed so make sure to check target usage before deleting." }, errors: { general: "Targets could not be retrieved", delete: "The target could not be deleted at this time.", copy: "Failed to copy to clipboard", weight: "Value must be in range 0 to 65535" }, copy: { success: "Copied {val} to clipboard", success_brief: "Successfully copied to clipboard" }, form: { create: { title: "New target" }, edit: { title: "Edit target" }, buttons: { save: "Save", cancel: "Cancel" }, fields: { target: { label: "Target address", placeholder: "Enter IP/hostname and port", tooltip: "The target address (IP or hostname) and port. If omitted the port defaults to 8000." }, weight: { label: "Weight", tooltip: "The weight of this target in relation to other targets in the upstream. Value must be in range 0 to 65535, defaults to 100." }, tags: { label: "Tags", placeholder: "Enter a list of tags separated by comma", help: "e.g. tag1, tag2, tag3" }, failover: { label: "Failover target", load_balance_target: "Load balance", failover_target: "Failover", help: "Whether to use this target only as backup.", unsupported: "The current load balance algorithm does not support failover." } } } }, yt = {
|
|
7
|
+
upstreams: ft,
|
|
8
|
+
targets: mt
|
|
387
9
|
};
|
|
388
|
-
function
|
|
389
|
-
const a =
|
|
10
|
+
function gt() {
|
|
11
|
+
const a = dt("en-us", yt);
|
|
390
12
|
return {
|
|
391
13
|
i18n: a,
|
|
392
|
-
i18nT:
|
|
14
|
+
i18nT: pt(a)
|
|
393
15
|
// Translation component <i18n-t>
|
|
394
16
|
};
|
|
395
17
|
}
|
|
396
|
-
function
|
|
397
|
-
const { replaceId:
|
|
18
|
+
function ve(a) {
|
|
19
|
+
const { replaceId: K = !1 } = a, s = A([]);
|
|
398
20
|
return {
|
|
399
|
-
addedItems:
|
|
400
|
-
trackNewItems: (
|
|
401
|
-
if (
|
|
402
|
-
const y = { ...
|
|
403
|
-
|
|
21
|
+
addedItems: s,
|
|
22
|
+
trackNewItems: (i, g) => {
|
|
23
|
+
if (g) {
|
|
24
|
+
const y = { ...i };
|
|
25
|
+
K && (y.value = i.label), s.value.push(y);
|
|
404
26
|
} else
|
|
405
|
-
|
|
27
|
+
s.value = s.value.filter((y) => y.value !== i.value);
|
|
406
28
|
}
|
|
407
29
|
};
|
|
408
30
|
}
|
|
409
|
-
const
|
|
31
|
+
const He = [
|
|
410
32
|
{
|
|
411
33
|
label: "100",
|
|
412
34
|
value: "100"
|
|
@@ -775,122 +397,119 @@ const Fe = [
|
|
|
775
397
|
label: "599",
|
|
776
398
|
value: "599"
|
|
777
399
|
}
|
|
778
|
-
],
|
|
779
|
-
function
|
|
780
|
-
const a = (
|
|
781
|
-
if (a(
|
|
782
|
-
const
|
|
783
|
-
return
|
|
400
|
+
], Pe = 10, Ae = 65536, bt = 0, vt = 65535, ue = 0, ce = 255, tt = 0, at = 255, kt = 0, _t = 65535, Re = 0, Be = 65535, Ct = 0, St = 2 ** 31, Ue = ["200", "302"], Ie = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226", "300", "301", "302", "303", "304", "305", "306", "307", "308"], qe = ["429", "404", "500", "501", "502", "503", "504", "505"], we = ["429", "500", "503"], Ht = ["latency", "least-connections", "round-robin"];
|
|
401
|
+
function Te() {
|
|
402
|
+
const a = (u) => /^\d+$/.test(u), K = (u, c, k) => {
|
|
403
|
+
if (a(u)) {
|
|
404
|
+
const f = Number(u);
|
|
405
|
+
return f >= c && f <= k;
|
|
784
406
|
} else
|
|
785
407
|
return !1;
|
|
786
|
-
},
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
httpStatuses: (We = (Qe = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Qe.unhealthy) != null && We.http_statuses ? s(l.healthchecks.active.unhealthy.http_statuses) : Oe,
|
|
828
|
-
timeouts: ((ze = (Ge = (Je = l == null ? void 0 : l.healthchecks.active) == null ? void 0 : Je.unhealthy) == null ? void 0 : Ge.timeouts) == null ? void 0 : ze.toString()) || "0"
|
|
829
|
-
}
|
|
830
|
-
},
|
|
831
|
-
passiveHealthCheck: {
|
|
832
|
-
type: ((Xe = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : Xe.type) || "http",
|
|
833
|
-
healthy: {
|
|
834
|
-
successes: ((et = (Ze = (Ye = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : Ye.healthy) == null ? void 0 : Ze.successes) == null ? void 0 : et.toString()) || "5",
|
|
835
|
-
httpStatuses: (at = (tt = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : tt.healthy) != null && at.http_statuses ? s(l.healthchecks.passive.healthy.http_statuses) : xe
|
|
836
|
-
},
|
|
837
|
-
unhealthy: {
|
|
838
|
-
timeouts: ((it = (st = (lt = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : lt.unhealthy) == null ? void 0 : st.timeouts) == null ? void 0 : it.toString()) || "0",
|
|
839
|
-
httpFailures: ((nt = (rt = (ot = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : ot.unhealthy) == null ? void 0 : rt.http_failures) == null ? void 0 : nt.toString()) || "5",
|
|
840
|
-
tcpFailures: ((ct = (ut = (ht = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : ht.unhealthy) == null ? void 0 : ut.tcp_failures) == null ? void 0 : ct.toString()) || "5",
|
|
841
|
-
httpStatuses: (pt = (dt = l == null ? void 0 : l.healthchecks.passive) == null ? void 0 : dt.unhealthy) != null && pt.http_statuses ? s(l.healthchecks.passive.unhealthy.http_statuses) : $e
|
|
842
|
-
}
|
|
408
|
+
}, s = (u) => u.map((c) => Number(c)), l = (u) => u.map((c) => c.toString()), i = (u) => ({
|
|
409
|
+
name: u?.name || "",
|
|
410
|
+
hostHeader: u?.host_header || "",
|
|
411
|
+
clientCertificate: u?.client_certificate?.id || "",
|
|
412
|
+
tags: u?.tags?.join(", ") || "",
|
|
413
|
+
algorithm: u?.algorithm || "round-robin",
|
|
414
|
+
stickySessionsCookie: u?.sticky_sessions_cookie || "",
|
|
415
|
+
stickySessionsCookiePath: u?.sticky_sessions_cookie_path || "/",
|
|
416
|
+
slots: u?.slots?.toString() || "10000",
|
|
417
|
+
hashOn: u?.hash_on || "none",
|
|
418
|
+
hashFallback: u?.hash_fallback || "none",
|
|
419
|
+
hashOnHeader: u?.hash_on_header || "",
|
|
420
|
+
hashOnCookie: u?.hash_on_cookie || "",
|
|
421
|
+
hashOnCookiePath: u?.hash_on_cookie_path || "/",
|
|
422
|
+
hashOnQueryArgument: u?.hash_on_query_arg || "",
|
|
423
|
+
hashOnUriCapture: u?.hash_on_uri_capture || "",
|
|
424
|
+
hashFallbackHeader: u?.hash_fallback_header || "",
|
|
425
|
+
hashFallbackQueryArgument: u?.hash_fallback_query_arg || "",
|
|
426
|
+
hashFallbackUriCapture: u?.hash_fallback_uri_capture || "",
|
|
427
|
+
activeHealthSwitch: u ? u.healthchecks.active?.healthy?.interval !== 0 || u.healthchecks.active?.unhealthy?.interval !== 0 : !1,
|
|
428
|
+
passiveHealthSwitch: u ? u.healthchecks.passive?.healthy?.successes !== 0 || u.healthchecks.passive?.unhealthy?.timeouts !== 0 || u.healthchecks.passive?.unhealthy?.tcp_failures !== 0 || u.healthchecks.passive?.unhealthy?.http_failures !== 0 : !1,
|
|
429
|
+
healthchecksThreshold: u?.healthchecks.threshold?.toString() || "0",
|
|
430
|
+
activeHealthCheck: {
|
|
431
|
+
type: u?.healthchecks.active?.type || "http",
|
|
432
|
+
httpPath: u?.healthchecks.active?.http_path || "/",
|
|
433
|
+
timeout: u?.healthchecks.active?.timeout?.toString() || "1",
|
|
434
|
+
concurrency: u?.healthchecks.active?.concurrency?.toString() || "10",
|
|
435
|
+
httpsSni: u?.healthchecks.active?.https_sni || "",
|
|
436
|
+
verifySsl: u?.healthchecks.active?.https_verify_certificate || !1,
|
|
437
|
+
headers: u?.healthchecks.active?.headers && Object.entries(u.healthchecks.active.headers).length > 0 ? Object.entries(u.healthchecks.active.headers).map(([k, f]) => ({ key: k, values: f?.join(", ") })) : [{ key: "", values: "" }],
|
|
438
|
+
healthy: {
|
|
439
|
+
interval: u?.healthchecks.active?.healthy?.interval?.toString() || "0",
|
|
440
|
+
successes: u?.healthchecks.active?.healthy?.successes?.toString() || "5",
|
|
441
|
+
httpStatuses: u?.healthchecks.active?.healthy?.http_statuses ? l(u.healthchecks.active.healthy.http_statuses) : Ue
|
|
442
|
+
},
|
|
443
|
+
unhealthy: {
|
|
444
|
+
interval: u?.healthchecks.active?.unhealthy?.interval?.toString() || "0",
|
|
445
|
+
httpFailures: u?.healthchecks.active?.unhealthy?.http_failures?.toString() || "5",
|
|
446
|
+
tcpFailures: u?.healthchecks.active?.unhealthy?.tcp_failures?.toString() || "5",
|
|
447
|
+
httpStatuses: u?.healthchecks.active?.unhealthy?.http_statuses ? l(u.healthchecks.active.unhealthy.http_statuses) : qe,
|
|
448
|
+
timeouts: u?.healthchecks.active?.unhealthy?.timeouts?.toString() || "0"
|
|
843
449
|
}
|
|
844
|
-
}
|
|
845
|
-
|
|
450
|
+
},
|
|
451
|
+
passiveHealthCheck: {
|
|
452
|
+
type: u?.healthchecks.passive?.type || "http",
|
|
453
|
+
healthy: {
|
|
454
|
+
successes: u?.healthchecks.passive?.healthy?.successes?.toString() || "5",
|
|
455
|
+
httpStatuses: u?.healthchecks.passive?.healthy?.http_statuses ? l(u.healthchecks.passive.healthy.http_statuses) : Ie
|
|
456
|
+
},
|
|
457
|
+
unhealthy: {
|
|
458
|
+
timeouts: u?.healthchecks.passive?.unhealthy?.timeouts?.toString() || "0",
|
|
459
|
+
httpFailures: u?.healthchecks.passive?.unhealthy?.http_failures?.toString() || "5",
|
|
460
|
+
tcpFailures: u?.healthchecks.passive?.unhealthy?.tcp_failures?.toString() || "5",
|
|
461
|
+
httpStatuses: u?.healthchecks.passive?.unhealthy?.http_statuses ? l(u.healthchecks.passive.unhealthy.http_statuses) : we
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
});
|
|
846
465
|
return {
|
|
847
466
|
isInteger: a,
|
|
848
|
-
inRange:
|
|
849
|
-
stringToNumberArray:
|
|
850
|
-
numberToStringArray:
|
|
851
|
-
upstreamsResponseToFields: (
|
|
852
|
-
getDefaultUpstreamFields: () =>
|
|
853
|
-
objectsAreEqual: (
|
|
467
|
+
inRange: K,
|
|
468
|
+
stringToNumberArray: s,
|
|
469
|
+
numberToStringArray: l,
|
|
470
|
+
upstreamsResponseToFields: (u) => i(u),
|
|
471
|
+
getDefaultUpstreamFields: () => i(),
|
|
472
|
+
objectsAreEqual: (u, c) => {
|
|
854
473
|
try {
|
|
855
|
-
return JSON.stringify(
|
|
474
|
+
return JSON.stringify(u) === JSON.stringify(c);
|
|
856
475
|
} catch {
|
|
857
476
|
return !1;
|
|
858
477
|
}
|
|
859
478
|
},
|
|
860
|
-
cloneDeep: (
|
|
479
|
+
cloneDeep: (u) => JSON.parse(JSON.stringify(u))
|
|
861
480
|
};
|
|
862
481
|
}
|
|
863
|
-
const
|
|
864
|
-
useI18n:
|
|
865
|
-
useMultiselectCreation:
|
|
866
|
-
useHelpers:
|
|
867
|
-
},
|
|
482
|
+
const ie = {
|
|
483
|
+
useI18n: gt,
|
|
484
|
+
useMultiselectCreation: ve,
|
|
485
|
+
useHelpers: Te
|
|
486
|
+
}, ye = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", ge = "/{workspace}", de = {
|
|
868
487
|
list: {
|
|
869
|
-
konnect: `${
|
|
870
|
-
kongManager: `${
|
|
488
|
+
konnect: `${ye}/upstreams`,
|
|
489
|
+
kongManager: `${ge}/upstreams`
|
|
871
490
|
},
|
|
872
491
|
form: {
|
|
873
492
|
konnect: {
|
|
874
|
-
getServices: `${
|
|
875
|
-
getCertificates: `${
|
|
876
|
-
create: `${
|
|
877
|
-
edit: `${
|
|
493
|
+
getServices: `${ye}/services`,
|
|
494
|
+
getCertificates: `${ye}/certificates`,
|
|
495
|
+
create: `${ye}/upstreams`,
|
|
496
|
+
edit: `${ye}/upstreams/{id}`
|
|
878
497
|
},
|
|
879
498
|
kongManager: {
|
|
880
|
-
getServices: `${
|
|
881
|
-
getCertificates: `${
|
|
882
|
-
create: `${
|
|
883
|
-
edit: `${
|
|
499
|
+
getServices: `${ge}/services`,
|
|
500
|
+
getCertificates: `${ge}/certificates`,
|
|
501
|
+
create: `${ge}/upstreams`,
|
|
502
|
+
edit: `${ge}/upstreams/{id}`
|
|
884
503
|
}
|
|
885
504
|
}
|
|
886
|
-
},
|
|
505
|
+
}, Ut = { class: "kong-ui-entities-upstreams-list" }, It = { class: "button-row" }, qt = { class: "upstream-name" }, wt = /* @__PURE__ */ ee({
|
|
887
506
|
__name: "UpstreamsList",
|
|
888
507
|
props: {
|
|
889
508
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
890
509
|
config: {
|
|
891
510
|
type: Object,
|
|
892
511
|
required: !0,
|
|
893
|
-
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a
|
|
512
|
+
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a?.app) || !a.createRoute || !a.getViewRoute || !a.getEditRoute || a.app === "kongManager" && !a.isExactMatch && !a.filterSchema)
|
|
894
513
|
},
|
|
895
514
|
// used to override the default identifier for the cache entry
|
|
896
515
|
cacheIdentifier: {
|
|
@@ -928,171 +547,166 @@ const pe = {
|
|
|
928
547
|
}
|
|
929
548
|
},
|
|
930
549
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
931
|
-
setup(a, { emit:
|
|
932
|
-
|
|
933
|
-
const i = D, s = a, { i18n: { t: h } } = pe.useI18n(), b = Ft(), { axiosInstance: y } = Pe((L = s.config) == null ? void 0 : L.axiosRequestConfig), { hasRecords: j, handleStateChange: T } = At(() => V.value), l = H(() => j.value && s.config.app === "konnect"), c = H(() => s.config.app !== "kongManager" || !!s.config.disableSorting), _ = {
|
|
550
|
+
setup(a, { emit: K }) {
|
|
551
|
+
const s = K, l = a, { i18n: { t: i } } = ie.useI18n(), g = et(), { axiosInstance: y } = Fe(l.config?.axiosRequestConfig), { hasRecords: V, handleStateChange: w } = ot(() => $.value), u = S(() => V.value && l.config.app === "konnect"), c = S(() => l.config.app !== "kongManager" || !!l.config.disableSorting), k = {
|
|
934
552
|
// the Name column is non-hidable
|
|
935
|
-
name: { label:
|
|
936
|
-
slots: { label:
|
|
937
|
-
tags: { label:
|
|
938
|
-
},
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
if (v)
|
|
553
|
+
name: { label: i("upstreams.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
554
|
+
slots: { label: i("upstreams.list.table_headers.slots"), searchable: !0, sortable: !0 },
|
|
555
|
+
tags: { label: i("upstreams.list.table_headers.tags"), sortable: !1 }
|
|
556
|
+
}, f = k, t = S(() => {
|
|
557
|
+
let C = `${l.config.apiBaseUrl}${de.list[l.config.app]}`;
|
|
558
|
+
return l.config.app === "konnect" && (C = C.replace(/{controlPlaneId}/gi, l.config?.controlPlaneId || "")), C.replace(/\/{workspace}/gi, l.config?.workspace ? `/${l.config.workspace}` : "");
|
|
559
|
+
}), $ = A(""), q = S(() => {
|
|
560
|
+
const C = l.config.app === "konnect" || l.config.isExactMatch;
|
|
561
|
+
if (C)
|
|
945
562
|
return {
|
|
946
|
-
isExactMatch:
|
|
947
|
-
placeholder:
|
|
563
|
+
isExactMatch: C,
|
|
564
|
+
placeholder: i("upstreams.search.placeholder")
|
|
948
565
|
};
|
|
949
|
-
const { name:
|
|
566
|
+
const { name: N, slots: R } = k;
|
|
950
567
|
return {
|
|
951
|
-
isExactMatch:
|
|
952
|
-
fields: { name:
|
|
953
|
-
schema:
|
|
568
|
+
isExactMatch: C,
|
|
569
|
+
fields: { name: N, slots: R },
|
|
570
|
+
schema: l.config.filterSchema
|
|
954
571
|
};
|
|
955
572
|
}), {
|
|
956
573
|
fetcher: p,
|
|
957
|
-
fetcherState:
|
|
958
|
-
fetcherCacheKey:
|
|
959
|
-
} =
|
|
960
|
-
|
|
961
|
-
},
|
|
962
|
-
|
|
963
|
-
},
|
|
964
|
-
const
|
|
965
|
-
if (!await
|
|
966
|
-
|
|
967
|
-
entity:
|
|
574
|
+
fetcherState: _,
|
|
575
|
+
fetcherCacheKey: j
|
|
576
|
+
} = je(S(() => ({ ...l.config, cacheIdentifier: l.cacheIdentifier })), t), M = () => {
|
|
577
|
+
$.value = "";
|
|
578
|
+
}, U = () => {
|
|
579
|
+
j.value++;
|
|
580
|
+
}, x = A(null), L = async (C, N) => {
|
|
581
|
+
const R = C.id;
|
|
582
|
+
if (!await N(R)) {
|
|
583
|
+
s("copy:error", {
|
|
584
|
+
entity: C,
|
|
968
585
|
field: "id",
|
|
969
|
-
message:
|
|
586
|
+
message: i("upstreams.errors.copy")
|
|
970
587
|
});
|
|
971
588
|
return;
|
|
972
589
|
}
|
|
973
|
-
|
|
974
|
-
entity:
|
|
590
|
+
s("copy:success", {
|
|
591
|
+
entity: C,
|
|
975
592
|
field: "id",
|
|
976
|
-
message:
|
|
593
|
+
message: i("upstreams.copy.success", { val: R })
|
|
977
594
|
});
|
|
978
|
-
},
|
|
979
|
-
const
|
|
980
|
-
if (!await
|
|
981
|
-
|
|
982
|
-
entity:
|
|
983
|
-
message:
|
|
595
|
+
}, Q = async (C, N) => {
|
|
596
|
+
const R = JSON.stringify(C);
|
|
597
|
+
if (!await N(R)) {
|
|
598
|
+
s("copy:error", {
|
|
599
|
+
entity: C,
|
|
600
|
+
message: i("upstreams.errors.copy")
|
|
984
601
|
});
|
|
985
602
|
return;
|
|
986
603
|
}
|
|
987
|
-
|
|
988
|
-
entity:
|
|
989
|
-
message:
|
|
604
|
+
s("copy:success", {
|
|
605
|
+
entity: C,
|
|
606
|
+
message: i("upstreams.copy.success_brief")
|
|
990
607
|
});
|
|
991
|
-
},
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
if ((v = W.value) != null && v.id) {
|
|
1007
|
-
z.value = !0;
|
|
608
|
+
}, z = async (C) => {
|
|
609
|
+
await l.canRetrieve?.(C) && g.push(l.config.getViewRoute(C.id));
|
|
610
|
+
}, v = (C) => ({
|
|
611
|
+
label: i("upstreams.actions.view"),
|
|
612
|
+
to: l.config.getViewRoute(C)
|
|
613
|
+
}), B = (C) => ({
|
|
614
|
+
label: i("upstreams.actions.edit"),
|
|
615
|
+
to: l.config.getEditRoute(C)
|
|
616
|
+
}), F = A(void 0), D = A(!1), W = A(!1), te = A(""), Y = Qe(l.config, t.value), J = (C) => {
|
|
617
|
+
F.value = C, D.value = !0;
|
|
618
|
+
}, pe = () => {
|
|
619
|
+
D.value = !1;
|
|
620
|
+
}, fe = async () => {
|
|
621
|
+
if (F.value?.id) {
|
|
622
|
+
W.value = !0;
|
|
1008
623
|
try {
|
|
1009
|
-
await y.delete(
|
|
1010
|
-
} catch (
|
|
1011
|
-
|
|
624
|
+
await y.delete(Y(F.value.id)), W.value = !1, D.value = !1, j.value++, s("delete:success", F.value);
|
|
625
|
+
} catch (C) {
|
|
626
|
+
te.value = C.response?.data?.message || C.message || i("upstreams.errors.delete"), s("error", C);
|
|
1012
627
|
} finally {
|
|
1013
|
-
|
|
628
|
+
W.value = !1;
|
|
1014
629
|
}
|
|
1015
630
|
}
|
|
1016
|
-
},
|
|
1017
|
-
|
|
631
|
+
}, he = () => {
|
|
632
|
+
g.push(l.config.createRoute);
|
|
1018
633
|
};
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
}, (Y = (O = (I = v.error) == null ? void 0 : I.response) == null ? void 0 : O.data) != null && Y.message && (k.value.message = v.error.response.data.message), i("error", v.error);
|
|
634
|
+
oe(_, (C) => {
|
|
635
|
+
if (C.status === We.Error) {
|
|
636
|
+
x.value = {
|
|
637
|
+
title: i("upstreams.errors.general")
|
|
638
|
+
}, C.error?.response?.data?.message && (x.value.message = C.error.response.data.message), s("error", C.error);
|
|
1025
639
|
return;
|
|
1026
640
|
}
|
|
1027
|
-
|
|
641
|
+
x.value = null;
|
|
1028
642
|
});
|
|
1029
|
-
const
|
|
1030
|
-
ctaPath:
|
|
643
|
+
const I = A({
|
|
644
|
+
ctaPath: l.config.createRoute,
|
|
1031
645
|
ctaText: void 0,
|
|
1032
|
-
message: `${
|
|
1033
|
-
title:
|
|
1034
|
-
}),
|
|
1035
|
-
return
|
|
1036
|
-
|
|
1037
|
-
}), (
|
|
1038
|
-
const
|
|
1039
|
-
return
|
|
1040
|
-
|
|
646
|
+
message: `${i("upstreams.list.empty_state.description")}${l.config.additionMessageForEmptyState ? ` ${l.config.additionMessageForEmptyState}` : ""}`,
|
|
647
|
+
title: i("upstreams.title")
|
|
648
|
+
}), G = A(!1);
|
|
649
|
+
return Me(async () => {
|
|
650
|
+
G.value = await l.canCreate(), G.value && (I.value.title = i("upstreams.list.empty_state.title"), I.value.ctaText = i("upstreams.actions.create"));
|
|
651
|
+
}), (C, N) => {
|
|
652
|
+
const R = T("KButton"), ne = T("KEmptyState"), d = T("KDropdownItem"), h = T("KClipboardProvider");
|
|
653
|
+
return H(), X("div", Ut, [
|
|
654
|
+
n(e(Je), {
|
|
1041
655
|
"cache-identifier": a.cacheIdentifier,
|
|
1042
656
|
"disable-sorting": c.value,
|
|
1043
|
-
"empty-state-options":
|
|
657
|
+
"empty-state-options": I.value,
|
|
1044
658
|
"enable-entity-actions": "",
|
|
1045
|
-
"error-message":
|
|
659
|
+
"error-message": x.value,
|
|
1046
660
|
fetcher: e(p),
|
|
1047
|
-
"fetcher-cache-key": e(
|
|
661
|
+
"fetcher-cache-key": e(j),
|
|
1048
662
|
"pagination-type": "offset",
|
|
1049
663
|
"preferences-storage-key": "kong-ui-entities-upstreams-list",
|
|
1050
|
-
query:
|
|
1051
|
-
"table-headers": e(
|
|
1052
|
-
onClearSearchInput:
|
|
1053
|
-
"onClick:row":
|
|
1054
|
-
onSort:
|
|
1055
|
-
onState: e(
|
|
1056
|
-
},
|
|
1057
|
-
"toolbar-filter":
|
|
1058
|
-
|
|
1059
|
-
modelValue:
|
|
1060
|
-
"onUpdate:modelValue":
|
|
1061
|
-
config:
|
|
664
|
+
query: $.value,
|
|
665
|
+
"table-headers": e(f),
|
|
666
|
+
onClearSearchInput: M,
|
|
667
|
+
"onClick:row": N[3] || (N[3] = (r) => z(r)),
|
|
668
|
+
onSort: U,
|
|
669
|
+
onState: e(w)
|
|
670
|
+
}, _e({
|
|
671
|
+
"toolbar-filter": o(() => [
|
|
672
|
+
n(e(it), {
|
|
673
|
+
modelValue: $.value,
|
|
674
|
+
"onUpdate:modelValue": N[0] || (N[0] = (r) => $.value = r),
|
|
675
|
+
config: q.value
|
|
1062
676
|
}, null, 8, ["modelValue", "config"])
|
|
1063
677
|
]),
|
|
1064
|
-
"toolbar-button":
|
|
1065
|
-
(
|
|
678
|
+
"toolbar-button": o(() => [
|
|
679
|
+
(H(), O(De, {
|
|
1066
680
|
disabled: !a.useActionOutside,
|
|
1067
681
|
to: "#kong-ui-app-page-header-action-button"
|
|
1068
682
|
}, [
|
|
1069
|
-
|
|
1070
|
-
|
|
683
|
+
b("div", It, [
|
|
684
|
+
u.value ? (H(), O(R, {
|
|
1071
685
|
key: 0,
|
|
1072
686
|
appearance: "secondary",
|
|
1073
687
|
class: "open-learning-hub",
|
|
1074
688
|
"data-testid": "upstream-learn-more-button",
|
|
1075
689
|
icon: "",
|
|
1076
|
-
onClick:
|
|
690
|
+
onClick: N[1] || (N[1] = (r) => C.$emit("click:learn-more"))
|
|
1077
691
|
}, {
|
|
1078
|
-
default:
|
|
1079
|
-
|
|
692
|
+
default: o(() => [
|
|
693
|
+
n(e(Ne), { decorative: "" })
|
|
1080
694
|
]),
|
|
1081
695
|
_: 1
|
|
1082
|
-
})) :
|
|
1083
|
-
|
|
696
|
+
})) : P("", !0),
|
|
697
|
+
n(e(se), {
|
|
1084
698
|
"auth-function": () => a.canCreate()
|
|
1085
699
|
}, {
|
|
1086
|
-
default:
|
|
1087
|
-
|
|
700
|
+
default: o(() => [
|
|
701
|
+
n(R, {
|
|
1088
702
|
appearance: "primary",
|
|
1089
703
|
"data-testid": "toolbar-add-upstream",
|
|
1090
704
|
size: a.useActionOutside ? "medium" : "large",
|
|
1091
705
|
to: a.config.createRoute
|
|
1092
706
|
}, {
|
|
1093
|
-
default:
|
|
1094
|
-
|
|
1095
|
-
|
|
707
|
+
default: o(() => [
|
|
708
|
+
n(e(Se)),
|
|
709
|
+
E(" " + m(e(i)("upstreams.list.toolbar_actions.new_upstream")), 1)
|
|
1096
710
|
]),
|
|
1097
711
|
_: 1
|
|
1098
712
|
}, 8, ["size", "to"])
|
|
@@ -1102,79 +716,79 @@ const pe = {
|
|
|
1102
716
|
])
|
|
1103
717
|
], 8, ["disabled"]))
|
|
1104
718
|
]),
|
|
1105
|
-
name:
|
|
1106
|
-
|
|
719
|
+
name: o(({ rowValue: r }) => [
|
|
720
|
+
b("span", qt, m(r), 1)
|
|
1107
721
|
]),
|
|
1108
|
-
tags:
|
|
1109
|
-
|
|
722
|
+
tags: o(({ rowValue: r }) => [
|
|
723
|
+
n(e(Ge), {
|
|
1110
724
|
"tag-max-width": "auto",
|
|
1111
725
|
tags: r
|
|
1112
726
|
}, null, 8, ["tags"])
|
|
1113
727
|
]),
|
|
1114
|
-
actions:
|
|
1115
|
-
|
|
1116
|
-
default:
|
|
1117
|
-
|
|
728
|
+
actions: o(({ row: r }) => [
|
|
729
|
+
n(h, null, {
|
|
730
|
+
default: o(({ copyToClipboard: Z }) => [
|
|
731
|
+
n(d, {
|
|
1118
732
|
"data-testid": "action-entity-copy-id",
|
|
1119
|
-
onClick: (
|
|
733
|
+
onClick: (me) => L(r, Z)
|
|
1120
734
|
}, {
|
|
1121
|
-
default:
|
|
1122
|
-
|
|
735
|
+
default: o(() => [
|
|
736
|
+
E(m(e(i)("upstreams.actions.copy_id")), 1)
|
|
1123
737
|
]),
|
|
1124
738
|
_: 1
|
|
1125
739
|
}, 8, ["onClick"])
|
|
1126
740
|
]),
|
|
1127
741
|
_: 2
|
|
1128
742
|
}, 1024),
|
|
1129
|
-
|
|
1130
|
-
default:
|
|
1131
|
-
|
|
743
|
+
n(h, null, {
|
|
744
|
+
default: o(({ copyToClipboard: Z }) => [
|
|
745
|
+
n(d, {
|
|
1132
746
|
"data-testid": "action-entity-copy-json",
|
|
1133
|
-
onClick: (
|
|
747
|
+
onClick: (me) => Q(r, Z)
|
|
1134
748
|
}, {
|
|
1135
|
-
default:
|
|
1136
|
-
|
|
749
|
+
default: o(() => [
|
|
750
|
+
E(m(e(i)("upstreams.actions.copy_json")), 1)
|
|
1137
751
|
]),
|
|
1138
752
|
_: 1
|
|
1139
753
|
}, 8, ["onClick"])
|
|
1140
754
|
]),
|
|
1141
755
|
_: 2
|
|
1142
756
|
}, 1024),
|
|
1143
|
-
|
|
757
|
+
n(e(se), {
|
|
1144
758
|
"auth-function": () => a.canRetrieve(r)
|
|
1145
759
|
}, {
|
|
1146
|
-
default:
|
|
1147
|
-
|
|
760
|
+
default: o(() => [
|
|
761
|
+
n(d, {
|
|
1148
762
|
"data-testid": "action-entity-view",
|
|
1149
763
|
"has-divider": "",
|
|
1150
|
-
item:
|
|
764
|
+
item: v(r.id)
|
|
1151
765
|
}, null, 8, ["item"])
|
|
1152
766
|
]),
|
|
1153
767
|
_: 2
|
|
1154
768
|
}, 1032, ["auth-function"]),
|
|
1155
|
-
|
|
769
|
+
n(e(se), {
|
|
1156
770
|
"auth-function": () => a.canEdit(r)
|
|
1157
771
|
}, {
|
|
1158
|
-
default:
|
|
1159
|
-
|
|
772
|
+
default: o(() => [
|
|
773
|
+
n(d, {
|
|
1160
774
|
"data-testid": "action-entity-edit",
|
|
1161
|
-
item:
|
|
775
|
+
item: B(r.id)
|
|
1162
776
|
}, null, 8, ["item"])
|
|
1163
777
|
]),
|
|
1164
778
|
_: 2
|
|
1165
779
|
}, 1032, ["auth-function"]),
|
|
1166
|
-
|
|
780
|
+
n(e(se), {
|
|
1167
781
|
"auth-function": () => a.canDelete(r)
|
|
1168
782
|
}, {
|
|
1169
|
-
default:
|
|
1170
|
-
|
|
783
|
+
default: o(() => [
|
|
784
|
+
n(d, {
|
|
1171
785
|
danger: "",
|
|
1172
786
|
"data-testid": "action-entity-delete",
|
|
1173
787
|
"has-divider": "",
|
|
1174
|
-
onClick: (
|
|
788
|
+
onClick: (Z) => J(r)
|
|
1175
789
|
}, {
|
|
1176
|
-
default:
|
|
1177
|
-
|
|
790
|
+
default: o(() => [
|
|
791
|
+
E(m(e(i)("upstreams.actions.delete")), 1)
|
|
1178
792
|
]),
|
|
1179
793
|
_: 1
|
|
1180
794
|
}, 8, ["onClick"])
|
|
@@ -1184,107 +798,104 @@ const pe = {
|
|
|
1184
798
|
]),
|
|
1185
799
|
_: 2
|
|
1186
800
|
}, [
|
|
1187
|
-
|
|
801
|
+
!$.value && a.config.app === "konnect" ? {
|
|
1188
802
|
name: "empty-state",
|
|
1189
|
-
fn:
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
u(e(we), { decorative: "" }),
|
|
1209
|
-
Q(" " + f(e(h)("upstreams.list.empty_state_v2.create_cta")), 1)
|
|
1210
|
-
]),
|
|
1211
|
-
_: 1
|
|
1212
|
-
})) : R("", !0),
|
|
1213
|
-
u(O, {
|
|
1214
|
-
appearance: "secondary",
|
|
1215
|
-
"data-testid": "entity-learn-more-button",
|
|
1216
|
-
onClick: I[2] || (I[2] = (J) => v.$emit("click:learn-more"))
|
|
1217
|
-
}, {
|
|
1218
|
-
default: n(() => [
|
|
1219
|
-
u(e(ft), { decorative: "" }),
|
|
1220
|
-
Q(" " + f(e(h)("upstreams.list.empty_state_v2.learn_more")), 1)
|
|
1221
|
-
]),
|
|
1222
|
-
_: 1
|
|
1223
|
-
})
|
|
1224
|
-
]),
|
|
1225
|
-
_: 2
|
|
1226
|
-
}, [
|
|
1227
|
-
(r = a.config) != null && r.isControlPlaneGroup ? {
|
|
1228
|
-
name: "default",
|
|
1229
|
-
fn: n(() => [
|
|
1230
|
-
Q(f(e(h)("upstreams.list.empty_state_v2.group")), 1)
|
|
803
|
+
fn: o(() => [
|
|
804
|
+
n(ne, {
|
|
805
|
+
"data-testid": "upstreams-entity-empty-state",
|
|
806
|
+
"icon-background": "",
|
|
807
|
+
message: e(i)("upstreams.list.empty_state_v2.description"),
|
|
808
|
+
title: e(i)("upstreams.list.empty_state_v2.title")
|
|
809
|
+
}, _e({
|
|
810
|
+
icon: o(() => [
|
|
811
|
+
n(e(ut), { decorative: "" })
|
|
812
|
+
]),
|
|
813
|
+
action: o(() => [
|
|
814
|
+
G.value ? (H(), O(R, {
|
|
815
|
+
key: 0,
|
|
816
|
+
"data-testid": "entity-create-button",
|
|
817
|
+
onClick: he
|
|
818
|
+
}, {
|
|
819
|
+
default: o(() => [
|
|
820
|
+
n(e(Se), { decorative: "" }),
|
|
821
|
+
E(" " + m(e(i)("upstreams.list.empty_state_v2.create_cta")), 1)
|
|
1231
822
|
]),
|
|
1232
|
-
|
|
1233
|
-
} :
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
823
|
+
_: 1
|
|
824
|
+
})) : P("", !0),
|
|
825
|
+
n(R, {
|
|
826
|
+
appearance: "secondary",
|
|
827
|
+
"data-testid": "entity-learn-more-button",
|
|
828
|
+
onClick: N[2] || (N[2] = (r) => C.$emit("click:learn-more"))
|
|
829
|
+
}, {
|
|
830
|
+
default: o(() => [
|
|
831
|
+
n(e(Ne), { decorative: "" }),
|
|
832
|
+
E(" " + m(e(i)("upstreams.list.empty_state_v2.learn_more")), 1)
|
|
833
|
+
]),
|
|
834
|
+
_: 1
|
|
835
|
+
})
|
|
836
|
+
]),
|
|
837
|
+
_: 2
|
|
838
|
+
}, [
|
|
839
|
+
a.config?.isControlPlaneGroup ? {
|
|
840
|
+
name: "default",
|
|
841
|
+
fn: o(() => [
|
|
842
|
+
E(m(e(i)("upstreams.list.empty_state_v2.group")), 1)
|
|
843
|
+
]),
|
|
844
|
+
key: "0"
|
|
845
|
+
} : void 0
|
|
846
|
+
]), 1032, ["message", "title"])
|
|
847
|
+
]),
|
|
1237
848
|
key: "0"
|
|
1238
849
|
} : void 0
|
|
1239
850
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
1240
|
-
|
|
1241
|
-
"action-pending":
|
|
1242
|
-
description: e(
|
|
1243
|
-
"entity-name":
|
|
1244
|
-
"entity-type": e(
|
|
1245
|
-
error:
|
|
1246
|
-
title: e(
|
|
1247
|
-
visible:
|
|
1248
|
-
onCancel:
|
|
1249
|
-
onProceed:
|
|
851
|
+
n(e(ze), {
|
|
852
|
+
"action-pending": W.value,
|
|
853
|
+
description: e(i)("upstreams.delete.description"),
|
|
854
|
+
"entity-name": F.value && (F.value.name || F.value.id),
|
|
855
|
+
"entity-type": e(Xe).Upstream,
|
|
856
|
+
error: te.value,
|
|
857
|
+
title: e(i)("upstreams.delete.title"),
|
|
858
|
+
visible: D.value,
|
|
859
|
+
onCancel: pe,
|
|
860
|
+
onProceed: fe
|
|
1250
861
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
1251
862
|
]);
|
|
1252
863
|
};
|
|
1253
864
|
}
|
|
1254
|
-
}),
|
|
1255
|
-
const
|
|
1256
|
-
for (const [
|
|
1257
|
-
|
|
1258
|
-
return
|
|
1259
|
-
},
|
|
865
|
+
}), re = (a, K) => {
|
|
866
|
+
const s = a.__vccOpts || a;
|
|
867
|
+
for (const [l, i] of K)
|
|
868
|
+
s[l] = i;
|
|
869
|
+
return s;
|
|
870
|
+
}, ka = /* @__PURE__ */ re(wt, [["__scopeId", "data-v-2579f455"]]), Oe = "/v2/control-planes/{controlPlaneId}/core-entities/{workspace}", $e = "/{workspace}", Ke = {
|
|
1260
871
|
list: {
|
|
1261
|
-
konnect: `${
|
|
1262
|
-
kongManager: `${
|
|
872
|
+
konnect: `${Oe}/upstreams/{upstreamId}/targets`,
|
|
873
|
+
kongManager: `${$e}/upstreams/{upstreamId}/targets`
|
|
1263
874
|
},
|
|
1264
875
|
form: {
|
|
1265
876
|
konnect: {
|
|
1266
|
-
create: `${
|
|
1267
|
-
edit: `${
|
|
877
|
+
create: `${Oe}/upstreams/{upstreamId}/targets`,
|
|
878
|
+
edit: `${Oe}/upstreams/{upstreamId}/targets/{id}`
|
|
1268
879
|
},
|
|
1269
880
|
kongManager: {
|
|
1270
|
-
create: `${
|
|
1271
|
-
edit: `${
|
|
881
|
+
create: `${$e}/upstreams/{upstreamId}/targets`,
|
|
882
|
+
edit: `${$e}/upstreams/{upstreamId}/targets/{id}`
|
|
1272
883
|
}
|
|
1273
884
|
}
|
|
1274
|
-
},
|
|
885
|
+
}, Ft = { class: "kong-ui-entities-target-form" }, Tt = { class: "target-form-container" }, xt = {
|
|
1275
886
|
key: 0,
|
|
1276
887
|
class: "target-form-info"
|
|
1277
|
-
},
|
|
888
|
+
}, Ot = {
|
|
1278
889
|
key: 1,
|
|
1279
890
|
class: "failover-target"
|
|
1280
|
-
},
|
|
891
|
+
}, $t = /* @__PURE__ */ ee({
|
|
1281
892
|
__name: "TargetForm",
|
|
1282
893
|
props: {
|
|
1283
894
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
1284
895
|
config: {
|
|
1285
896
|
type: Object,
|
|
1286
897
|
required: !0,
|
|
1287
|
-
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a
|
|
898
|
+
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a?.app) || a.app === "konnect" && !a.controlPlaneId || a.app === "kongManager" && typeof a.workspace != "string" || !a.upstreamId)
|
|
1288
899
|
},
|
|
1289
900
|
// Controls whether the modal is visible or not
|
|
1290
901
|
isVisible: {
|
|
@@ -1309,12 +920,8 @@ const pe = {
|
|
|
1309
920
|
}
|
|
1310
921
|
},
|
|
1311
922
|
emits: ["update", "error", "loading", "cancel"],
|
|
1312
|
-
setup(a, { emit:
|
|
1313
|
-
|
|
1314
|
-
const i = D, s = a, { i18n: { t: h } } = pe.useI18n(), { getMessageFromError: b } = qt(), { axiosInstance: y } = Pe((X = s.config) == null ? void 0 : X.axiosRequestConfig), j = H(() => {
|
|
1315
|
-
var k;
|
|
1316
|
-
return Be.form[s.config.app].edit.replace(/{upstreamId}/gi, ((k = s.config) == null ? void 0 : k.upstreamId) || "");
|
|
1317
|
-
}), T = H(() => s.targetId ? ue.Edit : ue.Create), l = H(() => T.value === ue.Edit ? h("targets.form.edit.title") : h("targets.form.create.title")), c = qe({
|
|
923
|
+
setup(a, { emit: K }) {
|
|
924
|
+
const s = K, l = a, { i18n: { t: i } } = ie.useI18n(), { getMessageFromError: g } = Ye(), { axiosInstance: y } = Fe(l.config?.axiosRequestConfig), V = S(() => Ke.form[l.config.app].edit.replace(/{upstreamId}/gi, l.config?.upstreamId || "")), w = S(() => l.targetId ? le.Edit : le.Create), u = S(() => w.value === le.Edit ? i("targets.form.edit.title") : i("targets.form.create.title")), c = Ce({
|
|
1318
925
|
fields: {
|
|
1319
926
|
target: "",
|
|
1320
927
|
weight: 100,
|
|
@@ -1323,114 +930,108 @@ const pe = {
|
|
|
1323
930
|
},
|
|
1324
931
|
isReadonly: !1,
|
|
1325
932
|
errorMessage: ""
|
|
1326
|
-
}),
|
|
933
|
+
}), k = Ce({
|
|
1327
934
|
target: "",
|
|
1328
935
|
weight: 100,
|
|
1329
936
|
tags: "",
|
|
1330
937
|
failover: !1
|
|
1331
|
-
}),
|
|
938
|
+
}), f = {
|
|
1332
939
|
target: "",
|
|
1333
940
|
weight: 100,
|
|
1334
941
|
tags: ""
|
|
1335
|
-
}, t =
|
|
1336
|
-
const
|
|
1337
|
-
return
|
|
1338
|
-
}),
|
|
1339
|
-
() => JSON.stringify(c.fields) !== JSON.stringify(
|
|
1340
|
-
),
|
|
1341
|
-
|
|
1342
|
-
c.fields.target = (k == null ? void 0 : k.target) || "", c.fields.weight = (k == null ? void 0 : k.weight) ?? "", c.fields.tags = ((F = k == null ? void 0 : k.tags) == null ? void 0 : F.join(", ")) || "", s.failoverEnabled && (c.fields.failover = (k == null ? void 0 : k.failover) || !1), Object.assign(_, c.fields);
|
|
942
|
+
}, t = S(() => {
|
|
943
|
+
const U = parseInt(c.fields.weight.toString(), 10);
|
|
944
|
+
return U < 0 || U > 65535;
|
|
945
|
+
}), $ = S(
|
|
946
|
+
() => JSON.stringify(c.fields) !== JSON.stringify(k) && !!c.fields.target && !!c.fields.weight && !t.value
|
|
947
|
+
), q = (U) => {
|
|
948
|
+
c.fields.target = U?.target || "", c.fields.weight = U?.weight ?? "", c.fields.tags = U?.tags?.join(", ") || "", l.failoverEnabled && (c.fields.failover = U?.failover || !1), Object.assign(k, c.fields);
|
|
1343
949
|
}, p = () => {
|
|
1344
|
-
c.errorMessage = "",
|
|
1345
|
-
},
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
upstream: { id: s.config.upstreamId },
|
|
1356
|
-
...s.failoverEnabled ? { failover: c.fields.failover } : {}
|
|
1357
|
-
};
|
|
1358
|
-
}), N = async () => {
|
|
1359
|
-
var k, F;
|
|
950
|
+
c.errorMessage = "", s("cancel");
|
|
951
|
+
}, _ = S(() => {
|
|
952
|
+
let U = `${l.config.apiBaseUrl}${Ke.form[l.config.app][w.value]}`;
|
|
953
|
+
return l.config.app === "konnect" && (U = U.replace(/{controlPlaneId}/gi, l.config?.controlPlaneId || "")), U.replace(/\/{workspace}/gi, l.config?.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, l.config?.upstreamId || "").replace(/{id}/gi, l.targetId ?? "");
|
|
954
|
+
}), j = S(() => ({
|
|
955
|
+
target: c.fields.target,
|
|
956
|
+
weight: parseInt(c.fields.weight),
|
|
957
|
+
tags: c.fields.tags?.split(",")?.map((U) => String(U || "").trim())?.filter((U) => U !== ""),
|
|
958
|
+
upstream: { id: l.config.upstreamId },
|
|
959
|
+
...l.failoverEnabled ? { failover: c.fields.failover } : {}
|
|
960
|
+
})), M = async () => {
|
|
1360
961
|
try {
|
|
1361
962
|
c.isReadonly = !0, c.errorMessage = "";
|
|
1362
|
-
let
|
|
1363
|
-
if (
|
|
1364
|
-
const { data:
|
|
1365
|
-
c.fields.target =
|
|
963
|
+
let U;
|
|
964
|
+
if (w.value === "create" ? U = await y.post(_.value, j.value) : w.value === "edit" && (U = l.config?.app === "konnect" ? await y.put(_.value, j.value) : await y.patch(_.value, j.value)), U) {
|
|
965
|
+
const { data: x } = U;
|
|
966
|
+
c.fields.target = x?.name || "", c.fields.weight = x?.weight ?? 100, c.fields.tags = x?.tags?.join(", ") || "", s("update", x), Object.assign(c.fields, f);
|
|
1366
967
|
}
|
|
1367
|
-
} catch (
|
|
1368
|
-
c.errorMessage =
|
|
968
|
+
} catch (U) {
|
|
969
|
+
c.errorMessage = g(U), s("error", U);
|
|
1369
970
|
} finally {
|
|
1370
971
|
c.isReadonly = !1;
|
|
1371
972
|
}
|
|
1372
973
|
};
|
|
1373
|
-
return
|
|
1374
|
-
Object.assign(c.fields,
|
|
1375
|
-
}), (
|
|
1376
|
-
const
|
|
1377
|
-
return
|
|
1378
|
-
"action-button-disabled":
|
|
1379
|
-
"action-button-text": e(
|
|
1380
|
-
"cancel-button-text": e(
|
|
1381
|
-
title:
|
|
974
|
+
return oe(() => l.targetId, () => {
|
|
975
|
+
Object.assign(c.fields, f);
|
|
976
|
+
}), (U, x) => {
|
|
977
|
+
const L = T("KInput"), Q = T("KCheckbox"), z = T("KPrompt");
|
|
978
|
+
return H(), O(z, {
|
|
979
|
+
"action-button-disabled": !$.value || c.isReadonly,
|
|
980
|
+
"action-button-text": e(i)("targets.form.buttons.save"),
|
|
981
|
+
"cancel-button-text": e(i)("targets.form.buttons.cancel"),
|
|
982
|
+
title: u.value,
|
|
1382
983
|
visible: a.isVisible,
|
|
1383
984
|
onCancel: p,
|
|
1384
|
-
onProceed:
|
|
985
|
+
onProceed: M
|
|
1385
986
|
}, {
|
|
1386
|
-
default:
|
|
1387
|
-
|
|
1388
|
-
|
|
987
|
+
default: o(() => [
|
|
988
|
+
b("div", Ft, [
|
|
989
|
+
n(e(Ze), {
|
|
1389
990
|
config: a.config,
|
|
1390
991
|
"edit-id": a.targetId,
|
|
1391
|
-
"entity-type": e(
|
|
992
|
+
"entity-type": e(Ve).Target,
|
|
1392
993
|
"error-message": c.errorMessage,
|
|
1393
|
-
"fetch-url":
|
|
1394
|
-
"form-fields":
|
|
994
|
+
"fetch-url": V.value,
|
|
995
|
+
"form-fields": j.value,
|
|
1395
996
|
"is-readonly": c.isReadonly,
|
|
1396
997
|
onCancel: p,
|
|
1397
|
-
"onFetch:error":
|
|
1398
|
-
"onFetch:success":
|
|
1399
|
-
onLoading:
|
|
998
|
+
"onFetch:error": x[4] || (x[4] = (v) => U.$emit("error", v)),
|
|
999
|
+
"onFetch:success": q,
|
|
1000
|
+
onLoading: x[5] || (x[5] = (v) => U.$emit("loading", v))
|
|
1400
1001
|
}, {
|
|
1401
|
-
default:
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
])) :
|
|
1406
|
-
|
|
1002
|
+
default: o(() => [
|
|
1003
|
+
b("div", Tt, [
|
|
1004
|
+
U.$slots.info ? (H(), X("div", xt, [
|
|
1005
|
+
Le(U.$slots, "info", {}, void 0, !0)
|
|
1006
|
+
])) : P("", !0),
|
|
1007
|
+
n(L, {
|
|
1407
1008
|
modelValue: c.fields.target,
|
|
1408
|
-
"onUpdate:modelValue":
|
|
1009
|
+
"onUpdate:modelValue": x[0] || (x[0] = (v) => c.fields.target = v),
|
|
1409
1010
|
modelModifiers: { trim: !0 },
|
|
1410
1011
|
autocomplete: "off",
|
|
1411
1012
|
class: "target-form-input",
|
|
1412
1013
|
"data-testid": "target-form-target",
|
|
1413
|
-
label: e(
|
|
1014
|
+
label: e(i)("targets.form.fields.target.label"),
|
|
1414
1015
|
"label-attributes": {
|
|
1415
|
-
info: e(
|
|
1016
|
+
info: e(i)("targets.form.fields.target.tooltip"),
|
|
1416
1017
|
tooltipAttributes: { maxWidth: "400" }
|
|
1417
1018
|
},
|
|
1418
|
-
placeholder: e(
|
|
1019
|
+
placeholder: e(i)("targets.form.fields.target.placeholder"),
|
|
1419
1020
|
readonly: c.isReadonly,
|
|
1420
1021
|
required: "",
|
|
1421
1022
|
type: "text"
|
|
1422
1023
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1423
|
-
|
|
1024
|
+
n(L, {
|
|
1424
1025
|
modelValue: c.fields.weight,
|
|
1425
|
-
"onUpdate:modelValue":
|
|
1026
|
+
"onUpdate:modelValue": x[1] || (x[1] = (v) => c.fields.weight = v),
|
|
1426
1027
|
autocomplete: "off",
|
|
1427
1028
|
class: "target-form-input",
|
|
1428
1029
|
"data-testid": "target-form-weight",
|
|
1429
1030
|
error: t.value,
|
|
1430
|
-
"error-message": e(
|
|
1431
|
-
label: e(
|
|
1031
|
+
"error-message": e(i)("targets.errors.weight"),
|
|
1032
|
+
label: e(i)("targets.form.fields.weight.label"),
|
|
1432
1033
|
"label-attributes": {
|
|
1433
|
-
info: e(
|
|
1034
|
+
info: e(i)("targets.form.fields.weight.tooltip"),
|
|
1434
1035
|
tooltipAttributes: { maxWidth: "400" }
|
|
1435
1036
|
},
|
|
1436
1037
|
max: "65535",
|
|
@@ -1439,27 +1040,27 @@ const pe = {
|
|
|
1439
1040
|
required: "",
|
|
1440
1041
|
type: "number"
|
|
1441
1042
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "readonly"]),
|
|
1442
|
-
a.failoverEnabled ? (
|
|
1443
|
-
|
|
1043
|
+
a.failoverEnabled ? (H(), X("div", Ot, [
|
|
1044
|
+
n(Q, {
|
|
1444
1045
|
modelValue: c.fields.failover,
|
|
1445
|
-
"onUpdate:modelValue":
|
|
1046
|
+
"onUpdate:modelValue": x[2] || (x[2] = (v) => c.fields.failover = v),
|
|
1446
1047
|
disabled: a.failoverUnsupported,
|
|
1447
|
-
label: e(
|
|
1048
|
+
label: e(i)("targets.form.fields.failover.label"),
|
|
1448
1049
|
"label-attributes": {
|
|
1449
|
-
info: a.failoverUnsupported ? e(
|
|
1050
|
+
info: a.failoverUnsupported ? e(i)("targets.form.fields.failover.unsupported") : e(i)("targets.form.fields.failover.help")
|
|
1450
1051
|
}
|
|
1451
1052
|
}, null, 8, ["modelValue", "disabled", "label", "label-attributes"])
|
|
1452
|
-
])) :
|
|
1453
|
-
|
|
1053
|
+
])) : P("", !0),
|
|
1054
|
+
n(L, {
|
|
1454
1055
|
modelValue: c.fields.tags,
|
|
1455
|
-
"onUpdate:modelValue":
|
|
1056
|
+
"onUpdate:modelValue": x[3] || (x[3] = (v) => c.fields.tags = v),
|
|
1456
1057
|
modelModifiers: { trim: !0 },
|
|
1457
1058
|
autocomplete: "off",
|
|
1458
1059
|
class: "target-form-input",
|
|
1459
1060
|
"data-testid": "target-form-tags",
|
|
1460
|
-
help: e(
|
|
1461
|
-
label: e(
|
|
1462
|
-
placeholder: e(
|
|
1061
|
+
help: e(i)("targets.form.fields.tags.help"),
|
|
1062
|
+
label: e(i)("targets.form.fields.tags.label"),
|
|
1063
|
+
placeholder: e(i)("targets.form.fields.tags.placeholder"),
|
|
1463
1064
|
readonly: c.isReadonly,
|
|
1464
1065
|
type: "text"
|
|
1465
1066
|
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"])
|
|
@@ -1473,14 +1074,14 @@ const pe = {
|
|
|
1473
1074
|
}, 8, ["action-button-disabled", "action-button-text", "cancel-button-text", "title", "visible"]);
|
|
1474
1075
|
};
|
|
1475
1076
|
}
|
|
1476
|
-
}),
|
|
1077
|
+
}), Pt = /* @__PURE__ */ re($t, [["__scopeId", "data-v-bdedfe82"]]), At = { class: "kong-ui-entities-targets-list" }, Kt = { class: "target-address" }, Mt = /* @__PURE__ */ ee({
|
|
1477
1078
|
__name: "TargetsList",
|
|
1478
1079
|
props: {
|
|
1479
1080
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
1480
1081
|
config: {
|
|
1481
1082
|
type: Object,
|
|
1482
1083
|
required: !0,
|
|
1483
|
-
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a
|
|
1084
|
+
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a?.app) || !a.upstreamId || a.app === "kongManager" && (typeof a.canMarkHealthy > "u" || typeof a.canMarkUnhealthy > "u"))
|
|
1484
1085
|
},
|
|
1485
1086
|
// used to override the default identifier for the cache entry
|
|
1486
1087
|
cacheIdentifier: {
|
|
@@ -1521,149 +1122,145 @@ const pe = {
|
|
|
1521
1122
|
}
|
|
1522
1123
|
},
|
|
1523
1124
|
emits: ["error", "copy:success", "copy:error", "delete:success", "health-actions:healthy", "health-actions:unhealthy", "create:target", "update:target"],
|
|
1524
|
-
setup(a, { emit:
|
|
1525
|
-
|
|
1526
|
-
const i = D, s = a, { i18n: { t: h } } = pe.useI18n(), { axiosInstance: b } = Pe((te = s.config) == null ? void 0 : te.axiosRequestConfig), y = H(() => s.config.app !== "kongManager" || !!s.config.disableSorting), T = {
|
|
1125
|
+
setup(a, { emit: K }) {
|
|
1126
|
+
const s = K, l = a, { i18n: { t: i } } = ie.useI18n(), { axiosInstance: g } = Fe(l.config?.axiosRequestConfig), y = S(() => l.config.app !== "kongManager" || !!l.config.disableSorting), w = {
|
|
1527
1127
|
// the Target Address column is non-hidable
|
|
1528
|
-
target: { label:
|
|
1529
|
-
weight: { label:
|
|
1530
|
-
...
|
|
1531
|
-
tags: { label:
|
|
1532
|
-
},
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
return s.config.app === "konnect" && (U = U.replace(/{controlPlaneId}/gi, ((L = s.config) == null ? void 0 : L.controlPlaneId) || "")), U.replace(/\/{workspace}/gi, (v = s.config) != null && v.workspace ? `/${s.config.workspace}` : "").replace(/{upstreamId}/gi, ((I = s.config) == null ? void 0 : I.upstreamId) || "");
|
|
1128
|
+
target: { label: i("targets.list.table_headers.target_address"), sortable: !0, hidable: !1 },
|
|
1129
|
+
weight: { label: i("targets.list.table_headers.weight"), sortable: !0 },
|
|
1130
|
+
...l.failoverEnabled ? { failover: { label: i("targets.list.table_headers.target_type"), sortable: !1 } } : {},
|
|
1131
|
+
tags: { label: i("targets.list.table_headers.tags"), sortable: !1 }
|
|
1132
|
+
}, u = S(() => {
|
|
1133
|
+
let I = `${l.config.apiBaseUrl}${Ke.list[l.config.app]}`;
|
|
1134
|
+
return l.config.app === "konnect" && (I = I.replace(/{controlPlaneId}/gi, l.config?.controlPlaneId || "")), I.replace(/\/{workspace}/gi, l.config?.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, l.config?.upstreamId || "");
|
|
1536
1135
|
}), {
|
|
1537
1136
|
fetcher: c,
|
|
1538
|
-
fetcherState:
|
|
1539
|
-
fetcherCacheKey:
|
|
1540
|
-
} =
|
|
1541
|
-
|
|
1542
|
-
},
|
|
1543
|
-
|
|
1544
|
-
}, p = async (
|
|
1545
|
-
const
|
|
1546
|
-
if (!await
|
|
1547
|
-
|
|
1548
|
-
entity:
|
|
1137
|
+
fetcherState: k,
|
|
1138
|
+
fetcherCacheKey: f
|
|
1139
|
+
} = je(S(() => ({ ...l.config, cacheIdentifier: l.cacheIdentifier })), u), t = () => {
|
|
1140
|
+
f.value++;
|
|
1141
|
+
}, $ = A(null), q = () => {
|
|
1142
|
+
J.value = !0;
|
|
1143
|
+
}, p = async (I, G) => {
|
|
1144
|
+
const C = I.id;
|
|
1145
|
+
if (!await G(C)) {
|
|
1146
|
+
s("copy:error", {
|
|
1147
|
+
entity: I,
|
|
1549
1148
|
field: "id",
|
|
1550
|
-
message:
|
|
1149
|
+
message: i("targets.errors.copy")
|
|
1551
1150
|
});
|
|
1552
1151
|
return;
|
|
1553
1152
|
}
|
|
1554
|
-
|
|
1555
|
-
entity:
|
|
1153
|
+
s("copy:success", {
|
|
1154
|
+
entity: I,
|
|
1556
1155
|
field: "id",
|
|
1557
|
-
message:
|
|
1156
|
+
message: i("targets.copy.success", { val: C })
|
|
1558
1157
|
});
|
|
1559
|
-
},
|
|
1560
|
-
const
|
|
1561
|
-
if (!await
|
|
1562
|
-
|
|
1563
|
-
entity:
|
|
1564
|
-
message:
|
|
1158
|
+
}, _ = async (I, G) => {
|
|
1159
|
+
const C = JSON.stringify(I);
|
|
1160
|
+
if (!await G(C)) {
|
|
1161
|
+
s("copy:error", {
|
|
1162
|
+
entity: I,
|
|
1163
|
+
message: i("targets.errors.copy")
|
|
1565
1164
|
});
|
|
1566
1165
|
return;
|
|
1567
1166
|
}
|
|
1568
|
-
|
|
1569
|
-
entity:
|
|
1570
|
-
message:
|
|
1167
|
+
s("copy:success", {
|
|
1168
|
+
entity: I,
|
|
1169
|
+
message: i("targets.copy.success_brief")
|
|
1571
1170
|
});
|
|
1572
|
-
},
|
|
1573
|
-
|
|
1574
|
-
},
|
|
1575
|
-
|
|
1576
|
-
},
|
|
1577
|
-
|
|
1578
|
-
},
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
P.value = !0;
|
|
1171
|
+
}, j = (I) => {
|
|
1172
|
+
Y.value = I, J.value = !0;
|
|
1173
|
+
}, M = (I) => l.config.app === "konnect" ? !1 : l.config.canMarkHealthy(I), U = (I) => l.config.app === "konnect" ? !1 : l.config.canMarkUnhealthy(I), x = A(void 0), L = A(!1), Q = A(!1), z = A(""), v = Qe(l.config, u.value), B = (I) => {
|
|
1174
|
+
x.value = I, L.value = !0;
|
|
1175
|
+
}, F = () => {
|
|
1176
|
+
L.value = !1;
|
|
1177
|
+
}, D = async () => {
|
|
1178
|
+
if (x.value?.id) {
|
|
1179
|
+
Q.value = !0;
|
|
1582
1180
|
try {
|
|
1583
|
-
await
|
|
1181
|
+
await g.delete(v(x.value.id)), Q.value = !1, L.value = !1, f.value++, s("delete:success", x.value);
|
|
1584
1182
|
} catch (I) {
|
|
1585
|
-
|
|
1183
|
+
z.value = I.response?.data?.message || I.message || i("targets.errors.delete"), s("error", I);
|
|
1586
1184
|
} finally {
|
|
1587
|
-
|
|
1185
|
+
Q.value = !1;
|
|
1588
1186
|
}
|
|
1589
1187
|
}
|
|
1590
1188
|
};
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
}, (I = (v = (L = U.error) == null ? void 0 : L.response) == null ? void 0 : v.data) != null && I.message && (V.value.message = U.error.response.data.message), i("error", U.error);
|
|
1189
|
+
oe(k, (I) => {
|
|
1190
|
+
if (I.status === We.Error) {
|
|
1191
|
+
$.value = {
|
|
1192
|
+
title: i("targets.errors.general")
|
|
1193
|
+
}, I.error?.response?.data?.message && ($.value.message = I.error.response.data.message), s("error", I.error);
|
|
1597
1194
|
return;
|
|
1598
1195
|
}
|
|
1599
|
-
|
|
1196
|
+
$.value = null;
|
|
1600
1197
|
});
|
|
1601
|
-
const
|
|
1198
|
+
const W = A({
|
|
1602
1199
|
ctaText: void 0,
|
|
1603
|
-
message: `${
|
|
1604
|
-
title:
|
|
1605
|
-
...
|
|
1200
|
+
message: `${i("targets.list.empty_state.description")}${l.config.additionMessageForEmptyState ? ` ${l.config.additionMessageForEmptyState}` : ""}`,
|
|
1201
|
+
title: i("targets.title"),
|
|
1202
|
+
...l.config.createRoute && {
|
|
1606
1203
|
// If `createRoute` provided in config, add a `ctaPath` to empty state CTA button so it becomes a link
|
|
1607
|
-
ctaPath:
|
|
1204
|
+
ctaPath: l.config.createRoute
|
|
1608
1205
|
}
|
|
1609
1206
|
});
|
|
1610
|
-
|
|
1611
|
-
await
|
|
1207
|
+
Me(async () => {
|
|
1208
|
+
await l.canCreate() && (W.value.title = i("targets.list.empty_state.title"), W.value.ctaText = i("targets.actions.create"));
|
|
1612
1209
|
});
|
|
1613
|
-
const
|
|
1614
|
-
app:
|
|
1615
|
-
apiBaseUrl:
|
|
1616
|
-
upstreamId:
|
|
1617
|
-
axiosRequestConfig:
|
|
1618
|
-
workspace:
|
|
1210
|
+
const te = S(() => ({
|
|
1211
|
+
app: l.config.app,
|
|
1212
|
+
apiBaseUrl: l.config.apiBaseUrl,
|
|
1213
|
+
upstreamId: l.config.upstreamId,
|
|
1214
|
+
axiosRequestConfig: l.config.axiosRequestConfig,
|
|
1215
|
+
workspace: l.config.workspace,
|
|
1619
1216
|
// Depending on the app, we need to pass in the control plane ID
|
|
1620
1217
|
// see KonnectTargetFormConfig and KongManagerTargetFormConfig types
|
|
1621
|
-
...
|
|
1622
|
-
controlPlaneId:
|
|
1218
|
+
...l.config.app === "konnect" && {
|
|
1219
|
+
controlPlaneId: l.config.controlPlaneId
|
|
1623
1220
|
}
|
|
1624
|
-
})),
|
|
1625
|
-
|
|
1626
|
-
},
|
|
1627
|
-
|
|
1628
|
-
},
|
|
1629
|
-
|
|
1221
|
+
})), Y = A(""), J = A(!1), pe = (I) => {
|
|
1222
|
+
Y.value ? s("update:target", I) : s("create:target", I), fe();
|
|
1223
|
+
}, fe = () => {
|
|
1224
|
+
he(), f.value++;
|
|
1225
|
+
}, he = () => {
|
|
1226
|
+
J.value = !1, Y.value = "";
|
|
1630
1227
|
};
|
|
1631
|
-
return (
|
|
1632
|
-
const
|
|
1633
|
-
return
|
|
1634
|
-
|
|
1228
|
+
return (I, G) => {
|
|
1229
|
+
const C = T("KButton"), N = T("KBadge"), R = T("KDropdownItem"), ne = T("KClipboardProvider");
|
|
1230
|
+
return H(), X("div", At, [
|
|
1231
|
+
n(e(Je), {
|
|
1635
1232
|
"cache-identifier": a.cacheIdentifier,
|
|
1636
1233
|
"disable-sorting": y.value,
|
|
1637
|
-
"empty-state-options":
|
|
1234
|
+
"empty-state-options": W.value,
|
|
1638
1235
|
"enable-entity-actions": "",
|
|
1639
|
-
"error-message":
|
|
1236
|
+
"error-message": $.value,
|
|
1640
1237
|
fetcher: e(c),
|
|
1641
|
-
"fetcher-cache-key": e(
|
|
1238
|
+
"fetcher-cache-key": e(f),
|
|
1642
1239
|
"pagination-type": "offset",
|
|
1643
1240
|
"preferences-storage-key": "kong-ui-entities-targets-list",
|
|
1644
|
-
"table-headers": e(
|
|
1645
|
-
onEmptyStateCtaClicked:
|
|
1241
|
+
"table-headers": e(w),
|
|
1242
|
+
onEmptyStateCtaClicked: G[1] || (G[1] = () => l.config.createRoute ? void 0 : q()),
|
|
1646
1243
|
onSort: t
|
|
1647
|
-
},
|
|
1648
|
-
"toolbar-button":
|
|
1649
|
-
(
|
|
1244
|
+
}, _e({
|
|
1245
|
+
"toolbar-button": o(() => [
|
|
1246
|
+
(H(), O(De, {
|
|
1650
1247
|
disabled: !a.useActionOutside,
|
|
1651
1248
|
to: "#kong-ui-app-page-header-action-button"
|
|
1652
1249
|
}, [
|
|
1653
|
-
|
|
1250
|
+
n(e(se), {
|
|
1654
1251
|
"auth-function": () => a.canCreate()
|
|
1655
1252
|
}, {
|
|
1656
|
-
default:
|
|
1657
|
-
|
|
1253
|
+
default: o(() => [
|
|
1254
|
+
n(C, {
|
|
1658
1255
|
appearance: "primary",
|
|
1659
1256
|
"data-testid": "toolbar-new-target",
|
|
1660
1257
|
size: a.useActionOutside ? "medium" : "large",
|
|
1661
|
-
to:
|
|
1662
|
-
onClick:
|
|
1258
|
+
to: l.config.createRoute ? l.config.createRoute : void 0,
|
|
1259
|
+
onClick: G[0] || (G[0] = () => l.config.createRoute ? void 0 : q())
|
|
1663
1260
|
}, {
|
|
1664
|
-
default:
|
|
1665
|
-
|
|
1666
|
-
|
|
1261
|
+
default: o(() => [
|
|
1262
|
+
n(e(Se)),
|
|
1263
|
+
E(" " + m(e(i)("targets.list.toolbar_actions.new_target")), 1)
|
|
1667
1264
|
]),
|
|
1668
1265
|
_: 1
|
|
1669
1266
|
}, 8, ["size", "to"])
|
|
@@ -1672,105 +1269,105 @@ const pe = {
|
|
|
1672
1269
|
}, 8, ["auth-function"])
|
|
1673
1270
|
], 8, ["disabled"]))
|
|
1674
1271
|
]),
|
|
1675
|
-
target:
|
|
1676
|
-
|
|
1272
|
+
target: o(({ rowValue: d }) => [
|
|
1273
|
+
b("span", Kt, m(d), 1)
|
|
1677
1274
|
]),
|
|
1678
|
-
tags:
|
|
1679
|
-
|
|
1275
|
+
tags: o(({ rowValue: d }) => [
|
|
1276
|
+
n(e(Ge), {
|
|
1680
1277
|
"tag-max-width": "auto",
|
|
1681
1278
|
tags: d
|
|
1682
1279
|
}, null, 8, ["tags"])
|
|
1683
1280
|
]),
|
|
1684
|
-
actions:
|
|
1685
|
-
|
|
1686
|
-
default:
|
|
1687
|
-
|
|
1281
|
+
actions: o(({ row: d }) => [
|
|
1282
|
+
n(ne, null, {
|
|
1283
|
+
default: o(({ copyToClipboard: h }) => [
|
|
1284
|
+
n(R, {
|
|
1688
1285
|
"data-testid": "action-entity-copy-id",
|
|
1689
|
-
onClick: (r) => p(d,
|
|
1286
|
+
onClick: (r) => p(d, h)
|
|
1690
1287
|
}, {
|
|
1691
|
-
default:
|
|
1692
|
-
|
|
1288
|
+
default: o(() => [
|
|
1289
|
+
E(m(e(i)("targets.actions.copy_id")), 1)
|
|
1693
1290
|
]),
|
|
1694
1291
|
_: 1
|
|
1695
1292
|
}, 8, ["onClick"])
|
|
1696
1293
|
]),
|
|
1697
1294
|
_: 2
|
|
1698
1295
|
}, 1024),
|
|
1699
|
-
|
|
1700
|
-
default:
|
|
1701
|
-
|
|
1296
|
+
n(ne, null, {
|
|
1297
|
+
default: o(({ copyToClipboard: h }) => [
|
|
1298
|
+
n(R, {
|
|
1702
1299
|
"data-testid": "action-entity-copy-json",
|
|
1703
|
-
onClick: (r) =>
|
|
1300
|
+
onClick: (r) => _(d, h)
|
|
1704
1301
|
}, {
|
|
1705
|
-
default:
|
|
1706
|
-
|
|
1302
|
+
default: o(() => [
|
|
1303
|
+
E(m(e(i)("targets.actions.copy_json")), 1)
|
|
1707
1304
|
]),
|
|
1708
1305
|
_: 1
|
|
1709
1306
|
}, 8, ["onClick"])
|
|
1710
1307
|
]),
|
|
1711
1308
|
_: 2
|
|
1712
1309
|
}, 1024),
|
|
1713
|
-
|
|
1310
|
+
n(e(se), {
|
|
1714
1311
|
"auth-function": () => a.canEdit(d)
|
|
1715
1312
|
}, {
|
|
1716
|
-
default:
|
|
1717
|
-
|
|
1313
|
+
default: o(() => [
|
|
1314
|
+
n(R, {
|
|
1718
1315
|
"data-testid": "action-entity-edit",
|
|
1719
1316
|
"has-divider": "",
|
|
1720
|
-
onClick: (
|
|
1317
|
+
onClick: (h) => j(d.id)
|
|
1721
1318
|
}, {
|
|
1722
|
-
default:
|
|
1723
|
-
|
|
1319
|
+
default: o(() => [
|
|
1320
|
+
E(m(e(i)("targets.actions.edit")), 1)
|
|
1724
1321
|
]),
|
|
1725
1322
|
_: 1
|
|
1726
1323
|
}, 8, ["onClick"])
|
|
1727
1324
|
]),
|
|
1728
1325
|
_: 2
|
|
1729
1326
|
}, 1032, ["auth-function"]),
|
|
1730
|
-
|
|
1731
|
-
"auth-function": () =>
|
|
1327
|
+
n(e(se), {
|
|
1328
|
+
"auth-function": () => M(d)
|
|
1732
1329
|
}, {
|
|
1733
|
-
default:
|
|
1734
|
-
|
|
1330
|
+
default: o(() => [
|
|
1331
|
+
n(R, {
|
|
1735
1332
|
"data-testid": "action-target-mark-healthy",
|
|
1736
|
-
onClick: (
|
|
1333
|
+
onClick: (h) => s("health-actions:healthy", d)
|
|
1737
1334
|
}, {
|
|
1738
|
-
default:
|
|
1739
|
-
|
|
1335
|
+
default: o(() => [
|
|
1336
|
+
E(m(e(i)("targets.actions.mark_healthy")), 1)
|
|
1740
1337
|
]),
|
|
1741
1338
|
_: 1
|
|
1742
1339
|
}, 8, ["onClick"])
|
|
1743
1340
|
]),
|
|
1744
1341
|
_: 2
|
|
1745
1342
|
}, 1032, ["auth-function"]),
|
|
1746
|
-
|
|
1747
|
-
"auth-function": () =>
|
|
1343
|
+
n(e(se), {
|
|
1344
|
+
"auth-function": () => U(d)
|
|
1748
1345
|
}, {
|
|
1749
|
-
default:
|
|
1750
|
-
|
|
1346
|
+
default: o(() => [
|
|
1347
|
+
n(R, {
|
|
1751
1348
|
"data-testid": "action-target-mark-unhealthy",
|
|
1752
|
-
onClick: (
|
|
1349
|
+
onClick: (h) => s("health-actions:unhealthy", d)
|
|
1753
1350
|
}, {
|
|
1754
|
-
default:
|
|
1755
|
-
|
|
1351
|
+
default: o(() => [
|
|
1352
|
+
E(m(e(i)("targets.actions.mark_unhealthy")), 1)
|
|
1756
1353
|
]),
|
|
1757
1354
|
_: 1
|
|
1758
1355
|
}, 8, ["onClick"])
|
|
1759
1356
|
]),
|
|
1760
1357
|
_: 2
|
|
1761
1358
|
}, 1032, ["auth-function"]),
|
|
1762
|
-
|
|
1359
|
+
n(e(se), {
|
|
1763
1360
|
"auth-function": () => a.canDelete(d)
|
|
1764
1361
|
}, {
|
|
1765
|
-
default:
|
|
1766
|
-
|
|
1362
|
+
default: o(() => [
|
|
1363
|
+
n(R, {
|
|
1767
1364
|
danger: "",
|
|
1768
1365
|
"data-testid": "action-entity-delete",
|
|
1769
1366
|
"has-divider": "",
|
|
1770
|
-
onClick: (
|
|
1367
|
+
onClick: (h) => B(d)
|
|
1771
1368
|
}, {
|
|
1772
|
-
default:
|
|
1773
|
-
|
|
1369
|
+
default: o(() => [
|
|
1370
|
+
E(m(e(i)("targets.actions.delete")), 1)
|
|
1774
1371
|
]),
|
|
1775
1372
|
_: 1
|
|
1776
1373
|
}, 8, ["onClick"])
|
|
@@ -1782,13 +1379,13 @@ const pe = {
|
|
|
1782
1379
|
}, [
|
|
1783
1380
|
a.failoverEnabled ? {
|
|
1784
1381
|
name: "failover",
|
|
1785
|
-
fn:
|
|
1786
|
-
|
|
1382
|
+
fn: o(({ rowValue: d }) => [
|
|
1383
|
+
n(N, {
|
|
1787
1384
|
appearance: "info",
|
|
1788
1385
|
class: "upstream-failover"
|
|
1789
1386
|
}, {
|
|
1790
|
-
default:
|
|
1791
|
-
|
|
1387
|
+
default: o(() => [
|
|
1388
|
+
E(m(d ? e(i)("targets.form.fields.failover.failover_target") : e(i)("targets.form.fields.failover.load_balance_target")), 1)
|
|
1792
1389
|
]),
|
|
1793
1390
|
_: 2
|
|
1794
1391
|
}, 1024)
|
|
@@ -1796,30 +1393,30 @@ const pe = {
|
|
|
1796
1393
|
key: "0"
|
|
1797
1394
|
} : void 0
|
|
1798
1395
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "table-headers"]),
|
|
1799
|
-
|
|
1800
|
-
"action-pending":
|
|
1801
|
-
description: e(
|
|
1802
|
-
"entity-type": e(
|
|
1803
|
-
error:
|
|
1396
|
+
n(e(ze), {
|
|
1397
|
+
"action-pending": Q.value,
|
|
1398
|
+
description: e(i)("targets.delete.description"),
|
|
1399
|
+
"entity-type": e(Xe).Target,
|
|
1400
|
+
error: z.value,
|
|
1804
1401
|
"need-confirm": !1,
|
|
1805
|
-
title: e(
|
|
1806
|
-
visible:
|
|
1807
|
-
onCancel:
|
|
1808
|
-
onProceed:
|
|
1402
|
+
title: e(i)("targets.delete.title"),
|
|
1403
|
+
visible: L.value,
|
|
1404
|
+
onCancel: F,
|
|
1405
|
+
onProceed: D
|
|
1809
1406
|
}, null, 8, ["action-pending", "description", "entity-type", "error", "title", "visible"]),
|
|
1810
|
-
|
|
1811
|
-
config:
|
|
1407
|
+
n(Pt, {
|
|
1408
|
+
config: te.value,
|
|
1812
1409
|
"failover-enabled": a.failoverEnabled,
|
|
1813
|
-
"failover-unsupported": a.failoverEnabled && !e(
|
|
1814
|
-
"is-visible":
|
|
1815
|
-
"target-id":
|
|
1816
|
-
onCancel:
|
|
1817
|
-
onUpdate:
|
|
1818
|
-
},
|
|
1819
|
-
|
|
1410
|
+
"failover-unsupported": a.failoverEnabled && !e(Ht).includes(a.algorithm),
|
|
1411
|
+
"is-visible": J.value,
|
|
1412
|
+
"target-id": Y.value,
|
|
1413
|
+
onCancel: he,
|
|
1414
|
+
onUpdate: pe
|
|
1415
|
+
}, _e({ _: 2 }, [
|
|
1416
|
+
I.$slots["form-info"] ? {
|
|
1820
1417
|
name: "info",
|
|
1821
|
-
fn:
|
|
1822
|
-
|
|
1418
|
+
fn: o(() => [
|
|
1419
|
+
Le(I.$slots, "form-info", {}, void 0, !0)
|
|
1823
1420
|
]),
|
|
1824
1421
|
key: "0"
|
|
1825
1422
|
} : void 0
|
|
@@ -1827,7 +1424,7 @@ const pe = {
|
|
|
1827
1424
|
]);
|
|
1828
1425
|
};
|
|
1829
1426
|
}
|
|
1830
|
-
}),
|
|
1427
|
+
}), _a = /* @__PURE__ */ re(Mt, [["__scopeId", "data-v-bb093257"]]), Vt = { key: 1 }, Et = /* @__PURE__ */ ee({
|
|
1831
1428
|
__name: "UpstreamsFormGeneralInfo",
|
|
1832
1429
|
props: {
|
|
1833
1430
|
config: {
|
|
@@ -1857,143 +1454,131 @@ const pe = {
|
|
|
1857
1454
|
}
|
|
1858
1455
|
},
|
|
1859
1456
|
emits: ["update:name", "update:host-header", "update:client-certificate", "update:tags"],
|
|
1860
|
-
setup(a, { emit:
|
|
1861
|
-
|
|
1862
|
-
const { i18nT: i, i18n: { t: s } } = pe.useI18n(), h = a, b = D, {
|
|
1457
|
+
setup(a, { emit: K }) {
|
|
1458
|
+
const { i18nT: s, i18n: { t: l } } = ie.useI18n(), i = a, g = K, {
|
|
1863
1459
|
debouncedQueryChange: y,
|
|
1864
|
-
loading:
|
|
1865
|
-
loadItems:
|
|
1866
|
-
results:
|
|
1460
|
+
loading: V,
|
|
1461
|
+
loadItems: w,
|
|
1462
|
+
results: u,
|
|
1867
1463
|
allRecords: c
|
|
1868
|
-
} =
|
|
1464
|
+
} = Ee(i.config, de.form[i.config?.app]?.getServices, "", {
|
|
1869
1465
|
fetchedItemsKey: "data",
|
|
1870
1466
|
searchKeys: ["host"]
|
|
1871
1467
|
}), {
|
|
1872
|
-
debouncedQueryChange:
|
|
1873
|
-
loading:
|
|
1468
|
+
debouncedQueryChange: k,
|
|
1469
|
+
loading: f,
|
|
1874
1470
|
loadItems: t,
|
|
1875
|
-
results:
|
|
1876
|
-
} =
|
|
1877
|
-
|
|
1878
|
-
return
|
|
1879
|
-
|
|
1880
|
-
var M, ee, se;
|
|
1881
|
-
const K = p.value && h.name.includes((M = w.value) == null ? void 0 : M.toLowerCase());
|
|
1882
|
-
return (se = l.value) == null ? void 0 : se.map((ae) => ({ label: ae.host, value: ae.id })).concat(
|
|
1883
|
-
K ? [{ label: h.name, value: ((ee = X.value) == null ? void 0 : ee.value) || h.name }] : []
|
|
1471
|
+
results: $
|
|
1472
|
+
} = Ee(i.config, de.form[i.config?.app]?.getCertificates), q = A(""), p = S(() => !!i.name && !c.value?.some((F) => F.host === i.name)), _ = S(() => {
|
|
1473
|
+
const F = p.value && i.name.includes(q.value?.toLowerCase());
|
|
1474
|
+
return u.value?.map((D) => ({ label: D.host, value: D.id })).concat(
|
|
1475
|
+
F ? [{ label: i.name, value: U.value?.value || i.name }] : []
|
|
1884
1476
|
);
|
|
1885
|
-
}),
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
|
-
},
|
|
1894
|
-
|
|
1895
|
-
}, A = () => {
|
|
1896
|
-
X.value = { value: "", label: "" };
|
|
1897
|
-
}, S = (K) => {
|
|
1898
|
-
N.value = K, b("update:name", k.value);
|
|
1899
|
-
}, x = B(!1);
|
|
1900
|
-
return De(async () => {
|
|
1901
|
-
var K, M;
|
|
1477
|
+
}), j = S(() => $.value?.map((F) => ({ label: F.id, value: F.id }))), M = A(""), U = A({ value: "", label: "" }), x = S(() => _.value.find((F) => F.value === M.value)?.label || U.value?.label), L = (F) => {
|
|
1478
|
+
q.value = F, y(F);
|
|
1479
|
+
}, Q = (F) => {
|
|
1480
|
+
U.value = F;
|
|
1481
|
+
}, z = () => {
|
|
1482
|
+
U.value = { value: "", label: "" };
|
|
1483
|
+
}, v = (F) => {
|
|
1484
|
+
M.value = F, g("update:name", x.value);
|
|
1485
|
+
}, B = A(!1);
|
|
1486
|
+
return Me(async () => {
|
|
1902
1487
|
try {
|
|
1903
|
-
|
|
1488
|
+
B.value = !0, await w(), i.name && (M.value = _.value.find((F) => F.label === i.name)?.value?.toString() || i.name), await t();
|
|
1904
1489
|
} finally {
|
|
1905
|
-
|
|
1490
|
+
B.value = !1;
|
|
1906
1491
|
}
|
|
1907
|
-
}), (
|
|
1908
|
-
const
|
|
1909
|
-
return
|
|
1492
|
+
}), (F, D) => {
|
|
1493
|
+
const W = T("KSkeleton"), te = T("KSelect"), Y = T("KInput");
|
|
1494
|
+
return H(), O(e(ke), {
|
|
1910
1495
|
class: "kong-ui-entities-upstreams-general-info",
|
|
1911
|
-
description: e(
|
|
1912
|
-
title: e(
|
|
1496
|
+
description: e(l)("upstreams.form.general_info.help"),
|
|
1497
|
+
title: e(l)("upstreams.form.general_info.title")
|
|
1913
1498
|
}, {
|
|
1914
|
-
default:
|
|
1915
|
-
|
|
1499
|
+
default: o(() => [
|
|
1500
|
+
B.value ? (H(), O(W, {
|
|
1916
1501
|
key: 0,
|
|
1917
1502
|
type: "form"
|
|
1918
|
-
})) : (
|
|
1919
|
-
|
|
1503
|
+
})) : (H(), X("div", Vt, [
|
|
1504
|
+
n(te, {
|
|
1920
1505
|
class: "name-select margin-bottom-6",
|
|
1921
1506
|
clearable: "",
|
|
1922
1507
|
"data-testid": "upstreams-form-name",
|
|
1923
1508
|
"enable-filtering": "",
|
|
1924
1509
|
"enable-item-creation": "",
|
|
1925
1510
|
"filter-function": () => !0,
|
|
1926
|
-
items:
|
|
1927
|
-
label: e(
|
|
1511
|
+
items: _.value,
|
|
1512
|
+
label: e(l)("upstreams.form.fields.name.label"),
|
|
1928
1513
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
1929
|
-
loading: e(
|
|
1930
|
-
"model-value":
|
|
1931
|
-
placeholder: e(
|
|
1514
|
+
loading: e(V),
|
|
1515
|
+
"model-value": M.value,
|
|
1516
|
+
placeholder: e(l)("upstreams.form.fields.name.placeholder"),
|
|
1932
1517
|
readonly: a.readonly,
|
|
1933
1518
|
required: "",
|
|
1934
1519
|
width: "100%",
|
|
1935
|
-
onItemAdded:
|
|
1936
|
-
onItemRemoved:
|
|
1937
|
-
onQueryChange:
|
|
1938
|
-
"onUpdate:modelValue":
|
|
1520
|
+
onItemAdded: Q,
|
|
1521
|
+
onItemRemoved: z,
|
|
1522
|
+
onQueryChange: L,
|
|
1523
|
+
"onUpdate:modelValue": v
|
|
1939
1524
|
}, {
|
|
1940
|
-
"label-tooltip":
|
|
1941
|
-
|
|
1525
|
+
"label-tooltip": o(() => [
|
|
1526
|
+
n(e(s), {
|
|
1942
1527
|
keypath: "upstreams.form.fields.name.tooltip",
|
|
1943
1528
|
scope: "global"
|
|
1944
1529
|
}, {
|
|
1945
|
-
host:
|
|
1946
|
-
|
|
1530
|
+
host: o(() => [
|
|
1531
|
+
b("code", null, m(e(l)("upstreams.form.fields.name.host")), 1)
|
|
1947
1532
|
]),
|
|
1948
1533
|
_: 1
|
|
1949
1534
|
})
|
|
1950
1535
|
]),
|
|
1951
1536
|
_: 1
|
|
1952
1537
|
}, 8, ["items", "label", "loading", "model-value", "placeholder", "readonly", "onUpdate:modelValue"]),
|
|
1953
|
-
|
|
1538
|
+
n(Y, {
|
|
1954
1539
|
autocomplete: "off",
|
|
1955
1540
|
class: "margin-bottom-6",
|
|
1956
1541
|
"data-testid": "upstreams-form-host-header",
|
|
1957
|
-
label: e(
|
|
1542
|
+
label: e(l)("upstreams.form.fields.host_header.label"),
|
|
1958
1543
|
"model-value": a.hostHeader,
|
|
1959
1544
|
readonly: a.readonly,
|
|
1960
1545
|
type: "text",
|
|
1961
|
-
"onUpdate:modelValue":
|
|
1546
|
+
"onUpdate:modelValue": D[0] || (D[0] = (J) => g("update:host-header", J))
|
|
1962
1547
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
1963
|
-
|
|
1548
|
+
n(te, {
|
|
1964
1549
|
class: "certificate-select margin-bottom-6",
|
|
1965
1550
|
clearable: "",
|
|
1966
1551
|
"data-testid": "upstreams-form-client-certificate",
|
|
1967
1552
|
"enable-filtering": "",
|
|
1968
1553
|
"filter-function": () => !0,
|
|
1969
|
-
items:
|
|
1970
|
-
label: e(
|
|
1554
|
+
items: j.value,
|
|
1555
|
+
label: e(l)("upstreams.form.fields.client_certificate.label"),
|
|
1971
1556
|
"label-attributes": {
|
|
1972
|
-
info: e(
|
|
1557
|
+
info: e(l)("upstreams.form.fields.client_certificate.tooltip"),
|
|
1973
1558
|
tooltipAttributes: { maxWidth: "400" }
|
|
1974
1559
|
},
|
|
1975
|
-
loading: e(
|
|
1560
|
+
loading: e(f),
|
|
1976
1561
|
"model-value": a.clientCertificate,
|
|
1977
|
-
placeholder: e(
|
|
1562
|
+
placeholder: e(l)("upstreams.form.fields.client_certificate.placeholder"),
|
|
1978
1563
|
readonly: a.readonly,
|
|
1979
1564
|
width: "100%",
|
|
1980
|
-
onQueryChange: e(
|
|
1981
|
-
"onUpdate:modelValue":
|
|
1565
|
+
onQueryChange: e(k),
|
|
1566
|
+
"onUpdate:modelValue": D[1] || (D[1] = (J) => g("update:client-certificate", J))
|
|
1982
1567
|
}, null, 8, ["items", "label", "label-attributes", "loading", "model-value", "placeholder", "readonly", "onQueryChange"]),
|
|
1983
|
-
|
|
1568
|
+
n(Y, {
|
|
1984
1569
|
autocomplete: "off",
|
|
1985
1570
|
"data-testid": "upstreams-form-tags",
|
|
1986
|
-
help: e(
|
|
1987
|
-
label: e(
|
|
1571
|
+
help: e(l)("upstreams.form.fields.tags.help"),
|
|
1572
|
+
label: e(l)("upstreams.form.fields.tags.label"),
|
|
1988
1573
|
"label-attributes": {
|
|
1989
|
-
info: e(
|
|
1574
|
+
info: e(l)("upstreams.form.fields.tags.tooltip"),
|
|
1990
1575
|
tooltipAttributes: { maxWidth: "400" }
|
|
1991
1576
|
},
|
|
1992
1577
|
"model-value": a.tags,
|
|
1993
|
-
placeholder: e(
|
|
1578
|
+
placeholder: e(l)("upstreams.form.fields.tags.placeholder"),
|
|
1994
1579
|
readonly: a.readonly,
|
|
1995
1580
|
type: "text",
|
|
1996
|
-
"onUpdate:modelValue":
|
|
1581
|
+
"onUpdate:modelValue": D[2] || (D[2] = (J) => g("update:tags", J))
|
|
1997
1582
|
}, null, 8, ["help", "label", "label-attributes", "model-value", "placeholder", "readonly"])
|
|
1998
1583
|
]))
|
|
1999
1584
|
]),
|
|
@@ -2001,10 +1586,10 @@ const pe = {
|
|
|
2001
1586
|
}, 8, ["description", "title"]);
|
|
2002
1587
|
};
|
|
2003
1588
|
}
|
|
2004
|
-
}),
|
|
1589
|
+
}), Nt = /* @__PURE__ */ re(Et, [["__scopeId", "data-v-a892b419"]]), xe = {
|
|
2005
1590
|
upstreamObject: "https://developer.konghq.com/gateway/entities/upstream/",
|
|
2006
1591
|
loadBalancing: "https://developer.konghq.com/gateway/traffic-control/load-balancing-reference/"
|
|
2007
|
-
},
|
|
1592
|
+
}, Rt = { class: "fields-group-title" }, Bt = { class: "fields-group-text" }, Dt = { class: "fields-group-title" }, Lt = { class: "fields-group-text" }, jt = /* @__PURE__ */ ee({
|
|
2008
1593
|
__name: "UpstreamsFormLoadBalancing",
|
|
2009
1594
|
props: {
|
|
2010
1595
|
stickySessionsAvailable: {
|
|
@@ -2075,334 +1660,334 @@ const pe = {
|
|
|
2075
1660
|
}
|
|
2076
1661
|
},
|
|
2077
1662
|
emits: ["update:algorithm", "update:sticky-sessions-cookie", "update:sticky-sessions-cookie-path", "update:slots", "update:hash-on", "update:hash-fallback", "update:hash-on-header", "update:hash-on-cookie", "update:hash-on-cookie-path", "update:hash-on-query-argument", "update:hash-on-uri-capture", "update:hash-fallback-header", "update:hash-fallback-query-argument", "update:hash-fallback-uri-capture"],
|
|
2078
|
-
setup(a, { emit:
|
|
2079
|
-
const { i18nT:
|
|
1663
|
+
setup(a, { emit: K }) {
|
|
1664
|
+
const { i18nT: s, i18n: { t: l } } = ie.useI18n(), { inRange: i } = Te(), g = a, y = K, V = A([
|
|
2080
1665
|
{
|
|
2081
|
-
label:
|
|
1666
|
+
label: l("upstreams.form.algorithms.round_robin_label"),
|
|
2082
1667
|
value: "round-robin",
|
|
2083
1668
|
selected: !1
|
|
2084
1669
|
},
|
|
2085
1670
|
{
|
|
2086
|
-
label:
|
|
1671
|
+
label: l("upstreams.form.algorithms.least_connections_label"),
|
|
2087
1672
|
value: "least-connections",
|
|
2088
1673
|
selected: !1
|
|
2089
1674
|
},
|
|
2090
1675
|
{
|
|
2091
|
-
label:
|
|
1676
|
+
label: l("upstreams.form.algorithms.consistent_hashing_label"),
|
|
2092
1677
|
value: "consistent-hashing",
|
|
2093
1678
|
selected: !1
|
|
2094
1679
|
},
|
|
2095
1680
|
{
|
|
2096
|
-
label:
|
|
1681
|
+
label: l("upstreams.form.algorithms.latency_label"),
|
|
2097
1682
|
value: "latency",
|
|
2098
1683
|
selected: !1
|
|
2099
1684
|
},
|
|
2100
|
-
...
|
|
2101
|
-
label:
|
|
1685
|
+
...g.stickySessionsAvailable ? [{
|
|
1686
|
+
label: l("upstreams.form.algorithms.sticky_sessions_label"),
|
|
2102
1687
|
value: "sticky-sessions",
|
|
2103
1688
|
selected: !1
|
|
2104
1689
|
}] : []
|
|
2105
|
-
]),
|
|
1690
|
+
]), w = A([
|
|
2106
1691
|
{
|
|
2107
|
-
label:
|
|
1692
|
+
label: l("upstreams.form.hash_labels.none"),
|
|
2108
1693
|
value: "none",
|
|
2109
1694
|
selected: !1
|
|
2110
1695
|
},
|
|
2111
1696
|
{
|
|
2112
|
-
label:
|
|
1697
|
+
label: l("upstreams.form.hash_labels.consumer"),
|
|
2113
1698
|
value: "consumer",
|
|
2114
1699
|
selected: !1
|
|
2115
1700
|
},
|
|
2116
1701
|
{
|
|
2117
|
-
label:
|
|
1702
|
+
label: l("upstreams.form.hash_labels.ip"),
|
|
2118
1703
|
value: "ip",
|
|
2119
1704
|
selected: !1
|
|
2120
1705
|
},
|
|
2121
1706
|
{
|
|
2122
|
-
label:
|
|
1707
|
+
label: l("upstreams.form.hash_labels.header"),
|
|
2123
1708
|
value: "header",
|
|
2124
1709
|
selected: !1
|
|
2125
1710
|
},
|
|
2126
1711
|
{
|
|
2127
|
-
label:
|
|
1712
|
+
label: l("upstreams.form.hash_labels.cookie"),
|
|
2128
1713
|
value: "cookie",
|
|
2129
1714
|
selected: !1
|
|
2130
1715
|
},
|
|
2131
1716
|
{
|
|
2132
|
-
label:
|
|
1717
|
+
label: l("upstreams.form.hash_labels.path"),
|
|
2133
1718
|
value: "path",
|
|
2134
1719
|
selected: !1
|
|
2135
1720
|
},
|
|
2136
1721
|
{
|
|
2137
|
-
label:
|
|
1722
|
+
label: l("upstreams.form.hash_labels.query_argument"),
|
|
2138
1723
|
value: "query_arg",
|
|
2139
1724
|
selected: !1
|
|
2140
1725
|
},
|
|
2141
1726
|
{
|
|
2142
|
-
label:
|
|
1727
|
+
label: l("upstreams.form.hash_labels.uri_capture"),
|
|
2143
1728
|
value: "uri_capture",
|
|
2144
1729
|
selected: !1
|
|
2145
1730
|
}
|
|
2146
1731
|
]);
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
}),
|
|
2150
|
-
|
|
2151
|
-
}),
|
|
2152
|
-
|
|
1732
|
+
oe(() => g.hashOn, (k, f) => {
|
|
1733
|
+
f === "header" && k !== f && y("update:hash-on-header", ""), f === "cookie" && k !== f && (y("update:hash-on-cookie", ""), y("update:hash-on-cookie-path", "/")), f === "query_arg" && k !== f && y("update:hash-on-query-argument", ""), f === "uri_capture" && k !== f && y("update:hash-on-uri-capture", ""), (k === "cookie" || k === "none") && (y("update:hash-fallback", "none"), y("update:hash-fallback-header", ""), y("update:hash-fallback-query-argument", ""), y("update:hash-fallback-uri-capture", ""));
|
|
1734
|
+
}), oe(() => g.hashFallback, (k, f) => {
|
|
1735
|
+
f === "header" && k !== f && y("update:hash-fallback-header", ""), f === "cookie" && k !== f && (y("update:hash-on-cookie", ""), y("update:hash-on-cookie-path", "/")), f === "query_arg" && k !== f && y("update:hash-fallback-query-argument", ""), f === "uri_capture" && k !== f && y("update:hash-fallback-uri-capture", "");
|
|
1736
|
+
}), oe(() => g.algorithm, (k) => {
|
|
1737
|
+
k === "sticky-sessions" && (y("update:slots", "10000"), y("update:hash-on", "none"), y("update:hash-fallback", "none"), y("update:hash-on-header", ""), y("update:hash-on-cookie", ""), y("update:hash-on-cookie-path", "/"), y("update:hash-on-query-argument", ""), y("update:hash-on-uri-capture", ""), y("update:hash-fallback-header", ""), y("update:hash-fallback-query-argument", ""), y("update:hash-fallback-uri-capture", ""));
|
|
2153
1738
|
}, { immediate: !0 });
|
|
2154
|
-
const
|
|
2155
|
-
return (
|
|
2156
|
-
const t =
|
|
2157
|
-
return
|
|
1739
|
+
const u = S(() => g.hashOn === "cookie" || g.hashOn === "none"), c = S(() => g.slots ? i(g.slots, Pe, Ae) ? "" : l("upstreams.form.errors.in_range") : "");
|
|
1740
|
+
return (k, f) => {
|
|
1741
|
+
const t = T("KExternalLink"), $ = T("KSelect"), q = T("KInput"), p = T("KCard");
|
|
1742
|
+
return H(), O(e(ke), {
|
|
2158
1743
|
class: "kong-ui-entities-upstreams-load-balancing",
|
|
2159
|
-
title: e(
|
|
1744
|
+
title: e(l)("upstreams.form.load_balancing.title")
|
|
2160
1745
|
}, {
|
|
2161
|
-
description:
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
1746
|
+
description: o(() => [
|
|
1747
|
+
b("p", null, [
|
|
1748
|
+
E(m(e(l)("upstreams.form.load_balancing.help")) + " ", 1),
|
|
1749
|
+
n(t, {
|
|
2165
1750
|
"hide-icon": "",
|
|
2166
|
-
href: e(
|
|
1751
|
+
href: e(xe).upstreamObject
|
|
2167
1752
|
}, {
|
|
2168
|
-
default:
|
|
2169
|
-
|
|
1753
|
+
default: o(() => [
|
|
1754
|
+
E(m(e(l)("upstreams.form.buttons.view_documentation")), 1)
|
|
2170
1755
|
]),
|
|
2171
1756
|
_: 1
|
|
2172
1757
|
}, 8, ["href"])
|
|
2173
1758
|
])
|
|
2174
1759
|
]),
|
|
2175
|
-
default:
|
|
2176
|
-
|
|
1760
|
+
default: o(() => [
|
|
1761
|
+
n($, {
|
|
2177
1762
|
class: "algorithm-select",
|
|
2178
|
-
items:
|
|
2179
|
-
label: e(
|
|
1763
|
+
items: V.value,
|
|
1764
|
+
label: e(l)("upstreams.form.fields.algorithm.label"),
|
|
2180
1765
|
"model-value": a.algorithm,
|
|
2181
1766
|
readonly: a.readonly,
|
|
2182
1767
|
width: "100%",
|
|
2183
|
-
"onUpdate:modelValue":
|
|
1768
|
+
"onUpdate:modelValue": f[0] || (f[0] = (_) => y("update:algorithm", _))
|
|
2184
1769
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2185
|
-
a.algorithm === "sticky-sessions" ? (
|
|
2186
|
-
|
|
1770
|
+
a.algorithm === "sticky-sessions" ? (H(), X(be, { key: 0 }, [
|
|
1771
|
+
n(q, {
|
|
2187
1772
|
autocomplete: "off",
|
|
2188
1773
|
"data-testid": "upstreams-form-sticky-sessions-cookie",
|
|
2189
|
-
label: e(
|
|
1774
|
+
label: e(l)("upstreams.form.fields.sticky_sessions_cookie.label"),
|
|
2190
1775
|
"label-attributes": {
|
|
2191
|
-
info: e(
|
|
1776
|
+
info: e(l)("upstreams.form.fields.sticky_sessions_cookie.tooltip"),
|
|
2192
1777
|
tooltipAttributes: { maxWidth: "400" }
|
|
2193
1778
|
},
|
|
2194
1779
|
"model-value": a.stickySessionsCookie,
|
|
2195
1780
|
readonly: a.readonly,
|
|
2196
1781
|
required: "",
|
|
2197
1782
|
type: "text",
|
|
2198
|
-
"onUpdate:modelValue":
|
|
1783
|
+
"onUpdate:modelValue": f[1] || (f[1] = (_) => y("update:sticky-sessions-cookie", _))
|
|
2199
1784
|
}, null, 8, ["label", "label-attributes", "model-value", "readonly"]),
|
|
2200
|
-
|
|
1785
|
+
n(q, {
|
|
2201
1786
|
autocomplete: "off",
|
|
2202
1787
|
"data-testid": "upstreams-form-sticky-sessions-cookie-path",
|
|
2203
|
-
label: e(
|
|
1788
|
+
label: e(l)("upstreams.form.fields.sticky_sessions_cookie_path.label"),
|
|
2204
1789
|
"label-attributes": {
|
|
2205
|
-
info: e(
|
|
1790
|
+
info: e(l)("upstreams.form.fields.sticky_sessions_cookie_path.tooltip"),
|
|
2206
1791
|
tooltipAttributes: { maxWidth: "400" }
|
|
2207
1792
|
},
|
|
2208
1793
|
"model-value": a.stickySessionsCookiePath,
|
|
2209
1794
|
readonly: a.readonly,
|
|
2210
1795
|
required: "",
|
|
2211
1796
|
type: "text",
|
|
2212
|
-
"onUpdate:modelValue":
|
|
1797
|
+
"onUpdate:modelValue": f[2] || (f[2] = (_) => y("update:sticky-sessions-cookie-path", _))
|
|
2213
1798
|
}, null, 8, ["label", "label-attributes", "model-value", "readonly"])
|
|
2214
|
-
], 64)) :
|
|
2215
|
-
a.algorithm !== "sticky-sessions" ? (
|
|
1799
|
+
], 64)) : P("", !0),
|
|
1800
|
+
a.algorithm !== "sticky-sessions" ? (H(), O(q, {
|
|
2216
1801
|
key: 1,
|
|
2217
1802
|
autocomplete: "off",
|
|
2218
1803
|
"data-testid": "upstreams-form-slots",
|
|
2219
1804
|
error: !!c.value,
|
|
2220
1805
|
"error-message": c.value,
|
|
2221
|
-
help: e(
|
|
2222
|
-
label: e(
|
|
2223
|
-
max: e(
|
|
2224
|
-
min: e(
|
|
1806
|
+
help: e(l)("upstreams.form.fields.slots.help"),
|
|
1807
|
+
label: e(l)("upstreams.form.fields.slots.label"),
|
|
1808
|
+
max: e(Ae),
|
|
1809
|
+
min: e(Pe),
|
|
2225
1810
|
"model-value": a.slots,
|
|
2226
1811
|
readonly: a.readonly,
|
|
2227
1812
|
type: "number",
|
|
2228
|
-
"onUpdate:modelValue":
|
|
2229
|
-
}, null, 8, ["error", "error-message", "help", "label", "max", "min", "model-value", "readonly"])) :
|
|
2230
|
-
a.algorithm !== "sticky-sessions" ? (
|
|
2231
|
-
default:
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
1813
|
+
"onUpdate:modelValue": f[3] || (f[3] = (_) => y("update:slots", _))
|
|
1814
|
+
}, null, 8, ["error", "error-message", "help", "label", "max", "min", "model-value", "readonly"])) : P("", !0),
|
|
1815
|
+
a.algorithm !== "sticky-sessions" ? (H(), O(p, { key: 2 }, {
|
|
1816
|
+
default: o(() => [
|
|
1817
|
+
b("h5", Rt, m(e(l)("upstreams.form.fields.hash_on.label")), 1),
|
|
1818
|
+
b("p", Bt, m(e(l)("upstreams.form.fields.hash_on.help")), 1),
|
|
1819
|
+
n($, {
|
|
2235
1820
|
class: "hash-on-select",
|
|
2236
|
-
items:
|
|
2237
|
-
label: e(
|
|
1821
|
+
items: w.value,
|
|
1822
|
+
label: e(l)("upstreams.form.fields.hash_on.label"),
|
|
2238
1823
|
"model-value": a.hashOn,
|
|
2239
1824
|
readonly: a.readonly,
|
|
2240
1825
|
width: "100%",
|
|
2241
|
-
"onUpdate:modelValue":
|
|
1826
|
+
"onUpdate:modelValue": f[4] || (f[4] = (_) => y("update:hash-on", _))
|
|
2242
1827
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2243
|
-
a.hashOn === "header" ? (
|
|
1828
|
+
a.hashOn === "header" ? (H(), O(q, {
|
|
2244
1829
|
key: 0,
|
|
2245
1830
|
autocomplete: "off",
|
|
2246
1831
|
class: "margin-top-6",
|
|
2247
1832
|
"data-testid": "upstreams-form-hash-on-header",
|
|
2248
|
-
label: e(
|
|
1833
|
+
label: e(l)("upstreams.form.fields.header.label"),
|
|
2249
1834
|
"model-value": a.hashOnHeader,
|
|
2250
1835
|
readonly: a.readonly,
|
|
2251
1836
|
required: "",
|
|
2252
1837
|
type: "text",
|
|
2253
|
-
"onUpdate:modelValue":
|
|
2254
|
-
}, null, 8, ["label", "model-value", "readonly"])) :
|
|
2255
|
-
a.hashOn === "cookie" ? (
|
|
2256
|
-
|
|
1838
|
+
"onUpdate:modelValue": f[5] || (f[5] = (_) => y("update:hash-on-header", _))
|
|
1839
|
+
}, null, 8, ["label", "model-value", "readonly"])) : P("", !0),
|
|
1840
|
+
a.hashOn === "cookie" ? (H(), X(be, { key: 1 }, [
|
|
1841
|
+
n(q, {
|
|
2257
1842
|
autocomplete: "off",
|
|
2258
1843
|
class: "margin-top-6",
|
|
2259
1844
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
2260
|
-
label: e(
|
|
1845
|
+
label: e(l)("upstreams.form.fields.cookie.label"),
|
|
2261
1846
|
"model-value": a.hashOnCookie,
|
|
2262
1847
|
readonly: a.readonly,
|
|
2263
1848
|
required: "",
|
|
2264
1849
|
type: "text",
|
|
2265
|
-
"onUpdate:modelValue":
|
|
1850
|
+
"onUpdate:modelValue": f[6] || (f[6] = (_) => y("update:hash-on-cookie", _))
|
|
2266
1851
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2267
|
-
|
|
1852
|
+
n(q, {
|
|
2268
1853
|
autocomplete: "off",
|
|
2269
1854
|
class: "margin-top-6",
|
|
2270
1855
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
2271
|
-
label: e(
|
|
1856
|
+
label: e(l)("upstreams.form.fields.cookie_path.label"),
|
|
2272
1857
|
"model-value": a.hashOnCookiePath,
|
|
2273
1858
|
readonly: a.readonly,
|
|
2274
1859
|
required: "",
|
|
2275
1860
|
type: "text",
|
|
2276
|
-
"onUpdate:modelValue":
|
|
1861
|
+
"onUpdate:modelValue": f[7] || (f[7] = (_) => y("update:hash-on-cookie-path", _))
|
|
2277
1862
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
2278
|
-
], 64)) :
|
|
2279
|
-
a.hashOn === "query_arg" ? (
|
|
1863
|
+
], 64)) : P("", !0),
|
|
1864
|
+
a.hashOn === "query_arg" ? (H(), O(q, {
|
|
2280
1865
|
key: 2,
|
|
2281
1866
|
autocomplete: "off",
|
|
2282
1867
|
class: "margin-top-6",
|
|
2283
1868
|
"data-testid": "upstreams-form-query-argument",
|
|
2284
|
-
label: e(
|
|
1869
|
+
label: e(l)("upstreams.form.fields.query_argument.label"),
|
|
2285
1870
|
"model-value": a.hashOnQueryArgument,
|
|
2286
1871
|
readonly: a.readonly,
|
|
2287
1872
|
required: "",
|
|
2288
1873
|
type: "text",
|
|
2289
|
-
"onUpdate:modelValue":
|
|
2290
|
-
}, null, 8, ["label", "model-value", "readonly"])) :
|
|
2291
|
-
a.hashOn === "uri_capture" ? (
|
|
1874
|
+
"onUpdate:modelValue": f[8] || (f[8] = (_) => y("update:hash-on-query-argument", _))
|
|
1875
|
+
}, null, 8, ["label", "model-value", "readonly"])) : P("", !0),
|
|
1876
|
+
a.hashOn === "uri_capture" ? (H(), O(q, {
|
|
2292
1877
|
key: 3,
|
|
2293
1878
|
autocomplete: "off",
|
|
2294
1879
|
class: "margin-top-6",
|
|
2295
1880
|
"data-testid": "upstreams-form-uri-capture",
|
|
2296
|
-
label: e(
|
|
1881
|
+
label: e(l)("upstreams.form.fields.uri_capture.label"),
|
|
2297
1882
|
"model-value": a.hashOnUriCapture,
|
|
2298
1883
|
readonly: a.readonly,
|
|
2299
1884
|
required: "",
|
|
2300
1885
|
type: "text",
|
|
2301
|
-
"onUpdate:modelValue":
|
|
2302
|
-
}, null, 8, ["label", "model-value", "readonly"])) :
|
|
1886
|
+
"onUpdate:modelValue": f[9] || (f[9] = (_) => y("update:hash-on-uri-capture", _))
|
|
1887
|
+
}, null, 8, ["label", "model-value", "readonly"])) : P("", !0)
|
|
2303
1888
|
]),
|
|
2304
1889
|
_: 1
|
|
2305
|
-
})) :
|
|
2306
|
-
a.algorithm !== "sticky-sessions" ? (
|
|
2307
|
-
default:
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
1890
|
+
})) : P("", !0),
|
|
1891
|
+
a.algorithm !== "sticky-sessions" ? (H(), O(p, { key: 3 }, {
|
|
1892
|
+
default: o(() => [
|
|
1893
|
+
b("h5", Dt, m(e(l)("upstreams.form.fields.hash_fallback.label")), 1),
|
|
1894
|
+
b("p", Lt, m(e(l)("upstreams.form.fields.hash_fallback.help")), 1),
|
|
1895
|
+
n($, {
|
|
2311
1896
|
class: "hash-fallback-select",
|
|
2312
|
-
disabled:
|
|
2313
|
-
items:
|
|
2314
|
-
label: e(
|
|
1897
|
+
disabled: u.value,
|
|
1898
|
+
items: w.value,
|
|
1899
|
+
label: e(l)("upstreams.form.fields.hash_fallback.label"),
|
|
2315
1900
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } },
|
|
2316
1901
|
"model-value": a.hashFallback,
|
|
2317
1902
|
readonly: a.readonly,
|
|
2318
1903
|
width: "100%",
|
|
2319
|
-
"onUpdate:modelValue":
|
|
1904
|
+
"onUpdate:modelValue": f[10] || (f[10] = (_) => y("update:hash-fallback", _))
|
|
2320
1905
|
}, {
|
|
2321
|
-
"label-tooltip":
|
|
2322
|
-
|
|
1906
|
+
"label-tooltip": o(() => [
|
|
1907
|
+
n(e(s), {
|
|
2323
1908
|
keypath: "upstreams.form.fields.hash_fallback.tooltip",
|
|
2324
1909
|
scope: "global"
|
|
2325
1910
|
}, {
|
|
2326
|
-
hash_on:
|
|
2327
|
-
|
|
1911
|
+
hash_on: o(() => [
|
|
1912
|
+
b("code", null, m(e(l)("upstreams.form.fields.hash_fallback.hash_on")), 1)
|
|
2328
1913
|
]),
|
|
2329
|
-
cookie:
|
|
2330
|
-
|
|
1914
|
+
cookie: o(() => [
|
|
1915
|
+
b("code", null, m(e(l)("upstreams.form.fields.hash_fallback.cookie")), 1)
|
|
2331
1916
|
]),
|
|
2332
1917
|
_: 1
|
|
2333
1918
|
})
|
|
2334
1919
|
]),
|
|
2335
1920
|
_: 1
|
|
2336
1921
|
}, 8, ["disabled", "items", "label", "model-value", "readonly"]),
|
|
2337
|
-
a.hashFallback === "header" ? (
|
|
1922
|
+
a.hashFallback === "header" ? (H(), O(q, {
|
|
2338
1923
|
key: 0,
|
|
2339
1924
|
autocomplete: "off",
|
|
2340
1925
|
class: "margin-top-6",
|
|
2341
1926
|
"data-testid": "upstreams-form-hash-fallback-header",
|
|
2342
|
-
label: e(
|
|
1927
|
+
label: e(l)("upstreams.form.fields.header.label"),
|
|
2343
1928
|
"model-value": a.hashFallbackHeader,
|
|
2344
1929
|
readonly: a.readonly,
|
|
2345
1930
|
required: "",
|
|
2346
1931
|
type: "text",
|
|
2347
|
-
"onUpdate:modelValue":
|
|
2348
|
-
}, null, 8, ["label", "model-value", "readonly"])) :
|
|
2349
|
-
a.hashFallback === "cookie" ? (
|
|
2350
|
-
|
|
1932
|
+
"onUpdate:modelValue": f[11] || (f[11] = (_) => y("update:hash-fallback-header", _))
|
|
1933
|
+
}, null, 8, ["label", "model-value", "readonly"])) : P("", !0),
|
|
1934
|
+
a.hashFallback === "cookie" ? (H(), X(be, { key: 1 }, [
|
|
1935
|
+
n(q, {
|
|
2351
1936
|
autocomplete: "off",
|
|
2352
1937
|
class: "margin-top-6",
|
|
2353
1938
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
2354
|
-
label: e(
|
|
1939
|
+
label: e(l)("upstreams.form.fields.cookie.label"),
|
|
2355
1940
|
"model-value": a.hashOnCookie,
|
|
2356
1941
|
readonly: a.readonly,
|
|
2357
1942
|
required: "",
|
|
2358
1943
|
type: "text",
|
|
2359
|
-
"onUpdate:modelValue":
|
|
1944
|
+
"onUpdate:modelValue": f[12] || (f[12] = (_) => y("update:hash-on-cookie", _))
|
|
2360
1945
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2361
|
-
|
|
1946
|
+
n(q, {
|
|
2362
1947
|
autocomplete: "off",
|
|
2363
1948
|
class: "margin-top-6",
|
|
2364
1949
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
2365
|
-
label: e(
|
|
1950
|
+
label: e(l)("upstreams.form.fields.cookie_path.label"),
|
|
2366
1951
|
"model-value": a.hashOnCookiePath,
|
|
2367
1952
|
readonly: a.readonly,
|
|
2368
1953
|
required: "",
|
|
2369
1954
|
type: "text",
|
|
2370
|
-
"onUpdate:modelValue":
|
|
1955
|
+
"onUpdate:modelValue": f[13] || (f[13] = (_) => y("update:hash-on-cookie-path", _))
|
|
2371
1956
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
2372
|
-
], 64)) :
|
|
2373
|
-
a.hashFallback === "query_arg" ? (
|
|
1957
|
+
], 64)) : P("", !0),
|
|
1958
|
+
a.hashFallback === "query_arg" ? (H(), O(q, {
|
|
2374
1959
|
key: 2,
|
|
2375
1960
|
autocomplete: "off",
|
|
2376
1961
|
class: "margin-top-6",
|
|
2377
1962
|
"data-testid": "upstreams-form-hash-fallback-query-argument",
|
|
2378
|
-
label: e(
|
|
1963
|
+
label: e(l)("upstreams.form.fields.query_argument.label"),
|
|
2379
1964
|
"model-value": a.hashFallbackQueryArgument,
|
|
2380
1965
|
readonly: a.readonly,
|
|
2381
1966
|
required: "",
|
|
2382
1967
|
type: "text",
|
|
2383
|
-
"onUpdate:modelValue":
|
|
2384
|
-
}, null, 8, ["label", "model-value", "readonly"])) :
|
|
2385
|
-
a.hashFallback === "uri_capture" ? (
|
|
1968
|
+
"onUpdate:modelValue": f[14] || (f[14] = (_) => y("update:hash-fallback-query-argument", _))
|
|
1969
|
+
}, null, 8, ["label", "model-value", "readonly"])) : P("", !0),
|
|
1970
|
+
a.hashFallback === "uri_capture" ? (H(), O(q, {
|
|
2386
1971
|
key: 3,
|
|
2387
1972
|
autocomplete: "off",
|
|
2388
1973
|
class: "margin-top-6",
|
|
2389
1974
|
"data-testid": "upstreams-form-hash-fallback-uri-capture",
|
|
2390
|
-
label: e(
|
|
1975
|
+
label: e(l)("upstreams.form.fields.uri_capture.label"),
|
|
2391
1976
|
"model-value": a.hashFallbackUriCapture,
|
|
2392
1977
|
readonly: a.readonly,
|
|
2393
1978
|
required: "",
|
|
2394
1979
|
type: "text",
|
|
2395
|
-
"onUpdate:modelValue":
|
|
2396
|
-
}, null, 8, ["label", "model-value", "readonly"])) :
|
|
1980
|
+
"onUpdate:modelValue": f[15] || (f[15] = (_) => y("update:hash-fallback-uri-capture", _))
|
|
1981
|
+
}, null, 8, ["label", "model-value", "readonly"])) : P("", !0)
|
|
2397
1982
|
]),
|
|
2398
1983
|
_: 1
|
|
2399
|
-
})) :
|
|
1984
|
+
})) : P("", !0)
|
|
2400
1985
|
]),
|
|
2401
1986
|
_: 1
|
|
2402
1987
|
}, 8, ["title"]);
|
|
2403
1988
|
};
|
|
2404
1989
|
}
|
|
2405
|
-
}),
|
|
1990
|
+
}), Qt = /* @__PURE__ */ re(jt, [["__scopeId", "data-v-c6820fd3"]]), Wt = { class: "fields-group-title" }, Jt = { class: "fields-group-text" }, Gt = { class: "fields-group-title" }, zt = { class: "fields-group-text" }, Xt = /* @__PURE__ */ ee({
|
|
2406
1991
|
__name: "UpstreamsFormHealthChecks",
|
|
2407
1992
|
props: {
|
|
2408
1993
|
activeHealthSwitch: {
|
|
@@ -2424,74 +2009,74 @@ const pe = {
|
|
|
2424
2009
|
}
|
|
2425
2010
|
},
|
|
2426
2011
|
emits: ["update:active-health-switch", "update:passive-health-switch", "update:healthchecks-threshold"],
|
|
2427
|
-
setup(a, { emit:
|
|
2428
|
-
const { i18n: { t:
|
|
2429
|
-
return (
|
|
2430
|
-
const y =
|
|
2431
|
-
return
|
|
2012
|
+
setup(a, { emit: K }) {
|
|
2013
|
+
const { i18n: { t: s } } = ie.useI18n(), l = K;
|
|
2014
|
+
return (i, g) => {
|
|
2015
|
+
const y = T("KExternalLink"), V = T("KInputSwitch"), w = T("KCard"), u = T("KInput");
|
|
2016
|
+
return H(), O(e(ke), {
|
|
2432
2017
|
class: "kong-ui-entities-upstreams-healthchecks",
|
|
2433
|
-
title: e(
|
|
2018
|
+
title: e(s)("upstreams.form.health_check.title")
|
|
2434
2019
|
}, {
|
|
2435
|
-
description:
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2020
|
+
description: o(() => [
|
|
2021
|
+
b("p", null, [
|
|
2022
|
+
E(m(e(s)("upstreams.form.health_check.help")) + " ", 1),
|
|
2023
|
+
n(y, {
|
|
2439
2024
|
"hide-icon": "",
|
|
2440
|
-
href: e(
|
|
2025
|
+
href: e(xe).loadBalancing
|
|
2441
2026
|
}, {
|
|
2442
|
-
default:
|
|
2443
|
-
|
|
2027
|
+
default: o(() => [
|
|
2028
|
+
E(m(e(s)("upstreams.form.buttons.view_documentation")), 1)
|
|
2444
2029
|
]),
|
|
2445
2030
|
_: 1
|
|
2446
2031
|
}, 8, ["href"])
|
|
2447
2032
|
])
|
|
2448
2033
|
]),
|
|
2449
|
-
default:
|
|
2450
|
-
|
|
2451
|
-
default:
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2034
|
+
default: o(() => [
|
|
2035
|
+
n(w, null, {
|
|
2036
|
+
default: o(() => [
|
|
2037
|
+
b("h5", Wt, m(e(s)("upstreams.form.fields.active_health_checks.label")), 1),
|
|
2038
|
+
b("p", Jt, m(e(s)("upstreams.form.fields.active_health_checks.help")), 1),
|
|
2039
|
+
n(V, {
|
|
2455
2040
|
class: "active-health-switch",
|
|
2456
2041
|
"data-testid": "active-health-switch",
|
|
2457
2042
|
disabled: a.readonly,
|
|
2458
2043
|
"model-value": a.activeHealthSwitch,
|
|
2459
|
-
onChange:
|
|
2044
|
+
onChange: g[0] || (g[0] = (c) => l("update:active-health-switch", c))
|
|
2460
2045
|
}, null, 8, ["disabled", "model-value"])
|
|
2461
2046
|
]),
|
|
2462
2047
|
_: 1
|
|
2463
2048
|
}),
|
|
2464
|
-
|
|
2465
|
-
default:
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2049
|
+
n(w, null, {
|
|
2050
|
+
default: o(() => [
|
|
2051
|
+
b("h5", Gt, m(e(s)("upstreams.form.fields.passive_health_checks.label")), 1),
|
|
2052
|
+
b("p", zt, m(e(s)("upstreams.form.fields.passive_health_checks.help")), 1),
|
|
2053
|
+
n(V, {
|
|
2469
2054
|
class: "passive-health-switch",
|
|
2470
2055
|
"data-testid": "passive-health-switch",
|
|
2471
2056
|
disabled: a.readonly,
|
|
2472
2057
|
"model-value": a.passiveHealthSwitch,
|
|
2473
|
-
onChange:
|
|
2058
|
+
onChange: g[1] || (g[1] = (c) => l("update:passive-health-switch", c))
|
|
2474
2059
|
}, null, 8, ["disabled", "model-value"])
|
|
2475
2060
|
]),
|
|
2476
2061
|
_: 1
|
|
2477
2062
|
}),
|
|
2478
|
-
u
|
|
2063
|
+
n(u, {
|
|
2479
2064
|
autocomplete: "off",
|
|
2480
2065
|
"data-testid": "upstreams-form-healthchecks-threshold",
|
|
2481
|
-
label: e(
|
|
2482
|
-
max: e(
|
|
2483
|
-
min: e(
|
|
2066
|
+
label: e(s)("upstreams.form.fields.healthchecks_threshold.label"),
|
|
2067
|
+
max: e(vt),
|
|
2068
|
+
min: e(bt),
|
|
2484
2069
|
"model-value": a.healthchecksThreshold,
|
|
2485
2070
|
readonly: a.readonly,
|
|
2486
2071
|
type: "number",
|
|
2487
|
-
"onUpdate:modelValue":
|
|
2072
|
+
"onUpdate:modelValue": g[2] || (g[2] = (c) => l("update:healthchecks-threshold", c))
|
|
2488
2073
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
2489
2074
|
]),
|
|
2490
2075
|
_: 1
|
|
2491
2076
|
}, 8, ["title"]);
|
|
2492
2077
|
};
|
|
2493
2078
|
}
|
|
2494
|
-
}),
|
|
2079
|
+
}), Yt = /* @__PURE__ */ re(Xt, [["__scopeId", "data-v-398cef39"]]), Zt = "#d60027", ea = { class: "fields-group-title" }, ta = { class: "fields-group-text" }, aa = { class: "fields-group-title" }, la = { class: "fields-group-text" }, sa = /* @__PURE__ */ ee({
|
|
2495
2080
|
__name: "UpstreamsFormActiveHealthCheck",
|
|
2496
2081
|
props: {
|
|
2497
2082
|
config: {
|
|
@@ -2565,186 +2150,186 @@ const pe = {
|
|
|
2565
2150
|
}
|
|
2566
2151
|
},
|
|
2567
2152
|
emits: ["update:type", "update:http-path", "update:timeout", "update:concurrency", "update:https-sni", "update:verify-ssl", "update:headers", "update:healthy-interval", "update:healthy-successes", "update:healthy-http-statuses", "update:unhealthy-interval", "update:unhealthy-http-failures", "update:unhealthy-tcp-failures", "update:unhealthy-http-statuses", "update:unhealthy-timeouts"],
|
|
2568
|
-
setup(a, { emit:
|
|
2569
|
-
const { i18n: { t:
|
|
2153
|
+
setup(a, { emit: K }) {
|
|
2154
|
+
const { i18n: { t: s } } = ie.useI18n(), { objectsAreEqual: l } = Te(), i = a, g = K, y = A([
|
|
2570
2155
|
{
|
|
2571
|
-
label:
|
|
2156
|
+
label: s("upstreams.form.healthcheck_type_labels.http"),
|
|
2572
2157
|
value: "http",
|
|
2573
2158
|
selected: !1
|
|
2574
2159
|
},
|
|
2575
2160
|
{
|
|
2576
|
-
label:
|
|
2161
|
+
label: s("upstreams.form.healthcheck_type_labels.https"),
|
|
2577
2162
|
value: "https",
|
|
2578
2163
|
selected: !1
|
|
2579
2164
|
},
|
|
2580
2165
|
{
|
|
2581
|
-
label:
|
|
2166
|
+
label: s("upstreams.form.healthcheck_type_labels.tcp"),
|
|
2582
2167
|
value: "tcp",
|
|
2583
2168
|
selected: !1
|
|
2584
2169
|
},
|
|
2585
2170
|
{
|
|
2586
|
-
label:
|
|
2171
|
+
label: s("upstreams.form.healthcheck_type_labels.grsp"),
|
|
2587
2172
|
value: "grpc",
|
|
2588
2173
|
selected: !1
|
|
2589
2174
|
},
|
|
2590
2175
|
{
|
|
2591
|
-
label:
|
|
2176
|
+
label: s("upstreams.form.healthcheck_type_labels.grsps"),
|
|
2592
2177
|
value: "grpcs",
|
|
2593
2178
|
selected: !1
|
|
2594
2179
|
}
|
|
2595
|
-
]),
|
|
2596
|
-
trackNewItems:
|
|
2597
|
-
} =
|
|
2180
|
+
]), V = S(() => i.type === "https" || i.type === "grpcs"), w = S(() => i.type === "tcp"), {
|
|
2181
|
+
trackNewItems: u
|
|
2182
|
+
} = ve({ replaceId: !0 }), {
|
|
2598
2183
|
trackNewItems: c
|
|
2599
|
-
} =
|
|
2600
|
-
|
|
2601
|
-
p === "tcp" &&
|
|
2184
|
+
} = ve({ replaceId: !0 });
|
|
2185
|
+
oe(() => i.type, (q, p) => {
|
|
2186
|
+
p === "tcp" && q !== p && g("update:unhealthy-tcp-failures", "5"), (p === "https" || p === "grpcs") && q !== p && (g("update:https-sni", ""), g("update:verify-ssl", !1)), p !== "tcp" && q === "tcp" && (g("update:http-path", "/"), g("update:healthy-http-statuses", Ue), g("update:unhealthy-http-statuses", qe));
|
|
2602
2187
|
});
|
|
2603
|
-
const
|
|
2604
|
-
|
|
2605
|
-
|
|
2188
|
+
const k = A([{ key: "", values: "" }]);
|
|
2189
|
+
oe(() => i.headers, (q) => {
|
|
2190
|
+
l(k.value, q) || (k.value = [...q]);
|
|
2606
2191
|
}, {
|
|
2607
2192
|
immediate: !0,
|
|
2608
2193
|
deep: !0
|
|
2609
2194
|
});
|
|
2610
|
-
const
|
|
2611
|
-
|
|
2195
|
+
const f = () => {
|
|
2196
|
+
g("update:headers", k.value);
|
|
2612
2197
|
}, t = () => {
|
|
2613
|
-
|
|
2614
|
-
},
|
|
2615
|
-
|
|
2198
|
+
k.value.push({ key: "", values: "" }), f();
|
|
2199
|
+
}, $ = (q) => {
|
|
2200
|
+
q === 0 && k.value.length === 1 ? k.value[0] = { key: "", values: "" } : k.value.splice(q, 1), f();
|
|
2616
2201
|
};
|
|
2617
|
-
return (
|
|
2618
|
-
const
|
|
2619
|
-
return
|
|
2202
|
+
return (q, p) => {
|
|
2203
|
+
const _ = T("KExternalLink"), j = T("KSelect"), M = T("KInput"), U = T("KCheckbox"), x = T("KLabel"), L = T("KButton"), Q = T("KMultiselect"), z = T("KCard");
|
|
2204
|
+
return H(), O(e(ke), {
|
|
2620
2205
|
class: "kong-ui-entities-upstreams-active-healthcheck",
|
|
2621
|
-
title: e(
|
|
2206
|
+
title: e(s)("upstreams.form.active_health_check.title")
|
|
2622
2207
|
}, {
|
|
2623
|
-
description:
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2208
|
+
description: o(() => [
|
|
2209
|
+
b("p", null, [
|
|
2210
|
+
E(m(e(s)("upstreams.form.active_health_check.help")) + " ", 1),
|
|
2211
|
+
n(_, {
|
|
2627
2212
|
"hide-icon": "",
|
|
2628
|
-
href: e(
|
|
2213
|
+
href: e(xe).upstreamObject
|
|
2629
2214
|
}, {
|
|
2630
|
-
default:
|
|
2631
|
-
|
|
2215
|
+
default: o(() => [
|
|
2216
|
+
E(m(e(s)("upstreams.form.buttons.view_documentation")), 1)
|
|
2632
2217
|
]),
|
|
2633
2218
|
_: 1
|
|
2634
2219
|
}, 8, ["href"])
|
|
2635
2220
|
])
|
|
2636
2221
|
]),
|
|
2637
|
-
default:
|
|
2638
|
-
|
|
2222
|
+
default: o(() => [
|
|
2223
|
+
n(j, {
|
|
2639
2224
|
class: "active-healthcheck-type-select",
|
|
2640
2225
|
items: y.value,
|
|
2641
|
-
label: e(
|
|
2226
|
+
label: e(s)("upstreams.form.fields.active_healthcheck_type.label"),
|
|
2642
2227
|
"model-value": a.type,
|
|
2643
2228
|
readonly: a.readonly,
|
|
2644
2229
|
width: "100%",
|
|
2645
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
2230
|
+
"onUpdate:modelValue": p[0] || (p[0] = (v) => g("update:type", v))
|
|
2646
2231
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2647
|
-
|
|
2232
|
+
w.value ? P("", !0) : (H(), O(M, {
|
|
2648
2233
|
key: 0,
|
|
2649
2234
|
autocomplete: "off",
|
|
2650
2235
|
"data-testid": "active-healthcheck-http-path",
|
|
2651
|
-
label: e(
|
|
2236
|
+
label: e(s)("upstreams.form.fields.http_path.label"),
|
|
2652
2237
|
"model-value": a.httpPath,
|
|
2653
2238
|
readonly: a.readonly,
|
|
2654
2239
|
type: "text",
|
|
2655
|
-
"onUpdate:modelValue": p[1] || (p[1] = (
|
|
2240
|
+
"onUpdate:modelValue": p[1] || (p[1] = (v) => g("update:http-path", v))
|
|
2656
2241
|
}, null, 8, ["label", "model-value", "readonly"])),
|
|
2657
|
-
|
|
2242
|
+
n(M, {
|
|
2658
2243
|
autocomplete: "off",
|
|
2659
2244
|
"data-testid": "active-healthcheck-timeout",
|
|
2660
|
-
label: e(
|
|
2661
|
-
max: e(
|
|
2662
|
-
min: e(
|
|
2245
|
+
label: e(s)("upstreams.form.fields.timeout.label"),
|
|
2246
|
+
max: e(_t),
|
|
2247
|
+
min: e(kt),
|
|
2663
2248
|
"model-value": a.timeout,
|
|
2664
2249
|
readonly: a.readonly,
|
|
2665
2250
|
type: "number",
|
|
2666
|
-
"onUpdate:modelValue": p[2] || (p[2] = (
|
|
2251
|
+
"onUpdate:modelValue": p[2] || (p[2] = (v) => g("update:timeout", v))
|
|
2667
2252
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2668
|
-
|
|
2253
|
+
n(M, {
|
|
2669
2254
|
autocomplete: "off",
|
|
2670
2255
|
"data-testid": "active-healthcheck-concurrency",
|
|
2671
|
-
label: e(
|
|
2672
|
-
max: e(
|
|
2673
|
-
min: e(
|
|
2256
|
+
label: e(s)("upstreams.form.fields.concurrency.label"),
|
|
2257
|
+
max: e(St),
|
|
2258
|
+
min: e(Ct),
|
|
2674
2259
|
"model-value": a.concurrency,
|
|
2675
2260
|
readonly: a.readonly,
|
|
2676
2261
|
type: "number",
|
|
2677
|
-
"onUpdate:modelValue": p[3] || (p[3] = (
|
|
2262
|
+
"onUpdate:modelValue": p[3] || (p[3] = (v) => g("update:concurrency", v))
|
|
2678
2263
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2679
|
-
|
|
2680
|
-
|
|
2264
|
+
V.value ? (H(), X(be, { key: 1 }, [
|
|
2265
|
+
n(M, {
|
|
2681
2266
|
autocomplete: "off",
|
|
2682
2267
|
class: "margin-bottom-6",
|
|
2683
2268
|
"data-testid": "active-healthcheck-https-sni",
|
|
2684
|
-
label: e(
|
|
2269
|
+
label: e(s)("upstreams.form.fields.https_sni.label"),
|
|
2685
2270
|
"model-value": a.httpsSni,
|
|
2686
2271
|
readonly: a.readonly,
|
|
2687
2272
|
type: "text",
|
|
2688
|
-
"onUpdate:modelValue": p[4] || (p[4] = (
|
|
2273
|
+
"onUpdate:modelValue": p[4] || (p[4] = (v) => g("update:https-sni", v))
|
|
2689
2274
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
2690
|
-
|
|
2275
|
+
n(U, {
|
|
2691
2276
|
"data-testid": "active-healthcheck-verify-ssl",
|
|
2692
2277
|
disabled: a.readonly,
|
|
2693
|
-
label: e(
|
|
2278
|
+
label: e(s)("upstreams.form.fields.verify_ssl.label"),
|
|
2694
2279
|
"model-value": a.verifySsl,
|
|
2695
|
-
"onUpdate:modelValue": p[5] || (p[5] = (
|
|
2280
|
+
"onUpdate:modelValue": p[5] || (p[5] = (v) => g("update:verify-ssl", v))
|
|
2696
2281
|
}, null, 8, ["disabled", "label", "model-value"])
|
|
2697
|
-
], 64)) :
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
info: e(
|
|
2282
|
+
], 64)) : P("", !0),
|
|
2283
|
+
b("div", null, [
|
|
2284
|
+
n(x, {
|
|
2285
|
+
info: e(s)("upstreams.form.fields.headers.tooltip_active"),
|
|
2701
2286
|
"tooltip-attributes": { maxWidth: "250px" }
|
|
2702
2287
|
}, {
|
|
2703
|
-
default:
|
|
2704
|
-
|
|
2288
|
+
default: o(() => [
|
|
2289
|
+
E(m(e(s)("upstreams.form.fields.headers.label")), 1)
|
|
2705
2290
|
]),
|
|
2706
2291
|
_: 1
|
|
2707
2292
|
}, 8, ["info"]),
|
|
2708
|
-
|
|
2709
|
-
(
|
|
2710
|
-
key: `${
|
|
2711
|
-
class:
|
|
2293
|
+
b("div", null, [
|
|
2294
|
+
(H(!0), X(be, null, lt(k.value, (v, B) => (H(), X("div", {
|
|
2295
|
+
key: `${v.header}_${B}`,
|
|
2296
|
+
class: st(["headers-row", { "margin-top-6": B > 0 }])
|
|
2712
2297
|
}, [
|
|
2713
|
-
|
|
2714
|
-
modelValue:
|
|
2715
|
-
"onUpdate:modelValue": (
|
|
2298
|
+
n(M, {
|
|
2299
|
+
modelValue: k.value[B].key,
|
|
2300
|
+
"onUpdate:modelValue": (F) => k.value[B].key = F,
|
|
2716
2301
|
autocomplete: "off",
|
|
2717
|
-
"data-testid": `active-healthcheck-headers-header-${
|
|
2302
|
+
"data-testid": `active-healthcheck-headers-header-${B + 1}`,
|
|
2718
2303
|
readonly: a.readonly,
|
|
2719
2304
|
type: "text",
|
|
2720
|
-
onBlur:
|
|
2305
|
+
onBlur: f
|
|
2721
2306
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
2722
|
-
|
|
2723
|
-
modelValue:
|
|
2724
|
-
"onUpdate:modelValue": (
|
|
2307
|
+
n(M, {
|
|
2308
|
+
modelValue: k.value[B].values,
|
|
2309
|
+
"onUpdate:modelValue": (F) => k.value[B].values = F,
|
|
2725
2310
|
autocomplete: "off",
|
|
2726
|
-
"data-testid": `active-healthcheck-headers-value-${
|
|
2311
|
+
"data-testid": `active-healthcheck-headers-value-${B + 1}`,
|
|
2727
2312
|
readonly: a.readonly,
|
|
2728
2313
|
type: "text",
|
|
2729
|
-
onBlur:
|
|
2314
|
+
onBlur: f
|
|
2730
2315
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
2731
|
-
|
|
2316
|
+
n(L, {
|
|
2732
2317
|
appearance: "tertiary",
|
|
2733
2318
|
class: "btn-remove",
|
|
2734
2319
|
"data-testid": "btn-remove-header",
|
|
2735
|
-
disabled:
|
|
2320
|
+
disabled: k.value.length === 1,
|
|
2736
2321
|
icon: "",
|
|
2737
|
-
onClick: (
|
|
2322
|
+
onClick: (F) => $(B)
|
|
2738
2323
|
}, {
|
|
2739
|
-
default:
|
|
2740
|
-
|
|
2324
|
+
default: o(() => [
|
|
2325
|
+
n(e(ct), {
|
|
2741
2326
|
class: "delete-item",
|
|
2742
|
-
color:
|
|
2327
|
+
color: k.value.length > 1 ? `var(--kui-color-text-danger, ${e(Zt)})` : void 0
|
|
2743
2328
|
}, null, 8, ["color"])
|
|
2744
2329
|
]),
|
|
2745
2330
|
_: 1
|
|
2746
2331
|
}, 8, ["disabled", "onClick"]),
|
|
2747
|
-
|
|
2332
|
+
k.value && B === k.value.length - 1 ? (H(), O(L, {
|
|
2748
2333
|
key: 0,
|
|
2749
2334
|
appearance: "tertiary",
|
|
2750
2335
|
class: "btn-add-header",
|
|
@@ -2752,127 +2337,127 @@ const pe = {
|
|
|
2752
2337
|
icon: "",
|
|
2753
2338
|
onClick: t
|
|
2754
2339
|
}, {
|
|
2755
|
-
default:
|
|
2756
|
-
|
|
2340
|
+
default: o(() => [
|
|
2341
|
+
n(e(Se))
|
|
2757
2342
|
]),
|
|
2758
2343
|
_: 1
|
|
2759
|
-
})) :
|
|
2344
|
+
})) : P("", !0)
|
|
2760
2345
|
], 2))), 128))
|
|
2761
2346
|
])
|
|
2762
2347
|
]),
|
|
2763
|
-
|
|
2764
|
-
default:
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2348
|
+
n(z, null, {
|
|
2349
|
+
default: o(() => [
|
|
2350
|
+
b("h5", ea, m(e(s)("upstreams.form.healthy.label")), 1),
|
|
2351
|
+
b("p", ta, m(e(s)("upstreams.form.healthy.help")), 1),
|
|
2352
|
+
n(M, {
|
|
2768
2353
|
autocomplete: "off",
|
|
2769
2354
|
class: "margin-bottom-6",
|
|
2770
2355
|
"data-testid": "active-healthcheck-healthy-interval",
|
|
2771
|
-
help: e(
|
|
2772
|
-
label: e(
|
|
2773
|
-
max: e(
|
|
2774
|
-
min: e(
|
|
2356
|
+
help: e(s)("upstreams.form.fields.interval.help"),
|
|
2357
|
+
label: e(s)("upstreams.form.fields.interval.label"),
|
|
2358
|
+
max: e(Be),
|
|
2359
|
+
min: e(Re),
|
|
2775
2360
|
"model-value": a.healthyInterval,
|
|
2776
2361
|
readonly: a.readonly,
|
|
2777
2362
|
type: "number",
|
|
2778
|
-
"onUpdate:modelValue": p[6] || (p[6] = (
|
|
2363
|
+
"onUpdate:modelValue": p[6] || (p[6] = (v) => g("update:healthy-interval", v))
|
|
2779
2364
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
2780
|
-
|
|
2365
|
+
n(M, {
|
|
2781
2366
|
autocomplete: "off",
|
|
2782
2367
|
"data-testid": "active-healthcheck-healthy-successes",
|
|
2783
|
-
label: e(
|
|
2784
|
-
max: e(
|
|
2785
|
-
min: e(
|
|
2368
|
+
label: e(s)("upstreams.form.fields.successes.label"),
|
|
2369
|
+
max: e(ce),
|
|
2370
|
+
min: e(ue),
|
|
2786
2371
|
"model-value": a.healthySuccesses,
|
|
2787
2372
|
readonly: a.readonly,
|
|
2788
2373
|
type: "number",
|
|
2789
|
-
"onUpdate:modelValue": p[7] || (p[7] = (
|
|
2374
|
+
"onUpdate:modelValue": p[7] || (p[7] = (v) => g("update:healthy-successes", v))
|
|
2790
2375
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2791
|
-
|
|
2376
|
+
w.value ? P("", !0) : (H(), O(Q, {
|
|
2792
2377
|
key: 0,
|
|
2793
2378
|
autocomplete: "off",
|
|
2794
2379
|
class: "margin-top-6 active-healthcheck-healthy-http-statuses",
|
|
2795
2380
|
"data-testid": "active-healthcheck-healthy-http-statuses",
|
|
2796
2381
|
"enable-item-creation": "",
|
|
2797
|
-
items: e(
|
|
2798
|
-
label: e(
|
|
2382
|
+
items: e(He),
|
|
2383
|
+
label: e(s)("upstreams.form.fields.http_statuses.label"),
|
|
2799
2384
|
"model-value": a.healthyHttpStatuses,
|
|
2800
2385
|
readonly: a.readonly,
|
|
2801
2386
|
width: "100%",
|
|
2802
|
-
onItemAdded: p[8] || (p[8] = (
|
|
2803
|
-
onItemRemoved: p[9] || (p[9] = (
|
|
2804
|
-
"onUpdate:modelValue": p[10] || (p[10] = (
|
|
2387
|
+
onItemAdded: p[8] || (p[8] = (v) => e(u)(v, !0)),
|
|
2388
|
+
onItemRemoved: p[9] || (p[9] = (v) => e(u)(v, !1)),
|
|
2389
|
+
"onUpdate:modelValue": p[10] || (p[10] = (v) => g("update:healthy-http-statuses", v))
|
|
2805
2390
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
2806
2391
|
]),
|
|
2807
2392
|
_: 1
|
|
2808
2393
|
}),
|
|
2809
|
-
|
|
2810
|
-
default:
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2394
|
+
n(z, null, {
|
|
2395
|
+
default: o(() => [
|
|
2396
|
+
b("h5", aa, m(e(s)("upstreams.form.unhealthy.label")), 1),
|
|
2397
|
+
b("p", la, m(e(s)("upstreams.form.unhealthy.help")), 1),
|
|
2398
|
+
n(M, {
|
|
2814
2399
|
autocomplete: "off",
|
|
2815
2400
|
class: "margin-bottom-6",
|
|
2816
2401
|
"data-testid": "active-healthcheck-unhealthy-interval",
|
|
2817
|
-
help: e(
|
|
2818
|
-
label: e(
|
|
2819
|
-
max: e(
|
|
2820
|
-
min: e(
|
|
2402
|
+
help: e(s)("upstreams.form.fields.interval.help"),
|
|
2403
|
+
label: e(s)("upstreams.form.fields.interval.label"),
|
|
2404
|
+
max: e(Be),
|
|
2405
|
+
min: e(Re),
|
|
2821
2406
|
"model-value": a.unhealthyInterval,
|
|
2822
2407
|
readonly: a.readonly,
|
|
2823
2408
|
type: "number",
|
|
2824
|
-
"onUpdate:modelValue": p[11] || (p[11] = (
|
|
2409
|
+
"onUpdate:modelValue": p[11] || (p[11] = (v) => g("update:unhealthy-interval", v))
|
|
2825
2410
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
2826
|
-
|
|
2411
|
+
n(M, {
|
|
2827
2412
|
autocomplete: "off",
|
|
2828
2413
|
class: "margin-bottom-6",
|
|
2829
2414
|
"data-testid": "active-healthcheck-unhealthy-tcp-failures",
|
|
2830
|
-
label: e(
|
|
2831
|
-
max: e(
|
|
2832
|
-
min: e(
|
|
2415
|
+
label: e(s)("upstreams.form.fields.tcp_failures.label"),
|
|
2416
|
+
max: e(ce),
|
|
2417
|
+
min: e(ue),
|
|
2833
2418
|
"model-value": a.unhealthyTcpFailures,
|
|
2834
2419
|
readonly: a.readonly,
|
|
2835
2420
|
type: "number",
|
|
2836
|
-
"onUpdate:modelValue": p[12] || (p[12] = (
|
|
2421
|
+
"onUpdate:modelValue": p[12] || (p[12] = (v) => g("update:unhealthy-tcp-failures", v))
|
|
2837
2422
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
2838
|
-
|
|
2423
|
+
w.value ? P("", !0) : (H(), O(M, {
|
|
2839
2424
|
key: 0,
|
|
2840
2425
|
autocomplete: "off",
|
|
2841
2426
|
class: "margin-bottom-6",
|
|
2842
2427
|
"data-testid": "active-healthcheck-unhealthy-http-failures",
|
|
2843
|
-
label: e(
|
|
2844
|
-
max: e(
|
|
2845
|
-
min: e(
|
|
2428
|
+
label: e(s)("upstreams.form.fields.http_failures.label"),
|
|
2429
|
+
max: e(ce),
|
|
2430
|
+
min: e(ue),
|
|
2846
2431
|
"model-value": a.unhealthyHttpFailures,
|
|
2847
2432
|
readonly: a.readonly,
|
|
2848
2433
|
type: "number",
|
|
2849
|
-
"onUpdate:modelValue": p[13] || (p[13] = (
|
|
2434
|
+
"onUpdate:modelValue": p[13] || (p[13] = (v) => g("update:unhealthy-http-failures", v))
|
|
2850
2435
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])),
|
|
2851
|
-
|
|
2436
|
+
w.value ? P("", !0) : (H(), O(Q, {
|
|
2852
2437
|
key: 1,
|
|
2853
2438
|
autocomplete: "off",
|
|
2854
2439
|
class: "margin-bottom-6 active-healthcheck-unhealthy-http-statuses",
|
|
2855
2440
|
"data-testid": "active-healthcheck-unhealthy-http-statuses",
|
|
2856
2441
|
"enable-item-creation": "",
|
|
2857
|
-
items: e(
|
|
2858
|
-
label: e(
|
|
2442
|
+
items: e(He),
|
|
2443
|
+
label: e(s)("upstreams.form.fields.http_statuses.label"),
|
|
2859
2444
|
"model-value": a.unhealthyHttpStatuses,
|
|
2860
2445
|
readonly: a.readonly,
|
|
2861
2446
|
width: "100%",
|
|
2862
|
-
onItemAdded: p[14] || (p[14] = (
|
|
2863
|
-
onItemRemoved: p[15] || (p[15] = (
|
|
2864
|
-
"onUpdate:modelValue": p[16] || (p[16] = (
|
|
2447
|
+
onItemAdded: p[14] || (p[14] = (v) => e(c)(v, !0)),
|
|
2448
|
+
onItemRemoved: p[15] || (p[15] = (v) => e(c)(v, !1)),
|
|
2449
|
+
"onUpdate:modelValue": p[16] || (p[16] = (v) => g("update:unhealthy-http-statuses", v))
|
|
2865
2450
|
}, null, 8, ["items", "label", "model-value", "readonly"])),
|
|
2866
|
-
|
|
2451
|
+
n(M, {
|
|
2867
2452
|
autocomplete: "off",
|
|
2868
2453
|
"data-testid": "active-healthcheck-unhealthy-timeouts",
|
|
2869
|
-
label: e(
|
|
2870
|
-
max: e(
|
|
2871
|
-
min: e(
|
|
2454
|
+
label: e(s)("upstreams.form.fields.timeouts.label"),
|
|
2455
|
+
max: e(at),
|
|
2456
|
+
min: e(tt),
|
|
2872
2457
|
"model-value": a.unhealthyTimeouts,
|
|
2873
2458
|
readonly: a.readonly,
|
|
2874
2459
|
type: "number",
|
|
2875
|
-
"onUpdate:modelValue": p[17] || (p[17] = (
|
|
2460
|
+
"onUpdate:modelValue": p[17] || (p[17] = (v) => g("update:unhealthy-timeouts", v))
|
|
2876
2461
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
2877
2462
|
]),
|
|
2878
2463
|
_: 1
|
|
@@ -2882,7 +2467,7 @@ const pe = {
|
|
|
2882
2467
|
}, 8, ["title"]);
|
|
2883
2468
|
};
|
|
2884
2469
|
}
|
|
2885
|
-
}),
|
|
2470
|
+
}), oa = /* @__PURE__ */ re(sa, [["__scopeId", "data-v-05f959a8"]]), ia = { class: "fields-group-title" }, ra = { class: "fields-group-text" }, na = { class: "fields-group-title" }, ha = { class: "fields-group-text" }, ua = /* @__PURE__ */ ee({
|
|
2886
2471
|
__name: "UpstreamsFormPassiveHealthCheck",
|
|
2887
2472
|
props: {
|
|
2888
2473
|
type: {
|
|
@@ -2920,155 +2505,155 @@ const pe = {
|
|
|
2920
2505
|
}
|
|
2921
2506
|
},
|
|
2922
2507
|
emits: ["update:type", "update:healthy-successes", "update:healthy-http-statuses", "update:unhealthy-timeouts", "update:unhealthy-http-failures", "update:unhealthy-http-statuses", "update:unhealthy-tcp-failures"],
|
|
2923
|
-
setup(a, { emit:
|
|
2924
|
-
const { i18n: { t:
|
|
2508
|
+
setup(a, { emit: K }) {
|
|
2509
|
+
const { i18n: { t: s } } = ie.useI18n(), l = a, i = K, g = A([
|
|
2925
2510
|
{
|
|
2926
|
-
label:
|
|
2511
|
+
label: s("upstreams.form.healthcheck_type_labels.http"),
|
|
2927
2512
|
value: "http",
|
|
2928
2513
|
selected: !1
|
|
2929
2514
|
},
|
|
2930
2515
|
{
|
|
2931
|
-
label:
|
|
2516
|
+
label: s("upstreams.form.healthcheck_type_labels.https"),
|
|
2932
2517
|
value: "https",
|
|
2933
2518
|
selected: !1
|
|
2934
2519
|
},
|
|
2935
2520
|
{
|
|
2936
|
-
label:
|
|
2521
|
+
label: s("upstreams.form.healthcheck_type_labels.tcp"),
|
|
2937
2522
|
value: "tcp",
|
|
2938
2523
|
selected: !1
|
|
2939
2524
|
},
|
|
2940
2525
|
{
|
|
2941
|
-
label:
|
|
2526
|
+
label: s("upstreams.form.healthcheck_type_labels.grsp"),
|
|
2942
2527
|
value: "grpc",
|
|
2943
2528
|
selected: !1
|
|
2944
2529
|
},
|
|
2945
2530
|
{
|
|
2946
|
-
label:
|
|
2531
|
+
label: s("upstreams.form.healthcheck_type_labels.grsps"),
|
|
2947
2532
|
value: "grpcs",
|
|
2948
2533
|
selected: !1
|
|
2949
2534
|
}
|
|
2950
|
-
]), y =
|
|
2951
|
-
trackNewItems:
|
|
2952
|
-
} =
|
|
2953
|
-
trackNewItems:
|
|
2954
|
-
} =
|
|
2955
|
-
return
|
|
2956
|
-
c === "tcp" &&
|
|
2957
|
-
}), (
|
|
2958
|
-
const
|
|
2959
|
-
return
|
|
2535
|
+
]), y = S(() => l.type === "tcp"), {
|
|
2536
|
+
trackNewItems: V
|
|
2537
|
+
} = ve({ replaceId: !0 }), {
|
|
2538
|
+
trackNewItems: w
|
|
2539
|
+
} = ve({ replaceId: !0 });
|
|
2540
|
+
return oe(() => l.type, (u, c) => {
|
|
2541
|
+
c === "tcp" && u !== c && i("update:unhealthy-tcp-failures", "5"), c !== "tcp" && u === "tcp" && (i("update:healthy-http-statuses", Ie), i("update:unhealthy-http-statuses", we));
|
|
2542
|
+
}), (u, c) => {
|
|
2543
|
+
const k = T("KExternalLink"), f = T("KSelect"), t = T("KInput"), $ = T("KMultiselect"), q = T("KCard");
|
|
2544
|
+
return H(), O(e(ke), {
|
|
2960
2545
|
class: "kong-ui-entities-upstreams-passive-healthcheck",
|
|
2961
|
-
title: e(
|
|
2546
|
+
title: e(s)("upstreams.form.passive_health_check.title")
|
|
2962
2547
|
}, {
|
|
2963
|
-
description:
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2548
|
+
description: o(() => [
|
|
2549
|
+
b("p", null, [
|
|
2550
|
+
E(m(e(s)("upstreams.form.passive_health_check.help")) + " ", 1),
|
|
2551
|
+
n(k, {
|
|
2967
2552
|
"hide-icon": "",
|
|
2968
|
-
href: e(
|
|
2553
|
+
href: e(xe).upstreamObject
|
|
2969
2554
|
}, {
|
|
2970
|
-
default:
|
|
2971
|
-
|
|
2555
|
+
default: o(() => [
|
|
2556
|
+
E(m(e(s)("upstreams.form.buttons.view_documentation")), 1)
|
|
2972
2557
|
]),
|
|
2973
2558
|
_: 1
|
|
2974
2559
|
}, 8, ["href"])
|
|
2975
2560
|
])
|
|
2976
2561
|
]),
|
|
2977
|
-
default:
|
|
2978
|
-
|
|
2562
|
+
default: o(() => [
|
|
2563
|
+
n(f, {
|
|
2979
2564
|
class: "passive-healthcheck-type-select",
|
|
2980
|
-
items:
|
|
2981
|
-
label: e(
|
|
2565
|
+
items: g.value,
|
|
2566
|
+
label: e(s)("upstreams.form.fields.passive_health_check_type.label"),
|
|
2982
2567
|
"model-value": a.type,
|
|
2983
2568
|
readonly: a.readonly,
|
|
2984
2569
|
width: "100%",
|
|
2985
|
-
"onUpdate:modelValue": c[0] || (c[0] = (p) =>
|
|
2570
|
+
"onUpdate:modelValue": c[0] || (c[0] = (p) => i("update:type", p))
|
|
2986
2571
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
2987
|
-
|
|
2988
|
-
default:
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2572
|
+
n(q, null, {
|
|
2573
|
+
default: o(() => [
|
|
2574
|
+
b("h5", ia, m(e(s)("upstreams.form.passive_healthy.label")), 1),
|
|
2575
|
+
b("p", ra, m(e(s)("upstreams.form.passive_healthy.help")), 1),
|
|
2576
|
+
n(t, {
|
|
2992
2577
|
autocomplete: "off",
|
|
2993
2578
|
"data-testid": "passive-healthcheck-healthy-successes",
|
|
2994
|
-
label: e(
|
|
2995
|
-
max: e(
|
|
2996
|
-
min: e(
|
|
2579
|
+
label: e(s)("upstreams.form.fields.successes.label"),
|
|
2580
|
+
max: e(ce),
|
|
2581
|
+
min: e(ue),
|
|
2997
2582
|
"model-value": a.healthySuccesses,
|
|
2998
2583
|
readonly: a.readonly,
|
|
2999
2584
|
type: "number",
|
|
3000
|
-
"onUpdate:modelValue": c[1] || (c[1] = (p) =>
|
|
2585
|
+
"onUpdate:modelValue": c[1] || (c[1] = (p) => i("update:healthy-successes", p))
|
|
3001
2586
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
3002
|
-
y.value ?
|
|
2587
|
+
y.value ? P("", !0) : (H(), O($, {
|
|
3003
2588
|
key: 0,
|
|
3004
2589
|
class: "margin-top-6 passive-healthcheck-healthy-http-statuses",
|
|
3005
2590
|
"enable-item-creation": "",
|
|
3006
|
-
items: e(
|
|
3007
|
-
label: e(
|
|
2591
|
+
items: e(He),
|
|
2592
|
+
label: e(s)("upstreams.form.fields.http_statuses.label"),
|
|
3008
2593
|
"model-value": a.healthyHttpStatuses,
|
|
3009
2594
|
readonly: a.readonly,
|
|
3010
2595
|
width: "100%",
|
|
3011
|
-
onItemAdded: c[2] || (c[2] = (p) => e(
|
|
3012
|
-
onItemRemoved: c[3] || (c[3] = (p) => e(
|
|
3013
|
-
"onUpdate:modelValue": c[4] || (c[4] = (p) =>
|
|
2596
|
+
onItemAdded: c[2] || (c[2] = (p) => e(V)(p, !0)),
|
|
2597
|
+
onItemRemoved: c[3] || (c[3] = (p) => e(V)(p, !1)),
|
|
2598
|
+
"onUpdate:modelValue": c[4] || (c[4] = (p) => i("update:healthy-http-statuses", p))
|
|
3014
2599
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
3015
2600
|
]),
|
|
3016
2601
|
_: 1
|
|
3017
2602
|
}),
|
|
3018
|
-
|
|
3019
|
-
default:
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
2603
|
+
n(q, null, {
|
|
2604
|
+
default: o(() => [
|
|
2605
|
+
b("h5", na, m(e(s)("upstreams.form.passive_unhealthy.label")), 1),
|
|
2606
|
+
b("p", ha, m(e(s)("upstreams.form.passive_unhealthy.help")), 1),
|
|
2607
|
+
n(t, {
|
|
3023
2608
|
autocomplete: "off",
|
|
3024
2609
|
"data-testid": "passive-healthcheck-unhealthy-timeouts",
|
|
3025
|
-
label: e(
|
|
3026
|
-
max: e(
|
|
3027
|
-
min: e(
|
|
2610
|
+
label: e(s)("upstreams.form.fields.timeouts.label"),
|
|
2611
|
+
max: e(at),
|
|
2612
|
+
min: e(tt),
|
|
3028
2613
|
"model-value": a.unhealthyTimeouts,
|
|
3029
2614
|
readonly: a.readonly,
|
|
3030
2615
|
type: "number",
|
|
3031
|
-
"onUpdate:modelValue": c[5] || (c[5] = (p) =>
|
|
2616
|
+
"onUpdate:modelValue": c[5] || (c[5] = (p) => i("update:unhealthy-timeouts", p))
|
|
3032
2617
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
3033
|
-
|
|
2618
|
+
n(t, {
|
|
3034
2619
|
autocomplete: "off",
|
|
3035
2620
|
class: "margin-top-6",
|
|
3036
2621
|
"data-testid": "passive-healthcheck-unhealthy-tcp-failures",
|
|
3037
|
-
label: e(
|
|
3038
|
-
max: e(
|
|
3039
|
-
min: e(
|
|
2622
|
+
label: e(s)("upstreams.form.fields.tcp_failures.label"),
|
|
2623
|
+
max: e(ce),
|
|
2624
|
+
min: e(ue),
|
|
3040
2625
|
"model-value": a.unhealthyTcpFailures,
|
|
3041
2626
|
readonly: a.readonly,
|
|
3042
2627
|
type: "number",
|
|
3043
|
-
"onUpdate:modelValue": c[6] || (c[6] = (p) =>
|
|
2628
|
+
"onUpdate:modelValue": c[6] || (c[6] = (p) => i("update:unhealthy-tcp-failures", p))
|
|
3044
2629
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
3045
|
-
y.value ?
|
|
2630
|
+
y.value ? P("", !0) : (H(), O(t, {
|
|
3046
2631
|
key: 0,
|
|
3047
2632
|
autocomplete: "off",
|
|
3048
2633
|
class: "margin-top-6",
|
|
3049
2634
|
"data-testid": "passive-healthcheck-unhealthy-http-failures",
|
|
3050
|
-
label: e(
|
|
3051
|
-
max: e(
|
|
3052
|
-
min: e(
|
|
2635
|
+
label: e(s)("upstreams.form.fields.http_failures.label"),
|
|
2636
|
+
max: e(ce),
|
|
2637
|
+
min: e(ue),
|
|
3053
2638
|
"model-value": a.unhealthyHttpFailures,
|
|
3054
2639
|
readonly: a.readonly,
|
|
3055
2640
|
type: "number",
|
|
3056
|
-
"onUpdate:modelValue": c[7] || (c[7] = (p) =>
|
|
2641
|
+
"onUpdate:modelValue": c[7] || (c[7] = (p) => i("update:unhealthy-http-failures", p))
|
|
3057
2642
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])),
|
|
3058
|
-
y.value ?
|
|
2643
|
+
y.value ? P("", !0) : (H(), O($, {
|
|
3059
2644
|
key: 1,
|
|
3060
2645
|
autocomplete: "off",
|
|
3061
2646
|
class: "margin-top-6 passive-healthcheck-unhealthy-http-statuses",
|
|
3062
2647
|
"data-testid": "passive-healthcheck-unhealthy-http-statuses",
|
|
3063
2648
|
"enable-item-creation": "",
|
|
3064
|
-
items: e(
|
|
3065
|
-
label: e(
|
|
2649
|
+
items: e(He),
|
|
2650
|
+
label: e(s)("upstreams.form.fields.http_statuses.label"),
|
|
3066
2651
|
"model-value": a.unhealthyHttpStatuses,
|
|
3067
2652
|
readonly: a.readonly,
|
|
3068
2653
|
width: "100%",
|
|
3069
|
-
onItemAdded: c[8] || (c[8] = (p) => e(
|
|
3070
|
-
onItemRemoved: c[9] || (c[9] = (p) => e(
|
|
3071
|
-
"onUpdate:modelValue": c[10] || (c[10] = (p) =>
|
|
2654
|
+
onItemAdded: c[8] || (c[8] = (p) => e(w)(p, !0)),
|
|
2655
|
+
onItemRemoved: c[9] || (c[9] = (p) => e(w)(p, !1)),
|
|
2656
|
+
"onUpdate:modelValue": c[10] || (c[10] = (p) => i("update:unhealthy-http-statuses", p))
|
|
3072
2657
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
3073
2658
|
]),
|
|
3074
2659
|
_: 1
|
|
@@ -3078,14 +2663,14 @@ const pe = {
|
|
|
3078
2663
|
}, 8, ["title"]);
|
|
3079
2664
|
};
|
|
3080
2665
|
}
|
|
3081
|
-
}),
|
|
2666
|
+
}), ca = /* @__PURE__ */ re(ua, [["__scopeId", "data-v-4b45aa9e"]]), da = { class: "kong-ui-entities-upstreams-form" }, pa = /* @__PURE__ */ ee({
|
|
3082
2667
|
__name: "UpstreamsForm",
|
|
3083
2668
|
props: {
|
|
3084
2669
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
3085
2670
|
config: {
|
|
3086
2671
|
type: Object,
|
|
3087
2672
|
required: !0,
|
|
3088
|
-
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a
|
|
2673
|
+
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a?.app) || a?.app === "konnect" && !a?.controlPlaneId || a?.app === "kongManager" && typeof a?.workspace != "string" || !a?.cancelRoute)
|
|
3089
2674
|
},
|
|
3090
2675
|
/** If a valid upstreamId is provided, it will put the form in Edit mode instead of Create */
|
|
3091
2676
|
upstreamId: {
|
|
@@ -3095,41 +2680,35 @@ const pe = {
|
|
|
3095
2680
|
}
|
|
3096
2681
|
},
|
|
3097
2682
|
emits: ["update", "error", "loading"],
|
|
3098
|
-
setup(a, { emit:
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
fields: j(),
|
|
2683
|
+
setup(a, { emit: K }) {
|
|
2684
|
+
const s = a, l = K, { inRange: i, stringToNumberArray: g, upstreamsResponseToFields: y, getDefaultUpstreamFields: V, objectsAreEqual: w, cloneDeep: u } = Te(), { axiosInstance: c } = Fe(s.config?.axiosRequestConfig), { getMessageFromError: k } = Ye(), f = et(), t = Ce({
|
|
2685
|
+
fields: V(),
|
|
3102
2686
|
readonly: !1,
|
|
3103
2687
|
errorMessage: ""
|
|
3104
|
-
}),
|
|
3105
|
-
t.fields.activeHealthCheck.healthy.interval = d ? "5" : "0", t.fields.activeHealthCheck.healthy.successes = d ? "5" : "0", t.fields.activeHealthCheck.healthy.httpStatuses = d ?
|
|
3106
|
-
},
|
|
3107
|
-
t.fields.passiveHealthCheck.healthy.successes = d ? "80" : "0", t.fields.passiveHealthCheck.healthy.httpStatuses = d ?
|
|
3108
|
-
},
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
},
|
|
3117
|
-
s
|
|
3118
|
-
}, se = (d) => {
|
|
3119
|
-
s("error", d);
|
|
3120
|
-
}, ae = H(() => {
|
|
3121
|
-
const d = i.config.stickySessionsAvailable ? {
|
|
2688
|
+
}), $ = Ce(V()), q = S(() => !w(t.fields, $)), p = (d) => {
|
|
2689
|
+
t.fields.activeHealthCheck.healthy.interval = d ? "5" : "0", t.fields.activeHealthCheck.healthy.successes = d ? "5" : "0", t.fields.activeHealthCheck.healthy.httpStatuses = d ? Ue : [], t.fields.activeHealthCheck.unhealthy.httpStatuses = d ? qe : [], t.fields.activeHealthCheck.unhealthy.httpFailures = d ? "5" : "0", t.fields.activeHealthCheck.unhealthy.interval = d ? "5" : "0", t.fields.activeHealthCheck.unhealthy.tcpFailures = d ? "5" : "0", t.fields.activeHealthCheck.unhealthy.timeouts = d ? "5" : "0", t.fields.activeHealthCheck.timeout = d ? "1" : "0", t.fields.activeHealthCheck.concurrency = d ? "10" : "0", t.fields.activeHealthCheck.httpPath = d ? "/" : "", t.fields.activeHealthCheck.httpsSni = "", t.fields.activeHealthCheck.type = "http";
|
|
2690
|
+
}, _ = (d) => {
|
|
2691
|
+
t.fields.passiveHealthCheck.healthy.successes = d ? "80" : "0", t.fields.passiveHealthCheck.healthy.httpStatuses = d ? Ie : [], t.fields.passiveHealthCheck.unhealthy.timeouts = d ? "5" : "0", t.fields.passiveHealthCheck.unhealthy.tcpFailures = d ? "5" : "0", t.fields.passiveHealthCheck.unhealthy.httpFailures = d ? "5" : "0", t.fields.passiveHealthCheck.unhealthy.httpStatuses = d ? we : [], t.fields.passiveHealthCheck.type = "http";
|
|
2692
|
+
}, j = S(() => t.fields.algorithm !== "sticky-sessions" ? !0 : !!t.fields.stickySessionsCookie && !!t.fields.stickySessionsCookiePath), M = S(() => t.fields.slots ? i(t.fields.slots, Pe, Ae) : !0), U = S(() => t.fields.hashOn === "header" ? !!t.fields.hashOnHeader : !0), x = S(() => t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie" ? !!t.fields.hashOnCookie : !0), L = S(() => t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie" ? !!t.fields.hashOnCookiePath : !0), Q = S(() => t.fields.hashOn === "query_arg" ? !!t.fields.hashOnQueryArgument : !0), z = S(() => t.fields.hashOn === "uri_capture" ? !!t.fields.hashOnUriCapture : !0), v = S(() => t.fields.hashFallback === "header" ? !!t.fields.hashFallbackHeader : !0), B = S(() => t.fields.hashFallback === "query_arg" ? !!t.fields.hashFallbackQueryArgument : !0), F = S(() => t.fields.hashFallback === "uri_capture" ? !!t.fields.hashFallbackUriCapture : !0), D = S(() => !!t.fields.name && j.value && M.value && U.value && x.value && L.value && Q.value && z.value && v.value && B.value && F.value), W = S(() => s.upstreamId ? le.Edit : le.Create), te = S(() => de.form[s.config?.app]?.edit), Y = (d) => {
|
|
2693
|
+
Object.assign(t.fields, y(d)), Object.assign($, u(t.fields));
|
|
2694
|
+
}, J = () => {
|
|
2695
|
+
f.push(s.config?.cancelRoute || { name: "upstreams-list" });
|
|
2696
|
+
}, pe = (d) => {
|
|
2697
|
+
l("loading", d);
|
|
2698
|
+
}, fe = (d) => {
|
|
2699
|
+
l("error", d);
|
|
2700
|
+
}, he = S(() => {
|
|
2701
|
+
const d = s.config.stickySessionsAvailable ? {
|
|
3122
2702
|
sticky_sessions_cookie: null,
|
|
3123
2703
|
sticky_sessions_cookie_path: null
|
|
3124
2704
|
} : {};
|
|
3125
2705
|
return t.fields.algorithm === "sticky-sessions" && (d.sticky_sessions_cookie = t.fields.stickySessionsCookie || null, d.sticky_sessions_cookie_path = t.fields.stickySessionsCookiePath || null), d;
|
|
3126
|
-
}),
|
|
2706
|
+
}), I = S(() => {
|
|
3127
2707
|
const d = {};
|
|
3128
2708
|
return t.fields.hashOn === "header" && (d.hash_on_header = t.fields.hashOnHeader), (t.fields.hashOn === "cookie" || t.fields.hashFallback === "cookie") && (d.hash_on_cookie = t.fields.hashOnCookie, d.hash_on_cookie_path = t.fields.hashOnCookiePath), t.fields.hashOn === "query_arg" && (d.hash_on_query_arg = t.fields.hashOnQueryArgument), t.fields.hashOn === "uri_capture" && (d.hash_on_uri_capture = t.fields.hashOnUriCapture), t.fields.hashFallback === "header" && (d.hash_fallback_header = t.fields.hashFallbackHeader), t.fields.hashFallback === "query_arg" && (d.hash_fallback_query_arg = t.fields.hashFallbackQueryArgument), t.fields.hashFallback === "uri_capture" && (d.hash_fallback_uri_capture = t.fields.hashFallbackUriCapture), d;
|
|
3129
|
-
}),
|
|
3130
|
-
var o, r, J;
|
|
2709
|
+
}), G = S(() => {
|
|
3131
2710
|
if (!t.fields.activeHealthSwitch)
|
|
3132
|
-
return
|
|
2711
|
+
return s.config?.app === "kongManager" && W.value === le.Edit ? {
|
|
3133
2712
|
type: t.fields.activeHealthCheck.type,
|
|
3134
2713
|
headers: {},
|
|
3135
2714
|
healthy: {
|
|
@@ -3159,22 +2738,18 @@ const pe = {
|
|
|
3159
2738
|
};
|
|
3160
2739
|
if (t.fields.activeHealthCheck.type !== "tcp") {
|
|
3161
2740
|
d.http_path = t.fields.activeHealthCheck.httpPath || "/", d.unhealthy.http_failures = Number(t.fields.activeHealthCheck.unhealthy.httpFailures || "5");
|
|
3162
|
-
const
|
|
3163
|
-
d.unhealthy.http_statuses =
|
|
3164
|
-
const
|
|
3165
|
-
d.healthy.http_statuses =
|
|
2741
|
+
const h = t.fields.activeHealthCheck.unhealthy.httpStatuses?.length ? t.fields.activeHealthCheck.unhealthy.httpStatuses : qe;
|
|
2742
|
+
d.unhealthy.http_statuses = g(h);
|
|
2743
|
+
const r = t.fields.activeHealthCheck.healthy.httpStatuses?.length ? t.fields.activeHealthCheck.healthy.httpStatuses : Ue;
|
|
2744
|
+
d.healthy.http_statuses = g(r);
|
|
3166
2745
|
}
|
|
3167
|
-
return ["https", "grpcs"].includes(t.fields.activeHealthCheck.type) && (d.https_sni = t.fields.activeHealthCheck.httpsSni || null, d.https_verify_certificate = t.fields.activeHealthCheck.verifySsl), d.headers = t.fields.activeHealthCheck.headers.reduce((
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
} : Z;
|
|
3173
|
-
}, {}), d;
|
|
3174
|
-
}), L = H(() => {
|
|
3175
|
-
var o, r, J;
|
|
2746
|
+
return ["https", "grpcs"].includes(t.fields.activeHealthCheck.type) && (d.https_sni = t.fields.activeHealthCheck.httpsSni || null, d.https_verify_certificate = t.fields.activeHealthCheck.verifySsl), d.headers = t.fields.activeHealthCheck.headers.reduce((h, r) => r.key ? {
|
|
2747
|
+
...h,
|
|
2748
|
+
[r.key]: r.values.split(",")?.map((Z) => Z.trim())?.filter(Boolean)
|
|
2749
|
+
} : h, {}), d;
|
|
2750
|
+
}), C = S(() => {
|
|
3176
2751
|
if (!t.fields.passiveHealthSwitch)
|
|
3177
|
-
return
|
|
2752
|
+
return s.config?.app === "kongManager" && W.value === le.Edit ? {
|
|
3178
2753
|
type: t.fields.passiveHealthCheck.type,
|
|
3179
2754
|
healthy: { successes: 0 },
|
|
3180
2755
|
unhealthy: {
|
|
@@ -3195,13 +2770,13 @@ const pe = {
|
|
|
3195
2770
|
};
|
|
3196
2771
|
if (t.fields.passiveHealthCheck.type !== "tcp") {
|
|
3197
2772
|
d.unhealthy.http_failures = Number(t.fields.passiveHealthCheck.unhealthy.httpFailures || "5");
|
|
3198
|
-
const
|
|
3199
|
-
d.healthy.http_statuses =
|
|
3200
|
-
const
|
|
3201
|
-
d.unhealthy.http_statuses =
|
|
2773
|
+
const h = t.fields.passiveHealthCheck.healthy.httpStatuses?.length ? t.fields.passiveHealthCheck.healthy.httpStatuses : Ie;
|
|
2774
|
+
d.healthy.http_statuses = g(h);
|
|
2775
|
+
const r = t.fields.passiveHealthCheck.unhealthy.httpStatuses?.length ? t.fields.passiveHealthCheck.unhealthy.httpStatuses : we;
|
|
2776
|
+
d.unhealthy.http_statuses = g(r);
|
|
3202
2777
|
}
|
|
3203
2778
|
return d;
|
|
3204
|
-
}),
|
|
2779
|
+
}), N = S(() => {
|
|
3205
2780
|
const d = {
|
|
3206
2781
|
name: t.fields.name,
|
|
3207
2782
|
slots: Number(t.fields.slots),
|
|
@@ -3213,174 +2788,172 @@ const pe = {
|
|
|
3213
2788
|
},
|
|
3214
2789
|
host_header: t.fields.hostHeader || null,
|
|
3215
2790
|
client_certificate: t.fields.clientCertificate ? { id: t.fields.clientCertificate } : null
|
|
3216
|
-
},
|
|
2791
|
+
}, h = G.value, r = C.value, Z = {
|
|
3217
2792
|
...d,
|
|
3218
|
-
...
|
|
2793
|
+
...he.value,
|
|
3219
2794
|
healthchecks: {
|
|
3220
2795
|
...d.healthchecks,
|
|
3221
|
-
active:
|
|
2796
|
+
active: h || void 0,
|
|
3222
2797
|
passive: r || void 0
|
|
3223
2798
|
}
|
|
3224
2799
|
};
|
|
3225
|
-
return
|
|
3226
|
-
}),
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
}, O = async () => {
|
|
3231
|
-
var d;
|
|
2800
|
+
return Z.tags = t.fields.tags ? t.fields.tags.split(",").map((me) => String(me || "").trim()).filter((me) => me !== "") : [], Object.assign(Z, I.value), Z;
|
|
2801
|
+
}), R = (d) => {
|
|
2802
|
+
let h = `${s.config?.apiBaseUrl}${de.form[s.config?.app][d]}`;
|
|
2803
|
+
return s.config?.app === "konnect" && (h = h.replace(/{controlPlaneId}/gi, s.config?.controlPlaneId || "")), h.replace(/\/{workspace}/gi, s.config?.workspace ? `/${s.config.workspace}` : "").replace(/{id}/gi, s.upstreamId ?? "");
|
|
2804
|
+
}, ne = async () => {
|
|
3232
2805
|
try {
|
|
3233
2806
|
t.readonly = !0;
|
|
3234
|
-
let
|
|
3235
|
-
|
|
3236
|
-
} catch (
|
|
3237
|
-
t.errorMessage =
|
|
2807
|
+
let d;
|
|
2808
|
+
W.value === le.Create ? d = await c.post(R("create"), N.value) : W.value === le.Edit && (d = s.config?.app === "konnect" ? await c.put(R("edit"), N.value) : await c.patch(R("edit"), N.value)), l("update", d?.data);
|
|
2809
|
+
} catch (d) {
|
|
2810
|
+
t.errorMessage = k(d), l("error", d);
|
|
3238
2811
|
} finally {
|
|
3239
2812
|
t.readonly = !1;
|
|
3240
2813
|
}
|
|
3241
2814
|
};
|
|
3242
|
-
return (d,
|
|
3243
|
-
|
|
3244
|
-
"can-submit":
|
|
2815
|
+
return (d, h) => (H(), X("div", da, [
|
|
2816
|
+
n(e(Ze), {
|
|
2817
|
+
"can-submit": D.value && q.value,
|
|
3245
2818
|
config: a.config,
|
|
3246
2819
|
"edit-id": a.upstreamId,
|
|
3247
|
-
"entity-type": e(
|
|
2820
|
+
"entity-type": e(Ve).Upstream,
|
|
3248
2821
|
"error-message": t.errorMessage,
|
|
3249
|
-
"fetch-url":
|
|
3250
|
-
"form-fields":
|
|
2822
|
+
"fetch-url": te.value,
|
|
2823
|
+
"form-fields": N.value,
|
|
3251
2824
|
"is-readonly": t.readonly,
|
|
3252
|
-
onCancel:
|
|
3253
|
-
"onFetch:error":
|
|
3254
|
-
"onFetch:success":
|
|
3255
|
-
onLoading:
|
|
3256
|
-
onSubmit:
|
|
2825
|
+
onCancel: J,
|
|
2826
|
+
"onFetch:error": fe,
|
|
2827
|
+
"onFetch:success": Y,
|
|
2828
|
+
onLoading: pe,
|
|
2829
|
+
onSubmit: ne
|
|
3257
2830
|
}, {
|
|
3258
|
-
default:
|
|
3259
|
-
|
|
2831
|
+
default: o(() => [
|
|
2832
|
+
n(Nt, {
|
|
3260
2833
|
"client-certificate": t.fields.clientCertificate,
|
|
3261
|
-
"onUpdate:clientCertificate":
|
|
2834
|
+
"onUpdate:clientCertificate": h[0] || (h[0] = (r) => t.fields.clientCertificate = r),
|
|
3262
2835
|
"host-header": t.fields.hostHeader,
|
|
3263
|
-
"onUpdate:hostHeader":
|
|
2836
|
+
"onUpdate:hostHeader": h[1] || (h[1] = (r) => t.fields.hostHeader = r),
|
|
3264
2837
|
name: t.fields.name,
|
|
3265
|
-
"onUpdate:name":
|
|
2838
|
+
"onUpdate:name": h[2] || (h[2] = (r) => t.fields.name = r),
|
|
3266
2839
|
tags: t.fields.tags,
|
|
3267
|
-
"onUpdate:tags":
|
|
2840
|
+
"onUpdate:tags": h[3] || (h[3] = (r) => t.fields.tags = r),
|
|
3268
2841
|
config: a.config,
|
|
3269
2842
|
readonly: t.readonly
|
|
3270
2843
|
}, null, 8, ["client-certificate", "host-header", "name", "tags", "config", "readonly"]),
|
|
3271
|
-
|
|
2844
|
+
n(Qt, {
|
|
3272
2845
|
algorithm: t.fields.algorithm,
|
|
3273
|
-
"onUpdate:algorithm":
|
|
2846
|
+
"onUpdate:algorithm": h[4] || (h[4] = (r) => t.fields.algorithm = r),
|
|
3274
2847
|
"hash-fallback": t.fields.hashFallback,
|
|
3275
|
-
"onUpdate:hashFallback":
|
|
2848
|
+
"onUpdate:hashFallback": h[5] || (h[5] = (r) => t.fields.hashFallback = r),
|
|
3276
2849
|
"hash-fallback-header": t.fields.hashFallbackHeader,
|
|
3277
|
-
"onUpdate:hashFallbackHeader":
|
|
2850
|
+
"onUpdate:hashFallbackHeader": h[6] || (h[6] = (r) => t.fields.hashFallbackHeader = r),
|
|
3278
2851
|
"hash-fallback-query-argument": t.fields.hashFallbackQueryArgument,
|
|
3279
|
-
"onUpdate:hashFallbackQueryArgument":
|
|
2852
|
+
"onUpdate:hashFallbackQueryArgument": h[7] || (h[7] = (r) => t.fields.hashFallbackQueryArgument = r),
|
|
3280
2853
|
"hash-fallback-uri-capture": t.fields.hashFallbackUriCapture,
|
|
3281
|
-
"onUpdate:hashFallbackUriCapture":
|
|
2854
|
+
"onUpdate:hashFallbackUriCapture": h[8] || (h[8] = (r) => t.fields.hashFallbackUriCapture = r),
|
|
3282
2855
|
"hash-on": t.fields.hashOn,
|
|
3283
|
-
"onUpdate:hashOn":
|
|
2856
|
+
"onUpdate:hashOn": h[9] || (h[9] = (r) => t.fields.hashOn = r),
|
|
3284
2857
|
"hash-on-cookie": t.fields.hashOnCookie,
|
|
3285
|
-
"onUpdate:hashOnCookie":
|
|
2858
|
+
"onUpdate:hashOnCookie": h[10] || (h[10] = (r) => t.fields.hashOnCookie = r),
|
|
3286
2859
|
"hash-on-cookie-path": t.fields.hashOnCookiePath,
|
|
3287
|
-
"onUpdate:hashOnCookiePath":
|
|
2860
|
+
"onUpdate:hashOnCookiePath": h[11] || (h[11] = (r) => t.fields.hashOnCookiePath = r),
|
|
3288
2861
|
"hash-on-header": t.fields.hashOnHeader,
|
|
3289
|
-
"onUpdate:hashOnHeader":
|
|
2862
|
+
"onUpdate:hashOnHeader": h[12] || (h[12] = (r) => t.fields.hashOnHeader = r),
|
|
3290
2863
|
"hash-on-query-argument": t.fields.hashOnQueryArgument,
|
|
3291
|
-
"onUpdate:hashOnQueryArgument":
|
|
2864
|
+
"onUpdate:hashOnQueryArgument": h[13] || (h[13] = (r) => t.fields.hashOnQueryArgument = r),
|
|
3292
2865
|
"hash-on-uri-capture": t.fields.hashOnUriCapture,
|
|
3293
|
-
"onUpdate:hashOnUriCapture":
|
|
2866
|
+
"onUpdate:hashOnUriCapture": h[14] || (h[14] = (r) => t.fields.hashOnUriCapture = r),
|
|
3294
2867
|
slots: t.fields.slots,
|
|
3295
|
-
"onUpdate:slots":
|
|
2868
|
+
"onUpdate:slots": h[15] || (h[15] = (r) => t.fields.slots = r),
|
|
3296
2869
|
"sticky-sessions-cookie": t.fields.stickySessionsCookie,
|
|
3297
|
-
"onUpdate:stickySessionsCookie":
|
|
2870
|
+
"onUpdate:stickySessionsCookie": h[16] || (h[16] = (r) => t.fields.stickySessionsCookie = r),
|
|
3298
2871
|
"sticky-sessions-cookie-path": t.fields.stickySessionsCookiePath,
|
|
3299
|
-
"onUpdate:stickySessionsCookiePath":
|
|
2872
|
+
"onUpdate:stickySessionsCookiePath": h[17] || (h[17] = (r) => t.fields.stickySessionsCookiePath = r),
|
|
3300
2873
|
readonly: t.readonly,
|
|
3301
2874
|
"sticky-sessions-available": a.config.stickySessionsAvailable
|
|
3302
2875
|
}, null, 8, ["algorithm", "hash-fallback", "hash-fallback-header", "hash-fallback-query-argument", "hash-fallback-uri-capture", "hash-on", "hash-on-cookie", "hash-on-cookie-path", "hash-on-header", "hash-on-query-argument", "hash-on-uri-capture", "slots", "sticky-sessions-cookie", "sticky-sessions-cookie-path", "readonly", "sticky-sessions-available"]),
|
|
3303
|
-
|
|
2876
|
+
n(Yt, {
|
|
3304
2877
|
"active-health-switch": t.fields.activeHealthSwitch,
|
|
3305
2878
|
"onUpdate:activeHealthSwitch": [
|
|
3306
|
-
|
|
2879
|
+
h[18] || (h[18] = (r) => t.fields.activeHealthSwitch = r),
|
|
3307
2880
|
p
|
|
3308
2881
|
],
|
|
3309
2882
|
"healthchecks-threshold": t.fields.healthchecksThreshold,
|
|
3310
|
-
"onUpdate:healthchecksThreshold":
|
|
2883
|
+
"onUpdate:healthchecksThreshold": h[19] || (h[19] = (r) => t.fields.healthchecksThreshold = r),
|
|
3311
2884
|
"passive-health-switch": t.fields.passiveHealthSwitch,
|
|
3312
2885
|
"onUpdate:passiveHealthSwitch": [
|
|
3313
|
-
|
|
3314
|
-
|
|
2886
|
+
h[20] || (h[20] = (r) => t.fields.passiveHealthSwitch = r),
|
|
2887
|
+
_
|
|
3315
2888
|
],
|
|
3316
2889
|
readonly: t.readonly
|
|
3317
2890
|
}, null, 8, ["active-health-switch", "healthchecks-threshold", "passive-health-switch", "readonly"]),
|
|
3318
|
-
t.fields.activeHealthSwitch ? (
|
|
2891
|
+
t.fields.activeHealthSwitch ? (H(), O(oa, {
|
|
3319
2892
|
key: 0,
|
|
3320
2893
|
concurrency: t.fields.activeHealthCheck.concurrency,
|
|
3321
|
-
"onUpdate:concurrency":
|
|
2894
|
+
"onUpdate:concurrency": h[21] || (h[21] = (r) => t.fields.activeHealthCheck.concurrency = r),
|
|
3322
2895
|
headers: t.fields.activeHealthCheck.headers,
|
|
3323
|
-
"onUpdate:headers":
|
|
2896
|
+
"onUpdate:headers": h[22] || (h[22] = (r) => t.fields.activeHealthCheck.headers = r),
|
|
3324
2897
|
"healthy-http-statuses": t.fields.activeHealthCheck.healthy.httpStatuses,
|
|
3325
|
-
"onUpdate:healthyHttpStatuses":
|
|
2898
|
+
"onUpdate:healthyHttpStatuses": h[23] || (h[23] = (r) => t.fields.activeHealthCheck.healthy.httpStatuses = r),
|
|
3326
2899
|
"healthy-interval": t.fields.activeHealthCheck.healthy.interval,
|
|
3327
|
-
"onUpdate:healthyInterval":
|
|
2900
|
+
"onUpdate:healthyInterval": h[24] || (h[24] = (r) => t.fields.activeHealthCheck.healthy.interval = r),
|
|
3328
2901
|
"healthy-successes": t.fields.activeHealthCheck.healthy.successes,
|
|
3329
|
-
"onUpdate:healthySuccesses":
|
|
2902
|
+
"onUpdate:healthySuccesses": h[25] || (h[25] = (r) => t.fields.activeHealthCheck.healthy.successes = r),
|
|
3330
2903
|
"http-path": t.fields.activeHealthCheck.httpPath,
|
|
3331
|
-
"onUpdate:httpPath":
|
|
2904
|
+
"onUpdate:httpPath": h[26] || (h[26] = (r) => t.fields.activeHealthCheck.httpPath = r),
|
|
3332
2905
|
"https-sni": t.fields.activeHealthCheck.httpsSni,
|
|
3333
|
-
"onUpdate:httpsSni":
|
|
2906
|
+
"onUpdate:httpsSni": h[27] || (h[27] = (r) => t.fields.activeHealthCheck.httpsSni = r),
|
|
3334
2907
|
timeout: t.fields.activeHealthCheck.timeout,
|
|
3335
|
-
"onUpdate:timeout":
|
|
2908
|
+
"onUpdate:timeout": h[28] || (h[28] = (r) => t.fields.activeHealthCheck.timeout = r),
|
|
3336
2909
|
type: t.fields.activeHealthCheck.type,
|
|
3337
|
-
"onUpdate:type":
|
|
2910
|
+
"onUpdate:type": h[29] || (h[29] = (r) => t.fields.activeHealthCheck.type = r),
|
|
3338
2911
|
"unhealthy-http-failures": t.fields.activeHealthCheck.unhealthy.httpFailures,
|
|
3339
|
-
"onUpdate:unhealthyHttpFailures":
|
|
2912
|
+
"onUpdate:unhealthyHttpFailures": h[30] || (h[30] = (r) => t.fields.activeHealthCheck.unhealthy.httpFailures = r),
|
|
3340
2913
|
"unhealthy-http-statuses": t.fields.activeHealthCheck.unhealthy.httpStatuses,
|
|
3341
|
-
"onUpdate:unhealthyHttpStatuses":
|
|
2914
|
+
"onUpdate:unhealthyHttpStatuses": h[31] || (h[31] = (r) => t.fields.activeHealthCheck.unhealthy.httpStatuses = r),
|
|
3342
2915
|
"unhealthy-interval": t.fields.activeHealthCheck.unhealthy.interval,
|
|
3343
|
-
"onUpdate:unhealthyInterval":
|
|
2916
|
+
"onUpdate:unhealthyInterval": h[32] || (h[32] = (r) => t.fields.activeHealthCheck.unhealthy.interval = r),
|
|
3344
2917
|
"unhealthy-tcp-failures": t.fields.activeHealthCheck.unhealthy.tcpFailures,
|
|
3345
|
-
"onUpdate:unhealthyTcpFailures":
|
|
2918
|
+
"onUpdate:unhealthyTcpFailures": h[33] || (h[33] = (r) => t.fields.activeHealthCheck.unhealthy.tcpFailures = r),
|
|
3346
2919
|
"unhealthy-timeouts": t.fields.activeHealthCheck.unhealthy.timeouts,
|
|
3347
|
-
"onUpdate:unhealthyTimeouts":
|
|
2920
|
+
"onUpdate:unhealthyTimeouts": h[34] || (h[34] = (r) => t.fields.activeHealthCheck.unhealthy.timeouts = r),
|
|
3348
2921
|
"verify-ssl": t.fields.activeHealthCheck.verifySsl,
|
|
3349
|
-
"onUpdate:verifySsl":
|
|
2922
|
+
"onUpdate:verifySsl": h[35] || (h[35] = (r) => t.fields.activeHealthCheck.verifySsl = r),
|
|
3350
2923
|
config: a.config,
|
|
3351
2924
|
readonly: t.readonly
|
|
3352
|
-
}, null, 8, ["concurrency", "headers", "healthy-http-statuses", "healthy-interval", "healthy-successes", "http-path", "https-sni", "timeout", "type", "unhealthy-http-failures", "unhealthy-http-statuses", "unhealthy-interval", "unhealthy-tcp-failures", "unhealthy-timeouts", "verify-ssl", "config", "readonly"])) :
|
|
3353
|
-
t.fields.passiveHealthSwitch ? (
|
|
2925
|
+
}, null, 8, ["concurrency", "headers", "healthy-http-statuses", "healthy-interval", "healthy-successes", "http-path", "https-sni", "timeout", "type", "unhealthy-http-failures", "unhealthy-http-statuses", "unhealthy-interval", "unhealthy-tcp-failures", "unhealthy-timeouts", "verify-ssl", "config", "readonly"])) : P("", !0),
|
|
2926
|
+
t.fields.passiveHealthSwitch ? (H(), O(ca, {
|
|
3354
2927
|
key: 1,
|
|
3355
2928
|
"healthy-http-statuses": t.fields.passiveHealthCheck.healthy.httpStatuses,
|
|
3356
|
-
"onUpdate:healthyHttpStatuses":
|
|
2929
|
+
"onUpdate:healthyHttpStatuses": h[36] || (h[36] = (r) => t.fields.passiveHealthCheck.healthy.httpStatuses = r),
|
|
3357
2930
|
"healthy-successes": t.fields.passiveHealthCheck.healthy.successes,
|
|
3358
|
-
"onUpdate:healthySuccesses":
|
|
2931
|
+
"onUpdate:healthySuccesses": h[37] || (h[37] = (r) => t.fields.passiveHealthCheck.healthy.successes = r),
|
|
3359
2932
|
type: t.fields.passiveHealthCheck.type,
|
|
3360
|
-
"onUpdate:type":
|
|
2933
|
+
"onUpdate:type": h[38] || (h[38] = (r) => t.fields.passiveHealthCheck.type = r),
|
|
3361
2934
|
"unhealthy-http-failures": t.fields.passiveHealthCheck.unhealthy.httpFailures,
|
|
3362
|
-
"onUpdate:unhealthyHttpFailures":
|
|
2935
|
+
"onUpdate:unhealthyHttpFailures": h[39] || (h[39] = (r) => t.fields.passiveHealthCheck.unhealthy.httpFailures = r),
|
|
3363
2936
|
"unhealthy-http-statuses": t.fields.passiveHealthCheck.unhealthy.httpStatuses,
|
|
3364
|
-
"onUpdate:unhealthyHttpStatuses":
|
|
2937
|
+
"onUpdate:unhealthyHttpStatuses": h[40] || (h[40] = (r) => t.fields.passiveHealthCheck.unhealthy.httpStatuses = r),
|
|
3365
2938
|
"unhealthy-tcp-failures": t.fields.passiveHealthCheck.unhealthy.tcpFailures,
|
|
3366
|
-
"onUpdate:unhealthyTcpFailures":
|
|
2939
|
+
"onUpdate:unhealthyTcpFailures": h[41] || (h[41] = (r) => t.fields.passiveHealthCheck.unhealthy.tcpFailures = r),
|
|
3367
2940
|
"unhealthy-timeouts": t.fields.passiveHealthCheck.unhealthy.timeouts,
|
|
3368
|
-
"onUpdate:unhealthyTimeouts":
|
|
2941
|
+
"onUpdate:unhealthyTimeouts": h[42] || (h[42] = (r) => t.fields.passiveHealthCheck.unhealthy.timeouts = r),
|
|
3369
2942
|
readonly: t.readonly
|
|
3370
|
-
}, null, 8, ["healthy-http-statuses", "healthy-successes", "type", "unhealthy-http-failures", "unhealthy-http-statuses", "unhealthy-tcp-failures", "unhealthy-timeouts", "readonly"])) :
|
|
2943
|
+
}, null, 8, ["healthy-http-statuses", "healthy-successes", "type", "unhealthy-http-failures", "unhealthy-http-statuses", "unhealthy-tcp-failures", "unhealthy-timeouts", "readonly"])) : P("", !0)
|
|
3371
2944
|
]),
|
|
3372
2945
|
_: 1
|
|
3373
2946
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly"])
|
|
3374
2947
|
]));
|
|
3375
2948
|
}
|
|
3376
|
-
}),
|
|
2949
|
+
}), Ca = /* @__PURE__ */ re(pa, [["__scopeId", "data-v-224f4f98"]]), fa = { "data-testid": "client_certificate-plain-text" }, Sa = /* @__PURE__ */ ee({
|
|
3377
2950
|
__name: "UpstreamsConfigCard",
|
|
3378
2951
|
props: {
|
|
3379
2952
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
3380
2953
|
config: {
|
|
3381
2954
|
type: Object,
|
|
3382
2955
|
required: !0,
|
|
3383
|
-
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a
|
|
2956
|
+
validator: (a) => !(!a || !["konnect", "kongManager"].includes(a?.app) || a.app === "konnect" && !a.controlPlaneId || a.app === "kongManager" && typeof a.workspace != "string" || !a.entityId)
|
|
3384
2957
|
},
|
|
3385
2958
|
/**
|
|
3386
2959
|
* External link for documentation that determines visibility of Documentation button
|
|
@@ -3400,54 +2973,54 @@ const pe = {
|
|
|
3400
2973
|
},
|
|
3401
2974
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
3402
2975
|
setup(a) {
|
|
3403
|
-
const
|
|
2976
|
+
const K = a, { i18n: { t: s }, i18nT: l } = ie.useI18n(), { getPropValue: i } = rt(), g = S(() => de.form[K.config.app].edit), y = A({
|
|
3404
2977
|
id: {},
|
|
3405
2978
|
name: {},
|
|
3406
2979
|
created_at: {},
|
|
3407
2980
|
updated_at: {},
|
|
3408
2981
|
algorithm: {
|
|
3409
2982
|
order: 5,
|
|
3410
|
-
section:
|
|
3411
|
-
tooltip:
|
|
2983
|
+
section: ae.Basic,
|
|
2984
|
+
tooltip: s("upstreams.form.fields.algorithm.tooltip")
|
|
3412
2985
|
},
|
|
3413
2986
|
slots: {
|
|
3414
2987
|
order: 6,
|
|
3415
|
-
section:
|
|
2988
|
+
section: ae.Basic
|
|
3416
2989
|
},
|
|
3417
2990
|
hash_on: {
|
|
3418
2991
|
order: 7,
|
|
3419
|
-
section:
|
|
2992
|
+
section: ae.Basic
|
|
3420
2993
|
},
|
|
3421
2994
|
hash_on_header: {
|
|
3422
2995
|
order: 8,
|
|
3423
|
-
section:
|
|
2996
|
+
section: ae.Basic
|
|
3424
2997
|
},
|
|
3425
2998
|
hash_on_uri_capture: {
|
|
3426
2999
|
order: 9,
|
|
3427
|
-
section:
|
|
3000
|
+
section: ae.Basic
|
|
3428
3001
|
},
|
|
3429
3002
|
hash_on_query_arg: {
|
|
3430
3003
|
order: 10,
|
|
3431
|
-
section:
|
|
3432
|
-
label: `${
|
|
3004
|
+
section: ae.Basic,
|
|
3005
|
+
label: `${s("upstreams.form.fields.hash_on.label")} ${s("upstreams.form.hash_labels.query_argument")}`
|
|
3433
3006
|
},
|
|
3434
3007
|
hash_on_cookie: {
|
|
3435
3008
|
order: 11,
|
|
3436
|
-
section:
|
|
3009
|
+
section: ae.Basic
|
|
3437
3010
|
},
|
|
3438
3011
|
hash_on_cookie_path: {
|
|
3439
3012
|
order: 12,
|
|
3440
|
-
section:
|
|
3013
|
+
section: ae.Basic
|
|
3441
3014
|
},
|
|
3442
3015
|
healthchecks: {
|
|
3443
3016
|
order: 13,
|
|
3444
|
-
section:
|
|
3017
|
+
section: ae.Basic,
|
|
3445
3018
|
// TODO: change to JsonArray
|
|
3446
|
-
type:
|
|
3019
|
+
type: nt.Json
|
|
3447
3020
|
},
|
|
3448
3021
|
tags: {
|
|
3449
3022
|
order: 14,
|
|
3450
|
-
tooltip:
|
|
3023
|
+
tooltip: s("upstreams.form.hash_tooltips.tags")
|
|
3451
3024
|
},
|
|
3452
3025
|
// Advanced section
|
|
3453
3026
|
hash_fallback: {
|
|
@@ -3458,7 +3031,7 @@ const pe = {
|
|
|
3458
3031
|
},
|
|
3459
3032
|
hash_fallback_query_arg: {
|
|
3460
3033
|
order: 3,
|
|
3461
|
-
label: `${
|
|
3034
|
+
label: `${s("upstreams.form.fields.hash_fallback.label")} ${s("upstreams.form.hash_labels.query_argument")}`
|
|
3462
3035
|
},
|
|
3463
3036
|
hash_fallback_uri_capture: {
|
|
3464
3037
|
order: 4
|
|
@@ -3471,228 +3044,225 @@ const pe = {
|
|
|
3471
3044
|
},
|
|
3472
3045
|
client_certificate: {
|
|
3473
3046
|
order: 7,
|
|
3474
|
-
tooltip:
|
|
3047
|
+
tooltip: s("upstreams.form.hash_tooltips.client_certificate")
|
|
3475
3048
|
}
|
|
3476
3049
|
});
|
|
3477
|
-
return (
|
|
3478
|
-
|
|
3050
|
+
return (V, w) => (H(), X("div", null, [
|
|
3051
|
+
n(e(ht), {
|
|
3479
3052
|
config: a.config,
|
|
3480
3053
|
"config-card-doc": a.configCardDoc,
|
|
3481
3054
|
"config-schema": y.value,
|
|
3482
|
-
"entity-type": e(
|
|
3483
|
-
"fetch-url":
|
|
3055
|
+
"entity-type": e(Ve).Upstream,
|
|
3056
|
+
"fetch-url": g.value,
|
|
3484
3057
|
"hide-title": a.hideTitle,
|
|
3485
|
-
"onFetch:error":
|
|
3486
|
-
"onFetch:success":
|
|
3487
|
-
onLoading:
|
|
3058
|
+
"onFetch:error": w[0] || (w[0] = (u) => V.$emit("fetch:error", u)),
|
|
3059
|
+
"onFetch:success": w[1] || (w[1] = (u) => V.$emit("fetch:success", u)),
|
|
3060
|
+
onLoading: w[2] || (w[2] = (u) => V.$emit("loading", u))
|
|
3488
3061
|
}, {
|
|
3489
|
-
"name-label-tooltip":
|
|
3490
|
-
|
|
3062
|
+
"name-label-tooltip": o(() => [
|
|
3063
|
+
n(e(l), {
|
|
3491
3064
|
keypath: "upstreams.form.fields.name.tooltip",
|
|
3492
3065
|
scope: "global"
|
|
3493
3066
|
}, {
|
|
3494
|
-
host:
|
|
3495
|
-
|
|
3067
|
+
host: o(() => [
|
|
3068
|
+
b("code", null, m(e(s)("upstreams.form.fields.name.host")), 1)
|
|
3496
3069
|
]),
|
|
3497
3070
|
_: 1
|
|
3498
3071
|
})
|
|
3499
3072
|
]),
|
|
3500
|
-
"hash_on-label-tooltip":
|
|
3501
|
-
|
|
3073
|
+
"hash_on-label-tooltip": o(({ row: u }) => [
|
|
3074
|
+
n(e(l), {
|
|
3502
3075
|
keypath: "upstreams.form.fields.hash_on.tooltip",
|
|
3503
3076
|
scope: "global"
|
|
3504
3077
|
}, {
|
|
3505
|
-
result:
|
|
3506
|
-
|
|
3078
|
+
result: o(() => [
|
|
3079
|
+
b("code", null, m(u.value), 1)
|
|
3507
3080
|
]),
|
|
3508
3081
|
_: 2
|
|
3509
3082
|
}, 1024)
|
|
3510
3083
|
]),
|
|
3511
|
-
"hash_on_header-label-tooltip":
|
|
3512
|
-
|
|
3084
|
+
"hash_on_header-label-tooltip": o(() => [
|
|
3085
|
+
n(e(l), {
|
|
3513
3086
|
keypath: "upstreams.form.hash_tooltips.hash_on_header.text",
|
|
3514
3087
|
scope: "global"
|
|
3515
3088
|
}, {
|
|
3516
|
-
hash_on:
|
|
3517
|
-
|
|
3089
|
+
hash_on: o(() => [
|
|
3090
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_header.hash_on")), 1)
|
|
3518
3091
|
]),
|
|
3519
|
-
header:
|
|
3520
|
-
|
|
3092
|
+
header: o(() => [
|
|
3093
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_header.header")), 1)
|
|
3521
3094
|
]),
|
|
3522
3095
|
_: 1
|
|
3523
3096
|
})
|
|
3524
3097
|
]),
|
|
3525
|
-
"hash_on_uri_capture-label-tooltip":
|
|
3526
|
-
|
|
3098
|
+
"hash_on_uri_capture-label-tooltip": o(() => [
|
|
3099
|
+
n(e(l), {
|
|
3527
3100
|
keypath: "upstreams.form.hash_tooltips.hash_on_uri_capture.text",
|
|
3528
3101
|
scope: "global"
|
|
3529
3102
|
}, {
|
|
3530
|
-
hash_on:
|
|
3531
|
-
|
|
3103
|
+
hash_on: o(() => [
|
|
3104
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_uri_capture.hash_on")), 1)
|
|
3532
3105
|
]),
|
|
3533
|
-
uri_capture:
|
|
3534
|
-
|
|
3106
|
+
uri_capture: o(() => [
|
|
3107
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_uri_capture.uri_capture")), 1)
|
|
3535
3108
|
]),
|
|
3536
3109
|
_: 1
|
|
3537
3110
|
})
|
|
3538
3111
|
]),
|
|
3539
|
-
"hash_on_query_arg-label-tooltip":
|
|
3540
|
-
|
|
3112
|
+
"hash_on_query_arg-label-tooltip": o(() => [
|
|
3113
|
+
n(e(l), {
|
|
3541
3114
|
keypath: "upstreams.form.hash_tooltips.hash_on_query_arg.text",
|
|
3542
3115
|
scope: "global"
|
|
3543
3116
|
}, {
|
|
3544
|
-
hash_on:
|
|
3545
|
-
|
|
3117
|
+
hash_on: o(() => [
|
|
3118
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_query_arg.hash_on")), 1)
|
|
3546
3119
|
]),
|
|
3547
|
-
query_arg:
|
|
3548
|
-
|
|
3120
|
+
query_arg: o(() => [
|
|
3121
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_query_arg.query_arg")), 1)
|
|
3549
3122
|
]),
|
|
3550
3123
|
_: 1
|
|
3551
3124
|
})
|
|
3552
3125
|
]),
|
|
3553
|
-
"hash_on_cookie-label-tooltip":
|
|
3554
|
-
|
|
3126
|
+
"hash_on_cookie-label-tooltip": o(() => [
|
|
3127
|
+
n(e(l), {
|
|
3555
3128
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie.text",
|
|
3556
3129
|
scope: "global"
|
|
3557
3130
|
}, {
|
|
3558
|
-
hash_on:
|
|
3559
|
-
|
|
3131
|
+
hash_on: o(() => [
|
|
3132
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_cookie.hash_on")), 1)
|
|
3560
3133
|
]),
|
|
3561
|
-
hash_fallback:
|
|
3562
|
-
|
|
3134
|
+
hash_fallback: o(() => [
|
|
3135
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_cookie.hash_fallback")), 1)
|
|
3563
3136
|
]),
|
|
3564
|
-
cookie:
|
|
3565
|
-
|
|
3137
|
+
cookie: o(() => [
|
|
3138
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_cookie.cookie")), 1)
|
|
3566
3139
|
]),
|
|
3567
3140
|
_: 1
|
|
3568
3141
|
})
|
|
3569
3142
|
]),
|
|
3570
|
-
"hash_on_cookie_path-label-tooltip":
|
|
3571
|
-
|
|
3143
|
+
"hash_on_cookie_path-label-tooltip": o(() => [
|
|
3144
|
+
n(e(l), {
|
|
3572
3145
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie_path.text",
|
|
3573
3146
|
scope: "global"
|
|
3574
3147
|
}, {
|
|
3575
|
-
hash_on:
|
|
3576
|
-
|
|
3148
|
+
hash_on: o(() => [
|
|
3149
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_on")), 1)
|
|
3577
3150
|
]),
|
|
3578
|
-
hash_fallback:
|
|
3579
|
-
|
|
3151
|
+
hash_fallback: o(() => [
|
|
3152
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_cookie_path.hash_fallback")), 1)
|
|
3580
3153
|
]),
|
|
3581
|
-
cookie:
|
|
3582
|
-
|
|
3154
|
+
cookie: o(() => [
|
|
3155
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_on_cookie_path.cookie")), 1)
|
|
3583
3156
|
]),
|
|
3584
3157
|
_: 1
|
|
3585
3158
|
})
|
|
3586
3159
|
]),
|
|
3587
|
-
"slots-label-tooltip":
|
|
3588
|
-
|
|
3160
|
+
"slots-label-tooltip": o(() => [
|
|
3161
|
+
n(e(l), {
|
|
3589
3162
|
keypath: "upstreams.form.hash_tooltips.slots.text",
|
|
3590
3163
|
scope: "global"
|
|
3591
3164
|
}, {
|
|
3592
|
-
algorithm:
|
|
3593
|
-
|
|
3165
|
+
algorithm: o(() => [
|
|
3166
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.slots.algorithm")), 1)
|
|
3594
3167
|
]),
|
|
3595
|
-
round_robin:
|
|
3596
|
-
|
|
3168
|
+
round_robin: o(() => [
|
|
3169
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.slots.round_robin")), 1)
|
|
3597
3170
|
]),
|
|
3598
|
-
consistent_hashing:
|
|
3599
|
-
|
|
3171
|
+
consistent_hashing: o(() => [
|
|
3172
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.slots.consistent_hashing")), 1)
|
|
3600
3173
|
]),
|
|
3601
|
-
min:
|
|
3602
|
-
|
|
3174
|
+
min: o(() => [...w[3] || (w[3] = [
|
|
3175
|
+
b("code", null, "10", -1)
|
|
3603
3176
|
])]),
|
|
3604
|
-
max:
|
|
3605
|
-
|
|
3177
|
+
max: o(() => [...w[4] || (w[4] = [
|
|
3178
|
+
b("code", null, "65536", -1)
|
|
3606
3179
|
])]),
|
|
3607
3180
|
_: 1
|
|
3608
3181
|
})
|
|
3609
3182
|
]),
|
|
3610
|
-
"hash_fallback-label-tooltip":
|
|
3611
|
-
|
|
3183
|
+
"hash_fallback-label-tooltip": o(() => [
|
|
3184
|
+
n(e(l), {
|
|
3612
3185
|
keypath: "upstreams.form.hash_tooltips.hash_fallback.text",
|
|
3613
3186
|
scope: "global"
|
|
3614
3187
|
}, {
|
|
3615
|
-
hash_on:
|
|
3616
|
-
|
|
3188
|
+
hash_on: o(() => [
|
|
3189
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_fallback.hash_on")), 1)
|
|
3617
3190
|
]),
|
|
3618
|
-
cookie:
|
|
3619
|
-
|
|
3191
|
+
cookie: o(() => [
|
|
3192
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_fallback.cookie")), 1)
|
|
3620
3193
|
]),
|
|
3621
3194
|
_: 1
|
|
3622
3195
|
})
|
|
3623
3196
|
]),
|
|
3624
|
-
"hash_fallback_header-label-tooltip":
|
|
3625
|
-
|
|
3197
|
+
"hash_fallback_header-label-tooltip": o(() => [
|
|
3198
|
+
n(e(l), {
|
|
3626
3199
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_header.text",
|
|
3627
3200
|
scope: "global"
|
|
3628
3201
|
}, {
|
|
3629
|
-
hash_fallback:
|
|
3630
|
-
|
|
3202
|
+
hash_fallback: o(() => [
|
|
3203
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_fallback_header.hash_fallback")), 1)
|
|
3631
3204
|
]),
|
|
3632
|
-
header:
|
|
3633
|
-
|
|
3205
|
+
header: o(() => [
|
|
3206
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_fallback_header.header")), 1)
|
|
3634
3207
|
]),
|
|
3635
3208
|
_: 1
|
|
3636
3209
|
})
|
|
3637
3210
|
]),
|
|
3638
|
-
"hash_fallback_query_arg-label-tooltip":
|
|
3639
|
-
|
|
3211
|
+
"hash_fallback_query_arg-label-tooltip": o(() => [
|
|
3212
|
+
n(e(l), {
|
|
3640
3213
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_query_arg.text",
|
|
3641
3214
|
scope: "global"
|
|
3642
3215
|
}, {
|
|
3643
|
-
hash_fallback:
|
|
3644
|
-
|
|
3216
|
+
hash_fallback: o(() => [
|
|
3217
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_fallback_query_arg.hash_fallback")), 1)
|
|
3645
3218
|
]),
|
|
3646
|
-
query_arg:
|
|
3647
|
-
|
|
3219
|
+
query_arg: o(() => [
|
|
3220
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_fallback_query_arg.query_arg")), 1)
|
|
3648
3221
|
]),
|
|
3649
3222
|
_: 1
|
|
3650
3223
|
})
|
|
3651
3224
|
]),
|
|
3652
|
-
"hash_fallback_uri_capture-label-tooltip":
|
|
3653
|
-
|
|
3225
|
+
"hash_fallback_uri_capture-label-tooltip": o(() => [
|
|
3226
|
+
n(e(l), {
|
|
3654
3227
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",
|
|
3655
3228
|
scope: "global"
|
|
3656
3229
|
}, {
|
|
3657
|
-
hash_fallback:
|
|
3658
|
-
|
|
3230
|
+
hash_fallback: o(() => [
|
|
3231
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.hash_fallback")), 1)
|
|
3659
3232
|
]),
|
|
3660
|
-
uri_capture:
|
|
3661
|
-
|
|
3233
|
+
uri_capture: o(() => [
|
|
3234
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.hash_fallback_uri_capture.uri_capture")), 1)
|
|
3662
3235
|
]),
|
|
3663
3236
|
_: 1
|
|
3664
3237
|
})
|
|
3665
3238
|
]),
|
|
3666
|
-
"host_header-label-tooltip":
|
|
3667
|
-
|
|
3239
|
+
"host_header-label-tooltip": o(() => [
|
|
3240
|
+
n(e(l), {
|
|
3668
3241
|
keypath: "upstreams.form.hash_tooltips.host_header.text",
|
|
3669
3242
|
scope: "global"
|
|
3670
3243
|
}, {
|
|
3671
|
-
host:
|
|
3672
|
-
|
|
3244
|
+
host: o(() => [
|
|
3245
|
+
b("code", null, m(e(s)("upstreams.form.hash_tooltips.host_header.host")), 1)
|
|
3673
3246
|
]),
|
|
3674
3247
|
_: 1
|
|
3675
3248
|
})
|
|
3676
3249
|
]),
|
|
3677
|
-
client_certificate:
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
g("div", La, [
|
|
3682
|
-
g("span", null, f((c = e(h)("rowValue", l)) == null ? void 0 : c.id), 1)
|
|
3683
|
-
])
|
|
3250
|
+
client_certificate: o((u) => [
|
|
3251
|
+
b("div", null, [
|
|
3252
|
+
b("div", fa, [
|
|
3253
|
+
b("span", null, m(e(i)("rowValue", u)?.id), 1)
|
|
3684
3254
|
])
|
|
3685
|
-
]
|
|
3686
|
-
|
|
3255
|
+
])
|
|
3256
|
+
]),
|
|
3687
3257
|
_: 1
|
|
3688
3258
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
3689
3259
|
]));
|
|
3690
3260
|
}
|
|
3691
3261
|
});
|
|
3692
3262
|
export {
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3263
|
+
Pt as TargetForm,
|
|
3264
|
+
_a as TargetsList,
|
|
3265
|
+
Sa as UpstreamsConfigCard,
|
|
3266
|
+
Ca as UpstreamsForm,
|
|
3267
|
+
ka as UpstreamsList
|
|
3698
3268
|
};
|