@kong-ui-public/entities-gateway-services 3.11.26 → 3.11.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as Le, computed as k, ref as
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { BookIcon as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
import { useAxios as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as Le, computed as k, ref as D, watch as Fe, onBeforeMount as tt, resolveComponent as W, openBlock as S, createElementBlock as $, createVNode as d, unref as l, createSlots as Te, withCtx as m, createBlock as $e, Teleport as je, createElementVNode as I, createCommentVNode as M, createTextVNode as Z, toDisplayString as P, withModifiers as De, reactive as Me, onMounted as He, renderSlot as Ze, Transition as We, Fragment as lt, renderList as ot } from "vue";
|
|
2
|
+
import { useRouter as qe } from "vue-router";
|
|
3
|
+
import { BookIcon as ze, AddIcon as it, ServicesIcon as rt } from "@kong/icons";
|
|
4
|
+
import { createI18n as st, i18nTComponent as at } from "@kong-ui-public/i18n";
|
|
5
|
+
import { useAxios as Ge, useTableState as nt, useFetcher as ct, useDeleteUrlBuilder as dt, FetcherStatus as ut, EntityBaseTable as ft, EntityFilter as pt, PermissionsWrapper as Ue, TableTags as mt, EntityEmptyState as vt, EntityToggleModal as gt, EntityDeleteModal as yt, EntityTypes as _t, useErrors as Je, useValidators as Qe, EntityBaseFormType as Be, useGatewayFeatureSupported as Xe, EntityBaseForm as Ye, SupportedEntityType as Oe, EntityFormSection as Ke, useHelpers as et, ConfigurationSchemaSection as Ae, ConfigurationSchemaType as bt, EntityBaseConfigCard as ht } from "@kong-ui-public/entities-shared";
|
|
6
|
+
const wt = {
|
|
7
7
|
create: "New gateway service",
|
|
8
8
|
serverless_create: "Add a Service",
|
|
9
9
|
copy_id: "Copy ID",
|
|
@@ -16,12 +16,12 @@ const Ct = {
|
|
|
16
16
|
description: "Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",
|
|
17
17
|
menu_label: "Delete"
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, kt = {
|
|
20
20
|
placeholder: {
|
|
21
21
|
konnect: "Filter by name",
|
|
22
22
|
kongManager: "Filter by exact name or ID"
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, Vt = {
|
|
25
25
|
title: "Gateway Services",
|
|
26
26
|
list: {
|
|
27
27
|
toolbar_actions: {
|
|
@@ -203,39 +203,39 @@ const Ct = {
|
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
-
},
|
|
206
|
+
}, Ct = {
|
|
207
207
|
general: "Gateway Services could not be retrieved",
|
|
208
208
|
delete: "The gateway service could not be deleted at this time.",
|
|
209
209
|
copy: "Failed to copy to clipboard",
|
|
210
210
|
urlErrorMessage: "Error: invalid URL"
|
|
211
|
-
},
|
|
211
|
+
}, St = {
|
|
212
212
|
success: "Copied {val} to clipboard",
|
|
213
213
|
success_brief: "Successfully copied to clipboard"
|
|
214
|
-
},
|
|
214
|
+
}, It = {
|
|
215
215
|
gateway_services: "gateway services"
|
|
216
|
-
},
|
|
217
|
-
actions:
|
|
218
|
-
search:
|
|
219
|
-
gateway_services:
|
|
220
|
-
errors:
|
|
221
|
-
copy:
|
|
222
|
-
glossary:
|
|
216
|
+
}, Pt = {
|
|
217
|
+
actions: wt,
|
|
218
|
+
search: kt,
|
|
219
|
+
gateway_services: Vt,
|
|
220
|
+
errors: Ct,
|
|
221
|
+
copy: St,
|
|
222
|
+
glossary: It
|
|
223
223
|
};
|
|
224
|
-
function
|
|
225
|
-
const n =
|
|
224
|
+
function Et() {
|
|
225
|
+
const n = st("en-us", Pt);
|
|
226
226
|
return {
|
|
227
227
|
i18n: n,
|
|
228
|
-
i18nT:
|
|
228
|
+
i18nT: at(n)
|
|
229
229
|
// Translation component <i18n-t>
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Ut() {
|
|
233
233
|
return {
|
|
234
|
-
getPortFromProtocol: (
|
|
235
|
-
const
|
|
236
|
-
if ((
|
|
237
|
-
return
|
|
238
|
-
switch (
|
|
234
|
+
getPortFromProtocol: (X, _) => {
|
|
235
|
+
const v = [80, 443], a = Number(_);
|
|
236
|
+
if ((a || a === 0) && !v.includes(a))
|
|
237
|
+
return a;
|
|
238
|
+
switch (X) {
|
|
239
239
|
case "grpcs":
|
|
240
240
|
case "tls":
|
|
241
241
|
case "https":
|
|
@@ -251,37 +251,37 @@ function At() {
|
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
|
-
function
|
|
255
|
-
const { i18n: { t: n } } =
|
|
254
|
+
function $t() {
|
|
255
|
+
const { i18n: { t: n } } = se.useI18n();
|
|
256
256
|
return {
|
|
257
|
-
validateHost: (
|
|
258
|
-
if (!
|
|
259
|
-
const
|
|
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(
|
|
257
|
+
validateHost: (h) => {
|
|
258
|
+
if (!h || h.trim() === "") return n("gateway_services.form.errors.host.empty");
|
|
259
|
+
const L = /^(?!:\/\/)([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)(\.[a-zA-Z]{1,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(h) || L.test(h) ? "" : n("gateway_services.form.errors.host.invalid");
|
|
261
261
|
},
|
|
262
|
-
validateProtocol: (
|
|
263
|
-
if (r.value ===
|
|
262
|
+
validateProtocol: (h, L) => !h || h.trim() === "" ? n("gateway_services.form.errors.protocol.empty") : (h = h.slice(0, -1), L.find((r) => {
|
|
263
|
+
if (r.value === h) return r;
|
|
264
264
|
}) === void 0 ? n("gateway_services.form.errors.protocol.invalid") : ""),
|
|
265
|
-
validatePath: (
|
|
266
|
-
validatePort: (
|
|
267
|
-
if (
|
|
265
|
+
validatePath: (h) => !h || h === "" ? "" : h.startsWith("/") ? /[^A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=%]/.test(h) ? n("gateway_services.form.errors.path.invalid") : "" : n("gateway_services.form.errors.path.prefix"),
|
|
266
|
+
validatePort: (h) => {
|
|
267
|
+
if (h == null || h === "")
|
|
268
268
|
return "";
|
|
269
|
-
const
|
|
270
|
-
return isNaN(
|
|
269
|
+
const L = typeof h == "string" ? parseInt(h, 10) : h;
|
|
270
|
+
return isNaN(L) ? n("gateway_services.form.errors.port.type") : L < 0 || L > 65535 ? n("gateway_services.form.errors.port.invalid") : "";
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
const
|
|
275
|
-
useI18n:
|
|
276
|
-
usePortFromProtocol:
|
|
277
|
-
useUrlValidators:
|
|
278
|
-
}, xe = "/v2/control-planes/{controlPlaneId}/core-entities",
|
|
274
|
+
const se = {
|
|
275
|
+
useI18n: Et,
|
|
276
|
+
usePortFromProtocol: Ut,
|
|
277
|
+
useUrlValidators: $t
|
|
278
|
+
}, xe = "/v2/control-planes/{controlPlaneId}/core-entities", Re = "/{workspace}", pe = {
|
|
279
279
|
list: {
|
|
280
280
|
konnect: {
|
|
281
281
|
all: `${xe}/services`
|
|
282
282
|
},
|
|
283
283
|
kongManager: {
|
|
284
|
-
all: `${
|
|
284
|
+
all: `${Re}/services`
|
|
285
285
|
}
|
|
286
286
|
},
|
|
287
287
|
form: {
|
|
@@ -291,12 +291,12 @@ const ae = {
|
|
|
291
291
|
edit: `${xe}/services/{id}`
|
|
292
292
|
},
|
|
293
293
|
kongManager: {
|
|
294
|
-
create: `${
|
|
295
|
-
validate: `${
|
|
296
|
-
edit: `${
|
|
294
|
+
create: `${Re}/services`,
|
|
295
|
+
validate: `${Re}/schemas/services/validate`,
|
|
296
|
+
edit: `${Re}/services/{id}`
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
},
|
|
299
|
+
}, Ft = "#00abd2", At = "24px", xt = { class: "kong-ui-entities-gateway-services-list" }, Rt = { class: "button-row" }, Tt = { class: "empty-state-icon-gateway" }, Mt = { key: 1 }, Bt = /* @__PURE__ */ Le({
|
|
300
300
|
__name: "GatewayServiceList",
|
|
301
301
|
props: {
|
|
302
302
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -354,211 +354,211 @@ const ae = {
|
|
|
354
354
|
}
|
|
355
355
|
},
|
|
356
356
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
357
|
-
setup(n, { emit:
|
|
357
|
+
setup(n, { emit: X }) {
|
|
358
358
|
var c;
|
|
359
|
-
const
|
|
359
|
+
const _ = X, v = n, { i18n: { t: a, formatUnixTimeStamp: h } } = se.useI18n(), L = qe(), { axiosInstance: Q } = Ge((c = v.config) == null ? void 0 : c.axiosRequestConfig), { hasRecords: r, handleStateChange: j } = nt(() => N.value), A = k(() => r.value && v.config.app === "konnect"), Se = k(() => !v.enableV2EmptyStates && v.config.app === "konnect"), be = k(() => v.config.app !== "kongManager" || !!v.config.disableSorting), Y = {
|
|
360
360
|
// the Name column is non-hidable
|
|
361
|
-
name: { label:
|
|
362
|
-
...
|
|
363
|
-
protocol: { label:
|
|
364
|
-
host: { label:
|
|
365
|
-
port: { label:
|
|
366
|
-
path: { label:
|
|
367
|
-
enabled: { label:
|
|
368
|
-
tags: { label:
|
|
369
|
-
updated_at: { label:
|
|
370
|
-
created_at: { label:
|
|
371
|
-
},
|
|
361
|
+
name: { label: a("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
362
|
+
...v.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
|
|
363
|
+
protocol: { label: a("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
364
|
+
host: { label: a("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
365
|
+
port: { label: a("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
|
|
366
|
+
path: { label: a("gateway_services.list.table_headers.path"), searchable: !0, sortable: !0 },
|
|
367
|
+
enabled: { label: a("gateway_services.list.table_headers.enabled"), searchable: !0, sortable: !0 },
|
|
368
|
+
tags: { label: a("gateway_services.list.table_headers.tags"), sortable: !1 },
|
|
369
|
+
updated_at: { label: a("gateway_services.list.table_headers.updated_at"), sortable: !0 },
|
|
370
|
+
created_at: { label: a("gateway_services.list.table_headers.created_at"), sortable: !0 }
|
|
371
|
+
}, he = {
|
|
372
372
|
columnVisibility: {
|
|
373
373
|
created_at: !1
|
|
374
374
|
}
|
|
375
|
-
},
|
|
376
|
-
var
|
|
377
|
-
let g = `${
|
|
378
|
-
return
|
|
379
|
-
}),
|
|
380
|
-
const g =
|
|
375
|
+
}, ae = Y, x = k(() => {
|
|
376
|
+
var p, C;
|
|
377
|
+
let g = `${v.config.apiBaseUrl}${pe.list[v.config.app].all}`;
|
|
378
|
+
return v.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((p = v.config) == null ? void 0 : p.controlPlaneId) || "") : v.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (C = v.config) != null && C.workspace ? `/${v.config.workspace}` : "")), g;
|
|
379
|
+
}), me = k(() => v.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${x.value}`) : new URL(x.value)), N = D(""), Ie = k(() => {
|
|
380
|
+
const g = v.config.app === "konnect" || v.config.isExactMatch;
|
|
381
381
|
if (g)
|
|
382
382
|
return {
|
|
383
383
|
isExactMatch: g,
|
|
384
|
-
placeholder:
|
|
384
|
+
placeholder: a(`search.placeholder.${v.config.app}`)
|
|
385
385
|
};
|
|
386
|
-
const { name:
|
|
386
|
+
const { name: p, enabled: C, protocol: K, host: ue, port: G, path: fe } = Y;
|
|
387
387
|
return {
|
|
388
388
|
isExactMatch: g,
|
|
389
|
-
fields: { name:
|
|
390
|
-
schema:
|
|
389
|
+
fields: { name: p, enabled: C, protocol: K, host: ue, port: G, path: fe },
|
|
390
|
+
schema: v.config.filterSchema
|
|
391
391
|
};
|
|
392
392
|
}), {
|
|
393
393
|
fetcher: o,
|
|
394
394
|
fetcherState: w,
|
|
395
|
-
fetcherCacheKey:
|
|
396
|
-
} =
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
|
|
400
|
-
}, e =
|
|
401
|
-
ctaPath:
|
|
402
|
-
ctaText:
|
|
403
|
-
message: `${
|
|
404
|
-
title:
|
|
405
|
-
})),
|
|
395
|
+
fetcherCacheKey: ie
|
|
396
|
+
} = ct(k(() => ({ ...v.config, cacheIdentifier: v.cacheIdentifier })), x), ve = () => {
|
|
397
|
+
N.value = "";
|
|
398
|
+
}, we = () => {
|
|
399
|
+
ie.value++;
|
|
400
|
+
}, e = D(null), F = k(() => ({
|
|
401
|
+
ctaPath: v.config.createRoute,
|
|
402
|
+
ctaText: R.value ? v.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
|
|
403
|
+
message: `${a("gateway_services.list.empty_state.description")}${v.config.additionMessageForEmptyState ? ` ${v.config.additionMessageForEmptyState}` : ""}`,
|
|
404
|
+
title: R.value ? v.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
|
|
405
|
+
})), ne = D(!1), q = D(null), re = k(() => {
|
|
406
406
|
const g = {
|
|
407
407
|
action: "disable",
|
|
408
408
|
id: "",
|
|
409
409
|
name: ""
|
|
410
410
|
};
|
|
411
|
-
if (
|
|
412
|
-
const { enabled:
|
|
413
|
-
g.action =
|
|
411
|
+
if (q.value) {
|
|
412
|
+
const { enabled: p, id: C, name: K } = q.value;
|
|
413
|
+
g.action = p ? "disable" : "enable", g.id = C, g.name = K || C;
|
|
414
414
|
}
|
|
415
415
|
return g;
|
|
416
416
|
}), Pe = (g) => {
|
|
417
|
-
|
|
417
|
+
ne.value = !0, q.value = g;
|
|
418
418
|
}, oe = () => {
|
|
419
|
-
|
|
420
|
-
},
|
|
421
|
-
var
|
|
422
|
-
if (!await ((
|
|
419
|
+
ne.value = !1, q.value = null;
|
|
420
|
+
}, ke = async () => {
|
|
421
|
+
var K, ue;
|
|
422
|
+
if (!await ((K = v.canEdit) == null ? void 0 : K.call(v, q.value)) || !q.value)
|
|
423
423
|
return;
|
|
424
|
-
const
|
|
424
|
+
const p = `${me.value.href}/${q.value.id}`, C = !q.value.enabled;
|
|
425
425
|
try {
|
|
426
|
-
const { data:
|
|
427
|
-
|
|
428
|
-
} catch (
|
|
429
|
-
|
|
426
|
+
const { data: G } = ((ue = v.config) == null ? void 0 : ue.app) === "konnect" ? await Q.put(p, { ...q.value, enabled: C }) : await Q.patch(p, { ...q.value, enabled: C });
|
|
427
|
+
_("toggle:success", G), q.value.enabled = C;
|
|
428
|
+
} catch (G) {
|
|
429
|
+
_("error", G);
|
|
430
430
|
}
|
|
431
|
-
},
|
|
432
|
-
|
|
433
|
-
},
|
|
431
|
+
}, Ve = (g) => {
|
|
432
|
+
v.config.getControlPlaneRoute && L.push(v.config.getControlPlaneRoute(g));
|
|
433
|
+
}, ce = async (g, p) => {
|
|
434
434
|
const C = g.id;
|
|
435
|
-
if (!await
|
|
436
|
-
|
|
435
|
+
if (!await p(C)) {
|
|
436
|
+
_("copy:error", {
|
|
437
437
|
entity: g,
|
|
438
438
|
field: "id",
|
|
439
|
-
message:
|
|
439
|
+
message: a("errors.copy")
|
|
440
440
|
});
|
|
441
441
|
return;
|
|
442
442
|
}
|
|
443
|
-
|
|
443
|
+
_("copy:success", {
|
|
444
444
|
entity: g,
|
|
445
445
|
field: "id",
|
|
446
|
-
message:
|
|
446
|
+
message: a("copy.success", { val: C })
|
|
447
447
|
});
|
|
448
|
-
},
|
|
448
|
+
}, ge = async (g, p) => {
|
|
449
449
|
const C = JSON.stringify(g);
|
|
450
|
-
if (!await
|
|
451
|
-
|
|
450
|
+
if (!await p(C)) {
|
|
451
|
+
_("copy:error", {
|
|
452
452
|
entity: g,
|
|
453
|
-
message:
|
|
453
|
+
message: a("errors.copy")
|
|
454
454
|
});
|
|
455
455
|
return;
|
|
456
456
|
}
|
|
457
|
-
|
|
457
|
+
_("copy:success", {
|
|
458
458
|
entity: g,
|
|
459
|
-
message:
|
|
459
|
+
message: a("copy.success_brief")
|
|
460
460
|
});
|
|
461
|
-
},
|
|
461
|
+
}, ye = async (g) => {
|
|
462
462
|
var C;
|
|
463
|
-
await ((C =
|
|
463
|
+
await ((C = v.canRetrieve) == null ? void 0 : C.call(v, g)) && L.push(v.config.getViewRoute(g.id));
|
|
464
464
|
}, Ee = (g) => ({
|
|
465
|
-
label:
|
|
466
|
-
to:
|
|
465
|
+
label: a("actions.view"),
|
|
466
|
+
to: v.config.getViewRoute(g)
|
|
467
467
|
}), ee = (g) => ({
|
|
468
|
-
label:
|
|
469
|
-
to:
|
|
470
|
-
}),
|
|
471
|
-
|
|
468
|
+
label: a("actions.edit"),
|
|
469
|
+
to: v.config.getEditRoute(g)
|
|
470
|
+
}), z = D(void 0), H = D(!1), te = D(!1), de = D(""), i = dt(v.config, x.value), u = (g) => {
|
|
471
|
+
z.value = g, H.value = !0, de.value = "";
|
|
472
472
|
}, V = () => {
|
|
473
|
-
|
|
474
|
-
},
|
|
475
|
-
var g,
|
|
476
|
-
if ((g =
|
|
473
|
+
H.value = !1, z.value = void 0;
|
|
474
|
+
}, J = async () => {
|
|
475
|
+
var g, p, C;
|
|
476
|
+
if ((g = z.value) != null && g.id) {
|
|
477
477
|
te.value = !0;
|
|
478
478
|
try {
|
|
479
|
-
await Q.delete(i(
|
|
480
|
-
} catch (
|
|
481
|
-
|
|
479
|
+
await Q.delete(i(z.value.id)), _("delete:success", z.value), V(), ie.value++;
|
|
480
|
+
} catch (K) {
|
|
481
|
+
de.value = ((C = (p = K.response) == null ? void 0 : p.data) == null ? void 0 : C.message) || K.message || a("errors.delete"), _("error", K);
|
|
482
482
|
} finally {
|
|
483
483
|
te.value = !1;
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
},
|
|
487
|
-
|
|
486
|
+
}, B = () => {
|
|
487
|
+
L.push(v.config.createRoute);
|
|
488
488
|
};
|
|
489
|
-
|
|
490
|
-
var
|
|
491
|
-
if (g.status ===
|
|
489
|
+
Fe(w, (g) => {
|
|
490
|
+
var p, C, K;
|
|
491
|
+
if (g.status === ut.Error) {
|
|
492
492
|
e.value = {
|
|
493
|
-
title:
|
|
494
|
-
}, (
|
|
493
|
+
title: a("errors.general")
|
|
494
|
+
}, (K = (C = (p = g.error) == null ? void 0 : p.response) == null ? void 0 : C.data) != null && K.message && (e.value.message = g.error.response.data.message), _("error", g.error);
|
|
495
495
|
return;
|
|
496
496
|
}
|
|
497
497
|
e.value = null;
|
|
498
498
|
});
|
|
499
|
-
const
|
|
500
|
-
return
|
|
501
|
-
|
|
502
|
-
}), (g,
|
|
503
|
-
const C =
|
|
504
|
-
return S(), $("div",
|
|
505
|
-
d(l(
|
|
499
|
+
const R = D(!1);
|
|
500
|
+
return tt(async () => {
|
|
501
|
+
R.value = await v.canCreate();
|
|
502
|
+
}), (g, p) => {
|
|
503
|
+
const C = W("KButton"), K = W("KBadge"), ue = W("KInputSwitch"), G = W("KDropdownItem"), fe = W("KClipboardProvider");
|
|
504
|
+
return S(), $("div", xt, [
|
|
505
|
+
d(l(ft), {
|
|
506
506
|
"cache-identifier": n.cacheIdentifier,
|
|
507
|
-
"default-table-preferences":
|
|
508
|
-
"disable-sorting":
|
|
509
|
-
"empty-state-options":
|
|
507
|
+
"default-table-preferences": he,
|
|
508
|
+
"disable-sorting": be.value,
|
|
509
|
+
"empty-state-options": F.value,
|
|
510
510
|
"enable-entity-actions": "",
|
|
511
511
|
"error-message": e.value,
|
|
512
512
|
fetcher: l(o),
|
|
513
|
-
"fetcher-cache-key": l(
|
|
513
|
+
"fetcher-cache-key": l(ie),
|
|
514
514
|
"pagination-type": "offset",
|
|
515
515
|
"preferences-storage-key": "kong-ui-entities-gateway-services-list",
|
|
516
|
-
query:
|
|
517
|
-
"table-headers": l(
|
|
518
|
-
onClearSearchInput:
|
|
519
|
-
"onClick:row":
|
|
520
|
-
onSort:
|
|
521
|
-
onState: l(
|
|
522
|
-
},
|
|
523
|
-
"toolbar-filter":
|
|
524
|
-
d(l(
|
|
525
|
-
modelValue:
|
|
526
|
-
"onUpdate:modelValue":
|
|
516
|
+
query: N.value,
|
|
517
|
+
"table-headers": l(ae),
|
|
518
|
+
onClearSearchInput: ve,
|
|
519
|
+
"onClick:row": p[5] || (p[5] = (b) => ye(b)),
|
|
520
|
+
onSort: we,
|
|
521
|
+
onState: l(j)
|
|
522
|
+
}, Te({
|
|
523
|
+
"toolbar-filter": m(() => [
|
|
524
|
+
d(l(pt), {
|
|
525
|
+
modelValue: N.value,
|
|
526
|
+
"onUpdate:modelValue": p[0] || (p[0] = (b) => N.value = b),
|
|
527
527
|
config: Ie.value
|
|
528
528
|
}, null, 8, ["modelValue", "config"])
|
|
529
529
|
]),
|
|
530
|
-
"toolbar-button":
|
|
531
|
-
(S(),
|
|
530
|
+
"toolbar-button": m(() => [
|
|
531
|
+
(S(), $e(je, {
|
|
532
532
|
disabled: !n.useActionOutside,
|
|
533
533
|
to: "#kong-ui-app-page-header-action-button"
|
|
534
534
|
}, [
|
|
535
|
-
I("div",
|
|
536
|
-
|
|
535
|
+
I("div", Rt, [
|
|
536
|
+
A.value ? (S(), $e(C, {
|
|
537
537
|
key: 0,
|
|
538
538
|
appearance: "secondary",
|
|
539
539
|
class: "open-learning-hub",
|
|
540
540
|
"data-testid": "gateway-services-learn-more-button",
|
|
541
541
|
icon: "",
|
|
542
|
-
onClick:
|
|
542
|
+
onClick: p[1] || (p[1] = (b) => g.$emit("click:learn-more"))
|
|
543
543
|
}, {
|
|
544
|
-
default:
|
|
545
|
-
d(l(
|
|
544
|
+
default: m(() => [
|
|
545
|
+
d(l(ze), { decorative: "" })
|
|
546
546
|
]),
|
|
547
547
|
_: 1
|
|
548
|
-
})) :
|
|
549
|
-
d(l(
|
|
548
|
+
})) : M("", !0),
|
|
549
|
+
d(l(Ue), {
|
|
550
550
|
"auth-function": () => n.canCreate()
|
|
551
551
|
}, {
|
|
552
|
-
default:
|
|
552
|
+
default: m(() => [
|
|
553
553
|
d(C, {
|
|
554
554
|
appearance: "primary",
|
|
555
555
|
"data-testid": "toolbar-add-gateway-service",
|
|
556
556
|
size: n.useActionOutside ? "medium" : "large",
|
|
557
557
|
to: n.config.createRoute
|
|
558
558
|
}, {
|
|
559
|
-
default:
|
|
560
|
-
d(l(
|
|
561
|
-
|
|
559
|
+
default: m(() => [
|
|
560
|
+
d(l(it)),
|
|
561
|
+
Z(" " + P(l(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
562
562
|
]),
|
|
563
563
|
_: 1
|
|
564
564
|
}, 8, ["size", "to"])
|
|
@@ -568,120 +568,120 @@ const ae = {
|
|
|
568
568
|
])
|
|
569
569
|
], 8, ["disabled"]))
|
|
570
570
|
]),
|
|
571
|
-
name:
|
|
572
|
-
I("b", null,
|
|
571
|
+
name: m(({ rowValue: b }) => [
|
|
572
|
+
I("b", null, P(b ?? "-"), 1)
|
|
573
573
|
]),
|
|
574
|
-
control_plane:
|
|
574
|
+
control_plane: m(({ row: b }) => {
|
|
575
575
|
var t;
|
|
576
576
|
return [
|
|
577
|
-
(t =
|
|
577
|
+
(t = b.x_meta) != null && t.cluster_id ? (S(), $e(K, {
|
|
578
578
|
key: 0,
|
|
579
|
-
tooltip:
|
|
579
|
+
tooltip: b.x_meta.cluster_id,
|
|
580
580
|
"truncation-tooltip": "",
|
|
581
|
-
onClick:
|
|
581
|
+
onClick: De((s) => Ve(b.x_meta.cluster_id), ["stop"])
|
|
582
582
|
}, {
|
|
583
|
-
default:
|
|
584
|
-
|
|
583
|
+
default: m(() => [
|
|
584
|
+
Z(P(b.x_meta.cluster_id), 1)
|
|
585
585
|
]),
|
|
586
586
|
_: 2
|
|
587
|
-
}, 1032, ["tooltip", "onClick"])) : (S(), $("b",
|
|
587
|
+
}, 1032, ["tooltip", "onClick"])) : (S(), $("b", Mt, "-"))
|
|
588
588
|
];
|
|
589
589
|
}),
|
|
590
|
-
enabled:
|
|
591
|
-
d(l(
|
|
592
|
-
"auth-function": () => n.canEdit(
|
|
590
|
+
enabled: m(({ row: b }) => [
|
|
591
|
+
d(l(Ue), {
|
|
592
|
+
"auth-function": () => n.canEdit(b),
|
|
593
593
|
"force-show": ""
|
|
594
594
|
}, {
|
|
595
|
-
default:
|
|
595
|
+
default: m(({ isAllowed: t }) => [
|
|
596
596
|
I("div", {
|
|
597
|
-
onClick:
|
|
597
|
+
onClick: p[4] || (p[4] = De(() => {
|
|
598
598
|
}, ["stop"]))
|
|
599
599
|
}, [
|
|
600
|
-
d(
|
|
601
|
-
modelValue:
|
|
602
|
-
"onUpdate:modelValue": (
|
|
603
|
-
"data-testid": `row-${
|
|
600
|
+
d(ue, {
|
|
601
|
+
modelValue: b.enabled,
|
|
602
|
+
"onUpdate:modelValue": (s) => b.enabled = s,
|
|
603
|
+
"data-testid": `row-${b.id}-toggle-input`,
|
|
604
604
|
disabled: !t,
|
|
605
|
-
onClick:
|
|
605
|
+
onClick: De((s) => Pe(b), ["prevent"])
|
|
606
606
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
|
|
607
607
|
])
|
|
608
608
|
]),
|
|
609
609
|
_: 2
|
|
610
610
|
}, 1032, ["auth-function"])
|
|
611
611
|
]),
|
|
612
|
-
tags:
|
|
613
|
-
d(l(
|
|
612
|
+
tags: m(({ rowValue: b }) => [
|
|
613
|
+
d(l(mt), { tags: b }, null, 8, ["tags"])
|
|
614
614
|
]),
|
|
615
|
-
created_at:
|
|
616
|
-
|
|
615
|
+
created_at: m(({ rowValue: b }) => [
|
|
616
|
+
Z(P(l(h)(b)), 1)
|
|
617
617
|
]),
|
|
618
|
-
updated_at:
|
|
619
|
-
|
|
618
|
+
updated_at: m(({ row: b, rowValue: t }) => [
|
|
619
|
+
Z(P(l(h)(t ?? b.created_at)), 1)
|
|
620
620
|
]),
|
|
621
|
-
actions:
|
|
622
|
-
d(
|
|
623
|
-
default:
|
|
624
|
-
d(
|
|
621
|
+
actions: m(({ row: b }) => [
|
|
622
|
+
d(fe, null, {
|
|
623
|
+
default: m(({ copyToClipboard: t }) => [
|
|
624
|
+
d(G, {
|
|
625
625
|
"data-testid": "action-entity-copy-id",
|
|
626
|
-
onClick: (
|
|
626
|
+
onClick: (s) => ce(b, t)
|
|
627
627
|
}, {
|
|
628
|
-
default:
|
|
629
|
-
|
|
628
|
+
default: m(() => [
|
|
629
|
+
Z(P(l(a)("actions.copy_id")), 1)
|
|
630
630
|
]),
|
|
631
631
|
_: 2
|
|
632
632
|
}, 1032, ["onClick"])
|
|
633
633
|
]),
|
|
634
634
|
_: 2
|
|
635
635
|
}, 1024),
|
|
636
|
-
d(
|
|
637
|
-
default:
|
|
638
|
-
d(
|
|
636
|
+
d(fe, null, {
|
|
637
|
+
default: m(({ copyToClipboard: t }) => [
|
|
638
|
+
d(G, {
|
|
639
639
|
"data-testid": "action-entity-copy-json",
|
|
640
|
-
onClick: (
|
|
640
|
+
onClick: (s) => ge(b, t)
|
|
641
641
|
}, {
|
|
642
|
-
default:
|
|
643
|
-
|
|
642
|
+
default: m(() => [
|
|
643
|
+
Z(P(l(a)("actions.copy_json")), 1)
|
|
644
644
|
]),
|
|
645
645
|
_: 2
|
|
646
646
|
}, 1032, ["onClick"])
|
|
647
647
|
]),
|
|
648
648
|
_: 2
|
|
649
649
|
}, 1024),
|
|
650
|
-
d(l(
|
|
651
|
-
"auth-function": () => n.canRetrieve(
|
|
650
|
+
d(l(Ue), {
|
|
651
|
+
"auth-function": () => n.canRetrieve(b)
|
|
652
652
|
}, {
|
|
653
|
-
default:
|
|
654
|
-
d(
|
|
653
|
+
default: m(() => [
|
|
654
|
+
d(G, {
|
|
655
655
|
"data-testid": "action-entity-view",
|
|
656
656
|
"has-divider": "",
|
|
657
|
-
item: Ee(
|
|
657
|
+
item: Ee(b.id)
|
|
658
658
|
}, null, 8, ["item"])
|
|
659
659
|
]),
|
|
660
660
|
_: 2
|
|
661
661
|
}, 1032, ["auth-function"]),
|
|
662
|
-
d(l(
|
|
663
|
-
"auth-function": () => n.canEdit(
|
|
662
|
+
d(l(Ue), {
|
|
663
|
+
"auth-function": () => n.canEdit(b)
|
|
664
664
|
}, {
|
|
665
|
-
default:
|
|
666
|
-
d(
|
|
665
|
+
default: m(() => [
|
|
666
|
+
d(G, {
|
|
667
667
|
"data-testid": "action-entity-edit",
|
|
668
|
-
item: ee(
|
|
668
|
+
item: ee(b.id)
|
|
669
669
|
}, null, 8, ["item"])
|
|
670
670
|
]),
|
|
671
671
|
_: 2
|
|
672
672
|
}, 1032, ["auth-function"]),
|
|
673
|
-
d(l(
|
|
674
|
-
"auth-function": () => n.canDelete(
|
|
673
|
+
d(l(Ue), {
|
|
674
|
+
"auth-function": () => n.canDelete(b)
|
|
675
675
|
}, {
|
|
676
|
-
default:
|
|
677
|
-
d(
|
|
676
|
+
default: m(() => [
|
|
677
|
+
d(G, {
|
|
678
678
|
danger: "",
|
|
679
679
|
"data-testid": "action-entity-delete",
|
|
680
680
|
"has-divider": "",
|
|
681
|
-
onClick: (t) => u(
|
|
681
|
+
onClick: (t) => u(b)
|
|
682
682
|
}, {
|
|
683
|
-
default:
|
|
684
|
-
|
|
683
|
+
default: m(() => [
|
|
684
|
+
Z(P(l(a)("actions.delete.menu_label")), 1)
|
|
685
685
|
]),
|
|
686
686
|
_: 2
|
|
687
687
|
}, 1032, ["onClick"])
|
|
@@ -691,10 +691,10 @@ const ae = {
|
|
|
691
691
|
]),
|
|
692
692
|
_: 2
|
|
693
693
|
}, [
|
|
694
|
-
!l(r) &&
|
|
694
|
+
!l(r) && Se.value ? {
|
|
695
695
|
name: "outside-actions",
|
|
696
|
-
fn:
|
|
697
|
-
(S(),
|
|
696
|
+
fn: m(() => [
|
|
697
|
+
(S(), $e(je, {
|
|
698
698
|
disabled: !n.useActionOutside,
|
|
699
699
|
to: "#kong-ui-app-page-header-action-button"
|
|
700
700
|
}, [
|
|
@@ -703,10 +703,10 @@ const ae = {
|
|
|
703
703
|
class: "open-learning-hub",
|
|
704
704
|
"data-testid": "gateway-services-more-button",
|
|
705
705
|
icon: "",
|
|
706
|
-
onClick:
|
|
706
|
+
onClick: p[2] || (p[2] = (b) => g.$emit("click:learn-more"))
|
|
707
707
|
}, {
|
|
708
|
-
default:
|
|
709
|
-
d(l(
|
|
708
|
+
default: m(() => [
|
|
709
|
+
d(l(ze), { decorative: "" })
|
|
710
710
|
]),
|
|
711
711
|
_: 1
|
|
712
712
|
})
|
|
@@ -714,36 +714,36 @@ const ae = {
|
|
|
714
714
|
]),
|
|
715
715
|
key: "0"
|
|
716
716
|
} : void 0,
|
|
717
|
-
!
|
|
717
|
+
!N.value && n.enableV2EmptyStates && n.config.app === "konnect" ? {
|
|
718
718
|
name: "empty-state",
|
|
719
|
-
fn:
|
|
720
|
-
var
|
|
719
|
+
fn: m(() => {
|
|
720
|
+
var b;
|
|
721
721
|
return [
|
|
722
|
-
d(l(
|
|
723
|
-
"action-button-text": l(
|
|
722
|
+
d(l(vt), {
|
|
723
|
+
"action-button-text": l(a)("gateway_services.empty_state_v2.create"),
|
|
724
724
|
appearance: "secondary",
|
|
725
725
|
"can-create": () => n.canCreate(),
|
|
726
726
|
"data-testid": "gateway-services-entity-empty-state",
|
|
727
|
-
description: l(
|
|
727
|
+
description: l(a)("gateway_services.empty_state_v2.description"),
|
|
728
728
|
"learn-more": n.config.app === "konnect",
|
|
729
|
-
title: l(
|
|
730
|
-
"onClick:create":
|
|
731
|
-
"onClick:learnMore":
|
|
732
|
-
},
|
|
733
|
-
image:
|
|
734
|
-
I("div",
|
|
735
|
-
d(l(
|
|
736
|
-
color: l(
|
|
737
|
-
size: l(
|
|
729
|
+
title: l(a)("gateway_services.empty_state_v2.title"),
|
|
730
|
+
"onClick:create": B,
|
|
731
|
+
"onClick:learnMore": p[3] || (p[3] = (t) => g.$emit("click:learn-more"))
|
|
732
|
+
}, Te({
|
|
733
|
+
image: m(() => [
|
|
734
|
+
I("div", Tt, [
|
|
735
|
+
d(l(rt), {
|
|
736
|
+
color: l(Ft),
|
|
737
|
+
size: l(At)
|
|
738
738
|
}, null, 8, ["color", "size"])
|
|
739
739
|
])
|
|
740
740
|
]),
|
|
741
741
|
_: 2
|
|
742
742
|
}, [
|
|
743
|
-
(
|
|
743
|
+
(b = n.config) != null && b.isControlPlaneGroup ? {
|
|
744
744
|
name: "message",
|
|
745
|
-
fn:
|
|
746
|
-
|
|
745
|
+
fn: m(() => [
|
|
746
|
+
Z(P(l(a)("gateway_services.empty_state_v2.group")), 1)
|
|
747
747
|
]),
|
|
748
748
|
key: "0"
|
|
749
749
|
} : void 0
|
|
@@ -753,57 +753,57 @@ const ae = {
|
|
|
753
753
|
key: "1"
|
|
754
754
|
} : void 0
|
|
755
755
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
|
|
756
|
-
d(l(
|
|
757
|
-
action:
|
|
758
|
-
"entity-id":
|
|
759
|
-
"entity-name":
|
|
760
|
-
"entity-type": l(
|
|
761
|
-
"on-confirm":
|
|
762
|
-
visible:
|
|
756
|
+
d(l(gt), {
|
|
757
|
+
action: re.value.action,
|
|
758
|
+
"entity-id": re.value.id,
|
|
759
|
+
"entity-name": re.value.name,
|
|
760
|
+
"entity-type": l(a)("glossary.gateway_services"),
|
|
761
|
+
"on-confirm": ke,
|
|
762
|
+
visible: ne.value,
|
|
763
763
|
onCancel: oe,
|
|
764
764
|
onProceed: oe
|
|
765
765
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
766
|
-
d(l(
|
|
766
|
+
d(l(yt), {
|
|
767
767
|
"action-pending": te.value,
|
|
768
|
-
description: l(
|
|
769
|
-
"entity-name":
|
|
770
|
-
"entity-type": l(
|
|
771
|
-
error:
|
|
772
|
-
title: l(
|
|
773
|
-
visible:
|
|
768
|
+
description: l(a)("actions.delete.description"),
|
|
769
|
+
"entity-name": z.value && (z.value.name || z.value.id),
|
|
770
|
+
"entity-type": l(_t).GatewayService,
|
|
771
|
+
error: de.value,
|
|
772
|
+
title: l(a)("actions.delete.title"),
|
|
773
|
+
visible: H.value,
|
|
774
774
|
onCancel: V,
|
|
775
|
-
onProceed:
|
|
775
|
+
onProceed: J
|
|
776
776
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
777
777
|
]);
|
|
778
778
|
};
|
|
779
779
|
}
|
|
780
|
-
}),
|
|
781
|
-
const
|
|
782
|
-
for (const [
|
|
783
|
-
|
|
784
|
-
return
|
|
785
|
-
},
|
|
780
|
+
}), Ne = (n, X) => {
|
|
781
|
+
const _ = n.__vccOpts || n;
|
|
782
|
+
for (const [v, a] of X)
|
|
783
|
+
_[v] = a;
|
|
784
|
+
return _;
|
|
785
|
+
}, Fl = /* @__PURE__ */ Ne(Bt, [["__scopeId", "data-v-210f19c5"]]), Kt = { class: "kong-ui-entities-gateway-service-form" }, Lt = { key: 0 }, Dt = { class: "gateway-service-form-traffic-label" }, Wt = { class: "gateway-service-form-margin-bottom" }, qt = {
|
|
786
786
|
key: 0,
|
|
787
787
|
class: "gateway-service-form-group-fields"
|
|
788
|
-
},
|
|
788
|
+
}, Gt = {
|
|
789
789
|
key: 1,
|
|
790
790
|
class: "gateway-service-form-group-fields"
|
|
791
|
-
},
|
|
791
|
+
}, Ot = { key: 0 }, Nt = { class: "gateway-service-form-margin-top" }, jt = { class: "gateway-service-form-margin-bottom" }, zt = { class: "gateway-service-form-margin-bottom" }, Ht = { class: "gateway-service-form-margin-bottom" }, Zt = { class: "gateway-service-form-margin-bottom" }, Jt = {
|
|
792
792
|
key: 0,
|
|
793
793
|
class: "gateway-service-form-margin-bottom"
|
|
794
|
-
},
|
|
794
|
+
}, Qt = {
|
|
795
795
|
key: 1,
|
|
796
796
|
class: "gateway-service-form-margin-bottom"
|
|
797
|
-
},
|
|
797
|
+
}, Xt = {
|
|
798
798
|
key: 2,
|
|
799
799
|
class: "gateway-service-form-margin-bottom"
|
|
800
|
-
},
|
|
800
|
+
}, Yt = {
|
|
801
801
|
key: 0,
|
|
802
802
|
class: "checkbox-aligned-radio"
|
|
803
|
-
},
|
|
803
|
+
}, el = {
|
|
804
804
|
key: 1,
|
|
805
805
|
class: "checkbox-aligned-radio"
|
|
806
|
-
},
|
|
806
|
+
}, tl = /* @__PURE__ */ Le({
|
|
807
807
|
__name: "LegacyGatewayServiceForm",
|
|
808
808
|
props: {
|
|
809
809
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -826,9 +826,9 @@ const ae = {
|
|
|
826
826
|
}
|
|
827
827
|
},
|
|
828
828
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
829
|
-
setup(n, { expose:
|
|
830
|
-
var
|
|
831
|
-
const
|
|
829
|
+
setup(n, { expose: X, emit: _ }) {
|
|
830
|
+
var de;
|
|
831
|
+
const v = _, a = n, h = D(!0), L = qe(), { i18nT: Q, i18n: { t: r } } = se.useI18n(), { getMessageFromError: j } = Je(), { axiosInstance: A } = Ge((de = a.config) == null ? void 0 : de.axiosRequestConfig), Se = Qe(), be = k(() => pe.form[a.config.app].edit), Y = k(() => a.gatewayServiceId ? Be.Edit : Be.Create), he = D(!1), ae = k(() => !!a.gatewayServiceId), x = D(ae.value ? "protocol" : "url"), me = se.usePortFromProtocol(), N = D(""), Ie = k(() => !!N.value), o = Me({
|
|
832
832
|
fields: {
|
|
833
833
|
name: "",
|
|
834
834
|
protocol: "http",
|
|
@@ -864,13 +864,13 @@ const ae = {
|
|
|
864
864
|
tls_verify_enabled: !1,
|
|
865
865
|
tls_verify_value: !1,
|
|
866
866
|
tags: ""
|
|
867
|
-
}),
|
|
868
|
-
gatewayInfo:
|
|
867
|
+
}), ie = a.config.app === "konnect" || Xe({
|
|
868
|
+
gatewayInfo: a.config.gatewayInfo,
|
|
869
869
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
870
870
|
supportedRange: {
|
|
871
871
|
enterprise: ["3.0"]
|
|
872
872
|
}
|
|
873
|
-
}),
|
|
873
|
+
}), ve = [
|
|
874
874
|
{
|
|
875
875
|
label: r("gateway_services.form.fields.protocol.options.http"),
|
|
876
876
|
value: "http",
|
|
@@ -906,7 +906,7 @@ const ae = {
|
|
|
906
906
|
value: "grpcs",
|
|
907
907
|
group: "grpc"
|
|
908
908
|
},
|
|
909
|
-
...
|
|
909
|
+
...ie ? [
|
|
910
910
|
{
|
|
911
911
|
label: r("gateway_services.form.fields.protocol.options.ws"),
|
|
912
912
|
value: "ws",
|
|
@@ -923,23 +923,23 @@ const ae = {
|
|
|
923
923
|
value: "udp",
|
|
924
924
|
group: "udp"
|
|
925
925
|
}
|
|
926
|
-
],
|
|
926
|
+
], we = { url: "url", protocol: "protocol" }, e = (i, u) => {
|
|
927
927
|
u.value;
|
|
928
|
-
},
|
|
929
|
-
|
|
930
|
-
},
|
|
928
|
+
}, F = (i) => i ? parseFloat(i) : 0, ne = () => {
|
|
929
|
+
h.value = !0, o.errorMessage = "", o.fields.host = w.host, o.fields.path = w.path, o.fields.port = w.port, o.fields.protocol = w.protocol, o.fields.url = w.url, o.fields.retries = w.retries, o.fields.connect_timeout = w.connect_timeout, o.fields.write_timeout = w.write_timeout, o.fields.read_timeout = w.read_timeout, o.fields.client_certificate = w.client_certificate, o.fields.ca_certificates = w.ca_certificates, o.fields.tls_verify_enabled = w.tls_verify_enabled, o.fields.tls_verify_value = w.tls_verify_value;
|
|
930
|
+
}, q = () => {
|
|
931
931
|
if (o.fields.url && x.value === "url")
|
|
932
932
|
try {
|
|
933
933
|
const i = new URL(o.fields.url);
|
|
934
934
|
o.errorMessage = "", o.fields.protocol = i.protocol.slice(0, -1), o.fields.host = i.hostname, o.fields.path = i.pathname;
|
|
935
935
|
const u = Number(i.port);
|
|
936
|
-
|
|
936
|
+
he.value = !!u, o.fields.port = u || me.getPortFromProtocol(o.fields.protocol), o.errorMessage = "", v("url-valid:success");
|
|
937
937
|
} catch (i) {
|
|
938
|
-
o.errorMessage = r("errors.urlErrorMessage"),
|
|
938
|
+
o.errorMessage = r("errors.urlErrorMessage"), v("url-valid:error", j(i));
|
|
939
939
|
}
|
|
940
940
|
else
|
|
941
|
-
|
|
942
|
-
},
|
|
941
|
+
v("url-valid:success"), o.errorMessage = "";
|
|
942
|
+
}, re = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(o.fields.protocol)), Pe = k(() => {
|
|
943
943
|
if (x.value === "url")
|
|
944
944
|
return !0;
|
|
945
945
|
const i = ["https", "wss", "tls"].includes(o.fields.protocol);
|
|
@@ -949,34 +949,34 @@ const ae = {
|
|
|
949
949
|
return !0;
|
|
950
950
|
const i = ["https", "tls"].includes(o.fields.protocol);
|
|
951
951
|
return x.value === "protocol" && i;
|
|
952
|
-
}),
|
|
952
|
+
}), ke = k(() => {
|
|
953
953
|
if (x.value === "url")
|
|
954
954
|
return !0;
|
|
955
955
|
const i = ["https", "wss", "tls"].includes(o.fields.protocol);
|
|
956
956
|
return x.value === "protocol" && i;
|
|
957
|
-
}),
|
|
958
|
-
|
|
959
|
-
},
|
|
960
|
-
var u, V,
|
|
961
|
-
o.fields.name = (i == null ? void 0 : i.name) || "", o.fields.tags = ((u = i == null ? void 0 : i.tags) == null ? void 0 : u.join(", ")) || "", o.fields.protocol = (i == null ? void 0 : i.protocol) || "http", o.fields.path = (i == null ? void 0 : i.path) || "", o.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, o.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, o.fields.host = (i == null ? void 0 : i.host) || "", o.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, o.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, o.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, o.fields.ca_certificates = ((V = i == null ? void 0 : i.ca_certificates) == null ? void 0 : V.join(",")) || "", o.fields.client_certificate = ((
|
|
962
|
-
},
|
|
963
|
-
|
|
957
|
+
}), Ve = (i) => {
|
|
958
|
+
N.value = Se.utf8Name(i);
|
|
959
|
+
}, ce = k(() => ae.value && JSON.stringify(o.fields) !== JSON.stringify(w) || x.value === "url" && !!o.fields.url || x.value === "protocol" && !!o.fields.host), ge = (i) => {
|
|
960
|
+
var u, V, J;
|
|
961
|
+
o.fields.name = (i == null ? void 0 : i.name) || "", o.fields.tags = ((u = i == null ? void 0 : i.tags) == null ? void 0 : u.join(", ")) || "", o.fields.protocol = (i == null ? void 0 : i.protocol) || "http", o.fields.path = (i == null ? void 0 : i.path) || "", o.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, o.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, o.fields.host = (i == null ? void 0 : i.host) || "", o.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, o.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, o.fields.tls_verify_value = i != null && i.tls_verify ? i == null ? void 0 : i.tls_verify : !1, o.fields.ca_certificates = ((V = i == null ? void 0 : i.ca_certificates) == null ? void 0 : V.join(",")) || "", o.fields.client_certificate = ((J = i == null ? void 0 : i.client_certificate) == null ? void 0 : J.id) || "", o.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, o.fields.port = i != null && i.port || (i == null ? void 0 : i.port) === 0 ? i == null ? void 0 : i.port : 80, Object.assign(w, o.fields);
|
|
962
|
+
}, ye = () => {
|
|
963
|
+
L.push(a.config.cancelRoute);
|
|
964
964
|
}, Ee = k(() => {
|
|
965
965
|
var u, V;
|
|
966
|
-
let i = `${
|
|
967
|
-
return
|
|
966
|
+
let i = `${a.config.apiBaseUrl}${pe.form[a.config.app].validate}`;
|
|
967
|
+
return a.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((u = a.config) == null ? void 0 : u.controlPlaneId) || "") : a.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (V = a.config) != null && V.workspace ? `/${a.config.workspace}` : "")), i = i.replace(/{id}/gi, a.gatewayServiceId), i;
|
|
968
968
|
}), ee = k(() => {
|
|
969
969
|
var u, V;
|
|
970
|
-
let i = `${
|
|
971
|
-
return
|
|
972
|
-
}),
|
|
970
|
+
let i = `${a.config.apiBaseUrl}${pe.form[a.config.app][Y.value]}`;
|
|
971
|
+
return a.config.app === "konnect" ? i = i.replace(/{controlPlaneId}/gi, ((u = a.config) == null ? void 0 : u.controlPlaneId) || "") : a.config.app === "kongManager" && (i = i.replace(/\/{workspace}/gi, (V = a.config) != null && V.workspace ? `/${a.config.workspace}` : "")), i = i.replace(/{id}/gi, a.gatewayServiceId), i;
|
|
972
|
+
}), z = (i) => {
|
|
973
973
|
let u = "";
|
|
974
974
|
i.url && (u = new URL(i.url).protocol), (["https", "wss", "tls"].includes(i.protocol) || ["https", "wss", "tls"].includes(u)) && (i.tls_verify = i.tls_verify_enabled ? i.tls_verify_value : null), delete i.tls_verify_enabled, delete i.tls_verify_value;
|
|
975
|
-
},
|
|
976
|
-
var u, V,
|
|
975
|
+
}, H = k(() => {
|
|
976
|
+
var u, V, J, B;
|
|
977
977
|
const i = {
|
|
978
978
|
name: o.fields.name || null,
|
|
979
|
-
tags: o.fields.tags ? (
|
|
979
|
+
tags: o.fields.tags ? (J = (V = (u = o.fields.tags) == null ? void 0 : u.split(",")) == null ? void 0 : V.map((R) => String(R || "").trim())) == null ? void 0 : J.filter((R) => R !== "") : null,
|
|
980
980
|
protocol: o.fields.protocol,
|
|
981
981
|
path: o.fields.path || null,
|
|
982
982
|
read_timeout: o.fields.read_timeout,
|
|
@@ -985,83 +985,83 @@ const ae = {
|
|
|
985
985
|
connect_timeout: o.fields.connect_timeout,
|
|
986
986
|
tls_verify_value: o.fields.tls_verify_value,
|
|
987
987
|
tls_verify_enabled: o.fields.tls_verify_enabled,
|
|
988
|
-
ca_certificates: o.fields.ca_certificates ? (
|
|
988
|
+
ca_certificates: o.fields.ca_certificates ? (B = o.fields.ca_certificates) == null ? void 0 : B.split(",").filter((R) => R !== "") : null,
|
|
989
989
|
client_certificate: o.fields.client_certificate ? { id: o.fields.client_certificate } : null,
|
|
990
990
|
write_timeout: o.fields.write_timeout,
|
|
991
991
|
port: o.fields.port,
|
|
992
992
|
url: o.fields.url
|
|
993
993
|
};
|
|
994
|
-
return o.fields.client_certificate && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.client_certificate = { id: o.fields.client_certificate }), o.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.tls_verify = o.fields.tls_verify_value),
|
|
994
|
+
return o.fields.client_certificate && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.client_certificate = { id: o.fields.client_certificate }), o.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(o.fields.protocol) && (i.tls_verify = o.fields.tls_verify_value), re.value || (i.path = null), Y.value === "create" ? x.value === "url" ? (delete i.protocol, delete i.host, delete i.path, a.config.app === "konnect" && delete i.port) : delete i.url : Y.value === "edit" && delete i.url, i;
|
|
995
995
|
}), te = async () => {
|
|
996
|
-
var i, u, V,
|
|
996
|
+
var i, u, V, J;
|
|
997
997
|
try {
|
|
998
|
-
o.isReadonly = !0,
|
|
999
|
-
const
|
|
1000
|
-
|
|
1001
|
-
let
|
|
1002
|
-
if (await
|
|
1003
|
-
const { data: c } =
|
|
1004
|
-
o.fields.name = (c == null ? void 0 : c.name) || "", o.fields.port = c.port ||
|
|
998
|
+
o.isReadonly = !0, q();
|
|
999
|
+
const B = H.value;
|
|
1000
|
+
z(B);
|
|
1001
|
+
let R;
|
|
1002
|
+
if (await A.post(Ee.value, B), Y.value === "create" ? R = await A.post(ee.value, B) : Y.value === "edit" && (R = ((i = a.config) == null ? void 0 : i.app) === "konnect" ? await A.put(ee.value, B) : await A.patch(ee.value, B)), R) {
|
|
1003
|
+
const { data: c } = R;
|
|
1004
|
+
o.fields.name = (c == null ? void 0 : c.name) || "", o.fields.port = c.port || me.getPortFromProtocol(c.protocol), o.fields.protocol = (c == null ? void 0 : c.protocol) || "http", o.fields.host = (c == null ? void 0 : c.host) || "", o.fields.path = (c == null ? void 0 : c.path) || "", o.fields.url = (c == null ? void 0 : c.url) || "", o.fields.retries = c != null && c.retries || (c == null ? void 0 : c.retries) === 0 ? c == null ? void 0 : c.retries : 5, o.fields.connect_timeout = c != null && c.connect_timeout || (c == null ? void 0 : c.connect_timeout) === 0 ? c == null ? void 0 : c.connect_timeout : 6e4, o.fields.write_timeout = c != null && c.write_timeout || (c == null ? void 0 : c.write_timeout) === 0 ? c == null ? void 0 : c.write_timeout : 6e4, o.fields.read_timeout = c != null && c.read_timeout || (c == null ? void 0 : c.read_timeout) === 0 ? c == null ? void 0 : c.read_timeout : 6e4, o.fields.client_certificate = ((u = c == null ? void 0 : c.client_certificate) == null ? void 0 : u.id) || "", o.fields.ca_certificates = (V = c == null ? void 0 : c.ca_certificates) != null && V.length ? c == null ? void 0 : c.ca_certificates.join(",") : "", o.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, o.fields.tls_verify_value = o.fields.tls_verify_enabled && (c == null ? void 0 : c.tls_verify), o.fields.tags = (J = c == null ? void 0 : c.tags) != null && J.length ? c.tags.join(", ") : "", Object.assign(w, o.fields), v("update", R == null ? void 0 : R.data);
|
|
1005
1005
|
}
|
|
1006
|
-
return
|
|
1007
|
-
} catch (
|
|
1008
|
-
o.errorMessage =
|
|
1006
|
+
return R;
|
|
1007
|
+
} catch (B) {
|
|
1008
|
+
o.errorMessage = j(B), v("error", B);
|
|
1009
1009
|
} finally {
|
|
1010
1010
|
o.isReadonly = !1;
|
|
1011
1011
|
}
|
|
1012
1012
|
};
|
|
1013
|
-
return
|
|
1013
|
+
return Fe(() => a.gatewayServiceId, () => {
|
|
1014
1014
|
Object.assign(o.fields, w);
|
|
1015
|
-
}),
|
|
1016
|
-
o.fields.port =
|
|
1017
|
-
}),
|
|
1018
|
-
|
|
1019
|
-
}),
|
|
1020
|
-
validateUrl:
|
|
1021
|
-
getPayload:
|
|
1015
|
+
}), Fe(o.fields, (i) => {
|
|
1016
|
+
o.fields.port = me.getPortFromProtocol(i.protocol, String(i.port)), v("model-updated", H.value);
|
|
1017
|
+
}), He(() => {
|
|
1018
|
+
v("model-updated", H.value);
|
|
1019
|
+
}), X({
|
|
1020
|
+
validateUrl: q,
|
|
1021
|
+
getPayload: H,
|
|
1022
1022
|
saveFormData: te,
|
|
1023
|
-
canSubmit:
|
|
1024
|
-
initForm:
|
|
1023
|
+
canSubmit: ce,
|
|
1024
|
+
initForm: ge
|
|
1025
1025
|
}), (i, u) => {
|
|
1026
|
-
const V =
|
|
1027
|
-
return S(), $("div",
|
|
1028
|
-
d(l(
|
|
1029
|
-
"can-submit":
|
|
1026
|
+
const V = W("KInput"), J = W("KLabel"), B = W("KRadio"), R = W("KSelect"), c = W("KCheckbox"), g = W("KCollapse");
|
|
1027
|
+
return S(), $("div", Kt, [
|
|
1028
|
+
d(l(Ye), {
|
|
1029
|
+
"can-submit": ce.value,
|
|
1030
1030
|
config: n.config,
|
|
1031
1031
|
"edit-id": n.gatewayServiceId,
|
|
1032
|
-
"entity-type": l(
|
|
1032
|
+
"entity-type": l(Oe).GatewayService,
|
|
1033
1033
|
"error-message": o.errorMessage,
|
|
1034
|
-
"fetch-url":
|
|
1035
|
-
"form-fields":
|
|
1034
|
+
"fetch-url": be.value,
|
|
1035
|
+
"form-fields": H.value,
|
|
1036
1036
|
"is-readonly": o.isReadonly,
|
|
1037
|
-
onCancel:
|
|
1038
|
-
"onFetch:error": u[25] || (u[25] = (
|
|
1039
|
-
"onFetch:success":
|
|
1040
|
-
onLoading: u[26] || (u[26] = (
|
|
1037
|
+
onCancel: ye,
|
|
1038
|
+
"onFetch:error": u[25] || (u[25] = (p) => i.$emit("error", p)),
|
|
1039
|
+
"onFetch:success": ge,
|
|
1040
|
+
onLoading: u[26] || (u[26] = (p) => i.$emit("loading", p)),
|
|
1041
1041
|
onSubmit: te
|
|
1042
1042
|
}, {
|
|
1043
|
-
"form-actions":
|
|
1044
|
-
|
|
1045
|
-
canSubmit:
|
|
1046
|
-
cancel:
|
|
1043
|
+
"form-actions": m(() => [
|
|
1044
|
+
Ze(i.$slots, "form-actions", {
|
|
1045
|
+
canSubmit: ce.value,
|
|
1046
|
+
cancel: ye,
|
|
1047
1047
|
submit: te
|
|
1048
1048
|
}, void 0, !0)
|
|
1049
1049
|
]),
|
|
1050
|
-
default:
|
|
1050
|
+
default: m(() => [
|
|
1051
1051
|
d(l(Ke), {
|
|
1052
1052
|
description: l(r)("gateway_services.form.sections.general.description"),
|
|
1053
1053
|
"hide-info-header": n.hideSectionsInfo,
|
|
1054
1054
|
title: l(r)("gateway_services.form.sections.general.title")
|
|
1055
1055
|
}, {
|
|
1056
|
-
default:
|
|
1056
|
+
default: m(() => [
|
|
1057
1057
|
d(V, {
|
|
1058
1058
|
modelValue: o.fields.name,
|
|
1059
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1059
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => o.fields.name = p),
|
|
1060
1060
|
modelModifiers: { trim: !0 },
|
|
1061
1061
|
autocomplete: "off",
|
|
1062
1062
|
"data-testid": "gateway-service-name-input",
|
|
1063
1063
|
error: Ie.value,
|
|
1064
|
-
"error-message":
|
|
1064
|
+
"error-message": N.value,
|
|
1065
1065
|
label: l(r)("gateway_services.form.fields.name.label"),
|
|
1066
1066
|
"label-attributes": {
|
|
1067
1067
|
info: l(r)("gateway_services.form.fields.name.tooltip"),
|
|
@@ -1071,11 +1071,11 @@ const ae = {
|
|
|
1071
1071
|
placeholder: l(r)("gateway_services.form.fields.name.placeholder"),
|
|
1072
1072
|
readonly: o.isReadonly,
|
|
1073
1073
|
type: "text",
|
|
1074
|
-
onInput:
|
|
1074
|
+
onInput: Ve
|
|
1075
1075
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
1076
1076
|
d(V, {
|
|
1077
1077
|
modelValue: o.fields.tags,
|
|
1078
|
-
"onUpdate:modelValue": u[1] || (u[1] = (
|
|
1078
|
+
"onUpdate:modelValue": u[1] || (u[1] = (p) => o.fields.tags = p),
|
|
1079
1079
|
modelModifiers: { trim: !0 },
|
|
1080
1080
|
autocomplete: "off",
|
|
1081
1081
|
"data-testid": "gateway-service-tags-input",
|
|
@@ -1098,34 +1098,34 @@ const ae = {
|
|
|
1098
1098
|
"hide-info-header": n.hideSectionsInfo,
|
|
1099
1099
|
title: l(r)("gateway_services.form.sections.keys.title")
|
|
1100
1100
|
}, {
|
|
1101
|
-
default:
|
|
1102
|
-
|
|
1103
|
-
I("div",
|
|
1104
|
-
d(
|
|
1105
|
-
default:
|
|
1106
|
-
|
|
1101
|
+
default: m(() => [
|
|
1102
|
+
ae.value ? M("", !0) : (S(), $("div", Lt, [
|
|
1103
|
+
I("div", Dt, [
|
|
1104
|
+
d(J, { required: "" }, {
|
|
1105
|
+
default: m(() => [
|
|
1106
|
+
Z(P(l(r)("gateway_services.form.sections.keys.checkedGroupLabel")), 1)
|
|
1107
1107
|
]),
|
|
1108
1108
|
_: 1
|
|
1109
1109
|
})
|
|
1110
1110
|
]),
|
|
1111
|
-
I("div",
|
|
1112
|
-
d(
|
|
1111
|
+
I("div", Wt, [
|
|
1112
|
+
d(B, {
|
|
1113
1113
|
modelValue: x.value,
|
|
1114
|
-
"onUpdate:modelValue": u[2] || (u[2] = (
|
|
1114
|
+
"onUpdate:modelValue": u[2] || (u[2] = (p) => x.value = p),
|
|
1115
1115
|
"data-testid": "gateway-service-url-radio",
|
|
1116
|
-
"selected-value":
|
|
1117
|
-
onChange:
|
|
1116
|
+
"selected-value": we.url,
|
|
1117
|
+
onChange: ne
|
|
1118
1118
|
}, {
|
|
1119
|
-
default:
|
|
1120
|
-
|
|
1119
|
+
default: m(() => [
|
|
1120
|
+
Z(P(l(r)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
1121
1121
|
]),
|
|
1122
1122
|
_: 1
|
|
1123
1123
|
}, 8, ["modelValue", "selected-value"])
|
|
1124
1124
|
]),
|
|
1125
|
-
x.value === "url" ? (S(), $("div",
|
|
1125
|
+
x.value === "url" ? (S(), $("div", qt, [
|
|
1126
1126
|
d(V, {
|
|
1127
1127
|
modelValue: o.fields.url,
|
|
1128
|
-
"onUpdate:modelValue": u[3] || (u[3] = (
|
|
1128
|
+
"onUpdate:modelValue": u[3] || (u[3] = (p) => o.fields.url = p),
|
|
1129
1129
|
modelModifiers: { trim: !0 },
|
|
1130
1130
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
1131
1131
|
"data-testid": "gateway-service-url-input",
|
|
@@ -1138,27 +1138,27 @@ const ae = {
|
|
|
1138
1138
|
placeholder: l(r)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
1139
1139
|
required: ""
|
|
1140
1140
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1141
|
-
])) :
|
|
1142
|
-
d(
|
|
1141
|
+
])) : M("", !0),
|
|
1142
|
+
d(B, {
|
|
1143
1143
|
modelValue: x.value,
|
|
1144
|
-
"onUpdate:modelValue": u[4] || (u[4] = (
|
|
1144
|
+
"onUpdate:modelValue": u[4] || (u[4] = (p) => x.value = p),
|
|
1145
1145
|
"checked-group": "protocol",
|
|
1146
1146
|
"data-testid": "gateway-service-protocol-radio",
|
|
1147
|
-
"selected-value":
|
|
1148
|
-
onChange:
|
|
1147
|
+
"selected-value": we.protocol,
|
|
1148
|
+
onChange: ne
|
|
1149
1149
|
}, {
|
|
1150
|
-
default:
|
|
1151
|
-
|
|
1150
|
+
default: m(() => [
|
|
1151
|
+
Z(P(l(r)("gateway_services.form.sections.keys.checkedGroupAltLabel")), 1)
|
|
1152
1152
|
]),
|
|
1153
1153
|
_: 1
|
|
1154
1154
|
}, 8, ["modelValue", "selected-value"])
|
|
1155
1155
|
])),
|
|
1156
|
-
x.value === "protocol" ||
|
|
1157
|
-
d(
|
|
1156
|
+
x.value === "protocol" || ae.value ? (S(), $("div", Gt, [
|
|
1157
|
+
d(R, {
|
|
1158
1158
|
modelValue: o.fields.protocol,
|
|
1159
|
-
"onUpdate:modelValue": u[5] || (u[5] = (
|
|
1159
|
+
"onUpdate:modelValue": u[5] || (u[5] = (p) => o.fields.protocol = p),
|
|
1160
1160
|
"data-testid": "gateway-service-protocol-select",
|
|
1161
|
-
items:
|
|
1161
|
+
items: ve,
|
|
1162
1162
|
label: l(r)("gateway_services.form.fields.protocol.label"),
|
|
1163
1163
|
"label-attributes": {
|
|
1164
1164
|
info: l(r)("gateway_services.form.fields.protocol.tooltip"),
|
|
@@ -1167,11 +1167,11 @@ const ae = {
|
|
|
1167
1167
|
readonly: o.isReadonly,
|
|
1168
1168
|
required: "",
|
|
1169
1169
|
width: "100%",
|
|
1170
|
-
onSelected: u[6] || (u[6] = (
|
|
1170
|
+
onSelected: u[6] || (u[6] = (p) => e(o.fields.protocol, p))
|
|
1171
1171
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
1172
1172
|
d(V, {
|
|
1173
1173
|
modelValue: o.fields.host,
|
|
1174
|
-
"onUpdate:modelValue": u[7] || (u[7] = (
|
|
1174
|
+
"onUpdate:modelValue": u[7] || (u[7] = (p) => o.fields.host = p),
|
|
1175
1175
|
modelModifiers: { trim: !0 },
|
|
1176
1176
|
class: "gateway-service-form-margin-top",
|
|
1177
1177
|
"data-testid": "gateway-service-host-input",
|
|
@@ -1184,10 +1184,10 @@ const ae = {
|
|
|
1184
1184
|
placeholder: l(r)("gateway_services.form.fields.host.placeholder"),
|
|
1185
1185
|
required: ""
|
|
1186
1186
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"]),
|
|
1187
|
-
|
|
1187
|
+
re.value ? (S(), $("div", Ot, [
|
|
1188
1188
|
d(V, {
|
|
1189
1189
|
modelValue: o.fields.path,
|
|
1190
|
-
"onUpdate:modelValue": u[8] || (u[8] = (
|
|
1190
|
+
"onUpdate:modelValue": u[8] || (u[8] = (p) => o.fields.path = p),
|
|
1191
1191
|
modelModifiers: { trim: !0 },
|
|
1192
1192
|
class: "gateway-service-form-margin-top",
|
|
1193
1193
|
"data-testid": "gateway-service-path-input",
|
|
@@ -1199,13 +1199,13 @@ const ae = {
|
|
|
1199
1199
|
name: "path",
|
|
1200
1200
|
placeholder: l(r)("gateway_services.form.fields.path.placeholder")
|
|
1201
1201
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder"])
|
|
1202
|
-
])) :
|
|
1202
|
+
])) : M("", !0),
|
|
1203
1203
|
d(V, {
|
|
1204
1204
|
modelValue: o.fields.port,
|
|
1205
1205
|
"onUpdate:modelValue": [
|
|
1206
|
-
u[9] || (u[9] = (
|
|
1206
|
+
u[9] || (u[9] = (p) => o.fields.port = p),
|
|
1207
1207
|
u[10] || (u[10] = () => {
|
|
1208
|
-
o.fields.port =
|
|
1208
|
+
o.fields.port = F(o.fields.port + "");
|
|
1209
1209
|
})
|
|
1210
1210
|
],
|
|
1211
1211
|
class: "gateway-service-form-margin-top",
|
|
@@ -1218,23 +1218,23 @@ const ae = {
|
|
|
1218
1218
|
name: "port",
|
|
1219
1219
|
type: "number"
|
|
1220
1220
|
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
1221
|
-
])) :
|
|
1221
|
+
])) : M("", !0),
|
|
1222
1222
|
d(g, {
|
|
1223
|
-
modelValue:
|
|
1224
|
-
"onUpdate:modelValue": u[24] || (u[24] = (
|
|
1223
|
+
modelValue: h.value,
|
|
1224
|
+
"onUpdate:modelValue": u[24] || (u[24] = (p) => h.value = p),
|
|
1225
1225
|
"data-testid": "advanced-fields-collapse",
|
|
1226
1226
|
"trigger-alignment": "leading",
|
|
1227
1227
|
"trigger-label": l(r)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
1228
1228
|
}, {
|
|
1229
|
-
default:
|
|
1230
|
-
I("div",
|
|
1231
|
-
I("div",
|
|
1229
|
+
default: m(() => [
|
|
1230
|
+
I("div", Nt, [
|
|
1231
|
+
I("div", jt, [
|
|
1232
1232
|
d(V, {
|
|
1233
1233
|
modelValue: o.fields.retries,
|
|
1234
1234
|
"onUpdate:modelValue": [
|
|
1235
|
-
u[11] || (u[11] = (
|
|
1235
|
+
u[11] || (u[11] = (p) => o.fields.retries = p),
|
|
1236
1236
|
u[12] || (u[12] = () => {
|
|
1237
|
-
o.fields.retries =
|
|
1237
|
+
o.fields.retries = F(o.fields.retries + "");
|
|
1238
1238
|
})
|
|
1239
1239
|
],
|
|
1240
1240
|
autocomplete: "off",
|
|
@@ -1249,13 +1249,13 @@ const ae = {
|
|
|
1249
1249
|
type: "number"
|
|
1250
1250
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1251
1251
|
]),
|
|
1252
|
-
I("div",
|
|
1252
|
+
I("div", zt, [
|
|
1253
1253
|
d(V, {
|
|
1254
1254
|
modelValue: o.fields.connect_timeout,
|
|
1255
1255
|
"onUpdate:modelValue": [
|
|
1256
|
-
u[13] || (u[13] = (
|
|
1256
|
+
u[13] || (u[13] = (p) => o.fields.connect_timeout = p),
|
|
1257
1257
|
u[14] || (u[14] = () => {
|
|
1258
|
-
o.fields.connect_timeout =
|
|
1258
|
+
o.fields.connect_timeout = F(o.fields.connect_timeout + "");
|
|
1259
1259
|
})
|
|
1260
1260
|
],
|
|
1261
1261
|
autocomplete: "off",
|
|
@@ -1270,13 +1270,13 @@ const ae = {
|
|
|
1270
1270
|
type: "number"
|
|
1271
1271
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1272
1272
|
]),
|
|
1273
|
-
I("div",
|
|
1273
|
+
I("div", Ht, [
|
|
1274
1274
|
d(V, {
|
|
1275
1275
|
modelValue: o.fields.write_timeout,
|
|
1276
1276
|
"onUpdate:modelValue": [
|
|
1277
|
-
u[15] || (u[15] = (
|
|
1277
|
+
u[15] || (u[15] = (p) => o.fields.write_timeout = p),
|
|
1278
1278
|
u[16] || (u[16] = () => {
|
|
1279
|
-
o.fields.write_timeout =
|
|
1279
|
+
o.fields.write_timeout = F(o.fields.write_timeout + "");
|
|
1280
1280
|
})
|
|
1281
1281
|
],
|
|
1282
1282
|
autocomplete: "off",
|
|
@@ -1291,13 +1291,13 @@ const ae = {
|
|
|
1291
1291
|
type: "number"
|
|
1292
1292
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1293
1293
|
]),
|
|
1294
|
-
I("div",
|
|
1294
|
+
I("div", Zt, [
|
|
1295
1295
|
d(V, {
|
|
1296
1296
|
modelValue: o.fields.read_timeout,
|
|
1297
1297
|
"onUpdate:modelValue": [
|
|
1298
|
-
u[17] || (u[17] = (
|
|
1298
|
+
u[17] || (u[17] = (p) => o.fields.read_timeout = p),
|
|
1299
1299
|
u[18] || (u[18] = () => {
|
|
1300
|
-
o.fields.read_timeout =
|
|
1300
|
+
o.fields.read_timeout = F(o.fields.read_timeout + "");
|
|
1301
1301
|
})
|
|
1302
1302
|
],
|
|
1303
1303
|
autocomplete: "off",
|
|
@@ -1312,10 +1312,10 @@ const ae = {
|
|
|
1312
1312
|
type: "number"
|
|
1313
1313
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
1314
1314
|
]),
|
|
1315
|
-
Pe.value ? (S(), $("div",
|
|
1315
|
+
Pe.value ? (S(), $("div", Jt, [
|
|
1316
1316
|
d(V, {
|
|
1317
1317
|
modelValue: o.fields.client_certificate,
|
|
1318
|
-
"onUpdate:modelValue": u[19] || (u[19] = (
|
|
1318
|
+
"onUpdate:modelValue": u[19] || (u[19] = (p) => o.fields.client_certificate = p),
|
|
1319
1319
|
modelModifiers: { trim: !0 },
|
|
1320
1320
|
autocomplete: "off",
|
|
1321
1321
|
"data-testid": "gateway-service-clientCert-input",
|
|
@@ -1329,11 +1329,11 @@ const ae = {
|
|
|
1329
1329
|
readonly: o.isReadonly,
|
|
1330
1330
|
type: "text"
|
|
1331
1331
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"])
|
|
1332
|
-
])) :
|
|
1333
|
-
oe.value ? (S(), $("div",
|
|
1332
|
+
])) : M("", !0),
|
|
1333
|
+
oe.value ? (S(), $("div", Qt, [
|
|
1334
1334
|
d(V, {
|
|
1335
1335
|
modelValue: o.fields.ca_certificates,
|
|
1336
|
-
"onUpdate:modelValue": u[20] || (u[20] = (
|
|
1336
|
+
"onUpdate:modelValue": u[20] || (u[20] = (p) => o.fields.ca_certificates = p),
|
|
1337
1337
|
modelModifiers: { trim: !0 },
|
|
1338
1338
|
autocomplete: "off",
|
|
1339
1339
|
"data-testid": "gateway-service-ca-certs-input",
|
|
@@ -1343,64 +1343,64 @@ const ae = {
|
|
|
1343
1343
|
readonly: o.isReadonly,
|
|
1344
1344
|
type: "text"
|
|
1345
1345
|
}, {
|
|
1346
|
-
"label-tooltip":
|
|
1346
|
+
"label-tooltip": m(() => [
|
|
1347
1347
|
d(l(Q), {
|
|
1348
1348
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1349
1349
|
scope: "global"
|
|
1350
1350
|
}, {
|
|
1351
|
-
code1:
|
|
1352
|
-
I("code", null,
|
|
1351
|
+
code1: m(() => [
|
|
1352
|
+
I("code", null, P(l(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1353
1353
|
]),
|
|
1354
|
-
code2:
|
|
1355
|
-
I("code", null,
|
|
1354
|
+
code2: m(() => [
|
|
1355
|
+
I("code", null, P(l(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1356
1356
|
]),
|
|
1357
1357
|
_: 1
|
|
1358
1358
|
})
|
|
1359
1359
|
]),
|
|
1360
1360
|
_: 1
|
|
1361
1361
|
}, 8, ["modelValue", "label", "placeholder", "readonly"])
|
|
1362
|
-
])) :
|
|
1363
|
-
|
|
1362
|
+
])) : M("", !0),
|
|
1363
|
+
ke.value ? (S(), $("div", Xt, [
|
|
1364
1364
|
d(c, {
|
|
1365
1365
|
modelValue: o.fields.tls_verify_enabled,
|
|
1366
|
-
"onUpdate:modelValue": u[21] || (u[21] = (
|
|
1366
|
+
"onUpdate:modelValue": u[21] || (u[21] = (p) => o.fields.tls_verify_enabled = p),
|
|
1367
1367
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
1368
1368
|
description: l(r)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
1369
1369
|
label: l(r)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
1370
1370
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
1371
1371
|
}, {
|
|
1372
|
-
tooltip:
|
|
1372
|
+
tooltip: m(() => [
|
|
1373
1373
|
d(l(Q), {
|
|
1374
1374
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1375
1375
|
scope: "global"
|
|
1376
1376
|
}, {
|
|
1377
|
-
code1:
|
|
1378
|
-
I("code", null,
|
|
1377
|
+
code1: m(() => [
|
|
1378
|
+
I("code", null, P(l(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1379
1379
|
]),
|
|
1380
1380
|
_: 1
|
|
1381
1381
|
})
|
|
1382
1382
|
]),
|
|
1383
1383
|
_: 1
|
|
1384
1384
|
}, 8, ["modelValue", "description", "label"]),
|
|
1385
|
-
o.fields.tls_verify_enabled ? (S(), $("div",
|
|
1386
|
-
d(
|
|
1385
|
+
o.fields.tls_verify_enabled ? (S(), $("div", Yt, [
|
|
1386
|
+
d(B, {
|
|
1387
1387
|
modelValue: o.fields.tls_verify_value,
|
|
1388
|
-
"onUpdate:modelValue": u[22] || (u[22] = (
|
|
1388
|
+
"onUpdate:modelValue": u[22] || (u[22] = (p) => o.fields.tls_verify_value = p),
|
|
1389
1389
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
1390
1390
|
label: l(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
1391
1391
|
"selected-value": !0
|
|
1392
1392
|
}, null, 8, ["modelValue", "label"])
|
|
1393
|
-
])) :
|
|
1394
|
-
o.fields.tls_verify_enabled ? (S(), $("div",
|
|
1395
|
-
d(
|
|
1393
|
+
])) : M("", !0),
|
|
1394
|
+
o.fields.tls_verify_enabled ? (S(), $("div", el, [
|
|
1395
|
+
d(B, {
|
|
1396
1396
|
modelValue: o.fields.tls_verify_value,
|
|
1397
|
-
"onUpdate:modelValue": u[23] || (u[23] = (
|
|
1397
|
+
"onUpdate:modelValue": u[23] || (u[23] = (p) => o.fields.tls_verify_value = p),
|
|
1398
1398
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
1399
1399
|
label: l(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
1400
1400
|
"selected-value": !1
|
|
1401
1401
|
}, null, 8, ["modelValue", "label"])
|
|
1402
|
-
])) :
|
|
1403
|
-
])) :
|
|
1402
|
+
])) : M("", !0)
|
|
1403
|
+
])) : M("", !0)
|
|
1404
1404
|
])
|
|
1405
1405
|
]),
|
|
1406
1406
|
_: 1
|
|
@@ -1414,7 +1414,7 @@ const ae = {
|
|
|
1414
1414
|
]);
|
|
1415
1415
|
};
|
|
1416
1416
|
}
|
|
1417
|
-
}),
|
|
1417
|
+
}), Al = /* @__PURE__ */ Ne(tl, [["__scopeId", "data-v-59d8e66b"]]), ll = { class: "kong-ui-gateway-service-entity-config-card" }, xl = /* @__PURE__ */ Le({
|
|
1418
1418
|
__name: "GatewayServiceConfigCard",
|
|
1419
1419
|
props: {
|
|
1420
1420
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1441,163 +1441,128 @@ const ae = {
|
|
|
1441
1441
|
},
|
|
1442
1442
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
1443
1443
|
setup(n) {
|
|
1444
|
-
const
|
|
1444
|
+
const X = n, { i18n: { t: _ }, i18nT: v } = se.useI18n(), a = k(() => pe.form[X.config.app].edit), { getPropValue: h } = et(), L = (r, j) => h(r, j) === !0 ? _("gateway_services.form.fields.tls_verify_option.true.display") : _("gateway_services.form.fields.tls_verify_option.false.display"), Q = D({
|
|
1445
1445
|
id: {},
|
|
1446
1446
|
name: {
|
|
1447
|
-
tooltip:
|
|
1447
|
+
tooltip: _("gateway_services.form.fields.name.tooltip")
|
|
1448
1448
|
},
|
|
1449
1449
|
enabled: {},
|
|
1450
1450
|
updated_at: {},
|
|
1451
1451
|
created_at: {},
|
|
1452
1452
|
protocol: {
|
|
1453
1453
|
section: Ae.Basic,
|
|
1454
|
-
tooltip:
|
|
1454
|
+
tooltip: _("gateway_services.form.fields.protocol.tooltip")
|
|
1455
1455
|
},
|
|
1456
1456
|
host: {
|
|
1457
1457
|
section: Ae.Basic,
|
|
1458
|
-
tooltip:
|
|
1458
|
+
tooltip: _("gateway_services.form.fields.host.tooltip")
|
|
1459
1459
|
},
|
|
1460
1460
|
path: {
|
|
1461
1461
|
section: Ae.Basic,
|
|
1462
|
-
tooltip:
|
|
1462
|
+
tooltip: _("gateway_services.form.fields.path.tooltip")
|
|
1463
1463
|
},
|
|
1464
1464
|
port: {
|
|
1465
1465
|
section: Ae.Basic,
|
|
1466
|
-
tooltip:
|
|
1466
|
+
tooltip: _("gateway_services.form.fields.port.tooltip")
|
|
1467
1467
|
},
|
|
1468
1468
|
tags: {
|
|
1469
|
-
tooltip:
|
|
1469
|
+
tooltip: _("gateway_services.form.fields.tags.tooltip")
|
|
1470
1470
|
},
|
|
1471
1471
|
// advanced fields
|
|
1472
1472
|
retries: {
|
|
1473
1473
|
order: 1,
|
|
1474
|
-
tooltip:
|
|
1474
|
+
tooltip: _("gateway_services.form.fields.retries.tooltip")
|
|
1475
1475
|
},
|
|
1476
1476
|
connect_timeout: {
|
|
1477
1477
|
order: 2,
|
|
1478
|
-
tooltip:
|
|
1478
|
+
tooltip: _("gateway_services.form.fields.connect_timeout.tooltip")
|
|
1479
1479
|
},
|
|
1480
1480
|
write_timeout: {
|
|
1481
1481
|
order: 3,
|
|
1482
|
-
tooltip:
|
|
1482
|
+
tooltip: _("gateway_services.form.fields.write_timeout.tooltip")
|
|
1483
1483
|
},
|
|
1484
1484
|
read_timeout: {
|
|
1485
1485
|
order: 4,
|
|
1486
|
-
tooltip:
|
|
1486
|
+
tooltip: _("gateway_services.form.fields.read_timeout.tooltip")
|
|
1487
1487
|
},
|
|
1488
1488
|
client_certificate: {
|
|
1489
1489
|
order: 5,
|
|
1490
|
-
tooltip:
|
|
1490
|
+
tooltip: _("gateway_services.form.fields.client_certificate.tooltip")
|
|
1491
1491
|
},
|
|
1492
1492
|
ca_certificates: {
|
|
1493
|
-
type:
|
|
1494
|
-
label:
|
|
1493
|
+
type: bt.BadgeTag,
|
|
1494
|
+
label: _("gateway_services.form.fields.ca_certificates.label"),
|
|
1495
1495
|
order: 6
|
|
1496
1496
|
},
|
|
1497
1497
|
tls_verify: {
|
|
1498
|
-
label:
|
|
1498
|
+
label: _("gateway_services.form.fields.tls_verify_enabled.label")
|
|
1499
1499
|
},
|
|
1500
1500
|
tls_verify_depth: {
|
|
1501
1501
|
hidden: !0
|
|
1502
1502
|
}
|
|
1503
1503
|
});
|
|
1504
|
-
return (r,
|
|
1505
|
-
d(l(
|
|
1504
|
+
return (r, j) => (S(), $("div", ll, [
|
|
1505
|
+
d(l(ht), {
|
|
1506
1506
|
config: n.config,
|
|
1507
1507
|
"config-card-doc": n.configCardDoc,
|
|
1508
1508
|
"config-schema": Q.value,
|
|
1509
|
-
"entity-type": l(
|
|
1510
|
-
"fetch-url":
|
|
1509
|
+
"entity-type": l(Oe).GatewayService,
|
|
1510
|
+
"fetch-url": a.value,
|
|
1511
1511
|
"hide-title": n.hideTitle,
|
|
1512
|
-
"onFetch:error":
|
|
1513
|
-
"onFetch:success":
|
|
1514
|
-
onLoading:
|
|
1512
|
+
"onFetch:error": j[0] || (j[0] = (A) => r.$emit("fetch:error", A)),
|
|
1513
|
+
"onFetch:success": j[1] || (j[1] = (A) => r.$emit("fetch:success", A)),
|
|
1514
|
+
onLoading: j[2] || (j[2] = (A) => r.$emit("loading", A))
|
|
1515
1515
|
}, {
|
|
1516
|
-
"enabled-label-tooltip":
|
|
1517
|
-
d(l(
|
|
1516
|
+
"enabled-label-tooltip": m(() => [
|
|
1517
|
+
d(l(v), {
|
|
1518
1518
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
1519
1519
|
scope: "global"
|
|
1520
1520
|
}, {
|
|
1521
|
-
false:
|
|
1522
|
-
I("code", null,
|
|
1521
|
+
false: m(() => [
|
|
1522
|
+
I("code", null, P(l(_)("gateway_services.form.fields.enabled.false")), 1)
|
|
1523
1523
|
]),
|
|
1524
|
-
true:
|
|
1525
|
-
I("code", null,
|
|
1524
|
+
true: m(() => [
|
|
1525
|
+
I("code", null, P(l(_)("gateway_services.form.fields.enabled.true")), 1)
|
|
1526
1526
|
]),
|
|
1527
1527
|
_: 1
|
|
1528
1528
|
})
|
|
1529
1529
|
]),
|
|
1530
|
-
"ca_certificates-label-tooltip":
|
|
1531
|
-
d(l(
|
|
1530
|
+
"ca_certificates-label-tooltip": m(() => [
|
|
1531
|
+
d(l(v), {
|
|
1532
1532
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
1533
1533
|
scope: "global"
|
|
1534
1534
|
}, {
|
|
1535
|
-
code1:
|
|
1536
|
-
I("code", null,
|
|
1535
|
+
code1: m(() => [
|
|
1536
|
+
I("code", null, P(l(_)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
1537
1537
|
]),
|
|
1538
|
-
code2:
|
|
1539
|
-
I("code", null,
|
|
1538
|
+
code2: m(() => [
|
|
1539
|
+
I("code", null, P(l(_)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
1540
1540
|
]),
|
|
1541
1541
|
_: 1
|
|
1542
1542
|
})
|
|
1543
1543
|
]),
|
|
1544
|
-
"tls_verify-label-tooltip":
|
|
1545
|
-
d(l(
|
|
1544
|
+
"tls_verify-label-tooltip": m(() => [
|
|
1545
|
+
d(l(v), {
|
|
1546
1546
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
1547
1547
|
scope: "global"
|
|
1548
1548
|
}, {
|
|
1549
|
-
code1:
|
|
1550
|
-
I("code", null,
|
|
1549
|
+
code1: m(() => [
|
|
1550
|
+
I("code", null, P(l(_)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
1551
1551
|
]),
|
|
1552
1552
|
_: 1
|
|
1553
1553
|
})
|
|
1554
1554
|
]),
|
|
1555
|
-
tls_verify:
|
|
1556
|
-
|
|
1555
|
+
tls_verify: m((A) => [
|
|
1556
|
+
Z(P(typeof l(h)("rowValue", A) == "boolean" ? L("rowValue", A) : l(_)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
|
|
1557
1557
|
]),
|
|
1558
|
-
client_certificate:
|
|
1559
|
-
|
|
1558
|
+
client_certificate: m((A) => [
|
|
1559
|
+
Z(P(l(h)("rowValue", A) ? l(h)("rowValue", A).id : "–"), 1)
|
|
1560
1560
|
]),
|
|
1561
1561
|
_: 1
|
|
1562
1562
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
1563
1563
|
]));
|
|
1564
1564
|
}
|
|
1565
|
-
})
|
|
1566
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1567
|
-
const Je = () => {
|
|
1568
|
-
};
|
|
1569
|
-
function sl(n, K) {
|
|
1570
|
-
function y(...p) {
|
|
1571
|
-
return new Promise((s, b) => {
|
|
1572
|
-
Promise.resolve(n(() => K.apply(this, p), { fn: K, thisArg: this, args: p })).then(s).catch(b);
|
|
1573
|
-
});
|
|
1574
|
-
}
|
|
1575
|
-
return y;
|
|
1576
|
-
}
|
|
1577
|
-
function al(n, K = {}) {
|
|
1578
|
-
let y, p, s = Je;
|
|
1579
|
-
const b = (r) => {
|
|
1580
|
-
clearTimeout(r), s(), s = Je;
|
|
1581
|
-
};
|
|
1582
|
-
let M;
|
|
1583
|
-
return (r) => {
|
|
1584
|
-
const D = He(n), P = He(K.maxWait);
|
|
1585
|
-
return y && b(y), D <= 0 || P !== void 0 && P <= 0 ? (p && (b(p), p = null), Promise.resolve(r())) : new Promise((ie, ne) => {
|
|
1586
|
-
s = K.rejectOnCancel ? ne : ie, M = r, P && !p && (p = setTimeout(() => {
|
|
1587
|
-
y && b(y), p = null, ie(M());
|
|
1588
|
-
}, P)), y = setTimeout(() => {
|
|
1589
|
-
p && b(p), p = null, ie(r());
|
|
1590
|
-
}, D);
|
|
1591
|
-
});
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
function qe(n, K = 200, y = {}) {
|
|
1595
|
-
return sl(
|
|
1596
|
-
al(K, y),
|
|
1597
|
-
n
|
|
1598
|
-
);
|
|
1599
|
-
}
|
|
1600
|
-
const le = {
|
|
1565
|
+
}), le = {
|
|
1601
1566
|
name: "Kong-Air-Flights-API",
|
|
1602
1567
|
tags: [],
|
|
1603
1568
|
protocol: "https",
|
|
@@ -1610,34 +1575,34 @@ const le = {
|
|
|
1610
1575
|
client_certificate: null,
|
|
1611
1576
|
write_timeout: 6e4,
|
|
1612
1577
|
port: 443
|
|
1613
|
-
},
|
|
1578
|
+
}, ol = { class: "kong-ui-entities-gateway-service-form" }, il = {
|
|
1614
1579
|
key: 0,
|
|
1615
1580
|
class: "gateway-service-form-general-info"
|
|
1616
|
-
},
|
|
1581
|
+
}, rl = { class: "gateway-service-form-group-selection-wrapper" }, sl = {
|
|
1617
1582
|
key: 0,
|
|
1618
1583
|
class: "gateway-service-form-group-fields"
|
|
1619
|
-
},
|
|
1584
|
+
}, al = {
|
|
1620
1585
|
key: 0,
|
|
1621
1586
|
class: "gateway-service-form-group-fields"
|
|
1622
|
-
},
|
|
1587
|
+
}, nl = { key: 0 }, cl = {
|
|
1623
1588
|
key: 0,
|
|
1624
1589
|
class: "gateway-service-form-advanced-fields"
|
|
1625
|
-
},
|
|
1590
|
+
}, dl = { class: "gateway-service-form-margin-bottom" }, ul = { class: "gateway-service-form-margin-bottom" }, fl = { class: "gateway-service-form-margin-bottom" }, pl = { class: "gateway-service-form-margin-bottom" }, ml = {
|
|
1626
1591
|
key: 0,
|
|
1627
1592
|
class: "gateway-service-form-margin-bottom"
|
|
1628
|
-
},
|
|
1593
|
+
}, vl = {
|
|
1629
1594
|
key: 1,
|
|
1630
1595
|
class: "gateway-service-form-margin-bottom"
|
|
1631
|
-
},
|
|
1596
|
+
}, gl = {
|
|
1632
1597
|
key: 2,
|
|
1633
1598
|
class: "gateway-service-form-margin-bottom"
|
|
1634
|
-
},
|
|
1599
|
+
}, yl = {
|
|
1635
1600
|
key: 0,
|
|
1636
1601
|
class: "checkbox-aligned-radio"
|
|
1637
|
-
},
|
|
1602
|
+
}, _l = {
|
|
1638
1603
|
key: 1,
|
|
1639
1604
|
class: "checkbox-aligned-radio"
|
|
1640
|
-
},
|
|
1605
|
+
}, bl = { class: "gateway-service-form-tags" }, hl = { class: "form-error-list" }, wl = /* @__PURE__ */ Le({
|
|
1641
1606
|
__name: "GatewayServiceForm",
|
|
1642
1607
|
props: {
|
|
1643
1608
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1666,9 +1631,9 @@ const le = {
|
|
|
1666
1631
|
}
|
|
1667
1632
|
},
|
|
1668
1633
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
|
|
1669
|
-
setup(n, { expose:
|
|
1670
|
-
var
|
|
1671
|
-
const
|
|
1634
|
+
setup(n, { expose: X, emit: _ }) {
|
|
1635
|
+
var b;
|
|
1636
|
+
const v = _, a = n, h = D(!0), L = qe(), { i18nT: Q, i18n: { t: r } } = se.useI18n(), { getErrorFieldsFromError: j } = Je(), { axiosInstance: A } = Ge((b = a.config) == null ? void 0 : b.axiosRequestConfig), Se = Qe(), { validateHost: be, validatePath: Y, validatePort: he, validateProtocol: ae } = se.useUrlValidators(), { objectsAreEqual: x } = et(), me = k(() => pe.form[a.config.app].edit), N = k(() => a.gatewayServiceId ? Be.Edit : Be.Create), Ie = D(!1), o = k(() => !!a.gatewayServiceId), w = D(o.value ? "protocol" : "url"), ie = se.usePortFromProtocol(), ve = D(""), we = k(() => !!ve.value || !!ee("name")), e = Me({
|
|
1672
1637
|
fields: {
|
|
1673
1638
|
name: "",
|
|
1674
1639
|
protocol: "http",
|
|
@@ -1704,7 +1669,7 @@ const le = {
|
|
|
1704
1669
|
tls_verify_enabled: "",
|
|
1705
1670
|
tls_verify_value: ""
|
|
1706
1671
|
}
|
|
1707
|
-
}),
|
|
1672
|
+
}), F = Me({
|
|
1708
1673
|
name: "",
|
|
1709
1674
|
protocol: "http",
|
|
1710
1675
|
host: "",
|
|
@@ -1720,13 +1685,13 @@ const le = {
|
|
|
1720
1685
|
tls_verify_enabled: !1,
|
|
1721
1686
|
tls_verify_value: !1,
|
|
1722
1687
|
tags: ""
|
|
1723
|
-
}),
|
|
1724
|
-
gatewayInfo:
|
|
1688
|
+
}), ne = a.config.app === "konnect" || Xe({
|
|
1689
|
+
gatewayInfo: a.config.gatewayInfo,
|
|
1725
1690
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
1726
1691
|
supportedRange: {
|
|
1727
1692
|
enterprise: ["3.0"]
|
|
1728
1693
|
}
|
|
1729
|
-
}),
|
|
1694
|
+
}), q = [
|
|
1730
1695
|
{
|
|
1731
1696
|
label: r("gateway_services.form.fields.protocol.options.http"),
|
|
1732
1697
|
value: "http",
|
|
@@ -1762,7 +1727,7 @@ const le = {
|
|
|
1762
1727
|
value: "grpcs",
|
|
1763
1728
|
group: "grpc"
|
|
1764
1729
|
},
|
|
1765
|
-
...
|
|
1730
|
+
...ne ? [
|
|
1766
1731
|
{
|
|
1767
1732
|
label: r("gateway_services.form.fields.protocol.options.ws"),
|
|
1768
1733
|
value: "ws",
|
|
@@ -1779,14 +1744,14 @@ const le = {
|
|
|
1779
1744
|
value: "udp",
|
|
1780
1745
|
group: "udp"
|
|
1781
1746
|
}
|
|
1782
|
-
],
|
|
1783
|
-
|
|
1784
|
-
}, oe = (t) => t ? parseFloat(t) : 0,
|
|
1785
|
-
e.fields.host =
|
|
1786
|
-
},
|
|
1787
|
-
|
|
1788
|
-
},
|
|
1789
|
-
switch (
|
|
1747
|
+
], re = { url: "url", protocol: "protocol" }, Pe = (t, s) => {
|
|
1748
|
+
s.value;
|
|
1749
|
+
}, oe = (t) => t ? parseFloat(t) : 0, ke = () => {
|
|
1750
|
+
e.fields.host = F.host, e.fields.path = F.path, e.fields.port = F.port, e.fields.protocol = F.protocol, e.fields.url = F.url, e.fields.retries = F.retries, e.fields.connect_timeout = F.connect_timeout, e.fields.write_timeout = F.write_timeout, e.fields.read_timeout = F.read_timeout, e.fields.client_certificate = F.client_certificate, e.fields.ca_certificates = F.ca_certificates, e.fields.tls_verify_enabled = F.tls_verify_enabled, e.fields.tls_verify_value = F.tls_verify_value;
|
|
1751
|
+
}, Ve = () => {
|
|
1752
|
+
h.value = !0, H(), e.errorMessages = [], ke();
|
|
1753
|
+
}, ce = () => {
|
|
1754
|
+
switch (ke(), e.fields.name = `${le.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, w.value) {
|
|
1790
1755
|
case "url":
|
|
1791
1756
|
e.fields.url = `${le.protocol}://${le.host}${le.path}`;
|
|
1792
1757
|
break;
|
|
@@ -1796,94 +1761,94 @@ const le = {
|
|
|
1796
1761
|
default:
|
|
1797
1762
|
e.fields.url = `${le.protocol}://${le.host}${le.path}`;
|
|
1798
1763
|
}
|
|
1799
|
-
},
|
|
1800
|
-
if (
|
|
1764
|
+
}, ge = () => {
|
|
1765
|
+
if (H(), e.fields.url.length)
|
|
1801
1766
|
try {
|
|
1802
|
-
const t = new URL(e.fields.url),
|
|
1803
|
-
if (
|
|
1767
|
+
const t = new URL(e.fields.url), s = ae(t.protocol, q);
|
|
1768
|
+
if (s) throw new Error(s);
|
|
1804
1769
|
e.fields.protocol = t.protocol.slice(0, -1);
|
|
1805
|
-
const
|
|
1806
|
-
if (
|
|
1770
|
+
const E = be(t.hostname);
|
|
1771
|
+
if (E) throw new Error(E);
|
|
1807
1772
|
e.fields.host = t.hostname;
|
|
1808
|
-
const
|
|
1809
|
-
if (
|
|
1773
|
+
const O = Y(t.pathname);
|
|
1774
|
+
if (O) throw new Error(O);
|
|
1810
1775
|
e.fields.path = t.pathname;
|
|
1811
|
-
const U =
|
|
1776
|
+
const U = he(t.port);
|
|
1812
1777
|
if (U) throw new Error(U);
|
|
1813
|
-
const
|
|
1814
|
-
Ie.value = !!
|
|
1778
|
+
const T = Number(t.port);
|
|
1779
|
+
Ie.value = !!T, e.fields.port = T || ie.getPortFromProtocol(e.fields.protocol), v("url-valid:success");
|
|
1815
1780
|
} catch {
|
|
1816
|
-
|
|
1781
|
+
v("url-valid:error", r("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = r("gateway_services.form.errors.url.invalid");
|
|
1817
1782
|
}
|
|
1818
|
-
},
|
|
1819
|
-
|
|
1820
|
-
},
|
|
1783
|
+
}, ye = (t) => {
|
|
1784
|
+
H(t);
|
|
1785
|
+
}, Ee = k(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), ee = (t) => {
|
|
1821
1786
|
if (e.errorMessages.length) return "";
|
|
1822
|
-
const
|
|
1823
|
-
return
|
|
1824
|
-
},
|
|
1825
|
-
|
|
1826
|
-
const
|
|
1827
|
-
|
|
1828
|
-
const
|
|
1829
|
-
|
|
1830
|
-
const
|
|
1831
|
-
|
|
1832
|
-
},
|
|
1787
|
+
const s = e.formFieldErrors;
|
|
1788
|
+
return s[t] ? s[t] : "";
|
|
1789
|
+
}, z = (t) => {
|
|
1790
|
+
H(t ?? void 0);
|
|
1791
|
+
const s = be(e.fields.host);
|
|
1792
|
+
s && (e.formFieldErrors.host = s);
|
|
1793
|
+
const E = Y(e.fields.path);
|
|
1794
|
+
E && (e.formFieldErrors.path = E);
|
|
1795
|
+
const O = he(e.fields.port);
|
|
1796
|
+
O && (e.formFieldErrors.port = O), te.value ? v("url-valid:success") : v("url-valid:error", e.errorMessages.join(",") || r("gateway_services.form.errors.url.invalid"));
|
|
1797
|
+
}, H = (t) => {
|
|
1833
1798
|
if (t)
|
|
1834
1799
|
e.formFieldErrors[t] = "";
|
|
1835
1800
|
else
|
|
1836
|
-
for (let
|
|
1837
|
-
e.formFieldErrors[
|
|
1801
|
+
for (let s in e.formFieldErrors)
|
|
1802
|
+
e.formFieldErrors[s] = "";
|
|
1838
1803
|
e.errorMessages = [];
|
|
1839
1804
|
}, te = k(() => {
|
|
1840
1805
|
for (let t in e.formFieldErrors)
|
|
1841
1806
|
if (e.formFieldErrors[t].length)
|
|
1842
1807
|
return !1;
|
|
1843
1808
|
return !0;
|
|
1844
|
-
}),
|
|
1845
|
-
e.fields.url && w.value === "url" ?
|
|
1809
|
+
}), de = () => {
|
|
1810
|
+
e.fields.url && w.value === "url" ? ge() : z();
|
|
1846
1811
|
}, i = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, u = k(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), V = k(() => {
|
|
1847
1812
|
if (w.value === "url")
|
|
1848
1813
|
return !0;
|
|
1849
1814
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1850
1815
|
return w.value === "protocol" && t;
|
|
1851
|
-
}),
|
|
1816
|
+
}), J = k(() => {
|
|
1852
1817
|
if (w.value === "url")
|
|
1853
1818
|
return !0;
|
|
1854
1819
|
const t = ["https", "tls"].includes(e.fields.protocol);
|
|
1855
1820
|
return w.value === "protocol" && t;
|
|
1856
|
-
}),
|
|
1821
|
+
}), B = k(() => {
|
|
1857
1822
|
if (w.value === "url")
|
|
1858
1823
|
return !0;
|
|
1859
1824
|
const t = ["https", "wss", "tls"].includes(e.fields.protocol);
|
|
1860
1825
|
return w.value === "protocol" && t;
|
|
1861
|
-
}),
|
|
1862
|
-
|
|
1826
|
+
}), R = (t) => {
|
|
1827
|
+
H("name"), ve.value = Se.utf8Name(t);
|
|
1863
1828
|
}, c = k(() => {
|
|
1864
|
-
const t = !o.value || !x(e.fields,
|
|
1865
|
-
return t && (
|
|
1829
|
+
const t = !o.value || !x(e.fields, F), s = w.value === "url" && !!e.fields.url && te.value, E = w.value === "protocol" && !!e.fields.host && te.value;
|
|
1830
|
+
return t && (s || E);
|
|
1866
1831
|
}), g = (t) => {
|
|
1867
|
-
var
|
|
1868
|
-
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((
|
|
1869
|
-
},
|
|
1870
|
-
|
|
1832
|
+
var s, E, O;
|
|
1833
|
+
e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((s = t == null ? void 0 : t.tags) == null ? void 0 : s.join(", ")) || "", e.fields.protocol = (t == null ? void 0 : t.protocol) || "http", e.fields.path = (t == null ? void 0 : t.path) || "", e.fields.read_timeout = t != null && t.read_timeout || (t == null ? void 0 : t.read_timeout) === 0 ? t == null ? void 0 : t.read_timeout : 6e4, e.fields.retries = t != null && t.retries || (t == null ? void 0 : t.retries) === 0 ? t == null ? void 0 : t.retries : 5, e.fields.host = (t == null ? void 0 : t.host) || "", e.fields.connect_timeout = t != null && t.connect_timeout || (t == null ? void 0 : t.connect_timeout) === 0 ? t == null ? void 0 : t.connect_timeout : 6e4, e.fields.tls_verify_enabled = (t == null ? void 0 : t.tls_verify) !== "" && (t == null ? void 0 : t.tls_verify) !== null && (t == null ? void 0 : t.tls_verify) !== void 0, e.fields.tls_verify_value = t != null && t.tls_verify ? t == null ? void 0 : t.tls_verify : !1, e.fields.ca_certificates = ((E = t == null ? void 0 : t.ca_certificates) == null ? void 0 : E.join(",")) || "", e.fields.client_certificate = ((O = t == null ? void 0 : t.client_certificate) == null ? void 0 : O.id) || "", e.fields.write_timeout = t != null && t.write_timeout || (t == null ? void 0 : t.write_timeout) === 0 ? t == null ? void 0 : t.write_timeout : 6e4, e.fields.port = t != null && t.port || (t == null ? void 0 : t.port) === 0 ? t == null ? void 0 : t.port : 80, Object.assign(F, e.fields);
|
|
1834
|
+
}, p = () => {
|
|
1835
|
+
L.push(a.config.cancelRoute);
|
|
1871
1836
|
}, C = k(() => {
|
|
1872
|
-
var
|
|
1873
|
-
let t = `${
|
|
1874
|
-
return
|
|
1875
|
-
}),
|
|
1876
|
-
var
|
|
1877
|
-
let t = `${
|
|
1878
|
-
return
|
|
1879
|
-
}),
|
|
1880
|
-
let
|
|
1881
|
-
t.url && (
|
|
1882
|
-
},
|
|
1883
|
-
var
|
|
1837
|
+
var s, E;
|
|
1838
|
+
let t = `${a.config.apiBaseUrl}${pe.form[a.config.app].validate}`;
|
|
1839
|
+
return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((s = a.config) == null ? void 0 : s.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (E = a.config) != null && E.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
|
|
1840
|
+
}), K = k(() => {
|
|
1841
|
+
var s, E;
|
|
1842
|
+
let t = `${a.config.apiBaseUrl}${pe.form[a.config.app][N.value]}`;
|
|
1843
|
+
return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((s = a.config) == null ? void 0 : s.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (E = a.config) != null && E.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
|
|
1844
|
+
}), ue = (t) => {
|
|
1845
|
+
let s = "";
|
|
1846
|
+
t.url && (s = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(s)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
|
|
1847
|
+
}, G = k(() => {
|
|
1848
|
+
var s, E, O, U;
|
|
1884
1849
|
const t = {
|
|
1885
1850
|
name: e.fields.name || null,
|
|
1886
|
-
tags: e.fields.tags ? (
|
|
1851
|
+
tags: e.fields.tags ? (O = (E = (s = e.fields.tags) == null ? void 0 : s.split(",")) == null ? void 0 : E.map((T) => String(T || "").trim())) == null ? void 0 : O.filter((T) => T !== "") : null,
|
|
1887
1852
|
protocol: e.fields.protocol,
|
|
1888
1853
|
path: e.fields.path || null,
|
|
1889
1854
|
read_timeout: e.fields.read_timeout,
|
|
@@ -1892,113 +1857,113 @@ const le = {
|
|
|
1892
1857
|
connect_timeout: e.fields.connect_timeout,
|
|
1893
1858
|
tls_verify_value: e.fields.tls_verify_value,
|
|
1894
1859
|
tls_verify_enabled: e.fields.tls_verify_enabled,
|
|
1895
|
-
ca_certificates: e.fields.ca_certificates ? (U = e.fields.ca_certificates) == null ? void 0 : U.split(",").filter((
|
|
1860
|
+
ca_certificates: e.fields.ca_certificates ? (U = e.fields.ca_certificates) == null ? void 0 : U.split(",").filter((T) => T !== "") : null,
|
|
1896
1861
|
client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
|
|
1897
1862
|
write_timeout: e.fields.write_timeout,
|
|
1898
1863
|
port: e.fields.port,
|
|
1899
1864
|
url: e.fields.url
|
|
1900
1865
|
};
|
|
1901
|
-
return e.fields.client_certificate && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.client_certificate = { id: e.fields.client_certificate }), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.tls_verify = e.fields.tls_verify_value), u.value || (t.path = null),
|
|
1902
|
-
}),
|
|
1903
|
-
var t,
|
|
1866
|
+
return e.fields.client_certificate && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.client_certificate = { id: e.fields.client_certificate }), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.tls_verify = e.fields.tls_verify_value), u.value || (t.path = null), N.value === "create" ? w.value === "url" ? (delete t.protocol, delete t.host, delete t.path, a.config.app === "konnect" && delete t.port) : delete t.url : N.value === "edit" && delete t.url, t;
|
|
1867
|
+
}), fe = async () => {
|
|
1868
|
+
var t, s, E, O;
|
|
1904
1869
|
try {
|
|
1905
1870
|
e.isReadonly = !0;
|
|
1906
|
-
const U =
|
|
1907
|
-
|
|
1908
|
-
let
|
|
1909
|
-
if (await
|
|
1910
|
-
const { data: f } =
|
|
1911
|
-
e.fields.name = (f == null ? void 0 : f.name) || "", e.fields.port = f.port ||
|
|
1871
|
+
const U = G.value;
|
|
1872
|
+
ue(U);
|
|
1873
|
+
let T;
|
|
1874
|
+
if (await A.post(C.value, U), N.value === "create" ? T = await A.post(K.value, U) : N.value === "edit" && (T = ((t = a.config) == null ? void 0 : t.app) === "konnect" ? await A.put(K.value, U) : await A.patch(K.value, U)), T) {
|
|
1875
|
+
const { data: f } = T;
|
|
1876
|
+
e.fields.name = (f == null ? void 0 : f.name) || "", e.fields.port = f.port || ie.getPortFromProtocol(f.protocol), e.fields.protocol = (f == null ? void 0 : f.protocol) || "http", e.fields.host = (f == null ? void 0 : f.host) || "", e.fields.path = (f == null ? void 0 : f.path) || "", e.fields.url = (f == null ? void 0 : f.url) || "", e.fields.retries = f != null && f.retries || (f == null ? void 0 : f.retries) === 0 ? f == null ? void 0 : f.retries : 5, e.fields.connect_timeout = f != null && f.connect_timeout || (f == null ? void 0 : f.connect_timeout) === 0 ? f == null ? void 0 : f.connect_timeout : 6e4, e.fields.write_timeout = f != null && f.write_timeout || (f == null ? void 0 : f.write_timeout) === 0 ? f == null ? void 0 : f.write_timeout : 6e4, e.fields.read_timeout = f != null && f.read_timeout || (f == null ? void 0 : f.read_timeout) === 0 ? f == null ? void 0 : f.read_timeout : 6e4, e.fields.client_certificate = ((s = f == null ? void 0 : f.client_certificate) == null ? void 0 : s.id) || "", e.fields.ca_certificates = (E = f == null ? void 0 : f.ca_certificates) != null && E.length ? f == null ? void 0 : f.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (f == null ? void 0 : f.tls_verify) !== "" && (f == null ? void 0 : f.tls_verify) !== null && (f == null ? void 0 : f.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (f == null ? void 0 : f.tls_verify), e.fields.tags = (O = f == null ? void 0 : f.tags) != null && O.length ? f.tags.join(", ") : "", Object.assign(F, e.fields), v("update", T == null ? void 0 : T.data);
|
|
1912
1877
|
}
|
|
1913
|
-
return
|
|
1878
|
+
return T;
|
|
1914
1879
|
} catch (U) {
|
|
1915
|
-
const { fields:
|
|
1916
|
-
e.errorMessages = f,
|
|
1917
|
-
const
|
|
1918
|
-
|
|
1880
|
+
const { fields: T, messages: f } = j(U);
|
|
1881
|
+
e.errorMessages = f, T.length && T.forEach((_e) => {
|
|
1882
|
+
const Ce = _e.field;
|
|
1883
|
+
Ce === "client_certificate.id" ? e.formFieldErrors.client_certificate = _e.message : Ce.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = _e.message : Object.keys(e.formFieldErrors).includes(Ce) && (e.formFieldErrors = {
|
|
1919
1884
|
...e.formFieldErrors,
|
|
1920
|
-
[
|
|
1885
|
+
[Ce]: _e.message
|
|
1921
1886
|
});
|
|
1922
|
-
}),
|
|
1887
|
+
}), v("error", U);
|
|
1923
1888
|
} finally {
|
|
1924
1889
|
e.isReadonly = !1;
|
|
1925
1890
|
}
|
|
1926
1891
|
};
|
|
1927
|
-
return
|
|
1928
|
-
Object.assign(e.fields,
|
|
1929
|
-
}),
|
|
1930
|
-
e.fields.port =
|
|
1931
|
-
}),
|
|
1932
|
-
|
|
1933
|
-
}),
|
|
1934
|
-
validateUrl:
|
|
1935
|
-
getPayload:
|
|
1936
|
-
saveFormData:
|
|
1892
|
+
return Fe(() => a.gatewayServiceId, () => {
|
|
1893
|
+
Object.assign(e.fields, F);
|
|
1894
|
+
}), Fe(e.fields, (t) => {
|
|
1895
|
+
e.fields.port = ie.getPortFromProtocol(t.protocol, String(t.port)), v("model-updated", G.value);
|
|
1896
|
+
}), He(() => {
|
|
1897
|
+
v("model-updated", G.value), o.value || (e.fields.name = i());
|
|
1898
|
+
}), X({
|
|
1899
|
+
validateUrl: de,
|
|
1900
|
+
getPayload: G,
|
|
1901
|
+
saveFormData: fe,
|
|
1937
1902
|
canSubmit: c,
|
|
1938
1903
|
initForm: g
|
|
1939
|
-
}), (t,
|
|
1940
|
-
const
|
|
1941
|
-
return S(), $("div",
|
|
1942
|
-
d(l(
|
|
1904
|
+
}), (t, s) => {
|
|
1905
|
+
const E = W("KRadio"), O = W("KButton"), U = W("KInput"), T = W("KSelect"), f = W("KCheckbox"), _e = W("KCollapse"), Ce = W("KAlert");
|
|
1906
|
+
return S(), $("div", ol, [
|
|
1907
|
+
d(l(Ye), {
|
|
1943
1908
|
"can-submit": c.value,
|
|
1944
1909
|
config: n.config,
|
|
1945
1910
|
"edit-id": n.gatewayServiceId,
|
|
1946
|
-
"entity-type": l(
|
|
1947
|
-
"fetch-url":
|
|
1948
|
-
"form-fields":
|
|
1911
|
+
"entity-type": l(Oe).GatewayService,
|
|
1912
|
+
"fetch-url": me.value,
|
|
1913
|
+
"form-fields": G.value,
|
|
1949
1914
|
"is-readonly": e.isReadonly,
|
|
1950
|
-
onCancel:
|
|
1951
|
-
"onFetch:error":
|
|
1915
|
+
onCancel: p,
|
|
1916
|
+
"onFetch:error": s[30] || (s[30] = (y) => t.$emit("error", y)),
|
|
1952
1917
|
"onFetch:success": g,
|
|
1953
|
-
onLoading:
|
|
1954
|
-
onSubmit:
|
|
1918
|
+
onLoading: s[31] || (s[31] = (y) => t.$emit("loading", y)),
|
|
1919
|
+
onSubmit: fe
|
|
1955
1920
|
}, {
|
|
1956
|
-
"form-actions":
|
|
1957
|
-
|
|
1921
|
+
"form-actions": m(() => [
|
|
1922
|
+
Ze(t.$slots, "form-actions", {
|
|
1958
1923
|
canSubmit: c.value,
|
|
1959
|
-
cancel:
|
|
1960
|
-
submit:
|
|
1924
|
+
cancel: p,
|
|
1925
|
+
submit: fe
|
|
1961
1926
|
}, void 0, !0)
|
|
1962
1927
|
]),
|
|
1963
|
-
default:
|
|
1928
|
+
default: m(() => [
|
|
1964
1929
|
d(l(Ke), {
|
|
1965
1930
|
description: l(r)("gateway_services.form.sections.keys.description"),
|
|
1966
1931
|
"hide-info-header": n.hideSectionsInfo,
|
|
1967
1932
|
title: l(r)("gateway_services.form.sections.keys.title")
|
|
1968
1933
|
}, {
|
|
1969
|
-
default:
|
|
1970
|
-
o.value ?
|
|
1971
|
-
I("div",
|
|
1972
|
-
d(
|
|
1934
|
+
default: m(() => [
|
|
1935
|
+
o.value ? M("", !0) : (S(), $("div", il, [
|
|
1936
|
+
I("div", rl, [
|
|
1937
|
+
d(E, {
|
|
1973
1938
|
modelValue: w.value,
|
|
1974
|
-
"onUpdate:modelValue":
|
|
1939
|
+
"onUpdate:modelValue": s[0] || (s[0] = (y) => w.value = y),
|
|
1975
1940
|
card: "",
|
|
1976
1941
|
"card-orientation": "horizontal",
|
|
1977
1942
|
"data-testid": "gateway-service-url-radio",
|
|
1978
1943
|
description: l(r)("gateway_services.form.sections.keys.url.description"),
|
|
1979
1944
|
label: l(r)("gateway_services.form.sections.keys.url.label"),
|
|
1980
|
-
"selected-value":
|
|
1981
|
-
onChange:
|
|
1945
|
+
"selected-value": re.url,
|
|
1946
|
+
onChange: Ve
|
|
1982
1947
|
}, null, 8, ["modelValue", "description", "label", "selected-value"]),
|
|
1983
|
-
d(
|
|
1948
|
+
d(E, {
|
|
1984
1949
|
modelValue: w.value,
|
|
1985
|
-
"onUpdate:modelValue":
|
|
1950
|
+
"onUpdate:modelValue": s[1] || (s[1] = (y) => w.value = y),
|
|
1986
1951
|
card: "",
|
|
1987
1952
|
"card-orientation": "horizontal",
|
|
1988
1953
|
"checked-group": "protocol",
|
|
1989
1954
|
"data-testid": "gateway-service-protocol-radio",
|
|
1990
1955
|
description: l(r)("gateway_services.form.sections.keys.protocol.description"),
|
|
1991
1956
|
label: l(r)("gateway_services.form.sections.keys.protocol.label"),
|
|
1992
|
-
"selected-value":
|
|
1993
|
-
onChange:
|
|
1957
|
+
"selected-value": re.protocol,
|
|
1958
|
+
onChange: Ve
|
|
1994
1959
|
}, null, 8, ["modelValue", "description", "label", "selected-value"])
|
|
1995
1960
|
]),
|
|
1996
|
-
d(
|
|
1997
|
-
default:
|
|
1998
|
-
w.value === "url" ? (S(), $("div",
|
|
1961
|
+
d(We, { name: "slide-fade" }, {
|
|
1962
|
+
default: m(() => [
|
|
1963
|
+
w.value === "url" ? (S(), $("div", sl, [
|
|
1999
1964
|
d(U, {
|
|
2000
1965
|
modelValue: e.fields.url,
|
|
2001
|
-
"onUpdate:modelValue":
|
|
1966
|
+
"onUpdate:modelValue": s[2] || (s[2] = (y) => e.fields.url = y),
|
|
2002
1967
|
modelModifiers: { trim: !0 },
|
|
2003
1968
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
2004
1969
|
"data-testid": "gateway-service-url-input",
|
|
@@ -2012,39 +1977,39 @@ const le = {
|
|
|
2012
1977
|
name: "url",
|
|
2013
1978
|
placeholder: l(r)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
2014
1979
|
required: "",
|
|
2015
|
-
onInput:
|
|
2016
|
-
},
|
|
1980
|
+
onInput: ge
|
|
1981
|
+
}, Te({ _: 2 }, [
|
|
2017
1982
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2018
1983
|
name: "after",
|
|
2019
|
-
fn:
|
|
2020
|
-
d(
|
|
1984
|
+
fn: m(() => [
|
|
1985
|
+
d(O, {
|
|
2021
1986
|
appearance: "tertiary",
|
|
2022
1987
|
"data-testid": "try-sample-api",
|
|
2023
1988
|
size: "small",
|
|
2024
|
-
onClick:
|
|
1989
|
+
onClick: ce
|
|
2025
1990
|
}, {
|
|
2026
|
-
default:
|
|
2027
|
-
|
|
1991
|
+
default: m(() => [
|
|
1992
|
+
Z(P(l(r)("gateway_services.form.buttons.try_sample")), 1)
|
|
2028
1993
|
]),
|
|
2029
1994
|
_: 1
|
|
2030
1995
|
})
|
|
2031
1996
|
]),
|
|
2032
1997
|
key: "0"
|
|
2033
1998
|
}
|
|
2034
|
-
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"
|
|
2035
|
-
])) :
|
|
1999
|
+
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
2000
|
+
])) : M("", !0)
|
|
2036
2001
|
]),
|
|
2037
2002
|
_: 1
|
|
2038
2003
|
})
|
|
2039
2004
|
])),
|
|
2040
|
-
d(
|
|
2041
|
-
default:
|
|
2042
|
-
w.value === "protocol" || o.value ? (S(), $("div",
|
|
2043
|
-
d(
|
|
2005
|
+
d(We, { name: "slide-fade" }, {
|
|
2006
|
+
default: m(() => [
|
|
2007
|
+
w.value === "protocol" || o.value ? (S(), $("div", al, [
|
|
2008
|
+
d(T, {
|
|
2044
2009
|
modelValue: e.fields.protocol,
|
|
2045
|
-
"onUpdate:modelValue":
|
|
2010
|
+
"onUpdate:modelValue": s[3] || (s[3] = (y) => e.fields.protocol = y),
|
|
2046
2011
|
"data-testid": "gateway-service-protocol-select",
|
|
2047
|
-
items:
|
|
2012
|
+
items: q,
|
|
2048
2013
|
label: l(r)("gateway_services.form.fields.protocol.label"),
|
|
2049
2014
|
"label-attributes": {
|
|
2050
2015
|
info: l(r)("gateway_services.form.fields.protocol.tooltip"),
|
|
@@ -2053,11 +2018,11 @@ const le = {
|
|
|
2053
2018
|
readonly: e.isReadonly,
|
|
2054
2019
|
required: "",
|
|
2055
2020
|
width: "100%",
|
|
2056
|
-
onSelected:
|
|
2021
|
+
onSelected: s[4] || (s[4] = (y) => Pe(e.fields.protocol, y))
|
|
2057
2022
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
|
|
2058
2023
|
d(U, {
|
|
2059
2024
|
modelValue: e.fields.host,
|
|
2060
|
-
"onUpdate:modelValue":
|
|
2025
|
+
"onUpdate:modelValue": s[5] || (s[5] = (y) => e.fields.host = y),
|
|
2061
2026
|
modelModifiers: { trim: !0 },
|
|
2062
2027
|
class: "gateway-service-form-margin-top",
|
|
2063
2028
|
"data-testid": "gateway-service-host-input",
|
|
@@ -2071,18 +2036,18 @@ const le = {
|
|
|
2071
2036
|
name: "host",
|
|
2072
2037
|
placeholder: l(r)("gateway_services.form.fields.host.placeholder"),
|
|
2073
2038
|
required: "",
|
|
2074
|
-
onInput:
|
|
2075
|
-
},
|
|
2039
|
+
onInput: s[6] || (s[6] = (y) => z("host"))
|
|
2040
|
+
}, Te({ _: 2 }, [
|
|
2076
2041
|
n.hideTrySampleApiButton ? void 0 : {
|
|
2077
2042
|
name: "after",
|
|
2078
|
-
fn:
|
|
2079
|
-
d(
|
|
2043
|
+
fn: m(() => [
|
|
2044
|
+
d(O, {
|
|
2080
2045
|
appearance: "tertiary",
|
|
2081
2046
|
size: "small",
|
|
2082
|
-
onClick:
|
|
2047
|
+
onClick: ce
|
|
2083
2048
|
}, {
|
|
2084
|
-
default:
|
|
2085
|
-
|
|
2049
|
+
default: m(() => [
|
|
2050
|
+
Z(P(l(r)("gateway_services.form.buttons.try_sample")), 1)
|
|
2086
2051
|
]),
|
|
2087
2052
|
_: 1
|
|
2088
2053
|
})
|
|
@@ -2090,10 +2055,10 @@ const le = {
|
|
|
2090
2055
|
key: "0"
|
|
2091
2056
|
}
|
|
2092
2057
|
]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
|
|
2093
|
-
u.value ? (S(), $("div",
|
|
2058
|
+
u.value ? (S(), $("div", nl, [
|
|
2094
2059
|
d(U, {
|
|
2095
2060
|
modelValue: e.fields.path,
|
|
2096
|
-
"onUpdate:modelValue":
|
|
2061
|
+
"onUpdate:modelValue": s[7] || (s[7] = (y) => e.fields.path = y),
|
|
2097
2062
|
modelModifiers: { trim: !0 },
|
|
2098
2063
|
class: "gateway-service-form-margin-top",
|
|
2099
2064
|
"data-testid": "gateway-service-path-input",
|
|
@@ -2106,14 +2071,14 @@ const le = {
|
|
|
2106
2071
|
},
|
|
2107
2072
|
name: "path",
|
|
2108
2073
|
placeholder: l(r)("gateway_services.form.fields.path.placeholder"),
|
|
2109
|
-
onInput:
|
|
2074
|
+
onInput: s[8] || (s[8] = (y) => z("path"))
|
|
2110
2075
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
|
|
2111
|
-
])) :
|
|
2076
|
+
])) : M("", !0),
|
|
2112
2077
|
d(U, {
|
|
2113
2078
|
modelValue: e.fields.port,
|
|
2114
2079
|
"onUpdate:modelValue": [
|
|
2115
|
-
|
|
2116
|
-
|
|
2080
|
+
s[9] || (s[9] = (y) => e.fields.port = y),
|
|
2081
|
+
s[11] || (s[11] = () => {
|
|
2117
2082
|
e.fields.port = oe(e.fields.port + "");
|
|
2118
2083
|
})
|
|
2119
2084
|
],
|
|
@@ -2128,29 +2093,29 @@ const le = {
|
|
|
2128
2093
|
},
|
|
2129
2094
|
name: "port",
|
|
2130
2095
|
type: "number",
|
|
2131
|
-
onInput:
|
|
2096
|
+
onInput: s[10] || (s[10] = (y) => z("port"))
|
|
2132
2097
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
|
|
2133
|
-
])) :
|
|
2098
|
+
])) : M("", !0)
|
|
2134
2099
|
]),
|
|
2135
2100
|
_: 1
|
|
2136
2101
|
}),
|
|
2137
|
-
d(
|
|
2138
|
-
modelValue:
|
|
2139
|
-
"onUpdate:modelValue":
|
|
2102
|
+
d(_e, {
|
|
2103
|
+
modelValue: h.value,
|
|
2104
|
+
"onUpdate:modelValue": s[27] || (s[27] = (y) => h.value = y),
|
|
2140
2105
|
"data-testid": "advanced-fields-collapse",
|
|
2141
2106
|
"trigger-alignment": "leading",
|
|
2142
2107
|
"trigger-label": l(r)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
2143
2108
|
}, {
|
|
2144
|
-
default:
|
|
2145
|
-
d(
|
|
2146
|
-
default:
|
|
2147
|
-
|
|
2148
|
-
I("div",
|
|
2109
|
+
default: m(() => [
|
|
2110
|
+
d(We, { name: "slide-fade" }, {
|
|
2111
|
+
default: m(() => [
|
|
2112
|
+
h.value ? M("", !0) : (S(), $("div", cl, [
|
|
2113
|
+
I("div", dl, [
|
|
2149
2114
|
d(U, {
|
|
2150
2115
|
modelValue: e.fields.retries,
|
|
2151
2116
|
"onUpdate:modelValue": [
|
|
2152
|
-
|
|
2153
|
-
|
|
2117
|
+
s[12] || (s[12] = (y) => e.fields.retries = y),
|
|
2118
|
+
s[13] || (s[13] = () => {
|
|
2154
2119
|
e.fields.retries = oe(e.fields.retries + "");
|
|
2155
2120
|
})
|
|
2156
2121
|
],
|
|
@@ -2166,12 +2131,12 @@ const le = {
|
|
|
2166
2131
|
type: "number"
|
|
2167
2132
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2168
2133
|
]),
|
|
2169
|
-
I("div",
|
|
2134
|
+
I("div", ul, [
|
|
2170
2135
|
d(U, {
|
|
2171
2136
|
modelValue: e.fields.connect_timeout,
|
|
2172
2137
|
"onUpdate:modelValue": [
|
|
2173
|
-
|
|
2174
|
-
|
|
2138
|
+
s[14] || (s[14] = (y) => e.fields.connect_timeout = y),
|
|
2139
|
+
s[15] || (s[15] = () => {
|
|
2175
2140
|
e.fields.connect_timeout = oe(e.fields.connect_timeout + "");
|
|
2176
2141
|
})
|
|
2177
2142
|
],
|
|
@@ -2187,12 +2152,12 @@ const le = {
|
|
|
2187
2152
|
type: "number"
|
|
2188
2153
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2189
2154
|
]),
|
|
2190
|
-
I("div",
|
|
2155
|
+
I("div", fl, [
|
|
2191
2156
|
d(U, {
|
|
2192
2157
|
modelValue: e.fields.write_timeout,
|
|
2193
2158
|
"onUpdate:modelValue": [
|
|
2194
|
-
|
|
2195
|
-
|
|
2159
|
+
s[16] || (s[16] = (y) => e.fields.write_timeout = y),
|
|
2160
|
+
s[17] || (s[17] = () => {
|
|
2196
2161
|
e.fields.write_timeout = oe(e.fields.write_timeout + "");
|
|
2197
2162
|
})
|
|
2198
2163
|
],
|
|
@@ -2208,12 +2173,12 @@ const le = {
|
|
|
2208
2173
|
type: "number"
|
|
2209
2174
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2210
2175
|
]),
|
|
2211
|
-
I("div",
|
|
2176
|
+
I("div", pl, [
|
|
2212
2177
|
d(U, {
|
|
2213
2178
|
modelValue: e.fields.read_timeout,
|
|
2214
2179
|
"onUpdate:modelValue": [
|
|
2215
|
-
|
|
2216
|
-
|
|
2180
|
+
s[18] || (s[18] = (y) => e.fields.read_timeout = y),
|
|
2181
|
+
s[19] || (s[19] = () => {
|
|
2217
2182
|
e.fields.read_timeout = oe(e.fields.read_timeout + "");
|
|
2218
2183
|
})
|
|
2219
2184
|
],
|
|
@@ -2229,10 +2194,10 @@ const le = {
|
|
|
2229
2194
|
type: "number"
|
|
2230
2195
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2231
2196
|
]),
|
|
2232
|
-
V.value ? (S(), $("div",
|
|
2197
|
+
V.value ? (S(), $("div", ml, [
|
|
2233
2198
|
d(U, {
|
|
2234
2199
|
modelValue: e.fields.client_certificate,
|
|
2235
|
-
"onUpdate:modelValue":
|
|
2200
|
+
"onUpdate:modelValue": s[20] || (s[20] = (y) => e.fields.client_certificate = y),
|
|
2236
2201
|
modelModifiers: { trim: !0 },
|
|
2237
2202
|
autocomplete: "off",
|
|
2238
2203
|
"data-testid": "gateway-service-clientCert-input",
|
|
@@ -2246,13 +2211,13 @@ const le = {
|
|
|
2246
2211
|
placeholder: l(r)("gateway_services.form.fields.client_certificate.placeholder"),
|
|
2247
2212
|
readonly: e.isReadonly,
|
|
2248
2213
|
type: "text",
|
|
2249
|
-
onInput:
|
|
2214
|
+
onInput: s[21] || (s[21] = (y) => ye("client_certificate"))
|
|
2250
2215
|
}, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
|
|
2251
|
-
])) :
|
|
2252
|
-
|
|
2216
|
+
])) : M("", !0),
|
|
2217
|
+
J.value ? (S(), $("div", vl, [
|
|
2253
2218
|
d(U, {
|
|
2254
2219
|
modelValue: e.fields.ca_certificates,
|
|
2255
|
-
"onUpdate:modelValue":
|
|
2220
|
+
"onUpdate:modelValue": s[22] || (s[22] = (y) => e.fields.ca_certificates = y),
|
|
2256
2221
|
modelModifiers: { trim: !0 },
|
|
2257
2222
|
autocomplete: "off",
|
|
2258
2223
|
"data-testid": "gateway-service-ca-certs-input",
|
|
@@ -2262,66 +2227,66 @@ const le = {
|
|
|
2262
2227
|
placeholder: l(r)("gateway_services.form.fields.ca_certificates.placeholder"),
|
|
2263
2228
|
readonly: e.isReadonly,
|
|
2264
2229
|
type: "text",
|
|
2265
|
-
onInput:
|
|
2230
|
+
onInput: s[23] || (s[23] = (y) => ye("ca_certificates"))
|
|
2266
2231
|
}, {
|
|
2267
|
-
"label-tooltip":
|
|
2232
|
+
"label-tooltip": m(() => [
|
|
2268
2233
|
d(l(Q), {
|
|
2269
2234
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
2270
2235
|
scope: "global"
|
|
2271
2236
|
}, {
|
|
2272
|
-
code1:
|
|
2273
|
-
I("code", null,
|
|
2237
|
+
code1: m(() => [
|
|
2238
|
+
I("code", null, P(l(r)("gateway_services.form.fields.ca_certificates.code1")), 1)
|
|
2274
2239
|
]),
|
|
2275
|
-
code2:
|
|
2276
|
-
I("code", null,
|
|
2240
|
+
code2: m(() => [
|
|
2241
|
+
I("code", null, P(l(r)("gateway_services.form.fields.ca_certificates.code2")), 1)
|
|
2277
2242
|
]),
|
|
2278
2243
|
_: 1
|
|
2279
2244
|
})
|
|
2280
2245
|
]),
|
|
2281
2246
|
_: 1
|
|
2282
2247
|
}, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
|
|
2283
|
-
])) :
|
|
2284
|
-
|
|
2248
|
+
])) : M("", !0),
|
|
2249
|
+
B.value ? (S(), $("div", gl, [
|
|
2285
2250
|
d(f, {
|
|
2286
2251
|
modelValue: e.fields.tls_verify_enabled,
|
|
2287
|
-
"onUpdate:modelValue":
|
|
2252
|
+
"onUpdate:modelValue": s[24] || (s[24] = (y) => e.fields.tls_verify_enabled = y),
|
|
2288
2253
|
"data-testid": "gateway-service-tls-verify-checkbox",
|
|
2289
2254
|
description: l(r)("gateway_services.form.fields.tls_verify_enabled.help"),
|
|
2290
2255
|
label: l(r)("gateway_services.form.fields.tls_verify_enabled.label"),
|
|
2291
2256
|
"label-attributes": { tooltipAttributes: { maxWidth: "400" } }
|
|
2292
2257
|
}, {
|
|
2293
|
-
tooltip:
|
|
2258
|
+
tooltip: m(() => [
|
|
2294
2259
|
d(l(Q), {
|
|
2295
2260
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
2296
2261
|
scope: "global"
|
|
2297
2262
|
}, {
|
|
2298
|
-
code1:
|
|
2299
|
-
I("code", null,
|
|
2263
|
+
code1: m(() => [
|
|
2264
|
+
I("code", null, P(l(r)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
|
|
2300
2265
|
]),
|
|
2301
2266
|
_: 1
|
|
2302
2267
|
})
|
|
2303
2268
|
]),
|
|
2304
2269
|
_: 1
|
|
2305
2270
|
}, 8, ["modelValue", "description", "label"]),
|
|
2306
|
-
e.fields.tls_verify_enabled ? (S(), $("div",
|
|
2307
|
-
d(
|
|
2271
|
+
e.fields.tls_verify_enabled ? (S(), $("div", yl, [
|
|
2272
|
+
d(E, {
|
|
2308
2273
|
modelValue: e.fields.tls_verify_value,
|
|
2309
|
-
"onUpdate:modelValue":
|
|
2274
|
+
"onUpdate:modelValue": s[25] || (s[25] = (y) => e.fields.tls_verify_value = y),
|
|
2310
2275
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
2311
2276
|
label: l(r)("gateway_services.form.fields.tls_verify_option.true.label"),
|
|
2312
2277
|
"selected-value": !0
|
|
2313
2278
|
}, null, 8, ["modelValue", "label"])
|
|
2314
|
-
])) :
|
|
2315
|
-
e.fields.tls_verify_enabled ? (S(), $("div",
|
|
2316
|
-
d(
|
|
2279
|
+
])) : M("", !0),
|
|
2280
|
+
e.fields.tls_verify_enabled ? (S(), $("div", _l, [
|
|
2281
|
+
d(E, {
|
|
2317
2282
|
modelValue: e.fields.tls_verify_value,
|
|
2318
|
-
"onUpdate:modelValue":
|
|
2283
|
+
"onUpdate:modelValue": s[26] || (s[26] = (y) => e.fields.tls_verify_value = y),
|
|
2319
2284
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
2320
2285
|
label: l(r)("gateway_services.form.fields.tls_verify_option.false.label"),
|
|
2321
2286
|
"selected-value": !1
|
|
2322
2287
|
}, null, 8, ["modelValue", "label"])
|
|
2323
|
-
])) :
|
|
2324
|
-
])) :
|
|
2288
|
+
])) : M("", !0)
|
|
2289
|
+
])) : M("", !0)
|
|
2325
2290
|
]))
|
|
2326
2291
|
]),
|
|
2327
2292
|
_: 1
|
|
@@ -2337,15 +2302,15 @@ const le = {
|
|
|
2337
2302
|
"hide-info-header": n.hideSectionsInfo,
|
|
2338
2303
|
title: l(r)("gateway_services.form.sections.general.title")
|
|
2339
2304
|
}, {
|
|
2340
|
-
default:
|
|
2305
|
+
default: m(() => [
|
|
2341
2306
|
d(U, {
|
|
2342
2307
|
modelValue: e.fields.name,
|
|
2343
|
-
"onUpdate:modelValue":
|
|
2308
|
+
"onUpdate:modelValue": s[28] || (s[28] = (y) => e.fields.name = y),
|
|
2344
2309
|
modelModifiers: { trim: !0 },
|
|
2345
2310
|
autocomplete: "off",
|
|
2346
2311
|
"data-testid": "gateway-service-name-input",
|
|
2347
|
-
error:
|
|
2348
|
-
"error-message":
|
|
2312
|
+
error: we.value,
|
|
2313
|
+
"error-message": ve.value,
|
|
2349
2314
|
label: l(r)("gateway_services.form.fields.name.label"),
|
|
2350
2315
|
"label-attributes": {
|
|
2351
2316
|
info: l(r)("gateway_services.form.fields.name.tooltip"),
|
|
@@ -2355,18 +2320,18 @@ const le = {
|
|
|
2355
2320
|
placeholder: l(r)("gateway_services.form.fields.name.placeholder"),
|
|
2356
2321
|
readonly: e.isReadonly,
|
|
2357
2322
|
type: "text",
|
|
2358
|
-
onInput:
|
|
2323
|
+
onInput: R
|
|
2359
2324
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
|
|
2360
|
-
d(
|
|
2325
|
+
d(_e, {
|
|
2361
2326
|
"data-testid": "tags-collapse",
|
|
2362
2327
|
"trigger-alignment": "leading",
|
|
2363
2328
|
"trigger-label": l(r)("gateway_services.form.fields.tags.collapse")
|
|
2364
2329
|
}, {
|
|
2365
|
-
default:
|
|
2366
|
-
I("div",
|
|
2330
|
+
default: m(() => [
|
|
2331
|
+
I("div", bl, [
|
|
2367
2332
|
d(U, {
|
|
2368
2333
|
modelValue: e.fields.tags,
|
|
2369
|
-
"onUpdate:modelValue":
|
|
2334
|
+
"onUpdate:modelValue": s[29] || (s[29] = (y) => e.fields.tags = y),
|
|
2370
2335
|
modelModifiers: { trim: !0 },
|
|
2371
2336
|
autocomplete: "off",
|
|
2372
2337
|
"data-testid": "gateway-service-tags-input",
|
|
@@ -2388,34 +2353,34 @@ const le = {
|
|
|
2388
2353
|
]),
|
|
2389
2354
|
_: 1
|
|
2390
2355
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
2391
|
-
e.errorMessages.length ? (S(),
|
|
2356
|
+
e.errorMessages.length ? (S(), $e(Ce, {
|
|
2392
2357
|
key: 0,
|
|
2393
2358
|
appearance: "danger",
|
|
2394
2359
|
"data-testid": "form-error"
|
|
2395
2360
|
}, {
|
|
2396
|
-
default:
|
|
2397
|
-
I("ul",
|
|
2398
|
-
(S(!0), $(
|
|
2361
|
+
default: m(() => [
|
|
2362
|
+
I("ul", hl, [
|
|
2363
|
+
(S(!0), $(lt, null, ot(e.errorMessages, (y) => (S(), $("li", { key: y }, P(y), 1))), 128))
|
|
2399
2364
|
])
|
|
2400
2365
|
]),
|
|
2401
2366
|
_: 1
|
|
2402
|
-
})) :
|
|
2367
|
+
})) : M("", !0)
|
|
2403
2368
|
]),
|
|
2404
2369
|
_: 3
|
|
2405
2370
|
}, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
|
|
2406
2371
|
]);
|
|
2407
2372
|
};
|
|
2408
2373
|
}
|
|
2409
|
-
}),
|
|
2410
|
-
validateHost:
|
|
2411
|
-
validatePort:
|
|
2412
|
-
validateProtocol:
|
|
2413
|
-
validatePath:
|
|
2374
|
+
}), Rl = /* @__PURE__ */ Ne(wl, [["__scopeId", "data-v-a94ad8c2"]]), { validateHost: kl, validatePort: Vl, validateProtocol: Cl, validatePath: Sl } = se.useUrlValidators(), Tl = () => ({
|
|
2375
|
+
validateHost: kl,
|
|
2376
|
+
validatePort: Vl,
|
|
2377
|
+
validateProtocol: Cl,
|
|
2378
|
+
validatePath: Sl
|
|
2414
2379
|
});
|
|
2415
2380
|
export {
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2381
|
+
xl as GatewayServiceConfigCard,
|
|
2382
|
+
Rl as GatewayServiceForm,
|
|
2383
|
+
Fl as GatewayServiceList,
|
|
2384
|
+
Al as LegacyGatewayServiceForm,
|
|
2385
|
+
Tl as useUrlValidator
|
|
2421
2386
|
};
|