@kong-ui-public/entities-gateway-services 3.10.6-pr.2001.dfcf418cd.0 → 3.10.6-pr.2001.fda319139.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.
- package/dist/entities-gateway-services.es.js +405 -398
- package/dist/entities-gateway-services.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/GatewayServiceForm.vue.d.ts.map +1 -1
- package/dist/types/composables/useUrlValidators.d.ts +3 -3
- package/dist/types/composables/useUrlValidators.d.ts.map +1 -1
- package/dist/types/types/gateway-service-form.d.ts +0 -5
- package/dist/types/types/gateway-service-form.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Ke, computed as h, ref as W, watch as $e, onBeforeMount as lt, resolveComponent as D, openBlock as C, createElementBlock as F, createVNode as u, unref as o, createSlots as Re, withCtx as v, createBlock as Fe, Teleport as je, createElementVNode as S, createCommentVNode as M, createTextVNode as z, toDisplayString as P, withModifiers as Le, reactive as Te, onMounted as Ze, renderSlot as Qe, toValue as ze, Transition as We, Fragment as ot, renderList as it } from "vue";
|
|
2
2
|
import { useRouter as qe } from "vue-router";
|
|
3
3
|
import { BookIcon as He, AddIcon as rt, ServicesIcon as st } from "@kong/icons";
|
|
4
4
|
import { createI18n as at, i18nTComponent as nt } from "@kong-ui-public/i18n";
|
|
5
|
-
import { useAxios as
|
|
5
|
+
import { useAxios as Oe, useTableState as ct, useFetcher as ut, useDeleteUrlBuilder as dt, FetcherStatus as ft, EntityBaseTable as pt, EntityFilter as mt, PermissionsWrapper as Ee, TableTags as vt, EntityEmptyState as gt, EntityToggleModal as yt, EntityDeleteModal as _t, EntityTypes as bt, useErrors as Xe, useValidators as Ye, EntityBaseFormType as Me, useGatewayFeatureSupported as et, EntityBaseForm as tt, SupportedEntityType as Ge, EntityFormSection as Be, useHelpers as ht, ConfigurationSchemaSection as Ue, ConfigurationSchemaType as wt, EntityBaseConfigCard as kt } from "@kong-ui-public/entities-shared";
|
|
6
6
|
const Vt = {
|
|
7
7
|
create: "New gateway service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
@@ -53,10 +53,13 @@ const Vt = {
|
|
|
53
53
|
description: "Gateway services represent backend APIs or microservices that receive traffic routed through the gateway."
|
|
54
54
|
},
|
|
55
55
|
form: {
|
|
56
|
+
buttons: {
|
|
57
|
+
try_sample: "Try sample API"
|
|
58
|
+
},
|
|
56
59
|
errors: {
|
|
57
60
|
host: {
|
|
58
|
-
empty: "
|
|
59
|
-
invalid: "
|
|
61
|
+
empty: "Host cannot be empty",
|
|
62
|
+
invalid: "Invalid host"
|
|
60
63
|
},
|
|
61
64
|
port: {
|
|
62
65
|
type: "Port must be a number",
|
|
@@ -67,8 +70,11 @@ const Vt = {
|
|
|
67
70
|
invalid: "Path should not include characters outside of the reserved list of RFC 3986"
|
|
68
71
|
},
|
|
69
72
|
protocol: {
|
|
70
|
-
empty: "
|
|
71
|
-
invalid: "
|
|
73
|
+
empty: "Protocol cannot be empty",
|
|
74
|
+
invalid: "Protocol - value must be one of http, https, grpc, grpcs, tcp, udp, tls, tls_passthrough, ws, wss"
|
|
75
|
+
},
|
|
76
|
+
url: {
|
|
77
|
+
invalid: "URL validation failed"
|
|
72
78
|
}
|
|
73
79
|
},
|
|
74
80
|
sections: {
|
|
@@ -77,11 +83,11 @@ const Vt = {
|
|
|
77
83
|
description: "Provide a name and tags to help identify and manage this service."
|
|
78
84
|
},
|
|
79
85
|
keys: {
|
|
80
|
-
title: "Service
|
|
86
|
+
title: "Service endpoint",
|
|
81
87
|
description: "Define where this service should send requests.",
|
|
82
88
|
checkedGroupLabel: "Choose how and where to send traffic",
|
|
83
89
|
urlLabel: "Full URL",
|
|
84
|
-
checkedGroupAltLabel: "Protocol,
|
|
90
|
+
checkedGroupAltLabel: "Protocol, host, port and path",
|
|
85
91
|
url: {
|
|
86
92
|
label: "Full URL",
|
|
87
93
|
description: "Define the service using a single, complete API URL for simple setup."
|
|
@@ -90,7 +96,7 @@ const Vt = {
|
|
|
90
96
|
label: "Protocol, host, port, and path",
|
|
91
97
|
description: "Manually specify each component of the API’s URL for advanced configurations."
|
|
92
98
|
},
|
|
93
|
-
viewAdvancedFields: "View
|
|
99
|
+
viewAdvancedFields: "View advanced fields"
|
|
94
100
|
}
|
|
95
101
|
},
|
|
96
102
|
fields: {
|
|
@@ -140,31 +146,31 @@ const Vt = {
|
|
|
140
146
|
tooltip: "The number of retries to execute upon failure to proxy."
|
|
141
147
|
},
|
|
142
148
|
connect_timeout: {
|
|
143
|
-
label: "Connection
|
|
149
|
+
label: "Connection timeout",
|
|
144
150
|
tooltip: "The timeout in milliseconds for establishing a connection to the upstream server."
|
|
145
151
|
},
|
|
146
152
|
write_timeout: {
|
|
147
|
-
label: "Write
|
|
153
|
+
label: "Write timeout",
|
|
148
154
|
tooltip: "The timeout in milliseconds between two successive write operations for transmitting a request to the upstream server."
|
|
149
155
|
},
|
|
150
156
|
read_timeout: {
|
|
151
|
-
label: "Read
|
|
157
|
+
label: "Read timeout",
|
|
152
158
|
tooltip: "The timeout in milliseconds between two successive read operations for transmitting a request to the upstream server."
|
|
153
159
|
},
|
|
154
160
|
client_certificate: {
|
|
155
|
-
label: "Client
|
|
161
|
+
label: "Client certificate",
|
|
156
162
|
placeholder: "Enter a Certificate ID",
|
|
157
163
|
tooltip: "Certificate to be used as client certificate while TLS handshaking to the upstream server."
|
|
158
164
|
},
|
|
159
165
|
ca_certificates: {
|
|
160
|
-
label: "CA
|
|
166
|
+
label: "CA certificates",
|
|
161
167
|
placeholder: "Enter a comma separated list of CA Certificate IDs",
|
|
162
168
|
tooltip: "Array of {code1} object UUIDs that are used to build the trust store while verifying upstream server's TLS certificate. If set to {code2} when Nginx default is respected. If default CA list in Nginx are not specified and TLS verification is enabled, then handshake with upstream server will always fail (because no CA are trusted).",
|
|
163
169
|
code1: "CA Certificate",
|
|
164
170
|
code2: "null"
|
|
165
171
|
},
|
|
166
172
|
tls_verify_enabled: {
|
|
167
|
-
label: "TLS
|
|
173
|
+
label: "TLS verify",
|
|
168
174
|
help: "If unchecked, use default system setting",
|
|
169
175
|
tooltip: "Whether to enable verification of upstream server TLS certificate. If set to {code1}, then the Nginx default is respected.",
|
|
170
176
|
code1: "null"
|
|
@@ -215,7 +221,7 @@ const Vt = {
|
|
|
215
221
|
copy: Pt,
|
|
216
222
|
glossary: Et
|
|
217
223
|
};
|
|
218
|
-
function
|
|
224
|
+
function $t() {
|
|
219
225
|
const n = at("en-us", Ft);
|
|
220
226
|
return {
|
|
221
227
|
i18n: n,
|
|
@@ -223,13 +229,13 @@ function Ut() {
|
|
|
223
229
|
// Translation component <i18n-t>
|
|
224
230
|
};
|
|
225
231
|
}
|
|
226
|
-
function
|
|
232
|
+
function Ut() {
|
|
227
233
|
return {
|
|
228
|
-
getPortFromProtocol: (
|
|
234
|
+
getPortFromProtocol: (B, y) => {
|
|
229
235
|
const p = [80, 443], a = Number(y);
|
|
230
236
|
if ((a || a === 0) && !p.includes(a))
|
|
231
237
|
return a;
|
|
232
|
-
switch (
|
|
238
|
+
switch (B) {
|
|
233
239
|
case "grpcs":
|
|
234
240
|
case "tls":
|
|
235
241
|
case "https":
|
|
@@ -245,48 +251,52 @@ function $t() {
|
|
|
245
251
|
}
|
|
246
252
|
};
|
|
247
253
|
}
|
|
248
|
-
function
|
|
254
|
+
function xt() {
|
|
249
255
|
const { i18n: { t: n } } = ge.useI18n();
|
|
250
256
|
return {
|
|
251
|
-
validateHost: (b) =>
|
|
252
|
-
|
|
257
|
+
validateHost: (b) => {
|
|
258
|
+
if (!b || b.trim() === "") return n("gateway_services.form.errors.host.empty");
|
|
259
|
+
const T = /^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/;
|
|
260
|
+
return /^((25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[0-1]?[0-9]?[0-9])$/.test(b) || T.test(b) ? "" : n("gateway_services.form.errors.host.invalid");
|
|
261
|
+
},
|
|
262
|
+
validateProtocol: (b, T) => !b || b.trim() === "" ? n("gateway_services.form.errors.protocol.empty") : (b = b.slice(0, -1), T.find((r) => {
|
|
253
263
|
if (r.value === b) return r;
|
|
254
264
|
}) === void 0 ? n("gateway_services.form.errors.protocol.invalid") : ""),
|
|
255
265
|
validatePath: (b) => !b || b === "" ? "" : b.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(b) ? n("gateway_services.form.errors.path.invalid") : "" : n("gateway_services.form.errors.path.prefix"),
|
|
256
266
|
validatePort: (b) => {
|
|
257
267
|
if (b == null || b === "")
|
|
258
268
|
return "";
|
|
259
|
-
const
|
|
260
|
-
return isNaN(
|
|
269
|
+
const T = typeof b == "string" ? parseInt(b, 10) : b;
|
|
270
|
+
return isNaN(T) ? n("gateway_services.form.errors.port.type") : T < 0 || T > 65535 ? n("gateway_services.form.errors.port.invalid") : "";
|
|
261
271
|
}
|
|
262
272
|
};
|
|
263
273
|
}
|
|
264
274
|
const ge = {
|
|
265
|
-
useI18n:
|
|
266
|
-
usePortFromProtocol:
|
|
267
|
-
useUrlValidators:
|
|
268
|
-
},
|
|
275
|
+
useI18n: $t,
|
|
276
|
+
usePortFromProtocol: Ut,
|
|
277
|
+
useUrlValidators: xt
|
|
278
|
+
}, xe = "/v2/control-planes/{controlPlaneId}/core-entities", Ae = "/{workspace}", ye = {
|
|
269
279
|
list: {
|
|
270
280
|
konnect: {
|
|
271
|
-
all: `${
|
|
281
|
+
all: `${xe}/services`
|
|
272
282
|
},
|
|
273
283
|
kongManager: {
|
|
274
|
-
all: `${
|
|
284
|
+
all: `${Ae}/services`
|
|
275
285
|
}
|
|
276
286
|
},
|
|
277
287
|
form: {
|
|
278
288
|
konnect: {
|
|
279
|
-
create: `${
|
|
280
|
-
validate: `${
|
|
281
|
-
edit: `${
|
|
289
|
+
create: `${xe}/services`,
|
|
290
|
+
validate: `${xe}/v1/schemas/json/service/validate`,
|
|
291
|
+
edit: `${xe}/services/{id}`
|
|
282
292
|
},
|
|
283
293
|
kongManager: {
|
|
284
|
-
create: `${
|
|
285
|
-
validate: `${
|
|
286
|
-
edit: `${
|
|
294
|
+
create: `${Ae}/services`,
|
|
295
|
+
validate: `${Ae}/schemas/services/validate`,
|
|
296
|
+
edit: `${Ae}/services/{id}`
|
|
287
297
|
}
|
|
288
298
|
}
|
|
289
|
-
},
|
|
299
|
+
}, At = "#00abd2", Rt = "24px", Tt = { class: "kong-ui-entities-gateway-services-list" }, Mt = { class: "button-row" }, Bt = { class: "empty-state-icon-gateway" }, Kt = { key: 1 }, Lt = /* @__PURE__ */ Ke({
|
|
290
300
|
__name: "GatewayServiceList",
|
|
291
301
|
props: {
|
|
292
302
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -344,9 +354,9 @@ const ge = {
|
|
|
344
354
|
}
|
|
345
355
|
},
|
|
346
356
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
347
|
-
setup(n, { emit:
|
|
357
|
+
setup(n, { emit: B }) {
|
|
348
358
|
var c;
|
|
349
|
-
const y =
|
|
359
|
+
const y = B, p = n, { i18n: { t: a, formatUnixTimeStamp: b } } = ge.useI18n(), T = qe(), { axiosInstance: H } = Oe((c = p.config) == null ? void 0 : c.axiosRequestConfig), { hasRecords: r, handleStateChange: L } = ct(() => ee.value), I = h(() => r.value && p.config.app === "konnect"), ie = h(() => !p.enableV2EmptyStates && p.config.app === "konnect"), de = h(() => p.config.app !== "kongManager" || !!p.config.disableSorting), X = {
|
|
350
360
|
// the Name column is non-hidable
|
|
351
361
|
name: { label: a("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
352
362
|
...p.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
|
|
@@ -362,36 +372,36 @@ const ge = {
|
|
|
362
372
|
columnVisibility: {
|
|
363
373
|
created_at: !1
|
|
364
374
|
}
|
|
365
|
-
}, fe = X,
|
|
375
|
+
}, fe = X, x = h(() => {
|
|
366
376
|
var m, w;
|
|
367
377
|
let g = `${p.config.apiBaseUrl}${ye.list[p.config.app].all}`;
|
|
368
378
|
return p.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((m = p.config) == null ? void 0 : m.controlPlaneId) || "") : p.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (w = p.config) != null && w.workspace ? `/${p.config.workspace}` : "")), g;
|
|
369
|
-
}), Y = h(() => p.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${
|
|
379
|
+
}), Y = h(() => p.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${x.value}`) : new URL(x.value)), ee = W(""), re = h(() => {
|
|
370
380
|
const g = p.config.app === "konnect" || p.config.isExactMatch;
|
|
371
381
|
if (g)
|
|
372
382
|
return {
|
|
373
383
|
isExactMatch: g,
|
|
374
384
|
placeholder: a(`search.placeholder.${p.config.app}`)
|
|
375
385
|
};
|
|
376
|
-
const { name: m, enabled: w, protocol:
|
|
386
|
+
const { name: m, enabled: w, protocol: O, host: Q, port: j, path: he } = X;
|
|
377
387
|
return {
|
|
378
388
|
isExactMatch: g,
|
|
379
|
-
fields: { name: m, enabled: w, protocol:
|
|
389
|
+
fields: { name: m, enabled: w, protocol: O, host: Q, port: j, path: he },
|
|
380
390
|
schema: p.config.filterSchema
|
|
381
391
|
};
|
|
382
392
|
}), {
|
|
383
393
|
fetcher: l,
|
|
384
|
-
fetcherState:
|
|
394
|
+
fetcherState: A,
|
|
385
395
|
fetcherCacheKey: se
|
|
386
|
-
} =
|
|
396
|
+
} = ut({ ...p.config, cacheIdentifier: p.cacheIdentifier }, x.value), Pe = () => {
|
|
387
397
|
ee.value = "";
|
|
388
398
|
}, t = () => {
|
|
389
399
|
se.value++;
|
|
390
|
-
},
|
|
400
|
+
}, $ = W(null), ae = h(() => ({
|
|
391
401
|
ctaPath: p.config.createRoute,
|
|
392
|
-
ctaText:
|
|
402
|
+
ctaText: U.value ? p.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
|
|
393
403
|
message: `${a("gateway_services.list.empty_state.description")}${p.config.additionMessageForEmptyState ? ` ${p.config.additionMessageForEmptyState}` : ""}`,
|
|
394
|
-
title:
|
|
404
|
+
title: U.value ? p.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
|
|
395
405
|
})), ne = W(!1), q = W(null), pe = h(() => {
|
|
396
406
|
const g = {
|
|
397
407
|
action: "disable",
|
|
@@ -399,8 +409,8 @@ const ge = {
|
|
|
399
409
|
name: ""
|
|
400
410
|
};
|
|
401
411
|
if (q.value) {
|
|
402
|
-
const { enabled: m, id: w, name:
|
|
403
|
-
g.action = m ? "disable" : "enable", g.id = w, g.name =
|
|
412
|
+
const { enabled: m, id: w, name: O } = q.value;
|
|
413
|
+
g.action = m ? "disable" : "enable", g.id = w, g.name = O || w;
|
|
404
414
|
}
|
|
405
415
|
return g;
|
|
406
416
|
}), ce = (g) => {
|
|
@@ -408,18 +418,18 @@ const ge = {
|
|
|
408
418
|
}, _e = () => {
|
|
409
419
|
ne.value = !1, q.value = null;
|
|
410
420
|
}, Ve = async () => {
|
|
411
|
-
var
|
|
412
|
-
if (!await ((
|
|
421
|
+
var O, Q;
|
|
422
|
+
if (!await ((O = p.canEdit) == null ? void 0 : O.call(p, q.value)) || !q.value)
|
|
413
423
|
return;
|
|
414
424
|
const m = `${Y.value.href}/${q.value.id}`, w = !q.value.enabled;
|
|
415
425
|
try {
|
|
416
|
-
const { data: j } = ((Q = p.config) == null ? void 0 : Q.app) === "konnect" ? await
|
|
426
|
+
const { data: j } = ((Q = p.config) == null ? void 0 : Q.app) === "konnect" ? await H.put(m, { ...q.value, enabled: w }) : await H.patch(m, { ...q.value, enabled: w });
|
|
417
427
|
y("toggle:success", j), q.value.enabled = w;
|
|
418
428
|
} catch (j) {
|
|
419
429
|
y("error", j);
|
|
420
430
|
}
|
|
421
431
|
}, Ce = (g) => {
|
|
422
|
-
p.config.getControlPlaneRoute &&
|
|
432
|
+
p.config.getControlPlaneRoute && T.push(p.config.getControlPlaneRoute(g));
|
|
423
433
|
}, me = (g, m) => {
|
|
424
434
|
const w = g.id;
|
|
425
435
|
if (!m(w)) {
|
|
@@ -450,55 +460,55 @@ const ge = {
|
|
|
450
460
|
});
|
|
451
461
|
}, Se = async (g) => {
|
|
452
462
|
var w;
|
|
453
|
-
await ((w = p.canRetrieve) == null ? void 0 : w.call(p, g)) &&
|
|
454
|
-
},
|
|
463
|
+
await ((w = p.canRetrieve) == null ? void 0 : w.call(p, g)) && T.push(p.config.getViewRoute(g.id));
|
|
464
|
+
}, ue = (g) => ({
|
|
455
465
|
label: a("actions.view"),
|
|
456
466
|
to: p.config.getViewRoute(g)
|
|
457
467
|
}), le = (g) => ({
|
|
458
468
|
label: a("actions.edit"),
|
|
459
469
|
to: p.config.getEditRoute(g)
|
|
460
|
-
}), N = W(void 0),
|
|
461
|
-
N.value = g,
|
|
470
|
+
}), N = W(void 0), Z = W(!1), oe = W(!1), ve = W(""), i = dt(p.config, x.value), f = (g) => {
|
|
471
|
+
N.value = g, Z.value = !0, ve.value = "";
|
|
462
472
|
}, k = () => {
|
|
463
|
-
|
|
464
|
-
},
|
|
473
|
+
Z.value = !1, N.value = void 0;
|
|
474
|
+
}, J = async () => {
|
|
465
475
|
var g, m, w;
|
|
466
476
|
if ((g = N.value) != null && g.id) {
|
|
467
477
|
oe.value = !0;
|
|
468
478
|
try {
|
|
469
|
-
await
|
|
470
|
-
} catch (
|
|
471
|
-
ve.value = ((w = (m =
|
|
479
|
+
await H.delete(i(N.value.id)), y("delete:success", N.value), k(), se.value++;
|
|
480
|
+
} catch (O) {
|
|
481
|
+
ve.value = ((w = (m = O.response) == null ? void 0 : m.data) == null ? void 0 : w.message) || O.message || a("errors.delete"), y("error", O);
|
|
472
482
|
} finally {
|
|
473
483
|
oe.value = !1;
|
|
474
484
|
}
|
|
475
485
|
}
|
|
476
|
-
},
|
|
477
|
-
|
|
486
|
+
}, K = () => {
|
|
487
|
+
T.push(p.config.createRoute);
|
|
478
488
|
};
|
|
479
|
-
|
|
480
|
-
var m, w,
|
|
489
|
+
$e(A, (g) => {
|
|
490
|
+
var m, w, O;
|
|
481
491
|
if (g.status === ft.Error) {
|
|
482
|
-
|
|
492
|
+
$.value = {
|
|
483
493
|
title: a("errors.general")
|
|
484
|
-
}, (
|
|
494
|
+
}, (O = (w = (m = g.error) == null ? void 0 : m.response) == null ? void 0 : w.data) != null && O.message && ($.value.message = g.error.response.data.message), y("error", g.error);
|
|
485
495
|
return;
|
|
486
496
|
}
|
|
487
|
-
|
|
497
|
+
$.value = null;
|
|
488
498
|
});
|
|
489
|
-
const
|
|
499
|
+
const U = W(!1);
|
|
490
500
|
return lt(async () => {
|
|
491
|
-
|
|
501
|
+
U.value = await p.canCreate();
|
|
492
502
|
}), (g, m) => {
|
|
493
|
-
const w = D("KButton"),
|
|
494
|
-
return C(),
|
|
495
|
-
|
|
503
|
+
const w = D("KButton"), O = D("KBadge"), Q = D("KInputSwitch"), j = D("KDropdownItem"), he = D("KClipboardProvider");
|
|
504
|
+
return C(), F("div", Tt, [
|
|
505
|
+
u(o(pt), {
|
|
496
506
|
"cache-identifier": n.cacheIdentifier,
|
|
497
507
|
"default-table-preferences": ke,
|
|
498
|
-
"disable-sorting":
|
|
508
|
+
"disable-sorting": de.value,
|
|
499
509
|
"empty-state-options": ae.value,
|
|
500
510
|
"enable-entity-actions": "",
|
|
501
|
-
"error-message":
|
|
511
|
+
"error-message": $.value,
|
|
502
512
|
fetcher: o(l),
|
|
503
513
|
"fetcher-cache-key": o(se),
|
|
504
514
|
"pagination-type": "offset",
|
|
@@ -508,10 +518,10 @@ const ge = {
|
|
|
508
518
|
onClearSearchInput: Pe,
|
|
509
519
|
"onClick:row": m[5] || (m[5] = (e) => Se(e)),
|
|
510
520
|
onSort: t,
|
|
511
|
-
onState: o(
|
|
521
|
+
onState: o(L)
|
|
512
522
|
}, Re({
|
|
513
523
|
"toolbar-filter": v(() => [
|
|
514
|
-
|
|
524
|
+
u(o(mt), {
|
|
515
525
|
modelValue: ee.value,
|
|
516
526
|
"onUpdate:modelValue": m[0] || (m[0] = (e) => ee.value = e),
|
|
517
527
|
config: re.value
|
|
@@ -532,23 +542,23 @@ const ge = {
|
|
|
532
542
|
onClick: m[1] || (m[1] = (e) => g.$emit("click:learn-more"))
|
|
533
543
|
}, {
|
|
534
544
|
default: v(() => [
|
|
535
|
-
|
|
545
|
+
u(o(He), { decorative: "" })
|
|
536
546
|
]),
|
|
537
547
|
_: 1
|
|
538
|
-
})) :
|
|
539
|
-
|
|
548
|
+
})) : M("", !0),
|
|
549
|
+
u(o(Ee), {
|
|
540
550
|
"auth-function": () => n.canCreate()
|
|
541
551
|
}, {
|
|
542
552
|
default: v(() => [
|
|
543
|
-
|
|
553
|
+
u(w, {
|
|
544
554
|
appearance: "primary",
|
|
545
555
|
"data-testid": "toolbar-add-gateway-service",
|
|
546
556
|
size: n.useActionOutside ? "medium" : "large",
|
|
547
557
|
to: n.config.createRoute
|
|
548
558
|
}, {
|
|
549
559
|
default: v(() => [
|
|
550
|
-
|
|
551
|
-
z(" " +
|
|
560
|
+
u(o(rt)),
|
|
561
|
+
z(" " + P(o(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
552
562
|
]),
|
|
553
563
|
_: 1
|
|
554
564
|
}, 8, ["size", "to"])
|
|
@@ -559,40 +569,40 @@ const ge = {
|
|
|
559
569
|
], 8, ["disabled"]))
|
|
560
570
|
]),
|
|
561
571
|
name: v(({ rowValue: e }) => [
|
|
562
|
-
S("b", null,
|
|
572
|
+
S("b", null, P(e ?? "-"), 1)
|
|
563
573
|
]),
|
|
564
574
|
control_plane: v(({ row: e }) => {
|
|
565
575
|
var s;
|
|
566
576
|
return [
|
|
567
|
-
(s = e.x_meta) != null && s.cluster_id ? (C(), Fe(
|
|
577
|
+
(s = e.x_meta) != null && s.cluster_id ? (C(), Fe(O, {
|
|
568
578
|
key: 0,
|
|
569
579
|
tooltip: e.x_meta.cluster_id,
|
|
570
580
|
"truncation-tooltip": "",
|
|
571
|
-
onClick:
|
|
581
|
+
onClick: Le((V) => Ce(e.x_meta.cluster_id), ["stop"])
|
|
572
582
|
}, {
|
|
573
583
|
default: v(() => [
|
|
574
|
-
z(
|
|
584
|
+
z(P(e.x_meta.cluster_id), 1)
|
|
575
585
|
]),
|
|
576
586
|
_: 2
|
|
577
|
-
}, 1032, ["tooltip", "onClick"])) : (C(),
|
|
587
|
+
}, 1032, ["tooltip", "onClick"])) : (C(), F("b", Kt, "-"))
|
|
578
588
|
];
|
|
579
589
|
}),
|
|
580
590
|
enabled: v(({ row: e }) => [
|
|
581
|
-
|
|
591
|
+
u(o(Ee), {
|
|
582
592
|
"auth-function": () => n.canEdit(e),
|
|
583
593
|
"force-show": ""
|
|
584
594
|
}, {
|
|
585
595
|
default: v(({ isAllowed: s }) => [
|
|
586
596
|
S("div", {
|
|
587
|
-
onClick: m[4] || (m[4] =
|
|
597
|
+
onClick: m[4] || (m[4] = Le(() => {
|
|
588
598
|
}, ["stop"]))
|
|
589
599
|
}, [
|
|
590
|
-
|
|
600
|
+
u(Q, {
|
|
591
601
|
modelValue: e.enabled,
|
|
592
602
|
"onUpdate:modelValue": (V) => e.enabled = V,
|
|
593
603
|
"data-testid": `row-${e.id}-toggle-input`,
|
|
594
604
|
disabled: !s,
|
|
595
|
-
onClick:
|
|
605
|
+
onClick: Le((V) => ce(e), ["prevent"])
|
|
596
606
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
597
607
|
])
|
|
598
608
|
]),
|
|
@@ -600,78 +610,78 @@ const ge = {
|
|
|
600
610
|
}, 1032, ["auth-function"])
|
|
601
611
|
]),
|
|
602
612
|
tags: v(({ rowValue: e }) => [
|
|
603
|
-
|
|
613
|
+
u(o(vt), { tags: e }, null, 8, ["tags"])
|
|
604
614
|
]),
|
|
605
615
|
created_at: v(({ rowValue: e }) => [
|
|
606
|
-
z(
|
|
616
|
+
z(P(o(b)(e)), 1)
|
|
607
617
|
]),
|
|
608
618
|
updated_at: v(({ row: e, rowValue: s }) => [
|
|
609
|
-
z(
|
|
619
|
+
z(P(o(b)(s ?? e.created_at)), 1)
|
|
610
620
|
]),
|
|
611
621
|
actions: v(({ row: e }) => [
|
|
612
|
-
|
|
622
|
+
u(he, null, {
|
|
613
623
|
default: v(({ copyToClipboard: s }) => [
|
|
614
|
-
|
|
624
|
+
u(j, {
|
|
615
625
|
"data-testid": "action-entity-copy-id",
|
|
616
626
|
onClick: (V) => me(e, s)
|
|
617
627
|
}, {
|
|
618
628
|
default: v(() => [
|
|
619
|
-
z(
|
|
629
|
+
z(P(o(a)("actions.copy_id")), 1)
|
|
620
630
|
]),
|
|
621
631
|
_: 2
|
|
622
632
|
}, 1032, ["onClick"])
|
|
623
633
|
]),
|
|
624
634
|
_: 2
|
|
625
635
|
}, 1024),
|
|
626
|
-
|
|
636
|
+
u(he, null, {
|
|
627
637
|
default: v(({ copyToClipboard: s }) => [
|
|
628
|
-
|
|
638
|
+
u(j, {
|
|
629
639
|
"data-testid": "action-entity-copy-json",
|
|
630
640
|
onClick: (V) => be(e, s)
|
|
631
641
|
}, {
|
|
632
642
|
default: v(() => [
|
|
633
|
-
z(
|
|
643
|
+
z(P(o(a)("actions.copy_json")), 1)
|
|
634
644
|
]),
|
|
635
645
|
_: 2
|
|
636
646
|
}, 1032, ["onClick"])
|
|
637
647
|
]),
|
|
638
648
|
_: 2
|
|
639
649
|
}, 1024),
|
|
640
|
-
|
|
650
|
+
u(o(Ee), {
|
|
641
651
|
"auth-function": () => n.canRetrieve(e)
|
|
642
652
|
}, {
|
|
643
653
|
default: v(() => [
|
|
644
|
-
|
|
654
|
+
u(j, {
|
|
645
655
|
"data-testid": "action-entity-view",
|
|
646
656
|
"has-divider": "",
|
|
647
|
-
item:
|
|
657
|
+
item: ue(e.id)
|
|
648
658
|
}, null, 8, ["item"])
|
|
649
659
|
]),
|
|
650
660
|
_: 2
|
|
651
661
|
}, 1032, ["auth-function"]),
|
|
652
|
-
|
|
662
|
+
u(o(Ee), {
|
|
653
663
|
"auth-function": () => n.canEdit(e)
|
|
654
664
|
}, {
|
|
655
665
|
default: v(() => [
|
|
656
|
-
|
|
666
|
+
u(j, {
|
|
657
667
|
"data-testid": "action-entity-edit",
|
|
658
668
|
item: le(e.id)
|
|
659
669
|
}, null, 8, ["item"])
|
|
660
670
|
]),
|
|
661
671
|
_: 2
|
|
662
672
|
}, 1032, ["auth-function"]),
|
|
663
|
-
|
|
673
|
+
u(o(Ee), {
|
|
664
674
|
"auth-function": () => n.canDelete(e)
|
|
665
675
|
}, {
|
|
666
676
|
default: v(() => [
|
|
667
|
-
|
|
677
|
+
u(j, {
|
|
668
678
|
danger: "",
|
|
669
679
|
"data-testid": "action-entity-delete",
|
|
670
680
|
"has-divider": "",
|
|
671
681
|
onClick: (s) => f(e)
|
|
672
682
|
}, {
|
|
673
683
|
default: v(() => [
|
|
674
|
-
z(
|
|
684
|
+
z(P(o(a)("actions.delete.menu_label")), 1)
|
|
675
685
|
]),
|
|
676
686
|
_: 2
|
|
677
687
|
}, 1032, ["onClick"])
|
|
@@ -688,7 +698,7 @@ const ge = {
|
|
|
688
698
|
disabled: !n.useActionOutside,
|
|
689
699
|
to: "#kong-ui-app-page-header-action-button"
|
|
690
700
|
}, [
|
|
691
|
-
|
|
701
|
+
u(w, {
|
|
692
702
|
appearance: "secondary",
|
|
693
703
|
class: "open-learning-hub",
|
|
694
704
|
"data-testid": "gateway-services-more-button",
|
|
@@ -696,7 +706,7 @@ const ge = {
|
|
|
696
706
|
onClick: m[2] || (m[2] = (e) => g.$emit("click:learn-more"))
|
|
697
707
|
}, {
|
|
698
708
|
default: v(() => [
|
|
699
|
-
|
|
709
|
+
u(o(He), { decorative: "" })
|
|
700
710
|
]),
|
|
701
711
|
_: 1
|
|
702
712
|
})
|
|
@@ -709,7 +719,7 @@ const ge = {
|
|
|
709
719
|
fn: v(() => {
|
|
710
720
|
var e;
|
|
711
721
|
return [
|
|
712
|
-
|
|
722
|
+
u(o(gt), {
|
|
713
723
|
"action-button-text": o(a)("gateway_services.empty_state_v2.create"),
|
|
714
724
|
appearance: "secondary",
|
|
715
725
|
"can-create": () => n.canCreate(),
|
|
@@ -717,13 +727,13 @@ const ge = {
|
|
|
717
727
|
description: o(a)("gateway_services.empty_state_v2.description"),
|
|
718
728
|
"learn-more": n.config.app === "konnect",
|
|
719
729
|
title: o(a)("gateway_services.empty_state_v2.title"),
|
|
720
|
-
"onClick:create":
|
|
730
|
+
"onClick:create": K,
|
|
721
731
|
"onClick:learnMore": m[3] || (m[3] = (s) => g.$emit("click:learn-more"))
|
|
722
732
|
}, Re({
|
|
723
733
|
image: v(() => [
|
|
724
734
|
S("div", Bt, [
|
|
725
|
-
|
|
726
|
-
color: o(
|
|
735
|
+
u(o(st), {
|
|
736
|
+
color: o(At),
|
|
727
737
|
size: o(Rt)
|
|
728
738
|
}, null, 8, ["color", "size"])
|
|
729
739
|
])
|
|
@@ -733,7 +743,7 @@ const ge = {
|
|
|
733
743
|
(e = n.config) != null && e.isControlPlaneGroup ? {
|
|
734
744
|
name: "message",
|
|
735
745
|
fn: v(() => [
|
|
736
|
-
z(
|
|
746
|
+
z(P(o(a)("gateway_services.empty_state_v2.group")), 1)
|
|
737
747
|
]),
|
|
738
748
|
key: "0"
|
|
739
749
|
} : void 0
|
|
@@ -743,7 +753,7 @@ const ge = {
|
|
|
743
753
|
key: "1"
|
|
744
754
|
} : void 0
|
|
745
755
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
746
|
-
|
|
756
|
+
u(o(yt), {
|
|
747
757
|
action: pe.value.action,
|
|
748
758
|
"entity-id": pe.value.id,
|
|
749
759
|
"entity-name": pe.value.name,
|
|
@@ -753,32 +763,32 @@ const ge = {
|
|
|
753
763
|
onCancel: _e,
|
|
754
764
|
onProceed: _e
|
|
755
765
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
756
|
-
|
|
766
|
+
u(o(_t), {
|
|
757
767
|
"action-pending": oe.value,
|
|
758
768
|
description: o(a)("actions.delete.description"),
|
|
759
769
|
"entity-name": N.value && (N.value.name || N.value.id),
|
|
760
770
|
"entity-type": o(bt).GatewayService,
|
|
761
771
|
error: ve.value,
|
|
762
772
|
title: o(a)("actions.delete.title"),
|
|
763
|
-
visible:
|
|
773
|
+
visible: Z.value,
|
|
764
774
|
onCancel: k,
|
|
765
|
-
onProceed:
|
|
775
|
+
onProceed: J
|
|
766
776
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
767
777
|
]);
|
|
768
778
|
};
|
|
769
779
|
}
|
|
770
|
-
}), Ne = (n,
|
|
780
|
+
}), Ne = (n, B) => {
|
|
771
781
|
const y = n.__vccOpts || n;
|
|
772
|
-
for (const [p, a] of
|
|
782
|
+
for (const [p, a] of B)
|
|
773
783
|
y[p] = a;
|
|
774
784
|
return y;
|
|
775
|
-
},
|
|
785
|
+
}, Ul = /* @__PURE__ */ Ne(Lt, [["__scopeId", "data-v-ee4f8a6d"]]), Wt = { class: "kong-ui-entities-gateway-service-form" }, Dt = { key: 0 }, qt = { class: "gateway-service-form-traffic-label" }, Ot = { class: "gateway-service-form-margin-bottom" }, Gt = {
|
|
776
786
|
key: 0,
|
|
777
787
|
class: "gateway-service-form-group-fields"
|
|
778
788
|
}, Nt = {
|
|
779
789
|
key: 1,
|
|
780
790
|
class: "gateway-service-form-group-fields"
|
|
781
|
-
}, jt = { key: 0 }, zt = { class: "gateway-service-form-margin-top" }, Ht = { class: "gateway-service-form-margin-bottom" },
|
|
791
|
+
}, jt = { key: 0 }, zt = { class: "gateway-service-form-margin-top" }, Ht = { class: "gateway-service-form-margin-bottom" }, Jt = { class: "gateway-service-form-margin-bottom" }, Zt = { class: "gateway-service-form-margin-bottom" }, Qt = { class: "gateway-service-form-margin-bottom" }, Xt = {
|
|
782
792
|
key: 0,
|
|
783
793
|
class: "gateway-service-form-margin-bottom"
|
|
784
794
|
}, Yt = {
|
|
@@ -793,7 +803,7 @@ const ge = {
|
|
|
793
803
|
}, ll = {
|
|
794
804
|
key: 1,
|
|
795
805
|
class: "checkbox-aligned-radio"
|
|
796
|
-
}, ol = /* @__PURE__ */
|
|
806
|
+
}, ol = /* @__PURE__ */ Ke({
|
|
797
807
|
__name: "LegacyGatewayServiceForm",
|
|
798
808
|
props: {
|
|
799
809
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -816,9 +826,9 @@ const ge = {
|
|
|
816
826
|
}
|
|
817
827
|
},
|
|
818
828
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
819
|
-
setup(n, { expose:
|
|
829
|
+
setup(n, { expose: B, emit: y }) {
|
|
820
830
|
var ve;
|
|
821
|
-
const p = y, a = n, b = W(!0),
|
|
831
|
+
const p = y, a = n, b = W(!0), T = qe(), { i18nT: H, i18n: { t: r } } = ge.useI18n(), { getMessageFromError: L } = Xe(), { axiosInstance: I } = Oe((ve = a.config) == null ? void 0 : ve.axiosRequestConfig), ie = Ye(), de = h(() => ye.form[a.config.app].edit), X = h(() => a.gatewayServiceId ? Me.Edit : Me.Create), ke = W(!1), fe = h(() => !!a.gatewayServiceId), x = W(fe.value ? "protocol" : "url"), Y = ge.usePortFromProtocol(), ee = W(""), re = h(() => !!ee.value), l = Te({
|
|
822
832
|
fields: {
|
|
823
833
|
name: "",
|
|
824
834
|
protocol: "http",
|
|
@@ -838,7 +848,7 @@ const ge = {
|
|
|
838
848
|
},
|
|
839
849
|
isReadonly: !1,
|
|
840
850
|
errorMessage: ""
|
|
841
|
-
}),
|
|
851
|
+
}), A = Te({
|
|
842
852
|
name: "",
|
|
843
853
|
protocol: "http",
|
|
844
854
|
host: "",
|
|
@@ -913,45 +923,45 @@ const ge = {
|
|
|
913
923
|
value: "udp",
|
|
914
924
|
group: "udp"
|
|
915
925
|
}
|
|
916
|
-
], t = { url: "url", protocol: "protocol" },
|
|
926
|
+
], t = { url: "url", protocol: "protocol" }, $ = (i, f) => {
|
|
917
927
|
f.value;
|
|
918
928
|
}, ae = (i) => i ? parseFloat(i) : 0, ne = () => {
|
|
919
|
-
b.value = !0, l.errorMessage = "", l.fields.host =
|
|
929
|
+
b.value = !0, l.errorMessage = "", l.fields.host = A.host, l.fields.path = A.path, l.fields.port = A.port, l.fields.protocol = A.protocol, l.fields.url = A.url, l.fields.retries = A.retries, l.fields.connect_timeout = A.connect_timeout, l.fields.write_timeout = A.write_timeout, l.fields.read_timeout = A.read_timeout, l.fields.client_certificate = A.client_certificate, l.fields.ca_certificates = A.ca_certificates, l.fields.tls_verify_enabled = A.tls_verify_enabled, l.fields.tls_verify_value = A.tls_verify_value;
|
|
920
930
|
}, q = () => {
|
|
921
|
-
if (l.fields.url &&
|
|
931
|
+
if (l.fields.url && x.value === "url")
|
|
922
932
|
try {
|
|
923
933
|
const i = new URL(l.fields.url);
|
|
924
934
|
l.errorMessage = "", l.fields.protocol = i.protocol.slice(0, -1), l.fields.host = i.hostname, l.fields.path = i.pathname;
|
|
925
935
|
const f = Number(i.port);
|
|
926
936
|
ke.value = !!f, l.fields.port = f || Y.getPortFromProtocol(l.fields.protocol), l.errorMessage = "", p("url-valid:success");
|
|
927
937
|
} catch (i) {
|
|
928
|
-
l.errorMessage = r("errors.urlErrorMessage"), p("url-valid:error",
|
|
938
|
+
l.errorMessage = r("errors.urlErrorMessage"), p("url-valid:error", L(i));
|
|
929
939
|
}
|
|
930
940
|
else
|
|
931
941
|
p("url-valid:success"), l.errorMessage = "";
|
|
932
942
|
}, pe = h(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(l.fields.protocol)), ce = h(() => {
|
|
933
|
-
if (
|
|
943
|
+
if (x.value === "url")
|
|
934
944
|
return !0;
|
|
935
945
|
const i = ["https", "wss", "tls"].includes(l.fields.protocol);
|
|
936
|
-
return
|
|
946
|
+
return x.value === "protocol" && i;
|
|
937
947
|
}), _e = h(() => {
|
|
938
|
-
if (
|
|
948
|
+
if (x.value === "url")
|
|
939
949
|
return !0;
|
|
940
950
|
const i = ["https", "tls"].includes(l.fields.protocol);
|
|
941
|
-
return
|
|
951
|
+
return x.value === "protocol" && i;
|
|
942
952
|
}), Ve = h(() => {
|
|
943
|
-
if (
|
|
953
|
+
if (x.value === "url")
|
|
944
954
|
return !0;
|
|
945
955
|
const i = ["https", "wss", "tls"].includes(l.fields.protocol);
|
|
946
|
-
return
|
|
956
|
+
return x.value === "protocol" && i;
|
|
947
957
|
}), Ce = (i) => {
|
|
948
958
|
ee.value = ie.utf8Name(i);
|
|
949
|
-
}, me = h(() => fe.value && JSON.stringify(l.fields) !== JSON.stringify(
|
|
950
|
-
var f, k,
|
|
951
|
-
l.fields.name = (i == null ? void 0 : i.name) || "", l.fields.tags = ((f = i == null ? void 0 : i.tags) == null ? void 0 : f.join(", ")) || "", l.fields.protocol = (i == null ? void 0 : i.protocol) || "http", l.fields.path = (i == null ? void 0 : i.path) || "", l.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, l.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, l.fields.host = (i == null ? void 0 : i.host) || "", l.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, l.fields.tls_verify_enabled = (i == null ? void 0 : i.tls_verify) !== "" && (i == null ? void 0 : i.tls_verify) !== null && (i == null ? void 0 : i.tls_verify) !== void 0, l.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, l.fields.ca_certificates = ((k = i == null ? void 0 : i.ca_certificates) == null ? void 0 : k.join(",")) || "", l.fields.client_certificate = ((
|
|
959
|
+
}, me = h(() => fe.value && JSON.stringify(l.fields) !== JSON.stringify(A) || x.value === "url" && !!l.fields.url || x.value === "protocol" && !!l.fields.host), be = (i) => {
|
|
960
|
+
var f, k, J;
|
|
961
|
+
l.fields.name = (i == null ? void 0 : i.name) || "", l.fields.tags = ((f = i == null ? void 0 : i.tags) == null ? void 0 : f.join(", ")) || "", l.fields.protocol = (i == null ? void 0 : i.protocol) || "http", l.fields.path = (i == null ? void 0 : i.path) || "", l.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, l.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, l.fields.host = (i == null ? void 0 : i.host) || "", l.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, l.fields.tls_verify_enabled = (i == null ? void 0 : i.tls_verify) !== "" && (i == null ? void 0 : i.tls_verify) !== null && (i == null ? void 0 : i.tls_verify) !== void 0, l.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, l.fields.ca_certificates = ((k = i == null ? void 0 : i.ca_certificates) == null ? void 0 : k.join(",")) || "", l.fields.client_certificate = ((J = i == null ? void 0 : i.client_certificate) == null ? void 0 : J.id) || "", l.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, l.fields.port = i != null && i.port || (i == null ? void 0 : i.port) === 0 ? i == null ? void 0 : i.port : 80, Object.assign(A, l.fields);
|
|
952
962
|
}, Se = () => {
|
|
953
|
-
|
|
954
|
-
},
|
|
963
|
+
T.push(a.config.cancelRoute);
|
|
964
|
+
}, ue = h(() => {
|
|
955
965
|
var f, k;
|
|
956
966
|
let i = `${a.config.apiBaseUrl}${ye.form[a.config.app].validate}`;
|
|
957
967
|
return a.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((f = a.config) == null ? void 0 : f.controlPlaneId) || "") : a.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (k = a.config) != null && k.workspace ? `/${a.config.workspace}` : "")), i = i.replace(/{id}/gi, a.gatewayServiceId), i;
|
|
@@ -962,11 +972,11 @@ const ge = {
|
|
|
962
972
|
}), N = (i) => {
|
|
963
973
|
let f = "";
|
|
964
974
|
i.url && (f = new URL(i.url).protocol), (["https", "wss", "tls"].includes(i.protocol) || ["https", "wss", "tls"].includes(f)) && (i.tls_verify = i.tls_verify_enabled ? i.tls_verify_value : null), delete i.tls_verify_enabled, delete i.tls_verify_value;
|
|
965
|
-
},
|
|
966
|
-
var f, k,
|
|
975
|
+
}, Z = h(() => {
|
|
976
|
+
var f, k, J, K;
|
|
967
977
|
const i = {
|
|
968
978
|
name: l.fields.name || null,
|
|
969
|
-
tags: l.fields.tags ? (
|
|
979
|
+
tags: l.fields.tags ? (J = (k = (f = l.fields.tags) == null ? void 0 : f.split(",")) == null ? void 0 : k.map((U) => String(U || "").trim())) == null ? void 0 : J.filter((U) => U !== "") : null,
|
|
970
980
|
protocol: l.fields.protocol,
|
|
971
981
|
path: l.fields.path || null,
|
|
972
982
|
read_timeout: l.fields.read_timeout,
|
|
@@ -975,54 +985,54 @@ const ge = {
|
|
|
975
985
|
connect_timeout: l.fields.connect_timeout,
|
|
976
986
|
tls_verify_value: l.fields.tls_verify_value,
|
|
977
987
|
tls_verify_enabled: l.fields.tls_verify_enabled,
|
|
978
|
-
ca_certificates: l.fields.ca_certificates ? (
|
|
988
|
+
ca_certificates: l.fields.ca_certificates ? (K = l.fields.ca_certificates) == null ? void 0 : K.split(",").filter((U) => U !== "") : null,
|
|
979
989
|
client_certificate: l.fields.client_certificate ? { id: l.fields.client_certificate } : null,
|
|
980
990
|
write_timeout: l.fields.write_timeout,
|
|
981
991
|
port: l.fields.port,
|
|
982
992
|
url: l.fields.url
|
|
983
993
|
};
|
|
984
|
-
return l.fields.client_certificate && ["https", "wss", "tls"].includes(l.fields.protocol) && (i.client_certificate = { id: l.fields.client_certificate }), l.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(l.fields.protocol) && (i.tls_verify = l.fields.tls_verify_value), pe.value || (i.path = null), X.value === "create" ?
|
|
994
|
+
return l.fields.client_certificate && ["https", "wss", "tls"].includes(l.fields.protocol) && (i.client_certificate = { id: l.fields.client_certificate }), l.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(l.fields.protocol) && (i.tls_verify = l.fields.tls_verify_value), pe.value || (i.path = null), X.value === "create" ? x.value === "url" ? (delete i.protocol, delete i.host, delete i.path, a.config.app === "konnect" && delete i.port) : delete i.url : X.value === "edit" && delete i.url, i;
|
|
985
995
|
}), oe = async () => {
|
|
986
|
-
var i, f, k,
|
|
996
|
+
var i, f, k, J;
|
|
987
997
|
try {
|
|
988
998
|
l.isReadonly = !0, q();
|
|
989
|
-
const
|
|
990
|
-
N(
|
|
991
|
-
let
|
|
992
|
-
if (await I.post(
|
|
993
|
-
const { data: c } =
|
|
994
|
-
l.fields.name = (c == null ? void 0 : c.name) || "", l.fields.port = c.port || Y.getPortFromProtocol(c.protocol), l.fields.protocol = (c == null ? void 0 : c.protocol) || "http", l.fields.host = (c == null ? void 0 : c.host) || "", l.fields.path = (c == null ? void 0 : c.path) || "", l.fields.url = (c == null ? void 0 : c.url) || "", l.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, l.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, l.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, l.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, l.fields.client_certificate = ((f = c == null ? void 0 : c.client_certificate) == null ? void 0 : f.id) || "", l.fields.ca_certificates = (k = c == null ? void 0 : c.ca_certificates) != null && k.length ? c == null ? void 0 : c.ca_certificates.join(",") : "", l.fields.tls_verify_enabled = (c == null ? void 0 : c.tls_verify) !== "" && (c == null ? void 0 : c.tls_verify) !== null && (c == null ? void 0 : c.tls_verify) !== void 0, l.fields.tls_verify_value = l.fields.tls_verify_enabled && (c == null ? void 0 : c.tls_verify), l.fields.tags = (
|
|
999
|
+
const K = Z.value;
|
|
1000
|
+
N(K);
|
|
1001
|
+
let U;
|
|
1002
|
+
if (await I.post(ue.value, K), X.value === "create" ? U = await I.post(le.value, K) : X.value === "edit" && (U = ((i = a.config) == null ? void 0 : i.app) === "konnect" ? await I.put(le.value, K) : await I.patch(le.value, K)), U) {
|
|
1003
|
+
const { data: c } = U;
|
|
1004
|
+
l.fields.name = (c == null ? void 0 : c.name) || "", l.fields.port = c.port || Y.getPortFromProtocol(c.protocol), l.fields.protocol = (c == null ? void 0 : c.protocol) || "http", l.fields.host = (c == null ? void 0 : c.host) || "", l.fields.path = (c == null ? void 0 : c.path) || "", l.fields.url = (c == null ? void 0 : c.url) || "", l.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, l.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, l.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, l.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, l.fields.client_certificate = ((f = c == null ? void 0 : c.client_certificate) == null ? void 0 : f.id) || "", l.fields.ca_certificates = (k = c == null ? void 0 : c.ca_certificates) != null && k.length ? c == null ? void 0 : c.ca_certificates.join(",") : "", l.fields.tls_verify_enabled = (c == null ? void 0 : c.tls_verify) !== "" && (c == null ? void 0 : c.tls_verify) !== null && (c == null ? void 0 : c.tls_verify) !== void 0, l.fields.tls_verify_value = l.fields.tls_verify_enabled && (c == null ? void 0 : c.tls_verify), l.fields.tags = (J = c == null ? void 0 : c.tags) != null && J.length ? c.tags.join(", ") : "", Object.assign(A, l.fields), p("update", U == null ? void 0 : U.data);
|
|
995
1005
|
}
|
|
996
|
-
return
|
|
997
|
-
} catch (
|
|
998
|
-
l.errorMessage = K
|
|
1006
|
+
return U;
|
|
1007
|
+
} catch (K) {
|
|
1008
|
+
l.errorMessage = L(K), p("error", K);
|
|
999
1009
|
} finally {
|
|
1000
1010
|
l.isReadonly = !1;
|
|
1001
1011
|
}
|
|
1002
1012
|
};
|
|
1003
|
-
return
|
|
1004
|
-
Object.assign(l.fields,
|
|
1005
|
-
}),
|
|
1006
|
-
l.fields.port = Y.getPortFromProtocol(i.protocol, String(i.port)), p("model-updated",
|
|
1007
|
-
}),
|
|
1008
|
-
p("model-updated",
|
|
1009
|
-
}),
|
|
1013
|
+
return $e(() => a.gatewayServiceId, () => {
|
|
1014
|
+
Object.assign(l.fields, A);
|
|
1015
|
+
}), $e(l.fields, (i) => {
|
|
1016
|
+
l.fields.port = Y.getPortFromProtocol(i.protocol, String(i.port)), p("model-updated", Z.value);
|
|
1017
|
+
}), Ze(() => {
|
|
1018
|
+
p("model-updated", Z.value);
|
|
1019
|
+
}), B({
|
|
1010
1020
|
validateUrl: q,
|
|
1011
|
-
getPayload:
|
|
1021
|
+
getPayload: Z,
|
|
1012
1022
|
saveFormData: oe,
|
|
1013
1023
|
canSubmit: me,
|
|
1014
1024
|
initForm: be
|
|
1015
1025
|
}), (i, f) => {
|
|
1016
|
-
const k = D("KInput"),
|
|
1017
|
-
return C(),
|
|
1018
|
-
|
|
1026
|
+
const k = D("KInput"), J = D("KLabel"), K = D("KRadio"), U = D("KSelect"), c = D("KCheckbox"), g = D("KCollapse");
|
|
1027
|
+
return C(), F("div", Wt, [
|
|
1028
|
+
u(o(tt), {
|
|
1019
1029
|
"can-submit": me.value,
|
|
1020
1030
|
config: n.config,
|
|
1021
1031
|
"edit-id": n.gatewayServiceId,
|
|
1022
|
-
"entity-type": o(
|
|
1032
|
+
"entity-type": o(Ge).GatewayService,
|
|
1023
1033
|
"error-message": l.errorMessage,
|
|
1024
|
-
"fetch-url":
|
|
1025
|
-
"form-fields":
|
|
1034
|
+
"fetch-url": de.value,
|
|
1035
|
+
"form-fields": Z.value,
|
|
1026
1036
|
"is-readonly": l.isReadonly,
|
|
1027
1037
|
onCancel: Se,
|
|
1028
1038
|
"onFetch:error": f[25] || (f[25] = (m) => i.$emit("error", m)),
|
|
@@ -1038,13 +1048,13 @@ const ge = {
|
|
|
1038
1048
|
}, void 0, !0)
|
|
1039
1049
|
]),
|
|
1040
1050
|
default: v(() => [
|
|
1041
|
-
|
|
1051
|
+
u(o(Be), {
|
|
1042
1052
|
description: o(r)("gateway_services.form.sections.general.description"),
|
|
1043
1053
|
"hide-info-header": n.hideSectionsInfo,
|
|
1044
1054
|
title: o(r)("gateway_services.form.sections.general.title")
|
|
1045
1055
|
}, {
|
|
1046
1056
|
default: v(() => [
|
|
1047
|
-
|
|
1057
|
+
u(k, {
|
|
1048
1058
|
modelValue: l.fields.name,
|
|
1049
1059
|
"onUpdate:modelValue": f[0] || (f[0] = (m) => l.fields.name = m),
|
|
1050
1060
|
modelModifiers: { trim: !0 },
|
|
@@ -1063,7 +1073,7 @@ const ge = {
|
|
|
1063
1073
|
type: "text",
|
|
1064
1074
|
onInput: Ce
|
|
1065
1075
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1066
|
-
|
|
1076
|
+
u(k, {
|
|
1067
1077
|
modelValue: l.fields.tags,
|
|
1068
1078
|
"onUpdate:modelValue": f[1] || (f[1] = (m) => l.fields.tags = m),
|
|
1069
1079
|
modelModifiers: { trim: !0 },
|
|
@@ -1083,37 +1093,37 @@ const ge = {
|
|
|
1083
1093
|
]),
|
|
1084
1094
|
_: 1
|
|
1085
1095
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
1086
|
-
|
|
1096
|
+
u(o(Be), {
|
|
1087
1097
|
description: o(r)("gateway_services.form.sections.keys.description"),
|
|
1088
1098
|
"hide-info-header": n.hideSectionsInfo,
|
|
1089
1099
|
title: o(r)("gateway_services.form.sections.keys.title")
|
|
1090
1100
|
}, {
|
|
1091
1101
|
default: v(() => [
|
|
1092
|
-
fe.value ?
|
|
1102
|
+
fe.value ? M("", !0) : (C(), F("div", Dt, [
|
|
1093
1103
|
S("div", qt, [
|
|
1094
|
-
|
|
1104
|
+
u(J, { required: "" }, {
|
|
1095
1105
|
default: v(() => [
|
|
1096
|
-
z(
|
|
1106
|
+
z(P(o(r)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
1097
1107
|
]),
|
|
1098
1108
|
_: 1
|
|
1099
1109
|
})
|
|
1100
1110
|
]),
|
|
1101
|
-
S("div",
|
|
1102
|
-
|
|
1103
|
-
modelValue:
|
|
1104
|
-
"onUpdate:modelValue": f[2] || (f[2] = (m) =>
|
|
1111
|
+
S("div", Ot, [
|
|
1112
|
+
u(K, {
|
|
1113
|
+
modelValue: x.value,
|
|
1114
|
+
"onUpdate:modelValue": f[2] || (f[2] = (m) => x.value = m),
|
|
1105
1115
|
"data-testid": "gateway-service-url-radio",
|
|
1106
1116
|
"selected-value": t.url,
|
|
1107
1117
|
onChange: ne
|
|
1108
1118
|
}, {
|
|
1109
1119
|
default: v(() => [
|
|
1110
|
-
z(
|
|
1120
|
+
z(P(o(r)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
1111
1121
|
]),
|
|
1112
1122
|
_: 1
|
|
1113
1123
|
}, 8, ["modelValue", "selected-value"])
|
|
1114
1124
|
]),
|
|
1115
|
-
|
|
1116
|
-
|
|
1125
|
+
x.value === "url" ? (C(), F("div", Gt, [
|
|
1126
|
+
u(k, {
|
|
1117
1127
|
modelValue: l.fields.url,
|
|
1118
1128
|
"onUpdate:modelValue": f[3] || (f[3] = (m) => l.fields.url = m),
|
|
1119
1129
|
modelModifiers: { trim: !0 },
|
|
@@ -1128,23 +1138,23 @@ const ge = {
|
|
|
1128
1138
|
placeholder: o(r)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1129
1139
|
required: ""
|
|
1130
1140
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1131
|
-
])) :
|
|
1132
|
-
|
|
1133
|
-
modelValue:
|
|
1134
|
-
"onUpdate:modelValue": f[4] || (f[4] = (m) =>
|
|
1141
|
+
])) : M("", !0),
|
|
1142
|
+
u(K, {
|
|
1143
|
+
modelValue: x.value,
|
|
1144
|
+
"onUpdate:modelValue": f[4] || (f[4] = (m) => x.value = m),
|
|
1135
1145
|
"checked-group": "protocol",
|
|
1136
1146
|
"data-testid": "gateway-service-protocol-radio",
|
|
1137
1147
|
"selected-value": t.protocol,
|
|
1138
1148
|
onChange: ne
|
|
1139
1149
|
}, {
|
|
1140
1150
|
default: v(() => [
|
|
1141
|
-
z(
|
|
1151
|
+
z(P(o(r)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
1142
1152
|
]),
|
|
1143
1153
|
_: 1
|
|
1144
1154
|
}, 8, ["modelValue", "selected-value"])
|
|
1145
1155
|
])),
|
|
1146
|
-
|
|
1147
|
-
|
|
1156
|
+
x.value === "protocol" || fe.value ? (C(), F("div", Nt, [
|
|
1157
|
+
u(U, {
|
|
1148
1158
|
modelValue: l.fields.protocol,
|
|
1149
1159
|
"onUpdate:modelValue": f[5] || (f[5] = (m) => l.fields.protocol = m),
|
|
1150
1160
|
"data-testid": "gateway-service-protocol-select",
|
|
@@ -1157,9 +1167,9 @@ const ge = {
|
|
|
1157
1167
|
readonly: l.isReadonly,
|
|
1158
1168
|
required: "",
|
|
1159
1169
|
width: "100%",
|
|
1160
|
-
onSelected: f[6] || (f[6] = (m) =>
|
|
1170
|
+
onSelected: f[6] || (f[6] = (m) => $(l.fields.protocol, m))
|
|
1161
1171
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1162
|
-
|
|
1172
|
+
u(k, {
|
|
1163
1173
|
modelValue: l.fields.host,
|
|
1164
1174
|
"onUpdate:modelValue": f[7] || (f[7] = (m) => l.fields.host = m),
|
|
1165
1175
|
modelModifiers: { trim: !0 },
|
|
@@ -1174,8 +1184,8 @@ const ge = {
|
|
|
1174
1184
|
placeholder: o(r)("gateway_services.form.fields.host.placeholder"),
|
|
1175
1185
|
required: ""
|
|
1176
1186
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
1177
|
-
pe.value ? (C(),
|
|
1178
|
-
|
|
1187
|
+
pe.value ? (C(), F("div", jt, [
|
|
1188
|
+
u(k, {
|
|
1179
1189
|
modelValue: l.fields.path,
|
|
1180
1190
|
"onUpdate:modelValue": f[8] || (f[8] = (m) => l.fields.path = m),
|
|
1181
1191
|
modelModifiers: { trim: !0 },
|
|
@@ -1189,8 +1199,8 @@ const ge = {
|
|
|
1189
1199
|
name: "path",
|
|
1190
1200
|
placeholder: o(r)("gateway_services.form.fields.path.placeholder")
|
|
1191
1201
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1192
|
-
])) :
|
|
1193
|
-
|
|
1202
|
+
])) : M("", !0),
|
|
1203
|
+
u(k, {
|
|
1194
1204
|
modelValue: l.fields.port,
|
|
1195
1205
|
"onUpdate:modelValue": [
|
|
1196
1206
|
f[9] || (f[9] = (m) => l.fields.port = m),
|
|
@@ -1208,8 +1218,8 @@ const ge = {
|
|
|
1208
1218
|
name: "port",
|
|
1209
1219
|
type: "number"
|
|
1210
1220
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1211
|
-
])) :
|
|
1212
|
-
|
|
1221
|
+
])) : M("", !0),
|
|
1222
|
+
u(g, {
|
|
1213
1223
|
modelValue: b.value,
|
|
1214
1224
|
"onUpdate:modelValue": f[24] || (f[24] = (m) => b.value = m),
|
|
1215
1225
|
"data-testid": "advanced-fields-collapse",
|
|
@@ -1219,7 +1229,7 @@ const ge = {
|
|
|
1219
1229
|
default: v(() => [
|
|
1220
1230
|
S("div", zt, [
|
|
1221
1231
|
S("div", Ht, [
|
|
1222
|
-
|
|
1232
|
+
u(k, {
|
|
1223
1233
|
modelValue: l.fields.retries,
|
|
1224
1234
|
"onUpdate:modelValue": [
|
|
1225
1235
|
f[11] || (f[11] = (m) => l.fields.retries = m),
|
|
@@ -1239,8 +1249,8 @@ const ge = {
|
|
|
1239
1249
|
type: "number"
|
|
1240
1250
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1241
1251
|
]),
|
|
1242
|
-
S("div",
|
|
1243
|
-
|
|
1252
|
+
S("div", Jt, [
|
|
1253
|
+
u(k, {
|
|
1244
1254
|
modelValue: l.fields.connect_timeout,
|
|
1245
1255
|
"onUpdate:modelValue": [
|
|
1246
1256
|
f[13] || (f[13] = (m) => l.fields.connect_timeout = m),
|
|
@@ -1260,8 +1270,8 @@ const ge = {
|
|
|
1260
1270
|
type: "number"
|
|
1261
1271
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1262
1272
|
]),
|
|
1263
|
-
S("div",
|
|
1264
|
-
|
|
1273
|
+
S("div", Zt, [
|
|
1274
|
+
u(k, {
|
|
1265
1275
|
modelValue: l.fields.write_timeout,
|
|
1266
1276
|
"onUpdate:modelValue": [
|
|
1267
1277
|
f[15] || (f[15] = (m) => l.fields.write_timeout = m),
|
|
@@ -1282,7 +1292,7 @@ const ge = {
|
|
|
1282
1292
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1283
1293
|
]),
|
|
1284
1294
|
S("div", Qt, [
|
|
1285
|
-
|
|
1295
|
+
u(k, {
|
|
1286
1296
|
modelValue: l.fields.read_timeout,
|
|
1287
1297
|
"onUpdate:modelValue": [
|
|
1288
1298
|
f[17] || (f[17] = (m) => l.fields.read_timeout = m),
|
|
@@ -1302,8 +1312,8 @@ const ge = {
|
|
|
1302
1312
|
type: "number"
|
|
1303
1313
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1304
1314
|
]),
|
|
1305
|
-
ce.value ? (C(),
|
|
1306
|
-
|
|
1315
|
+
ce.value ? (C(), F("div", Xt, [
|
|
1316
|
+
u(k, {
|
|
1307
1317
|
modelValue: l.fields.client_certificate,
|
|
1308
1318
|
"onUpdate:modelValue": f[19] || (f[19] = (m) => l.fields.client_certificate = m),
|
|
1309
1319
|
modelModifiers: { trim: !0 },
|
|
@@ -1319,9 +1329,9 @@ const ge = {
|
|
|
1319
1329
|
readonly: l.isReadonly,
|
|
1320
1330
|
type: "text"
|
|
1321
1331
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
1322
|
-
])) :
|
|
1323
|
-
_e.value ? (C(),
|
|
1324
|
-
|
|
1332
|
+
])) : M("", !0),
|
|
1333
|
+
_e.value ? (C(), F("div", Yt, [
|
|
1334
|
+
u(k, {
|
|
1325
1335
|
modelValue: l.fields.ca_certificates,
|
|
1326
1336
|
"onUpdate:modelValue": f[20] || (f[20] = (m) => l.fields.ca_certificates = m),
|
|
1327
1337
|
modelModifiers: { trim: !0 },
|
|
@@ -1334,24 +1344,24 @@ const ge = {
|
|
|
1334
1344
|
type: "text"
|
|
1335
1345
|
}, {
|
|
1336
1346
|
"label-tooltip": v(() => [
|
|
1337
|
-
|
|
1347
|
+
u(o(H), {
|
|
1338
1348
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1339
1349
|
scope: "global"
|
|
1340
1350
|
}, {
|
|
1341
1351
|
code1: v(() => [
|
|
1342
|
-
S("code", null,
|
|
1352
|
+
S("code", null, P(o(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1343
1353
|
]),
|
|
1344
1354
|
code2: v(() => [
|
|
1345
|
-
S("code", null,
|
|
1355
|
+
S("code", null, P(o(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1346
1356
|
]),
|
|
1347
1357
|
_: 1
|
|
1348
1358
|
})
|
|
1349
1359
|
]),
|
|
1350
1360
|
_: 1
|
|
1351
1361
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
1352
|
-
])) :
|
|
1353
|
-
Ve.value ? (C(),
|
|
1354
|
-
|
|
1362
|
+
])) : M("", !0),
|
|
1363
|
+
Ve.value ? (C(), F("div", el, [
|
|
1364
|
+
u(c, {
|
|
1355
1365
|
modelValue: l.fields.tls_verify_enabled,
|
|
1356
1366
|
"onUpdate:modelValue": f[21] || (f[21] = (m) => l.fields.tls_verify_enabled = m),
|
|
1357
1367
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
@@ -1360,37 +1370,37 @@ const ge = {
|
|
|
1360
1370
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1361
1371
|
}, {
|
|
1362
1372
|
tooltip: v(() => [
|
|
1363
|
-
|
|
1373
|
+
u(o(H), {
|
|
1364
1374
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1365
1375
|
scope: "global"
|
|
1366
1376
|
}, {
|
|
1367
1377
|
code1: v(() => [
|
|
1368
|
-
S("code", null,
|
|
1378
|
+
S("code", null, P(o(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1369
1379
|
]),
|
|
1370
1380
|
_: 1
|
|
1371
1381
|
})
|
|
1372
1382
|
]),
|
|
1373
1383
|
_: 1
|
|
1374
1384
|
}, 8, ["modelValue", "description", "label"]),
|
|
1375
|
-
l.fields.tls_verify_enabled ? (C(),
|
|
1376
|
-
|
|
1385
|
+
l.fields.tls_verify_enabled ? (C(), F("div", tl, [
|
|
1386
|
+
u(K, {
|
|
1377
1387
|
modelValue: l.fields.tls_verify_value,
|
|
1378
1388
|
"onUpdate:modelValue": f[22] || (f[22] = (m) => l.fields.tls_verify_value = m),
|
|
1379
1389
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1380
1390
|
label: o(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1381
1391
|
"selected-value": !0
|
|
1382
1392
|
}, null, 8, ["modelValue", "label"])
|
|
1383
|
-
])) :
|
|
1384
|
-
l.fields.tls_verify_enabled ? (C(),
|
|
1385
|
-
|
|
1393
|
+
])) : M("", !0),
|
|
1394
|
+
l.fields.tls_verify_enabled ? (C(), F("div", ll, [
|
|
1395
|
+
u(K, {
|
|
1386
1396
|
modelValue: l.fields.tls_verify_value,
|
|
1387
1397
|
"onUpdate:modelValue": f[23] || (f[23] = (m) => l.fields.tls_verify_value = m),
|
|
1388
1398
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1389
1399
|
label: o(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1390
1400
|
"selected-value": !1
|
|
1391
1401
|
}, null, 8, ["modelValue", "label"])
|
|
1392
|
-
])) :
|
|
1393
|
-
])) :
|
|
1402
|
+
])) : M("", !0)
|
|
1403
|
+
])) : M("", !0)
|
|
1394
1404
|
])
|
|
1395
1405
|
]),
|
|
1396
1406
|
_: 1
|
|
@@ -1404,7 +1414,7 @@ const ge = {
|
|
|
1404
1414
|
]);
|
|
1405
1415
|
};
|
|
1406
1416
|
}
|
|
1407
|
-
}),
|
|
1417
|
+
}), xl = /* @__PURE__ */ Ne(ol, [["__scopeId", "data-v-c2c5e1f0"]]), il = { class: "kong-ui-gateway-service-entity-config-card" }, Al = /* @__PURE__ */ Ke({
|
|
1408
1418
|
__name: "GatewayServiceConfigCard",
|
|
1409
1419
|
props: {
|
|
1410
1420
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1431,7 +1441,7 @@ const ge = {
|
|
|
1431
1441
|
},
|
|
1432
1442
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1433
1443
|
setup(n) {
|
|
1434
|
-
const
|
|
1444
|
+
const B = n, { i18n: { t: y }, i18nT: p } = ge.useI18n(), a = h(() => ye.form[B.config.app].edit), { getPropValue: b } = ht(), T = (r, L) => b(r, L) === !0 ? y("gateway_services.form.fields.tls_verify_option.true.display") : y("gateway_services.form.fields.tls_verify_option.false.display"), H = W({
|
|
1435
1445
|
id: {},
|
|
1436
1446
|
name: {
|
|
1437
1447
|
tooltip: y("gateway_services.form.fields.name.tooltip")
|
|
@@ -1440,19 +1450,19 @@ const ge = {
|
|
|
1440
1450
|
updated_at: {},
|
|
1441
1451
|
created_at: {},
|
|
1442
1452
|
protocol: {
|
|
1443
|
-
section:
|
|
1453
|
+
section: Ue.Basic,
|
|
1444
1454
|
tooltip: y("gateway_services.form.fields.protocol.tooltip")
|
|
1445
1455
|
},
|
|
1446
1456
|
host: {
|
|
1447
|
-
section:
|
|
1457
|
+
section: Ue.Basic,
|
|
1448
1458
|
tooltip: y("gateway_services.form.fields.host.tooltip")
|
|
1449
1459
|
},
|
|
1450
1460
|
path: {
|
|
1451
|
-
section:
|
|
1461
|
+
section: Ue.Basic,
|
|
1452
1462
|
tooltip: y("gateway_services.form.fields.path.tooltip")
|
|
1453
1463
|
},
|
|
1454
1464
|
port: {
|
|
1455
|
-
section:
|
|
1465
|
+
section: Ue.Basic,
|
|
1456
1466
|
tooltip: y("gateway_services.form.fields.port.tooltip")
|
|
1457
1467
|
},
|
|
1458
1468
|
tags: {
|
|
@@ -1491,62 +1501,62 @@ const ge = {
|
|
|
1491
1501
|
hidden: !0
|
|
1492
1502
|
}
|
|
1493
1503
|
});
|
|
1494
|
-
return (r,
|
|
1495
|
-
|
|
1504
|
+
return (r, L) => (C(), F("div", il, [
|
|
1505
|
+
u(o(kt), {
|
|
1496
1506
|
config: n.config,
|
|
1497
1507
|
"config-card-doc": n.configCardDoc,
|
|
1498
|
-
"config-schema":
|
|
1499
|
-
"entity-type": o(
|
|
1508
|
+
"config-schema": H.value,
|
|
1509
|
+
"entity-type": o(Ge).GatewayService,
|
|
1500
1510
|
"fetch-url": a.value,
|
|
1501
1511
|
"hide-title": n.hideTitle,
|
|
1502
|
-
"onFetch:error":
|
|
1503
|
-
"onFetch:success":
|
|
1504
|
-
onLoading:
|
|
1512
|
+
"onFetch:error": L[0] || (L[0] = (I) => r.$emit("fetch:error", I)),
|
|
1513
|
+
"onFetch:success": L[1] || (L[1] = (I) => r.$emit("fetch:success", I)),
|
|
1514
|
+
onLoading: L[2] || (L[2] = (I) => r.$emit("loading", I))
|
|
1505
1515
|
}, {
|
|
1506
1516
|
"enabled-label-tooltip": v(() => [
|
|
1507
|
-
|
|
1517
|
+
u(o(p), {
|
|
1508
1518
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
1509
1519
|
scope: "global"
|
|
1510
1520
|
}, {
|
|
1511
1521
|
false: v(() => [
|
|
1512
|
-
S("code", null,
|
|
1522
|
+
S("code", null, P(o(y)("gateway_services.form.fields.enabled.false")), 1)
|
|
1513
1523
|
]),
|
|
1514
1524
|
true: v(() => [
|
|
1515
|
-
S("code", null,
|
|
1525
|
+
S("code", null, P(o(y)("gateway_services.form.fields.enabled.true")), 1)
|
|
1516
1526
|
]),
|
|
1517
1527
|
_: 1
|
|
1518
1528
|
})
|
|
1519
1529
|
]),
|
|
1520
1530
|
"ca_certificates-label-tooltip": v(() => [
|
|
1521
|
-
|
|
1531
|
+
u(o(p), {
|
|
1522
1532
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1523
1533
|
scope: "global"
|
|
1524
1534
|
}, {
|
|
1525
1535
|
code1: v(() => [
|
|
1526
|
-
S("code", null,
|
|
1536
|
+
S("code", null, P(o(y)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1527
1537
|
]),
|
|
1528
1538
|
code2: v(() => [
|
|
1529
|
-
S("code", null,
|
|
1539
|
+
S("code", null, P(o(y)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1530
1540
|
]),
|
|
1531
1541
|
_: 1
|
|
1532
1542
|
})
|
|
1533
1543
|
]),
|
|
1534
1544
|
"tls_verify-label-tooltip": v(() => [
|
|
1535
|
-
|
|
1545
|
+
u(o(p), {
|
|
1536
1546
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1537
1547
|
scope: "global"
|
|
1538
1548
|
}, {
|
|
1539
1549
|
code1: v(() => [
|
|
1540
|
-
S("code", null,
|
|
1550
|
+
S("code", null, P(o(y)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1541
1551
|
]),
|
|
1542
1552
|
_: 1
|
|
1543
1553
|
})
|
|
1544
1554
|
]),
|
|
1545
1555
|
tls_verify: v((I) => [
|
|
1546
|
-
z(
|
|
1556
|
+
z(P(typeof o(b)("rowValue", I) == "boolean" ? T("rowValue", I) : o(y)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1547
1557
|
]),
|
|
1548
1558
|
client_certificate: v((I) => [
|
|
1549
|
-
z(
|
|
1559
|
+
z(P(o(b)("rowValue", I) ? o(b)("rowValue", I).id : "–"), 1)
|
|
1550
1560
|
]),
|
|
1551
1561
|
_: 1
|
|
1552
1562
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -1554,41 +1564,41 @@ const ge = {
|
|
|
1554
1564
|
}
|
|
1555
1565
|
});
|
|
1556
1566
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1557
|
-
const
|
|
1567
|
+
const Je = () => {
|
|
1558
1568
|
};
|
|
1559
|
-
function rl(n,
|
|
1569
|
+
function rl(n, B) {
|
|
1560
1570
|
function y(...p) {
|
|
1561
1571
|
return new Promise((a, b) => {
|
|
1562
|
-
Promise.resolve(n(() =>
|
|
1572
|
+
Promise.resolve(n(() => B.apply(this, p), { fn: B, thisArg: this, args: p })).then(a).catch(b);
|
|
1563
1573
|
});
|
|
1564
1574
|
}
|
|
1565
1575
|
return y;
|
|
1566
1576
|
}
|
|
1567
|
-
function sl(n,
|
|
1568
|
-
let y, p, a =
|
|
1577
|
+
function sl(n, B = {}) {
|
|
1578
|
+
let y, p, a = Je;
|
|
1569
1579
|
const b = (r) => {
|
|
1570
|
-
clearTimeout(r), a(), a =
|
|
1580
|
+
clearTimeout(r), a(), a = Je;
|
|
1571
1581
|
};
|
|
1572
|
-
let
|
|
1582
|
+
let T;
|
|
1573
1583
|
return (r) => {
|
|
1574
|
-
const
|
|
1575
|
-
return y && b(y),
|
|
1576
|
-
a =
|
|
1577
|
-
y && b(y), p = null, ie(
|
|
1584
|
+
const L = ze(n), I = ze(B.maxWait);
|
|
1585
|
+
return y && b(y), L <= 0 || I !== void 0 && I <= 0 ? (p && (b(p), p = null), Promise.resolve(r())) : new Promise((ie, de) => {
|
|
1586
|
+
a = B.rejectOnCancel ? de : ie, T = r, I && !p && (p = setTimeout(() => {
|
|
1587
|
+
y && b(y), p = null, ie(T());
|
|
1578
1588
|
}, I)), y = setTimeout(() => {
|
|
1579
1589
|
p && b(p), p = null, ie(r());
|
|
1580
|
-
},
|
|
1590
|
+
}, L);
|
|
1581
1591
|
});
|
|
1582
1592
|
};
|
|
1583
1593
|
}
|
|
1584
|
-
function De(n,
|
|
1594
|
+
function De(n, B = 200, y = {}) {
|
|
1585
1595
|
return rl(
|
|
1586
|
-
sl(
|
|
1596
|
+
sl(B, y),
|
|
1587
1597
|
n
|
|
1588
1598
|
);
|
|
1589
1599
|
}
|
|
1590
1600
|
const te = {
|
|
1591
|
-
name: "
|
|
1601
|
+
name: "Kong-Air-Flights-API",
|
|
1592
1602
|
tags: [],
|
|
1593
1603
|
protocol: "https",
|
|
1594
1604
|
path: "/flights",
|
|
@@ -1603,10 +1613,10 @@ const te = {
|
|
|
1603
1613
|
}, al = { class: "kong-ui-entities-gateway-service-form" }, nl = {
|
|
1604
1614
|
key: 0,
|
|
1605
1615
|
class: "gateway-service-form-general-info"
|
|
1606
|
-
}, cl = { class: "gateway-service-form-group-selection-wrapper" },
|
|
1616
|
+
}, cl = { class: "gateway-service-form-group-selection-wrapper" }, ul = {
|
|
1607
1617
|
key: 0,
|
|
1608
1618
|
class: "gateway-service-form-group-fields"
|
|
1609
|
-
},
|
|
1619
|
+
}, dl = {
|
|
1610
1620
|
key: 0,
|
|
1611
1621
|
class: "gateway-service-form-group-fields"
|
|
1612
1622
|
}, fl = { key: 0 }, pl = {
|
|
@@ -1627,7 +1637,7 @@ const te = {
|
|
|
1627
1637
|
}, kl = {
|
|
1628
1638
|
key: 1,
|
|
1629
1639
|
class: "checkbox-aligned-radio"
|
|
1630
|
-
}, Vl = { class: "gateway-service-form-tags" }, Cl = { class: "form-error-list" }, Sl = /* @__PURE__ */
|
|
1640
|
+
}, Vl = { class: "gateway-service-form-tags" }, Cl = { class: "form-error-list" }, Sl = /* @__PURE__ */ Ke({
|
|
1631
1641
|
__name: "GatewayServiceForm",
|
|
1632
1642
|
props: {
|
|
1633
1643
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1661,9 +1671,9 @@ const te = {
|
|
|
1661
1671
|
}
|
|
1662
1672
|
},
|
|
1663
1673
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
1664
|
-
setup(n, { expose:
|
|
1674
|
+
setup(n, { expose: B, emit: y }) {
|
|
1665
1675
|
var he;
|
|
1666
|
-
const p = y, a = n, b = W(!0),
|
|
1676
|
+
const p = y, a = n, b = W(!0), T = qe(), { i18nT: H, i18n: { t: r } } = ge.useI18n(), { getErrorFieldsFromError: L } = Xe(), { axiosInstance: I } = Oe((he = a.config) == null ? void 0 : he.axiosRequestConfig), ie = Ye(), { validateHost: de, validatePath: X, validatePort: ke, validateProtocol: fe } = ge.useUrlValidators(), x = h(() => ye.form[a.config.app].edit), Y = h(() => a.gatewayServiceId ? Me.Edit : Me.Create), ee = W(!1), re = h(() => !!a.gatewayServiceId), l = W(re.value ? "protocol" : "url"), A = ge.usePortFromProtocol(), se = W(""), Pe = h(() => !!se.value || !!ue("name")), t = Te({
|
|
1667
1677
|
fields: {
|
|
1668
1678
|
name: "",
|
|
1669
1679
|
protocol: "http",
|
|
@@ -1699,7 +1709,7 @@ const te = {
|
|
|
1699
1709
|
tls_verify_enabled: "",
|
|
1700
1710
|
tls_verify_value: ""
|
|
1701
1711
|
}
|
|
1702
|
-
}),
|
|
1712
|
+
}), $ = Te({
|
|
1703
1713
|
name: "",
|
|
1704
1714
|
protocol: "http",
|
|
1705
1715
|
host: "",
|
|
@@ -1777,11 +1787,11 @@ const te = {
|
|
|
1777
1787
|
], q = { url: "url", protocol: "protocol" }, pe = (e, s) => {
|
|
1778
1788
|
s.value;
|
|
1779
1789
|
}, ce = (e) => e ? parseFloat(e) : 0, _e = () => {
|
|
1780
|
-
t.fields.host =
|
|
1790
|
+
t.fields.host = $.host, t.fields.path = $.path, t.fields.port = $.port, t.fields.protocol = $.protocol, t.fields.url = $.url, t.fields.retries = $.retries, t.fields.connect_timeout = $.connect_timeout, t.fields.write_timeout = $.write_timeout, t.fields.read_timeout = $.read_timeout, t.fields.client_certificate = $.client_certificate, t.fields.ca_certificates = $.ca_certificates, t.fields.tls_verify_enabled = $.tls_verify_enabled, t.fields.tls_verify_value = $.tls_verify_value;
|
|
1781
1791
|
}, Ve = () => {
|
|
1782
1792
|
b.value = !0, N(), t.errorMessages = [], _e();
|
|
1783
1793
|
}, Ce = () => {
|
|
1784
|
-
switch (_e(), t.fields.name = te.name, l.value) {
|
|
1794
|
+
switch (_e(), t.fields.name = `${te.name} + ${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, l.value) {
|
|
1785
1795
|
case "url":
|
|
1786
1796
|
t.fields.url = `${te.protocol}://${te.host}${te.path}`;
|
|
1787
1797
|
break;
|
|
@@ -1797,33 +1807,33 @@ const te = {
|
|
|
1797
1807
|
const e = new URL(t.fields.url), s = fe(e.protocol, ne);
|
|
1798
1808
|
if (s) throw new Error(s);
|
|
1799
1809
|
t.fields.protocol = e.protocol.slice(0, -1);
|
|
1800
|
-
const V =
|
|
1810
|
+
const V = de(e.hostname);
|
|
1801
1811
|
if (V) throw new Error(V);
|
|
1802
1812
|
t.fields.host = e.hostname;
|
|
1803
|
-
const
|
|
1804
|
-
if (
|
|
1813
|
+
const G = X(e.pathname);
|
|
1814
|
+
if (G) throw new Error(G);
|
|
1805
1815
|
t.fields.path = e.pathname;
|
|
1806
|
-
const
|
|
1807
|
-
if (
|
|
1816
|
+
const E = ke(e.port);
|
|
1817
|
+
if (E) throw new Error(E);
|
|
1808
1818
|
const R = Number(e.port);
|
|
1809
|
-
ee.value = !!R, t.fields.port = R ||
|
|
1819
|
+
ee.value = !!R, t.fields.port = R || A.getPortFromProtocol(t.fields.protocol), p("url-valid:success");
|
|
1810
1820
|
} catch (e) {
|
|
1811
|
-
p("url-valid:error", e.message || "
|
|
1821
|
+
p("url-valid:error", e.message || r("gateway_services.form.errors.url.invalid")), t.formFieldErrors.url = e.message || r("gateway_services.form.errors.url.invalid");
|
|
1812
1822
|
}
|
|
1813
1823
|
}, 300), be = De((e) => {
|
|
1814
|
-
N(e
|
|
1815
|
-
}, 300), Se = h(() => !!t.formFieldErrors.url || !!t.formFieldErrors.host || !!t.formFieldErrors.port),
|
|
1824
|
+
N(e);
|
|
1825
|
+
}, 300), Se = h(() => !!t.formFieldErrors.url || !!t.formFieldErrors.host || !!t.formFieldErrors.port), ue = (e) => {
|
|
1816
1826
|
if (t.errorMessages.length) return "";
|
|
1817
1827
|
const s = t.formFieldErrors;
|
|
1818
1828
|
return s[e] ? s[e] : "";
|
|
1819
1829
|
}, le = De((e) => {
|
|
1820
1830
|
N(e ?? void 0);
|
|
1821
|
-
const s =
|
|
1831
|
+
const s = de(t.fields.host);
|
|
1822
1832
|
s && (t.formFieldErrors.host = s);
|
|
1823
1833
|
const V = X(t.fields.path);
|
|
1824
1834
|
V && (t.formFieldErrors.path = V);
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1835
|
+
const G = ke(t.fields.port);
|
|
1836
|
+
G && (t.formFieldErrors.port = G), Z.value ? p("url-valid:success") : p("url-valid:error", t.errorMessages.join(",") || r("gateway_services.form.errors.url.invalid"));
|
|
1827
1837
|
}, 300), N = (e) => {
|
|
1828
1838
|
if (e)
|
|
1829
1839
|
t.formFieldErrors[e] = "";
|
|
@@ -1831,14 +1841,11 @@ const te = {
|
|
|
1831
1841
|
for (let s in t.formFieldErrors)
|
|
1832
1842
|
t.formFieldErrors[s] = "";
|
|
1833
1843
|
t.errorMessages = [];
|
|
1834
|
-
},
|
|
1835
|
-
let e
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
break;
|
|
1840
|
-
}
|
|
1841
|
-
return e;
|
|
1844
|
+
}, Z = h(() => {
|
|
1845
|
+
for (let e in t.formFieldErrors)
|
|
1846
|
+
if (t.formFieldErrors[e].length)
|
|
1847
|
+
return !1;
|
|
1848
|
+
return !0;
|
|
1842
1849
|
}), oe = () => {
|
|
1843
1850
|
t.fields.url && l.value === "url" ? me() : le();
|
|
1844
1851
|
}, ve = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, i = h(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(t.fields.protocol)), f = h(() => {
|
|
@@ -1851,23 +1858,23 @@ const te = {
|
|
|
1851
1858
|
return !0;
|
|
1852
1859
|
const e = ["https", "tls"].includes(t.fields.protocol);
|
|
1853
1860
|
return l.value === "protocol" && e;
|
|
1854
|
-
}),
|
|
1861
|
+
}), J = h(() => {
|
|
1855
1862
|
if (l.value === "url")
|
|
1856
1863
|
return !0;
|
|
1857
1864
|
const e = ["https", "wss", "tls"].includes(t.fields.protocol);
|
|
1858
1865
|
return l.value === "protocol" && e;
|
|
1859
|
-
}),
|
|
1866
|
+
}), K = (e) => {
|
|
1860
1867
|
se.value = ie.utf8Name(e);
|
|
1861
|
-
},
|
|
1868
|
+
}, U = h(() => {
|
|
1862
1869
|
if (re.value)
|
|
1863
|
-
return JSON.stringify(t.fields) !== JSON.stringify(
|
|
1864
|
-
const e = l.value === "url" && !!t.fields.url &&
|
|
1870
|
+
return JSON.stringify(t.fields) !== JSON.stringify($);
|
|
1871
|
+
const e = l.value === "url" && !!t.fields.url && Z.value, s = l.value === "protocol" && !!t.fields.host && Z.value;
|
|
1865
1872
|
return e || s;
|
|
1866
1873
|
}), c = (e) => {
|
|
1867
|
-
var s, V,
|
|
1868
|
-
t.fields.name = (e == null ? void 0 : e.name) || "", t.fields.tags = ((s = e == null ? void 0 : e.tags) == null ? void 0 : s.join(", ")) || "", t.fields.protocol = (e == null ? void 0 : e.protocol) || "http", t.fields.path = (e == null ? void 0 : e.path) || "", t.fields.read_timeout = e != null && e.read_timeout || (e == null ? void 0 : e.read_timeout) === 0 ? e == null ? void 0 : e.read_timeout : 6e4, t.fields.retries = e != null && e.retries || (e == null ? void 0 : e.retries) === 0 ? e == null ? void 0 : e.retries : 5, t.fields.host = (e == null ? void 0 : e.host) || "", t.fields.connect_timeout = e != null && e.connect_timeout || (e == null ? void 0 : e.connect_timeout) === 0 ? e == null ? void 0 : e.connect_timeout : 6e4, t.fields.tls_verify_enabled = (e == null ? void 0 : e.tls_verify) !== "" && (e == null ? void 0 : e.tls_verify) !== null && (e == null ? void 0 : e.tls_verify) !== void 0, t.fields.tls_verify_value = e != null && e.tls_verify ? e == null ? void 0 : e.tls_verify : !1, t.fields.ca_certificates = ((V = e == null ? void 0 : e.ca_certificates) == null ? void 0 : V.join(",")) || "", t.fields.client_certificate = ((
|
|
1874
|
+
var s, V, G;
|
|
1875
|
+
t.fields.name = (e == null ? void 0 : e.name) || "", t.fields.tags = ((s = e == null ? void 0 : e.tags) == null ? void 0 : s.join(", ")) || "", t.fields.protocol = (e == null ? void 0 : e.protocol) || "http", t.fields.path = (e == null ? void 0 : e.path) || "", t.fields.read_timeout = e != null && e.read_timeout || (e == null ? void 0 : e.read_timeout) === 0 ? e == null ? void 0 : e.read_timeout : 6e4, t.fields.retries = e != null && e.retries || (e == null ? void 0 : e.retries) === 0 ? e == null ? void 0 : e.retries : 5, t.fields.host = (e == null ? void 0 : e.host) || "", t.fields.connect_timeout = e != null && e.connect_timeout || (e == null ? void 0 : e.connect_timeout) === 0 ? e == null ? void 0 : e.connect_timeout : 6e4, t.fields.tls_verify_enabled = (e == null ? void 0 : e.tls_verify) !== "" && (e == null ? void 0 : e.tls_verify) !== null && (e == null ? void 0 : e.tls_verify) !== void 0, t.fields.tls_verify_value = e != null && e.tls_verify ? e == null ? void 0 : e.tls_verify : !1, t.fields.ca_certificates = ((V = e == null ? void 0 : e.ca_certificates) == null ? void 0 : V.join(",")) || "", t.fields.client_certificate = ((G = e == null ? void 0 : e.client_certificate) == null ? void 0 : G.id) || "", t.fields.write_timeout = e != null && e.write_timeout || (e == null ? void 0 : e.write_timeout) === 0 ? e == null ? void 0 : e.write_timeout : 6e4, t.fields.port = e != null && e.port || (e == null ? void 0 : e.port) === 0 ? e == null ? void 0 : e.port : 80, Object.assign($, t.fields);
|
|
1869
1876
|
}, g = () => {
|
|
1870
|
-
|
|
1877
|
+
T.push(a.config.cancelRoute);
|
|
1871
1878
|
}, m = h(() => {
|
|
1872
1879
|
var s, V;
|
|
1873
1880
|
let e = `${a.config.apiBaseUrl}${ye.form[a.config.app].validate}`;
|
|
@@ -1876,14 +1883,14 @@ const te = {
|
|
|
1876
1883
|
var s, V;
|
|
1877
1884
|
let e = `${a.config.apiBaseUrl}${ye.form[a.config.app][Y.value]}`;
|
|
1878
1885
|
return a.config.app === "konnect" ? e = e.replace(/{controlPlaneId}/gi, ((s = a.config) == null ? void 0 : s.controlPlaneId) || "") : a.config.app === "kongManager" && (e = e.replace(/\/{workspace}/gi, (V = a.config) != null && V.workspace ? `/${a.config.workspace}` : "")), e = e.replace(/{id}/gi, a.gatewayServiceId), e;
|
|
1879
|
-
}),
|
|
1886
|
+
}), O = (e) => {
|
|
1880
1887
|
let s = "";
|
|
1881
1888
|
e.url && (s = new URL(e.url).protocol), (["https", "wss", "tls"].includes(e.protocol) || ["https", "wss", "tls"].includes(s)) && (e.tls_verify = e.tls_verify_enabled ? e.tls_verify_value : null), delete e.tls_verify_enabled, delete e.tls_verify_value;
|
|
1882
1889
|
}, Q = h(() => {
|
|
1883
|
-
var s, V,
|
|
1890
|
+
var s, V, G, E;
|
|
1884
1891
|
const e = {
|
|
1885
1892
|
name: t.fields.name || null,
|
|
1886
|
-
tags: t.fields.tags ? (
|
|
1893
|
+
tags: t.fields.tags ? (G = (V = (s = t.fields.tags) == null ? void 0 : s.split(",")) == null ? void 0 : V.map((R) => String(R || "").trim())) == null ? void 0 : G.filter((R) => R !== "") : null,
|
|
1887
1894
|
protocol: t.fields.protocol,
|
|
1888
1895
|
path: t.fields.path || null,
|
|
1889
1896
|
read_timeout: t.fields.read_timeout,
|
|
@@ -1892,7 +1899,7 @@ const te = {
|
|
|
1892
1899
|
connect_timeout: t.fields.connect_timeout,
|
|
1893
1900
|
tls_verify_value: t.fields.tls_verify_value,
|
|
1894
1901
|
tls_verify_enabled: t.fields.tls_verify_enabled,
|
|
1895
|
-
ca_certificates: t.fields.ca_certificates ? (
|
|
1902
|
+
ca_certificates: t.fields.ca_certificates ? (E = t.fields.ca_certificates) == null ? void 0 : E.split(",").filter((R) => R !== "") : null,
|
|
1896
1903
|
client_certificate: t.fields.client_certificate ? { id: t.fields.client_certificate } : null,
|
|
1897
1904
|
write_timeout: t.fields.write_timeout,
|
|
1898
1905
|
port: t.fields.port,
|
|
@@ -1900,51 +1907,51 @@ const te = {
|
|
|
1900
1907
|
};
|
|
1901
1908
|
return t.fields.client_certificate && ["https", "wss", "tls"].includes(t.fields.protocol) && (e.client_certificate = { id: t.fields.client_certificate }), t.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(t.fields.protocol) && (e.tls_verify = t.fields.tls_verify_value), i.value || (e.path = null), Y.value === "create" ? l.value === "url" ? (delete e.protocol, delete e.host, delete e.path, a.config.app === "konnect" && delete e.port) : delete e.url : Y.value === "edit" && delete e.url, e;
|
|
1902
1909
|
}), j = async () => {
|
|
1903
|
-
var e, s, V,
|
|
1910
|
+
var e, s, V, G;
|
|
1904
1911
|
try {
|
|
1905
1912
|
t.isReadonly = !0, oe();
|
|
1906
|
-
const
|
|
1907
|
-
|
|
1913
|
+
const E = Q.value;
|
|
1914
|
+
O(E);
|
|
1908
1915
|
let R;
|
|
1909
|
-
if (await I.post(m.value,
|
|
1910
|
-
const { data:
|
|
1911
|
-
t.fields.name = (
|
|
1916
|
+
if (await I.post(m.value, E), Y.value === "create" ? R = await I.post(w.value, E) : Y.value === "edit" && (R = ((e = a.config) == null ? void 0 : e.app) === "konnect" ? await I.put(w.value, E) : await I.patch(w.value, E)), R) {
|
|
1917
|
+
const { data: d } = R;
|
|
1918
|
+
t.fields.name = (d == null ? void 0 : d.name) || "", t.fields.port = d.port || A.getPortFromProtocol(d.protocol), t.fields.protocol = (d == null ? void 0 : d.protocol) || "http", t.fields.host = (d == null ? void 0 : d.host) || "", t.fields.path = (d == null ? void 0 : d.path) || "", t.fields.url = (d == null ? void 0 : d.url) || "", t.fields.retries = d != null && d.retries || (d == null ? void 0 : d.retries) === 0 ? d == null ? void 0 : d.retries : 5, t.fields.connect_timeout = d != null && d.connect_timeout || (d == null ? void 0 : d.connect_timeout) === 0 ? d == null ? void 0 : d.connect_timeout : 6e4, t.fields.write_timeout = d != null && d.write_timeout || (d == null ? void 0 : d.write_timeout) === 0 ? d == null ? void 0 : d.write_timeout : 6e4, t.fields.read_timeout = d != null && d.read_timeout || (d == null ? void 0 : d.read_timeout) === 0 ? d == null ? void 0 : d.read_timeout : 6e4, t.fields.client_certificate = ((s = d == null ? void 0 : d.client_certificate) == null ? void 0 : s.id) || "", t.fields.ca_certificates = (V = d == null ? void 0 : d.ca_certificates) != null && V.length ? d == null ? void 0 : d.ca_certificates.join(",") : "", t.fields.tls_verify_enabled = (d == null ? void 0 : d.tls_verify) !== "" && (d == null ? void 0 : d.tls_verify) !== null && (d == null ? void 0 : d.tls_verify) !== void 0, t.fields.tls_verify_value = t.fields.tls_verify_enabled && (d == null ? void 0 : d.tls_verify), t.fields.tags = (G = d == null ? void 0 : d.tags) != null && G.length ? d.tags.join(", ") : "", Object.assign($, t.fields), p("update", R == null ? void 0 : R.data);
|
|
1912
1919
|
}
|
|
1913
1920
|
return R;
|
|
1914
|
-
} catch (
|
|
1915
|
-
const { fields: R, messages:
|
|
1916
|
-
t.errorMessages =
|
|
1921
|
+
} catch (E) {
|
|
1922
|
+
const { fields: R, messages: d } = L(E);
|
|
1923
|
+
t.errorMessages = d, R.length && R.forEach((we) => {
|
|
1917
1924
|
const Ie = we.field;
|
|
1918
1925
|
Ie === "client_certificate.id" ? t.formFieldErrors.client_certificate = we.message : Ie.startsWith("ca_certificates") ? t.formFieldErrors.ca_certificates = we.message : Object.keys(t.formFieldErrors).includes(Ie) && (t.formFieldErrors = {
|
|
1919
1926
|
...t.formFieldErrors,
|
|
1920
1927
|
[Ie]: we.message
|
|
1921
1928
|
});
|
|
1922
|
-
}), p("error",
|
|
1929
|
+
}), p("error", E);
|
|
1923
1930
|
} finally {
|
|
1924
1931
|
t.isReadonly = !1;
|
|
1925
1932
|
}
|
|
1926
1933
|
};
|
|
1927
|
-
return
|
|
1928
|
-
Object.assign(t.fields,
|
|
1929
|
-
}),
|
|
1930
|
-
t.fields.port =
|
|
1931
|
-
}),
|
|
1934
|
+
return $e(() => a.gatewayServiceId, () => {
|
|
1935
|
+
Object.assign(t.fields, $);
|
|
1936
|
+
}), $e(t.fields, (e) => {
|
|
1937
|
+
t.fields.port = A.getPortFromProtocol(e.protocol, String(e.port)), p("model-updated", Q.value);
|
|
1938
|
+
}), Ze(() => {
|
|
1932
1939
|
p("model-updated", Q.value), re.value || (t.fields.name = ve());
|
|
1933
|
-
}),
|
|
1940
|
+
}), B({
|
|
1934
1941
|
validateUrl: oe,
|
|
1935
1942
|
getPayload: Q,
|
|
1936
1943
|
saveFormData: j,
|
|
1937
|
-
canSubmit:
|
|
1944
|
+
canSubmit: U,
|
|
1938
1945
|
initForm: c
|
|
1939
1946
|
}), (e, s) => {
|
|
1940
|
-
const V = D("KRadio"),
|
|
1941
|
-
return C(),
|
|
1942
|
-
|
|
1943
|
-
"can-submit":
|
|
1947
|
+
const V = D("KRadio"), G = D("KButton"), E = D("KInput"), R = D("KSelect"), d = D("KCheckbox"), we = D("KCollapse"), Ie = D("KAlert");
|
|
1948
|
+
return C(), F("div", al, [
|
|
1949
|
+
u(o(tt), {
|
|
1950
|
+
"can-submit": U.value,
|
|
1944
1951
|
config: n.config,
|
|
1945
1952
|
"edit-id": n.gatewayServiceId,
|
|
1946
|
-
"entity-type": o(
|
|
1947
|
-
"fetch-url":
|
|
1953
|
+
"entity-type": o(Ge).GatewayService,
|
|
1954
|
+
"fetch-url": x.value,
|
|
1948
1955
|
"form-fields": Q.value,
|
|
1949
1956
|
"is-readonly": t.isReadonly,
|
|
1950
1957
|
onCancel: g,
|
|
@@ -1955,21 +1962,21 @@ const te = {
|
|
|
1955
1962
|
}, {
|
|
1956
1963
|
"form-actions": v(() => [
|
|
1957
1964
|
Qe(e.$slots, "form-actions", {
|
|
1958
|
-
canSubmit:
|
|
1965
|
+
canSubmit: U.value,
|
|
1959
1966
|
cancel: g,
|
|
1960
1967
|
submit: j
|
|
1961
1968
|
}, void 0, !0)
|
|
1962
1969
|
]),
|
|
1963
1970
|
default: v(() => [
|
|
1964
|
-
|
|
1971
|
+
u(o(Be), {
|
|
1965
1972
|
description: o(r)("gateway_services.form.sections.keys.description"),
|
|
1966
1973
|
"hide-info-header": n.hideSectionsInfo,
|
|
1967
1974
|
title: o(r)("gateway_services.form.sections.keys.title")
|
|
1968
1975
|
}, {
|
|
1969
1976
|
default: v(() => [
|
|
1970
|
-
re.value ?
|
|
1977
|
+
re.value ? M("", !0) : (C(), F("div", nl, [
|
|
1971
1978
|
S("div", cl, [
|
|
1972
|
-
|
|
1979
|
+
u(V, {
|
|
1973
1980
|
modelValue: l.value,
|
|
1974
1981
|
"onUpdate:modelValue": s[0] || (s[0] = (_) => l.value = _),
|
|
1975
1982
|
card: "",
|
|
@@ -1980,7 +1987,7 @@ const te = {
|
|
|
1980
1987
|
"selected-value": q.url,
|
|
1981
1988
|
onChange: Ve
|
|
1982
1989
|
}, null, 8, ["modelValue", "description", "label", "selected-value"]),
|
|
1983
|
-
|
|
1990
|
+
u(V, {
|
|
1984
1991
|
modelValue: l.value,
|
|
1985
1992
|
"onUpdate:modelValue": s[1] || (s[1] = (_) => l.value = _),
|
|
1986
1993
|
card: "",
|
|
@@ -1993,17 +2000,17 @@ const te = {
|
|
|
1993
2000
|
onChange: Ve
|
|
1994
2001
|
}, null, 8, ["modelValue", "description", "label", "selected-value"])
|
|
1995
2002
|
]),
|
|
1996
|
-
|
|
2003
|
+
u(We, { name: "slide-fade" }, {
|
|
1997
2004
|
default: v(() => [
|
|
1998
|
-
l.value === "url" ? (C(),
|
|
1999
|
-
|
|
2005
|
+
l.value === "url" ? (C(), F("div", ul, [
|
|
2006
|
+
u(E, {
|
|
2000
2007
|
modelValue: t.fields.url,
|
|
2001
2008
|
"onUpdate:modelValue": s[2] || (s[2] = (_) => t.fields.url = _),
|
|
2002
2009
|
modelModifiers: { trim: !0 },
|
|
2003
2010
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
2004
2011
|
"data-testid": "gateway-service-url-input",
|
|
2005
2012
|
error: Se.value,
|
|
2006
|
-
"error-message":
|
|
2013
|
+
"error-message": ue("url"),
|
|
2007
2014
|
label: o(r)("gateway_services.form.fields.upstream_url.label"),
|
|
2008
2015
|
"label-attributes": {
|
|
2009
2016
|
info: n.config.app === "konnect" ? o(r)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : o(r)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
|
|
@@ -2017,29 +2024,29 @@ const te = {
|
|
|
2017
2024
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2018
2025
|
name: "after",
|
|
2019
2026
|
fn: v(() => [
|
|
2020
|
-
|
|
2027
|
+
u(G, {
|
|
2021
2028
|
appearance: "tertiary",
|
|
2022
2029
|
size: "small",
|
|
2023
2030
|
onClick: Ce
|
|
2024
2031
|
}, {
|
|
2025
|
-
default: v(() =>
|
|
2026
|
-
z("
|
|
2027
|
-
])
|
|
2032
|
+
default: v(() => [
|
|
2033
|
+
z(P(o(r)("gateway_services.form.buttons.try_sample")), 1)
|
|
2034
|
+
]),
|
|
2028
2035
|
_: 1
|
|
2029
2036
|
})
|
|
2030
2037
|
]),
|
|
2031
2038
|
key: "0"
|
|
2032
2039
|
}
|
|
2033
2040
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "onInput"])
|
|
2034
|
-
])) :
|
|
2041
|
+
])) : M("", !0)
|
|
2035
2042
|
]),
|
|
2036
2043
|
_: 1
|
|
2037
2044
|
})
|
|
2038
2045
|
])),
|
|
2039
|
-
|
|
2046
|
+
u(We, { name: "slide-fade" }, {
|
|
2040
2047
|
default: v(() => [
|
|
2041
|
-
l.value === "protocol" || re.value ? (C(),
|
|
2042
|
-
|
|
2048
|
+
l.value === "protocol" || re.value ? (C(), F("div", dl, [
|
|
2049
|
+
u(R, {
|
|
2043
2050
|
modelValue: t.fields.protocol,
|
|
2044
2051
|
"onUpdate:modelValue": s[3] || (s[3] = (_) => t.fields.protocol = _),
|
|
2045
2052
|
"data-testid": "gateway-service-protocol-select",
|
|
@@ -2054,14 +2061,14 @@ const te = {
|
|
|
2054
2061
|
width: "100%",
|
|
2055
2062
|
onSelected: s[4] || (s[4] = (_) => pe(t.fields.protocol, _))
|
|
2056
2063
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2057
|
-
|
|
2064
|
+
u(E, {
|
|
2058
2065
|
modelValue: t.fields.host,
|
|
2059
2066
|
"onUpdate:modelValue": s[5] || (s[5] = (_) => t.fields.host = _),
|
|
2060
2067
|
modelModifiers: { trim: !0 },
|
|
2061
2068
|
class: "gateway-service-form-margin-top",
|
|
2062
2069
|
"data-testid": "gateway-service-host-input",
|
|
2063
2070
|
error: !!t.formFieldErrors.host,
|
|
2064
|
-
"error-message":
|
|
2071
|
+
"error-message": ue("host"),
|
|
2065
2072
|
label: o(r)("gateway_services.form.fields.host.label"),
|
|
2066
2073
|
"label-attributes": {
|
|
2067
2074
|
info: o(r)("gateway_services.form.fields.host.tooltip"),
|
|
@@ -2075,29 +2082,29 @@ const te = {
|
|
|
2075
2082
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2076
2083
|
name: "after",
|
|
2077
2084
|
fn: v(() => [
|
|
2078
|
-
|
|
2085
|
+
u(G, {
|
|
2079
2086
|
appearance: "tertiary",
|
|
2080
2087
|
size: "small",
|
|
2081
2088
|
onClick: Ce
|
|
2082
2089
|
}, {
|
|
2083
|
-
default: v(() =>
|
|
2084
|
-
z("
|
|
2085
|
-
])
|
|
2090
|
+
default: v(() => [
|
|
2091
|
+
z(P(o(r)("gateway_services.form.buttons.try_sample")), 1)
|
|
2092
|
+
]),
|
|
2086
2093
|
_: 1
|
|
2087
2094
|
})
|
|
2088
2095
|
]),
|
|
2089
2096
|
key: "0"
|
|
2090
2097
|
}
|
|
2091
2098
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
2092
|
-
i.value ? (C(),
|
|
2093
|
-
|
|
2099
|
+
i.value ? (C(), F("div", fl, [
|
|
2100
|
+
u(E, {
|
|
2094
2101
|
modelValue: t.fields.path,
|
|
2095
2102
|
"onUpdate:modelValue": s[7] || (s[7] = (_) => t.fields.path = _),
|
|
2096
2103
|
modelModifiers: { trim: !0 },
|
|
2097
2104
|
class: "gateway-service-form-margin-top",
|
|
2098
2105
|
"data-testid": "gateway-service-path-input",
|
|
2099
2106
|
error: !!t.formFieldErrors.path,
|
|
2100
|
-
"error-message":
|
|
2107
|
+
"error-message": ue("path"),
|
|
2101
2108
|
label: o(r)("gateway_services.form.fields.path.label"),
|
|
2102
2109
|
"label-attributes": {
|
|
2103
2110
|
info: o(r)("gateway_services.form.fields.path.tooltip"),
|
|
@@ -2107,8 +2114,8 @@ const te = {
|
|
|
2107
2114
|
placeholder: o(r)("gateway_services.form.fields.path.placeholder"),
|
|
2108
2115
|
onInput: s[8] || (s[8] = (_) => o(le)("path"))
|
|
2109
2116
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
2110
|
-
])) :
|
|
2111
|
-
|
|
2117
|
+
])) : M("", !0),
|
|
2118
|
+
u(E, {
|
|
2112
2119
|
modelValue: t.fields.port,
|
|
2113
2120
|
"onUpdate:modelValue": [
|
|
2114
2121
|
s[9] || (s[9] = (_) => t.fields.port = _),
|
|
@@ -2119,7 +2126,7 @@ const te = {
|
|
|
2119
2126
|
class: "gateway-service-form-margin-top",
|
|
2120
2127
|
"data-testid": "gateway-service-port-input",
|
|
2121
2128
|
error: !!t.formFieldErrors.port,
|
|
2122
|
-
"error-message":
|
|
2129
|
+
"error-message": ue("port"),
|
|
2123
2130
|
label: o(r)("gateway_services.form.fields.port.label"),
|
|
2124
2131
|
"label-attributes": {
|
|
2125
2132
|
info: o(r)("gateway_services.form.fields.port.tooltip"),
|
|
@@ -2129,11 +2136,11 @@ const te = {
|
|
|
2129
2136
|
type: "number",
|
|
2130
2137
|
onInput: s[10] || (s[10] = (_) => o(le)("port"))
|
|
2131
2138
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
2132
|
-
])) :
|
|
2139
|
+
])) : M("", !0)
|
|
2133
2140
|
]),
|
|
2134
2141
|
_: 1
|
|
2135
2142
|
}),
|
|
2136
|
-
|
|
2143
|
+
u(we, {
|
|
2137
2144
|
modelValue: b.value,
|
|
2138
2145
|
"onUpdate:modelValue": s[27] || (s[27] = (_) => b.value = _),
|
|
2139
2146
|
"data-testid": "advanced-fields-collapse",
|
|
@@ -2141,11 +2148,11 @@ const te = {
|
|
|
2141
2148
|
"trigger-label": o(r)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
2142
2149
|
}, {
|
|
2143
2150
|
default: v(() => [
|
|
2144
|
-
|
|
2151
|
+
u(We, { name: "slide-fade" }, {
|
|
2145
2152
|
default: v(() => [
|
|
2146
|
-
b.value ?
|
|
2153
|
+
b.value ? M("", !0) : (C(), F("div", pl, [
|
|
2147
2154
|
S("div", ml, [
|
|
2148
|
-
|
|
2155
|
+
u(E, {
|
|
2149
2156
|
modelValue: t.fields.retries,
|
|
2150
2157
|
"onUpdate:modelValue": [
|
|
2151
2158
|
s[12] || (s[12] = (_) => t.fields.retries = _),
|
|
@@ -2166,7 +2173,7 @@ const te = {
|
|
|
2166
2173
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2167
2174
|
]),
|
|
2168
2175
|
S("div", vl, [
|
|
2169
|
-
|
|
2176
|
+
u(E, {
|
|
2170
2177
|
modelValue: t.fields.connect_timeout,
|
|
2171
2178
|
"onUpdate:modelValue": [
|
|
2172
2179
|
s[14] || (s[14] = (_) => t.fields.connect_timeout = _),
|
|
@@ -2187,7 +2194,7 @@ const te = {
|
|
|
2187
2194
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2188
2195
|
]),
|
|
2189
2196
|
S("div", gl, [
|
|
2190
|
-
|
|
2197
|
+
u(E, {
|
|
2191
2198
|
modelValue: t.fields.write_timeout,
|
|
2192
2199
|
"onUpdate:modelValue": [
|
|
2193
2200
|
s[16] || (s[16] = (_) => t.fields.write_timeout = _),
|
|
@@ -2208,7 +2215,7 @@ const te = {
|
|
|
2208
2215
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2209
2216
|
]),
|
|
2210
2217
|
S("div", yl, [
|
|
2211
|
-
|
|
2218
|
+
u(E, {
|
|
2212
2219
|
modelValue: t.fields.read_timeout,
|
|
2213
2220
|
"onUpdate:modelValue": [
|
|
2214
2221
|
s[18] || (s[18] = (_) => t.fields.read_timeout = _),
|
|
@@ -2228,8 +2235,8 @@ const te = {
|
|
|
2228
2235
|
type: "number"
|
|
2229
2236
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2230
2237
|
]),
|
|
2231
|
-
f.value ? (C(),
|
|
2232
|
-
|
|
2238
|
+
f.value ? (C(), F("div", _l, [
|
|
2239
|
+
u(E, {
|
|
2233
2240
|
modelValue: t.fields.client_certificate,
|
|
2234
2241
|
"onUpdate:modelValue": s[20] || (s[20] = (_) => t.fields.client_certificate = _),
|
|
2235
2242
|
modelModifiers: { trim: !0 },
|
|
@@ -2247,9 +2254,9 @@ const te = {
|
|
|
2247
2254
|
type: "text",
|
|
2248
2255
|
onInput: s[21] || (s[21] = (_) => o(be)("client_certificate"))
|
|
2249
2256
|
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
|
|
2250
|
-
])) :
|
|
2251
|
-
k.value ? (C(),
|
|
2252
|
-
|
|
2257
|
+
])) : M("", !0),
|
|
2258
|
+
k.value ? (C(), F("div", bl, [
|
|
2259
|
+
u(E, {
|
|
2253
2260
|
modelValue: t.fields.ca_certificates,
|
|
2254
2261
|
"onUpdate:modelValue": s[22] || (s[22] = (_) => t.fields.ca_certificates = _),
|
|
2255
2262
|
modelModifiers: { trim: !0 },
|
|
@@ -2264,24 +2271,24 @@ const te = {
|
|
|
2264
2271
|
onInput: s[23] || (s[23] = (_) => o(be)("ca_certificates"))
|
|
2265
2272
|
}, {
|
|
2266
2273
|
"label-tooltip": v(() => [
|
|
2267
|
-
|
|
2274
|
+
u(o(H), {
|
|
2268
2275
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
2269
2276
|
scope: "global"
|
|
2270
2277
|
}, {
|
|
2271
2278
|
code1: v(() => [
|
|
2272
|
-
S("code", null,
|
|
2279
|
+
S("code", null, P(o(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
2273
2280
|
]),
|
|
2274
2281
|
code2: v(() => [
|
|
2275
|
-
S("code", null,
|
|
2282
|
+
S("code", null, P(o(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
2276
2283
|
]),
|
|
2277
2284
|
_: 1
|
|
2278
2285
|
})
|
|
2279
2286
|
]),
|
|
2280
2287
|
_: 1
|
|
2281
2288
|
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
|
|
2282
|
-
])) :
|
|
2283
|
-
|
|
2284
|
-
d
|
|
2289
|
+
])) : M("", !0),
|
|
2290
|
+
J.value ? (C(), F("div", hl, [
|
|
2291
|
+
u(d, {
|
|
2285
2292
|
modelValue: t.fields.tls_verify_enabled,
|
|
2286
2293
|
"onUpdate:modelValue": s[24] || (s[24] = (_) => t.fields.tls_verify_enabled = _),
|
|
2287
2294
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
@@ -2290,37 +2297,37 @@ const te = {
|
|
|
2290
2297
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
2291
2298
|
}, {
|
|
2292
2299
|
tooltip: v(() => [
|
|
2293
|
-
|
|
2300
|
+
u(o(H), {
|
|
2294
2301
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
2295
2302
|
scope: "global"
|
|
2296
2303
|
}, {
|
|
2297
2304
|
code1: v(() => [
|
|
2298
|
-
S("code", null,
|
|
2305
|
+
S("code", null, P(o(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
2299
2306
|
]),
|
|
2300
2307
|
_: 1
|
|
2301
2308
|
})
|
|
2302
2309
|
]),
|
|
2303
2310
|
_: 1
|
|
2304
2311
|
}, 8, ["modelValue", "description", "label"]),
|
|
2305
|
-
t.fields.tls_verify_enabled ? (C(),
|
|
2306
|
-
|
|
2312
|
+
t.fields.tls_verify_enabled ? (C(), F("div", wl, [
|
|
2313
|
+
u(V, {
|
|
2307
2314
|
modelValue: t.fields.tls_verify_value,
|
|
2308
2315
|
"onUpdate:modelValue": s[25] || (s[25] = (_) => t.fields.tls_verify_value = _),
|
|
2309
2316
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
2310
2317
|
label: o(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
2311
2318
|
"selected-value": !0
|
|
2312
2319
|
}, null, 8, ["modelValue", "label"])
|
|
2313
|
-
])) :
|
|
2314
|
-
t.fields.tls_verify_enabled ? (C(),
|
|
2315
|
-
|
|
2320
|
+
])) : M("", !0),
|
|
2321
|
+
t.fields.tls_verify_enabled ? (C(), F("div", kl, [
|
|
2322
|
+
u(V, {
|
|
2316
2323
|
modelValue: t.fields.tls_verify_value,
|
|
2317
2324
|
"onUpdate:modelValue": s[26] || (s[26] = (_) => t.fields.tls_verify_value = _),
|
|
2318
2325
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
2319
2326
|
label: o(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
2320
2327
|
"selected-value": !1
|
|
2321
2328
|
}, null, 8, ["modelValue", "label"])
|
|
2322
|
-
])) :
|
|
2323
|
-
])) :
|
|
2329
|
+
])) : M("", !0)
|
|
2330
|
+
])) : M("", !0)
|
|
2324
2331
|
]))
|
|
2325
2332
|
]),
|
|
2326
2333
|
_: 1
|
|
@@ -2331,13 +2338,13 @@ const te = {
|
|
|
2331
2338
|
]),
|
|
2332
2339
|
_: 1
|
|
2333
2340
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
2334
|
-
|
|
2341
|
+
u(o(Be), {
|
|
2335
2342
|
description: o(r)("gateway_services.form.sections.general.description"),
|
|
2336
2343
|
"hide-info-header": n.hideSectionsInfo,
|
|
2337
2344
|
title: o(r)("gateway_services.form.sections.general.title")
|
|
2338
2345
|
}, {
|
|
2339
2346
|
default: v(() => [
|
|
2340
|
-
|
|
2347
|
+
u(E, {
|
|
2341
2348
|
modelValue: t.fields.name,
|
|
2342
2349
|
"onUpdate:modelValue": s[28] || (s[28] = (_) => t.fields.name = _),
|
|
2343
2350
|
modelModifiers: { trim: !0 },
|
|
@@ -2354,16 +2361,16 @@ const te = {
|
|
|
2354
2361
|
placeholder: o(r)("gateway_services.form.fields.name.placeholder"),
|
|
2355
2362
|
readonly: t.isReadonly,
|
|
2356
2363
|
type: "text",
|
|
2357
|
-
onInput:
|
|
2364
|
+
onInput: K
|
|
2358
2365
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
2359
|
-
|
|
2366
|
+
u(we, {
|
|
2360
2367
|
"data-testid": "tags-collapse",
|
|
2361
2368
|
"trigger-alignment": "leading",
|
|
2362
2369
|
"trigger-label": o(r)("gateway_services.form.fields.tags.collapse")
|
|
2363
2370
|
}, {
|
|
2364
2371
|
default: v(() => [
|
|
2365
2372
|
S("div", Vl, [
|
|
2366
|
-
|
|
2373
|
+
u(E, {
|
|
2367
2374
|
modelValue: t.fields.tags,
|
|
2368
2375
|
"onUpdate:modelValue": s[29] || (s[29] = (_) => t.fields.tags = _),
|
|
2369
2376
|
modelModifiers: { trim: !0 },
|
|
@@ -2393,21 +2400,21 @@ const te = {
|
|
|
2393
2400
|
}, {
|
|
2394
2401
|
default: v(() => [
|
|
2395
2402
|
S("ul", Cl, [
|
|
2396
|
-
(C(!0),
|
|
2403
|
+
(C(!0), F(ot, null, it(t.errorMessages, (_) => (C(), F("li", { key: _ }, P(_), 1))), 128))
|
|
2397
2404
|
])
|
|
2398
2405
|
]),
|
|
2399
2406
|
_: 1
|
|
2400
|
-
})) :
|
|
2407
|
+
})) : M("", !0)
|
|
2401
2408
|
]),
|
|
2402
2409
|
_: 3
|
|
2403
2410
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
|
|
2404
2411
|
]);
|
|
2405
2412
|
};
|
|
2406
2413
|
}
|
|
2407
|
-
}), Rl = /* @__PURE__ */ Ne(Sl, [["__scopeId", "data-v-
|
|
2414
|
+
}), Rl = /* @__PURE__ */ Ne(Sl, [["__scopeId", "data-v-a378ebc2"]]);
|
|
2408
2415
|
export {
|
|
2409
|
-
|
|
2416
|
+
Al as GatewayServiceConfigCard,
|
|
2410
2417
|
Rl as GatewayServiceForm,
|
|
2411
|
-
|
|
2412
|
-
|
|
2418
|
+
Ul as GatewayServiceList,
|
|
2419
|
+
xl as LegacyGatewayServiceForm
|
|
2413
2420
|
};
|