@kong-ui-public/entities-routes 3.16.33-pr.2732.14092b6ff.0 → 3.16.33-pr.2734.381a5b2e0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RouteFormExpressionsEditor-F5bIgjiX.js → RouteFormExpressionsEditor-ykO-6Hk6.js} +1 -1
- package/dist/entities-routes.es.js +1 -1
- package/dist/entities-routes.umd.js +1 -1
- package/dist/{index-CL0sBDYW.js → index-CyaFTH-I.js} +869 -848
- package/dist/style.css +1 -1
- package/dist/types/components/RouteList.vue.d.ts +13 -0
- package/dist/types/components/RouteList.vue.d.ts.map +1 -1
- package/dist/types/types/route-list.d.ts +2 -0
- package/dist/types/types/route-list.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
import { defineComponent as z, ref as B, computed as
|
|
2
|
-
import { useAxios as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { AddIcon as
|
|
7
|
-
import { BadgeMethodAppearances as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as z, ref as B, computed as D, resolveComponent as N, createElementBlock as k, openBlock as m, createVNode as d, unref as t, withCtx as u, createBlock as x, toDisplayString as H, inject as Ve, createCommentVNode as P, createElementVNode as w, mergeModels as Y, useModel as X, createTextVNode as U, TransitionGroup as he, Fragment as G, renderList as re, nextTick as lt, defineAsyncComponent as rt, h as Ke, onMounted as Ye, renderSlot as Le, resolveDynamicComponent as qe, watch as _e, reactive as Ce, onBeforeMount as Ze, provide as it, createSlots as Be, withModifiers as Ne, Teleport as at } from "vue";
|
|
2
|
+
import { useAxios as Fe, ConfigurationSchemaType as ve, ConfigurationSchemaSection as pe, EntityBaseConfigCard as nt, SupportedEntityType as et, InternalLinkItem as dt, useErrors as ut, useGatewayFeatureSupported as ct, EntityBaseFormType as Ge, useDebouncedFilter as pt, EntityBaseForm as ft, EntityFormSection as We, useTableState as mt, useFetcher as vt, useDeleteUrlBuilder as ht, FetcherStatus as gt, EntityBaseTable as yt, PermissionsWrapper as ke, TableTags as bt, EntityFilter as St, EntityDeleteModal as _t, EntityTypes as Tt } from "@kong-ui-public/entities-shared";
|
|
3
|
+
import { createI18n as It, i18nTComponent as Et } from "@kong-ui-public/i18n";
|
|
4
|
+
import je from "lodash.isequal";
|
|
5
|
+
import { useRouter as tt } from "vue-router";
|
|
6
|
+
import { AddIcon as Ue, CloseIcon as Rt, RocketIcon as At, InfoIcon as Ot, BookIcon as Xe, ForwardIcon as kt } from "@kong/icons";
|
|
7
|
+
import { BadgeMethodAppearances as Ht } from "@kong/kongponents";
|
|
8
|
+
const oe = "/v2/control-planes/{controlPlaneId}/core-entities", se = "/{workspace}", Te = {
|
|
9
9
|
list: {
|
|
10
10
|
konnect: {
|
|
11
|
-
all: `${te}/routes`,
|
|
12
|
-
forGatewayService: `${te}/services/{serviceId}/routes`
|
|
13
|
-
},
|
|
14
|
-
kongManager: {
|
|
15
11
|
all: `${oe}/routes`,
|
|
16
12
|
forGatewayService: `${oe}/services/{serviceId}/routes`
|
|
13
|
+
},
|
|
14
|
+
kongManager: {
|
|
15
|
+
all: `${se}/routes`,
|
|
16
|
+
forGatewayService: `${se}/services/{serviceId}/routes`
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
form: {
|
|
20
20
|
konnect: {
|
|
21
|
-
services: `${
|
|
21
|
+
services: `${oe}/services`,
|
|
22
22
|
create: {
|
|
23
|
-
all: `${
|
|
24
|
-
forGatewayService: `${
|
|
23
|
+
all: `${oe}/routes`,
|
|
24
|
+
forGatewayService: `${oe}/services/{serviceId}/routes`
|
|
25
25
|
},
|
|
26
26
|
fetch: {
|
|
27
|
-
all: `${
|
|
28
|
-
forGatewayService: `${
|
|
27
|
+
all: `${oe}/routes/{id}`,
|
|
28
|
+
forGatewayService: `${oe}/services/{serviceId}/routes/{id}`
|
|
29
29
|
},
|
|
30
30
|
edit: {
|
|
31
|
-
all: `${
|
|
32
|
-
forGatewayService: `${
|
|
31
|
+
all: `${oe}/routes/{id}`,
|
|
32
|
+
forGatewayService: `${oe}/services/{serviceId}/routes/{id}`
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
kongManager: {
|
|
36
|
-
services: `${
|
|
36
|
+
services: `${se}/services`,
|
|
37
37
|
create: {
|
|
38
|
-
all: `${
|
|
39
|
-
forGatewayService: `${
|
|
38
|
+
all: `${se}/routes`,
|
|
39
|
+
forGatewayService: `${se}/services/{serviceId}/routes`
|
|
40
40
|
},
|
|
41
41
|
fetch: {
|
|
42
|
-
all: `${
|
|
43
|
-
forGatewayService: `${
|
|
42
|
+
all: `${se}/routes/{id}`,
|
|
43
|
+
forGatewayService: `${se}/services/{serviceId}/routes/{id}`
|
|
44
44
|
},
|
|
45
45
|
edit: {
|
|
46
|
-
all: `${
|
|
47
|
-
forGatewayService: `${
|
|
46
|
+
all: `${se}/routes/{id}`,
|
|
47
|
+
forGatewayService: `${se}/services/{serviceId}/routes/{id}`
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
item: {
|
|
52
52
|
konnect: {
|
|
53
|
-
getService: `${te}/services/{serviceId}`,
|
|
54
|
-
all: `${te}/routes/{id}`,
|
|
55
|
-
forGatewayService: `${te}/services/{serviceId}/routes/{id}`
|
|
56
|
-
},
|
|
57
|
-
kongManager: {
|
|
58
53
|
getService: `${oe}/services/{serviceId}`,
|
|
59
54
|
all: `${oe}/routes/{id}`,
|
|
60
55
|
forGatewayService: `${oe}/services/{serviceId}/routes/{id}`
|
|
56
|
+
},
|
|
57
|
+
kongManager: {
|
|
58
|
+
getService: `${se}/services/{serviceId}`,
|
|
59
|
+
all: `${se}/routes/{id}`,
|
|
60
|
+
forGatewayService: `${se}/services/{serviceId}/routes/{id}`
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, Nt = {
|
|
64
64
|
create: "New route",
|
|
65
|
+
debugger: "Start debugging",
|
|
65
66
|
copy_id: "Copy ID",
|
|
66
67
|
copy_json: "Copy JSON",
|
|
67
68
|
edit: "Edit",
|
|
@@ -69,14 +70,14 @@ const te = "/v2/control-planes/{controlPlaneId}/core-entities", oe = "/{workspac
|
|
|
69
70
|
clear: "Clear",
|
|
70
71
|
view: "View Details",
|
|
71
72
|
loading: "Loading..."
|
|
72
|
-
},
|
|
73
|
+
}, Ct = {
|
|
73
74
|
placeholder: {
|
|
74
75
|
konnect: "Filter by name",
|
|
75
76
|
exact: "Filter by exact name or ID",
|
|
76
77
|
kongManager: "Filter by exact name or ID"
|
|
77
78
|
},
|
|
78
79
|
no_results: "No results found"
|
|
79
|
-
},
|
|
80
|
+
}, xt = {
|
|
80
81
|
title: "Routes",
|
|
81
82
|
list: {
|
|
82
83
|
toolbar_actions: {
|
|
@@ -105,7 +106,7 @@ const te = "/v2/control-planes/{controlPlaneId}/core-entities", oe = "/{workspac
|
|
|
105
106
|
learn_more: "Learn more"
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
},
|
|
109
|
+
}, Vt = {
|
|
109
110
|
general: "Routes could not be retrieved",
|
|
110
111
|
delete: "The route could not be deleted at this time.",
|
|
111
112
|
copy: "Failed to copy to clipboard",
|
|
@@ -115,7 +116,7 @@ const te = "/v2/control-planes/{controlPlaneId}/core-entities", oe = "/{workspac
|
|
|
115
116
|
}, wt = {
|
|
116
117
|
success: "Copied {val} to clipboard",
|
|
117
118
|
success_brief: "Successfully copied to clipboard"
|
|
118
|
-
},
|
|
119
|
+
}, Dt = {
|
|
119
120
|
config_flavor: {
|
|
120
121
|
label: "Define by"
|
|
121
122
|
},
|
|
@@ -322,28 +323,28 @@ const te = "/v2/control-planes/{controlPlaneId}/core-entities", oe = "/{workspac
|
|
|
322
323
|
supported_protocols_hint: "Currently only supports the following protocols: {protocols}"
|
|
323
324
|
}
|
|
324
325
|
}, Mt = {
|
|
325
|
-
actions:
|
|
326
|
-
search:
|
|
327
|
-
routes:
|
|
326
|
+
actions: Nt,
|
|
327
|
+
search: Ct,
|
|
328
|
+
routes: xt,
|
|
328
329
|
delete: {
|
|
329
330
|
title: "Delete a Route",
|
|
330
331
|
description: "Deleting this route will also remove any associated plugins. This action cannot be reversed."
|
|
331
332
|
},
|
|
332
|
-
errors:
|
|
333
|
+
errors: Vt,
|
|
333
334
|
copy: wt,
|
|
334
|
-
form:
|
|
335
|
+
form: Dt
|
|
335
336
|
};
|
|
336
|
-
function
|
|
337
|
-
const e =
|
|
337
|
+
function $t() {
|
|
338
|
+
const e = It("en-us", Mt);
|
|
338
339
|
return {
|
|
339
340
|
i18n: e,
|
|
340
|
-
i18nT:
|
|
341
|
+
i18nT: Et(e)
|
|
341
342
|
// Translation component <i18n-t>
|
|
342
343
|
};
|
|
343
344
|
}
|
|
344
345
|
const J = {
|
|
345
|
-
useI18n:
|
|
346
|
-
},
|
|
346
|
+
useI18n: $t
|
|
347
|
+
}, Ut = { class: "kong-ui-entities-route-entity-config-card" }, Pt = { key: 2 }, cs = /* @__PURE__ */ z({
|
|
347
348
|
__name: "RouteConfigCard",
|
|
348
349
|
props: {
|
|
349
350
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -377,30 +378,30 @@ const J = {
|
|
|
377
378
|
emits: ["loading", "fetch:error", "fetch:success", "navigation-click"],
|
|
378
379
|
setup(e, { emit: C }) {
|
|
379
380
|
var F;
|
|
380
|
-
const f = C,
|
|
381
|
+
const f = C, o = e, { axiosInstance: a } = Fe((F = o.config) == null ? void 0 : F.axiosRequestConfig), { i18n: { t: v } } = J.useI18n(), i = B(""), A = B(""), h = B(!1), g = D(
|
|
381
382
|
() => {
|
|
382
|
-
var r,
|
|
383
|
-
return (
|
|
383
|
+
var r, c;
|
|
384
|
+
return (c = Te.item[(r = o.config) == null ? void 0 : r.app]) == null ? void 0 : c[o.serviceId ? "forGatewayService" : "all"].replace(/{serviceId}/gi, o.serviceId);
|
|
384
385
|
}
|
|
385
|
-
), p =
|
|
386
|
+
), p = D(() => {
|
|
386
387
|
var r;
|
|
387
|
-
return (r =
|
|
388
|
+
return (r = Te.item[o.config.app]) == null ? void 0 : r.getService;
|
|
388
389
|
}), y = async (r) => {
|
|
389
|
-
var S,
|
|
390
|
-
if (i.value =
|
|
390
|
+
var S, M, le;
|
|
391
|
+
if (i.value = o.serviceId || ((S = r == null ? void 0 : r.service) == null ? void 0 : S.id), f("fetch:success", r), !i.value)
|
|
391
392
|
return;
|
|
392
|
-
let
|
|
393
|
-
|
|
393
|
+
let c = `${o.config.apiBaseUrl}${p.value}`;
|
|
394
|
+
o.config.app === "konnect" ? c = c.replace(/{controlPlaneId}/gi, ((M = o.config) == null ? void 0 : M.controlPlaneId) || "").replace(/{serviceId}/gi, i.value || "") : o.config.app === "kongManager" && (c = c.replace(/\/{workspace}/gi, (le = o.config) != null && le.workspace ? `/${o.config.workspace}` : "").replace(/{serviceId}/gi, i.value || ""));
|
|
394
395
|
try {
|
|
395
396
|
h.value = !0;
|
|
396
|
-
const { data: j } = await a.get(
|
|
397
|
+
const { data: j } = await a.get(c);
|
|
397
398
|
A.value = (j == null ? void 0 : j.name) || (j == null ? void 0 : j.id);
|
|
398
399
|
} catch (j) {
|
|
399
400
|
f("fetch:error", j);
|
|
400
401
|
} finally {
|
|
401
402
|
h.value = !1;
|
|
402
403
|
}
|
|
403
|
-
},
|
|
404
|
+
}, V = B({
|
|
404
405
|
id: {},
|
|
405
406
|
name: {
|
|
406
407
|
tooltip: v("form.fields.name.tooltip")
|
|
@@ -409,7 +410,7 @@ const J = {
|
|
|
409
410
|
updated_at: {},
|
|
410
411
|
service: {
|
|
411
412
|
label: v("form.fields.service.label"),
|
|
412
|
-
section:
|
|
413
|
+
section: pe.Basic,
|
|
413
414
|
tooltip: v("form.fields.service.tooltip"),
|
|
414
415
|
order: 5
|
|
415
416
|
},
|
|
@@ -418,21 +419,21 @@ const J = {
|
|
|
418
419
|
order: 6
|
|
419
420
|
},
|
|
420
421
|
protocols: {
|
|
421
|
-
section:
|
|
422
|
+
section: pe.Basic,
|
|
422
423
|
tooltip: v("form.fields.protocols.tooltip"),
|
|
423
|
-
type:
|
|
424
|
+
type: ve.BadgeTag,
|
|
424
425
|
order: 7
|
|
425
426
|
},
|
|
426
427
|
paths: {
|
|
427
|
-
section:
|
|
428
|
+
section: pe.Basic,
|
|
428
429
|
tooltip: v("form.fields.paths.tooltip"),
|
|
429
|
-
type:
|
|
430
|
+
type: ve.CopyBadge,
|
|
430
431
|
order: 8
|
|
431
432
|
},
|
|
432
433
|
hosts: {
|
|
433
|
-
section:
|
|
434
|
+
section: pe.Basic,
|
|
434
435
|
tooltip: v("form.fields.hosts.tooltip"),
|
|
435
|
-
type:
|
|
436
|
+
type: ve.CopyBadge,
|
|
436
437
|
order: 9
|
|
437
438
|
},
|
|
438
439
|
snis: {
|
|
@@ -441,26 +442,26 @@ const J = {
|
|
|
441
442
|
order: 10
|
|
442
443
|
},
|
|
443
444
|
headers: {
|
|
444
|
-
section:
|
|
445
|
+
section: pe.Basic,
|
|
445
446
|
tooltip: v("form.fields.headers.tooltip"),
|
|
446
447
|
order: 11
|
|
447
448
|
},
|
|
448
449
|
methods: {
|
|
449
|
-
section:
|
|
450
|
+
section: pe.Basic,
|
|
450
451
|
tooltip: v("form.fields.methods.tooltip"),
|
|
451
|
-
type:
|
|
452
|
+
type: ve.BadgeMethod,
|
|
452
453
|
order: 12
|
|
453
454
|
},
|
|
454
455
|
sources: {
|
|
455
|
-
section:
|
|
456
|
+
section: pe.Basic,
|
|
456
457
|
tooltip: v("form.fields.sources.tooltip"),
|
|
457
|
-
type:
|
|
458
|
+
type: ve.JsonArray,
|
|
458
459
|
order: 13
|
|
459
460
|
},
|
|
460
461
|
destinations: {
|
|
461
|
-
section:
|
|
462
|
+
section: pe.Basic,
|
|
462
463
|
tooltip: v("form.fields.destinations.tooltip"),
|
|
463
|
-
type:
|
|
464
|
+
type: ve.JsonArray,
|
|
464
465
|
order: 14
|
|
465
466
|
},
|
|
466
467
|
// advanced fields
|
|
@@ -493,34 +494,34 @@ const J = {
|
|
|
493
494
|
order: 7
|
|
494
495
|
}
|
|
495
496
|
});
|
|
496
|
-
return (r,
|
|
497
|
-
const S =
|
|
498
|
-
return m(),
|
|
499
|
-
d(
|
|
497
|
+
return (r, c) => {
|
|
498
|
+
const S = N("KSkeleton");
|
|
499
|
+
return m(), k("div", Ut, [
|
|
500
|
+
d(t(nt), {
|
|
500
501
|
config: e.config,
|
|
501
502
|
"config-card-doc": e.configCardDoc,
|
|
502
|
-
"config-schema":
|
|
503
|
-
"entity-type":
|
|
503
|
+
"config-schema": V.value,
|
|
504
|
+
"entity-type": t(et).Route,
|
|
504
505
|
"fetch-url": g.value,
|
|
505
506
|
"hide-title": e.hideTitle,
|
|
506
|
-
"onFetch:error":
|
|
507
|
+
"onFetch:error": c[0] || (c[0] = (M) => r.$emit("fetch:error", M)),
|
|
507
508
|
"onFetch:success": y,
|
|
508
|
-
onLoading:
|
|
509
|
+
onLoading: c[1] || (c[1] = (M) => r.$emit("loading", M))
|
|
509
510
|
}, {
|
|
510
|
-
service:
|
|
511
|
+
service: u(({ row: M }) => [
|
|
511
512
|
h.value ? (m(), x(S, {
|
|
512
513
|
key: 0,
|
|
513
514
|
"data-testid": "service-name-loader",
|
|
514
515
|
type: "spinner"
|
|
515
|
-
})) :
|
|
516
|
+
})) : M.value && M.value.id === i.value && A.value ? (m(), x(t(dt), {
|
|
516
517
|
key: 1,
|
|
517
518
|
item: {
|
|
518
|
-
key:
|
|
519
|
+
key: M.value.id,
|
|
519
520
|
value: A.value,
|
|
520
|
-
type:
|
|
521
|
+
type: t(ve).LinkInternal
|
|
521
522
|
},
|
|
522
|
-
onNavigationClick: () => r.$emit("navigation-click",
|
|
523
|
-
}, null, 8, ["item", "onNavigationClick"])) : (m(),
|
|
523
|
+
onNavigationClick: () => r.$emit("navigation-click", M.value.id, "services")
|
|
524
|
+
}, null, 8, ["item", "onNavigationClick"])) : (m(), k("div", Pt, H("-")))
|
|
524
525
|
]),
|
|
525
526
|
_: 1
|
|
526
527
|
}, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
|
|
@@ -528,8 +529,8 @@ const J = {
|
|
|
528
529
|
};
|
|
529
530
|
}
|
|
530
531
|
});
|
|
531
|
-
var q = /* @__PURE__ */ ((e) => (e.TRADITIONAL = "traditional", e.EXPRESSIONS = "expressions", e))(q || {}), s = /* @__PURE__ */ ((e) => (e.PATHS = "paths", e.SNIS = "snis", e.HOSTS = "hosts", e.METHODS = "methods", e.HEADERS = "headers", e.SOURCES = "sources", e.DESTINATIONS = "destinations", e))(s || {}),
|
|
532
|
-
const
|
|
532
|
+
var q = /* @__PURE__ */ ((e) => (e.TRADITIONAL = "traditional", e.EXPRESSIONS = "expressions", e))(q || {}), s = /* @__PURE__ */ ((e) => (e.PATHS = "paths", e.SNIS = "snis", e.HOSTS = "hosts", e.METHODS = "methods", e.HEADERS = "headers", e.SOURCES = "sources", e.DESTINATIONS = "destinations", e))(s || {}), Se = /* @__PURE__ */ ((e) => (e.LOADING = "loading", e.ERROR = "error", e.READY = "ready", e))(Se || {}), Ie = /* @__PURE__ */ ((e) => (e.GET = "GET", e.PUT = "PUT", e.POST = "POST", e.PATCH = "PATCH", e.DELETE = "DELETE", e.OPTIONS = "OPTIONS", e.HEAD = "HEAD", e.CONNECT = "CONNECT", e.TRACE = "TRACE", e))(Ie || {});
|
|
533
|
+
const ze = (e) => e.routeFlavors.traditional === !0, Je = (e) => e.routeFlavors.expressions === !0, W = {
|
|
533
534
|
[s.PATHS]: [""],
|
|
534
535
|
[s.SNIS]: [""],
|
|
535
536
|
[s.HOSTS]: [""],
|
|
@@ -537,7 +538,7 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
537
538
|
[s.HEADERS]: [{ header: "", values: "" }],
|
|
538
539
|
[s.SOURCES]: [{ ip: "", port: null }],
|
|
539
540
|
[s.DESTINATIONS]: [{ ip: "", port: null }]
|
|
540
|
-
},
|
|
541
|
+
}, Pe = {
|
|
541
542
|
http: [s.PATHS, s.METHODS, s.HOSTS, s.HEADERS],
|
|
542
543
|
https: [s.PATHS, s.METHODS, s.HOSTS, s.HEADERS, s.SNIS],
|
|
543
544
|
"http,https": [s.PATHS, s.METHODS, s.HOSTS, s.HEADERS, s.SNIS],
|
|
@@ -563,48 +564,48 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
563
564
|
wss: [s.PATHS, s.HOSTS, s.HEADERS, s.SNIS],
|
|
564
565
|
"ws,wss": [s.PATHS, s.HOSTS, s.HEADERS, s.SNIS],
|
|
565
566
|
"wss,ws": [s.PATHS, s.HOSTS, s.HEADERS, s.SNIS]
|
|
566
|
-
},
|
|
567
|
+
}, ot = [
|
|
567
568
|
{ label: "426", value: 426 },
|
|
568
569
|
{ label: "301", value: 301 },
|
|
569
570
|
{ label: "302", value: 302 },
|
|
570
571
|
{ label: "307", value: 307 },
|
|
571
572
|
{ label: "308", value: 308 }
|
|
572
|
-
],
|
|
573
|
+
], Lt = [
|
|
573
574
|
{ label: "v0", value: "v0" },
|
|
574
575
|
{ label: "v1", value: "v1" }
|
|
575
|
-
],
|
|
576
|
+
], xe = {
|
|
576
577
|
https_redirect_status_code: 426,
|
|
577
578
|
strip_path: !0,
|
|
578
579
|
preserve_host: !1,
|
|
579
580
|
request_buffering: !0,
|
|
580
581
|
response_buffering: !0
|
|
581
|
-
},
|
|
582
|
-
...
|
|
582
|
+
}, Ft = {
|
|
583
|
+
...xe,
|
|
583
584
|
paths: [""],
|
|
584
585
|
regex_priority: 0,
|
|
585
586
|
path_handling: "v0",
|
|
586
587
|
expression: "",
|
|
587
588
|
priority: 0
|
|
588
|
-
},
|
|
589
|
+
}, Kt = /* @__PURE__ */ z({
|
|
589
590
|
__name: "RuleControlsAdd",
|
|
590
591
|
props: {
|
|
591
592
|
routingRulesEntity: {}
|
|
592
593
|
},
|
|
593
594
|
emits: ["add"],
|
|
594
595
|
setup(e, { emit: C }) {
|
|
595
|
-
const f = e,
|
|
596
|
+
const f = e, o = C, a = Ve("configType", "basic"), { i18n: { t: v } } = J.useI18n(), i = D(() => v(`form.fields.${f.routingRulesEntity}.add`));
|
|
596
597
|
return (A, h) => {
|
|
597
|
-
const g =
|
|
598
|
-
return
|
|
598
|
+
const g = N("KButton");
|
|
599
|
+
return t(a) !== "basic" ? (m(), x(g, {
|
|
599
600
|
key: 0,
|
|
600
601
|
appearance: "tertiary",
|
|
601
602
|
class: "routing-rule-add-item-button",
|
|
602
603
|
"data-testid": `add-${e.routingRulesEntity}`,
|
|
603
|
-
onClick: h[0] || (h[0] = (p) =>
|
|
604
|
+
onClick: h[0] || (h[0] = (p) => o("add"))
|
|
604
605
|
}, {
|
|
605
|
-
default:
|
|
606
|
-
d(
|
|
607
|
-
|
|
606
|
+
default: u(() => [
|
|
607
|
+
d(t(Ue)),
|
|
608
|
+
w("span", null, H(i.value), 1)
|
|
608
609
|
]),
|
|
609
610
|
_: 1
|
|
610
611
|
}, 8, ["data-testid"])) : P("", !0);
|
|
@@ -612,10 +613,10 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
612
613
|
}
|
|
613
614
|
}), Z = (e, C) => {
|
|
614
615
|
const f = e.__vccOpts || e;
|
|
615
|
-
for (const [
|
|
616
|
-
f[
|
|
616
|
+
for (const [o, a] of C)
|
|
617
|
+
f[o] = a;
|
|
617
618
|
return f;
|
|
618
|
-
},
|
|
619
|
+
}, Ee = /* @__PURE__ */ Z(Kt, [["__scopeId", "data-v-f1f4cfc9"]]), qt = "#afb7c5", Bt = "#0044f4", Gt = "16px", Re = /* @__PURE__ */ z({
|
|
619
620
|
__name: "RuleControlsRemove",
|
|
620
621
|
props: {
|
|
621
622
|
disabled: { type: Boolean },
|
|
@@ -623,10 +624,10 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
623
624
|
},
|
|
624
625
|
emits: ["remove"],
|
|
625
626
|
setup(e, { emit: C }) {
|
|
626
|
-
const f = C,
|
|
627
|
+
const f = C, o = Ve("configType", "basic");
|
|
627
628
|
return (a, v) => {
|
|
628
|
-
const i =
|
|
629
|
-
return o
|
|
629
|
+
const i = N("KButton");
|
|
630
|
+
return t(o) !== "basic" ? (m(), x(i, {
|
|
630
631
|
key: 0,
|
|
631
632
|
appearance: "tertiary",
|
|
632
633
|
"data-testid": `remove-${e.routingRulesEntity}`,
|
|
@@ -634,16 +635,16 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
634
635
|
icon: "",
|
|
635
636
|
onClick: v[0] || (v[0] = (A) => f("remove"))
|
|
636
637
|
}, {
|
|
637
|
-
default:
|
|
638
|
-
d(
|
|
639
|
-
color: e.disabled ?
|
|
638
|
+
default: u(() => [
|
|
639
|
+
d(t(Rt), {
|
|
640
|
+
color: e.disabled ? t(qt) : t(Bt)
|
|
640
641
|
}, null, 8, ["color"])
|
|
641
642
|
]),
|
|
642
643
|
_: 1
|
|
643
644
|
}, 8, ["data-testid", "disabled"])) : P("", !0);
|
|
644
645
|
};
|
|
645
646
|
}
|
|
646
|
-
}),
|
|
647
|
+
}), Wt = { class: "routing-rule-container" }, jt = ["innerHTML"], Xt = /* @__PURE__ */ z({
|
|
647
648
|
__name: "DestinationRules",
|
|
648
649
|
props: {
|
|
649
650
|
modelValue: { required: !0 },
|
|
@@ -651,61 +652,61 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
651
652
|
},
|
|
652
653
|
emits: /* @__PURE__ */ Y(["add", "remove"], ["update:modelValue"]),
|
|
653
654
|
setup(e, { emit: C }) {
|
|
654
|
-
const { i18n: { t: f } } = J.useI18n(),
|
|
655
|
+
const { i18n: { t: f } } = J.useI18n(), o = X(e, "modelValue"), a = C;
|
|
655
656
|
return (v, i) => {
|
|
656
|
-
const A =
|
|
657
|
-
return m(),
|
|
657
|
+
const A = N("KLabel"), h = N("KInput");
|
|
658
|
+
return m(), k("div", Wt, [
|
|
658
659
|
d(A, { "tooltip-attributes": { maxWidth: "320" } }, {
|
|
659
|
-
tooltip:
|
|
660
|
-
|
|
661
|
-
innerHTML:
|
|
662
|
-
}, null, 8,
|
|
660
|
+
tooltip: u(() => [
|
|
661
|
+
w("span", {
|
|
662
|
+
innerHTML: t(f)("form.fields.destinations.tooltip")
|
|
663
|
+
}, null, 8, jt)
|
|
663
664
|
]),
|
|
664
|
-
default:
|
|
665
|
-
U(" " +
|
|
665
|
+
default: u(() => [
|
|
666
|
+
U(" " + H(t(f)("form.fields.destinations.label")), 1)
|
|
666
667
|
]),
|
|
667
668
|
_: 1
|
|
668
669
|
}),
|
|
669
|
-
d(
|
|
670
|
-
default:
|
|
671
|
-
(m(!0),
|
|
670
|
+
d(he, { name: "appear" }, {
|
|
671
|
+
default: u(() => [
|
|
672
|
+
(m(!0), k(G, null, re(o.value, (g, p) => (m(), k("div", {
|
|
672
673
|
key: p,
|
|
673
674
|
class: "routing-rule-input"
|
|
674
675
|
}, [
|
|
675
676
|
d(h, {
|
|
676
|
-
modelValue:
|
|
677
|
-
"onUpdate:modelValue": (y) =>
|
|
677
|
+
modelValue: o.value[p].ip,
|
|
678
|
+
"onUpdate:modelValue": (y) => o.value[p].ip = y,
|
|
678
679
|
modelModifiers: { trim: !0 },
|
|
679
680
|
"data-testid": `route-form-destinations-ip-input-${p + 1}`,
|
|
680
|
-
placeholder:
|
|
681
|
+
placeholder: t(f)("form.fields.destinations.ip.placeholder")
|
|
681
682
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
682
683
|
d(h, {
|
|
683
|
-
modelValue:
|
|
684
|
-
"onUpdate:modelValue": (y) =>
|
|
684
|
+
modelValue: o.value[p].port,
|
|
685
|
+
"onUpdate:modelValue": (y) => o.value[p].port = y,
|
|
685
686
|
modelModifiers: { number: !0 },
|
|
686
687
|
"data-testid": `route-form-destinations-port-input-${p + 1}`,
|
|
687
688
|
max: "65535",
|
|
688
689
|
min: "0",
|
|
689
|
-
placeholder:
|
|
690
|
+
placeholder: t(f)("form.fields.destinations.port.placeholder"),
|
|
690
691
|
type: "number"
|
|
691
692
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
692
|
-
d(
|
|
693
|
-
disabled:
|
|
694
|
-
"routing-rules-entity":
|
|
693
|
+
d(Re, {
|
|
694
|
+
disabled: o.value.length === 1,
|
|
695
|
+
"routing-rules-entity": t(s).DESTINATIONS,
|
|
695
696
|
onRemove: (y) => a("remove", p)
|
|
696
697
|
}, null, 8, ["disabled", "routing-rules-entity", "onRemove"])
|
|
697
698
|
]))), 128))
|
|
698
699
|
]),
|
|
699
700
|
_: 1
|
|
700
701
|
}),
|
|
701
|
-
d(
|
|
702
|
-
"routing-rules-entity":
|
|
702
|
+
d(Ee, {
|
|
703
|
+
"routing-rules-entity": t(s).DESTINATIONS,
|
|
703
704
|
onAdd: i[0] || (i[0] = (g) => a("add"))
|
|
704
705
|
}, null, 8, ["routing-rules-entity"])
|
|
705
706
|
]);
|
|
706
707
|
};
|
|
707
708
|
}
|
|
708
|
-
}),
|
|
709
|
+
}), zt = /* @__PURE__ */ Z(Xt, [["__scopeId", "data-v-3eb40a37"]]), Jt = { class: "routing-rule-container" }, Qt = ["innerHTML"], Yt = /* @__PURE__ */ z({
|
|
709
710
|
__name: "HeaderRules",
|
|
710
711
|
props: {
|
|
711
712
|
modelValue: { required: !0 },
|
|
@@ -713,58 +714,58 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
713
714
|
},
|
|
714
715
|
emits: /* @__PURE__ */ Y(["add", "remove"], ["update:modelValue"]),
|
|
715
716
|
setup(e, { emit: C }) {
|
|
716
|
-
const { i18n: { t: f } } = J.useI18n(),
|
|
717
|
+
const { i18n: { t: f } } = J.useI18n(), o = X(e, "modelValue"), a = C;
|
|
717
718
|
return (v, i) => {
|
|
718
|
-
const A =
|
|
719
|
-
return m(),
|
|
719
|
+
const A = N("KLabel"), h = N("KInput");
|
|
720
|
+
return m(), k("div", Jt, [
|
|
720
721
|
d(A, { "tooltip-attributes": { maxWidth: "320" } }, {
|
|
721
|
-
tooltip:
|
|
722
|
-
|
|
723
|
-
innerHTML:
|
|
724
|
-
}, null, 8,
|
|
722
|
+
tooltip: u(() => [
|
|
723
|
+
w("span", {
|
|
724
|
+
innerHTML: t(f)("form.fields.headers.tooltip")
|
|
725
|
+
}, null, 8, Qt)
|
|
725
726
|
]),
|
|
726
|
-
default:
|
|
727
|
-
U(" " +
|
|
727
|
+
default: u(() => [
|
|
728
|
+
U(" " + H(t(f)("form.fields.headers.label")), 1)
|
|
728
729
|
]),
|
|
729
730
|
_: 1
|
|
730
731
|
}),
|
|
731
|
-
d(
|
|
732
|
-
default:
|
|
733
|
-
(m(!0),
|
|
732
|
+
d(he, { name: "appear" }, {
|
|
733
|
+
default: u(() => [
|
|
734
|
+
(m(!0), k(G, null, re(o.value, (g, p) => (m(), k("div", {
|
|
734
735
|
key: p,
|
|
735
736
|
class: "routing-rule-input"
|
|
736
737
|
}, [
|
|
737
738
|
d(h, {
|
|
738
|
-
modelValue:
|
|
739
|
-
"onUpdate:modelValue": (y) =>
|
|
739
|
+
modelValue: o.value[p].header,
|
|
740
|
+
"onUpdate:modelValue": (y) => o.value[p].header = y,
|
|
740
741
|
modelModifiers: { trim: !0 },
|
|
741
742
|
"data-testid": `route-form-headers-name-input-${p + 1}`,
|
|
742
|
-
placeholder:
|
|
743
|
+
placeholder: t(f)("form.fields.headers.name.placeholder")
|
|
743
744
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
744
745
|
d(h, {
|
|
745
|
-
modelValue:
|
|
746
|
-
"onUpdate:modelValue": (y) =>
|
|
746
|
+
modelValue: o.value[p].values,
|
|
747
|
+
"onUpdate:modelValue": (y) => o.value[p].values = y,
|
|
747
748
|
modelModifiers: { trim: !0 },
|
|
748
749
|
"data-testid": `route-form-headers-values-input-${p + 1}`,
|
|
749
|
-
placeholder:
|
|
750
|
+
placeholder: t(f)("form.fields.headers.values.placeholder")
|
|
750
751
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
751
|
-
d(
|
|
752
|
-
disabled:
|
|
753
|
-
"routing-rules-entity":
|
|
752
|
+
d(Re, {
|
|
753
|
+
disabled: o.value.length === 1,
|
|
754
|
+
"routing-rules-entity": t(s).HEADERS,
|
|
754
755
|
onRemove: (y) => a("remove", p)
|
|
755
756
|
}, null, 8, ["disabled", "routing-rules-entity", "onRemove"])
|
|
756
757
|
]))), 128))
|
|
757
758
|
]),
|
|
758
759
|
_: 1
|
|
759
760
|
}),
|
|
760
|
-
d(
|
|
761
|
-
"routing-rules-entity":
|
|
761
|
+
d(Ee, {
|
|
762
|
+
"routing-rules-entity": t(s).HEADERS,
|
|
762
763
|
onAdd: i[0] || (i[0] = (g) => a("add"))
|
|
763
764
|
}, null, 8, ["routing-rules-entity"])
|
|
764
765
|
]);
|
|
765
766
|
};
|
|
766
767
|
}
|
|
767
|
-
}),
|
|
768
|
+
}), Zt = /* @__PURE__ */ Z(Yt, [["__scopeId", "data-v-d3bede0b"]]), eo = { class: "routing-rule-container" }, to = ["innerHTML"], oo = /* @__PURE__ */ z({
|
|
768
769
|
__name: "HostRules",
|
|
769
770
|
props: {
|
|
770
771
|
modelValue: { required: !0 },
|
|
@@ -772,54 +773,54 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
772
773
|
},
|
|
773
774
|
emits: /* @__PURE__ */ Y(["add", "remove"], ["update:modelValue"]),
|
|
774
775
|
setup(e, { emit: C }) {
|
|
775
|
-
const { i18n: { t: f } } = J.useI18n(),
|
|
776
|
+
const { i18n: { t: f } } = J.useI18n(), o = X(e, "modelValue"), a = C, v = Ve("configType", "basic");
|
|
776
777
|
return (i, A) => {
|
|
777
|
-
const h =
|
|
778
|
-
return m(),
|
|
778
|
+
const h = N("KLabel"), g = N("KInput");
|
|
779
|
+
return m(), k("div", eo, [
|
|
779
780
|
d(h, { "tooltip-attributes": { maxWidth: "320" } }, {
|
|
780
|
-
tooltip:
|
|
781
|
-
|
|
782
|
-
innerHTML:
|
|
783
|
-
}, null, 8,
|
|
781
|
+
tooltip: u(() => [
|
|
782
|
+
w("span", {
|
|
783
|
+
innerHTML: t(f)("form.fields.hosts.tooltip")
|
|
784
|
+
}, null, 8, to)
|
|
784
785
|
]),
|
|
785
|
-
default:
|
|
786
|
-
U(" " +
|
|
786
|
+
default: u(() => [
|
|
787
|
+
U(" " + H(t(v) === "basic" ? t(f)("form.fields.hosts.label_singular") : t(f)("form.fields.hosts.label")), 1)
|
|
787
788
|
]),
|
|
788
789
|
_: 1
|
|
789
790
|
}),
|
|
790
|
-
d(
|
|
791
|
-
default:
|
|
792
|
-
(m(!0),
|
|
791
|
+
d(he, { name: "appear" }, {
|
|
792
|
+
default: u(() => [
|
|
793
|
+
(m(!0), k(G, null, re(t(v) === "basic" ? o.value.slice(0, 1) : o.value, (p, y) => (m(), k("div", {
|
|
793
794
|
key: y,
|
|
794
795
|
class: "routing-rule-input"
|
|
795
796
|
}, [
|
|
796
797
|
d(g, {
|
|
797
|
-
modelValue:
|
|
798
|
-
"onUpdate:modelValue": (
|
|
798
|
+
modelValue: o.value[y],
|
|
799
|
+
"onUpdate:modelValue": (V) => o.value[y] = V,
|
|
799
800
|
modelModifiers: { trim: !0 },
|
|
800
801
|
"data-testid": `route-form-hosts-input-${y + 1}`,
|
|
801
|
-
placeholder:
|
|
802
|
+
placeholder: t(f)("form.fields.hosts.placeholder")
|
|
802
803
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
803
|
-
d(
|
|
804
|
-
disabled:
|
|
805
|
-
"routing-rules-entity":
|
|
806
|
-
onRemove: (
|
|
804
|
+
d(Re, {
|
|
805
|
+
disabled: o.value.length === 1,
|
|
806
|
+
"routing-rules-entity": t(s).HOSTS,
|
|
807
|
+
onRemove: (V) => a("remove", y)
|
|
807
808
|
}, null, 8, ["disabled", "routing-rules-entity", "onRemove"])
|
|
808
809
|
]))), 128))
|
|
809
810
|
]),
|
|
810
811
|
_: 1
|
|
811
812
|
}),
|
|
812
|
-
d(
|
|
813
|
-
"routing-rules-entity":
|
|
813
|
+
d(Ee, {
|
|
814
|
+
"routing-rules-entity": t(s).HOSTS,
|
|
814
815
|
onAdd: A[0] || (A[0] = (p) => a("add"))
|
|
815
816
|
}, null, 8, ["routing-rules-entity"])
|
|
816
817
|
]);
|
|
817
818
|
};
|
|
818
819
|
}
|
|
819
|
-
}),
|
|
820
|
+
}), so = /* @__PURE__ */ Z(oo, [["__scopeId", "data-v-dccd9082"]]), lo = {
|
|
820
821
|
class: "routing-rule-container",
|
|
821
822
|
"data-testid": "route-form-methods"
|
|
822
|
-
},
|
|
823
|
+
}, ro = ["innerHTML"], io = { class: "routing-rule-input" }, ao = /* @__PURE__ */ z({
|
|
823
824
|
__name: "MethodRules",
|
|
824
825
|
props: {
|
|
825
826
|
methods: { required: !0 },
|
|
@@ -829,40 +830,40 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
829
830
|
},
|
|
830
831
|
emits: ["update:methods", "update:customMethods"],
|
|
831
832
|
setup(e) {
|
|
832
|
-
const { i18n: { t: C } } = J.useI18n(), f = X(e, "methods"),
|
|
833
|
+
const { i18n: { t: C } } = J.useI18n(), f = X(e, "methods"), o = X(e, "customMethods"), a = D(() => f.value.filter((g) => Object.keys(Ie).includes(g)).concat(o.value.map((g) => g.value))), v = D(() => Object.keys(Ie).map((g) => ({
|
|
833
834
|
label: g,
|
|
834
835
|
value: g
|
|
835
|
-
})).concat(
|
|
836
|
+
})).concat(o.value.map((g) => ({
|
|
836
837
|
label: g.label,
|
|
837
838
|
value: g.value,
|
|
838
839
|
custom: !0
|
|
839
840
|
})))), i = (g) => !v.value.map((p) => p.value.toLowerCase()).includes(g.toLowerCase()), A = (g, p) => {
|
|
840
|
-
p ?
|
|
841
|
+
p ? o.value.push(g) : o.value = o.value.filter((y) => y.value !== g.value);
|
|
841
842
|
}, h = (g) => {
|
|
842
843
|
f.value = g;
|
|
843
844
|
};
|
|
844
845
|
return (g, p) => {
|
|
845
|
-
const y =
|
|
846
|
-
return m(),
|
|
846
|
+
const y = N("KLabel"), V = N("KMultiselect");
|
|
847
|
+
return m(), k("div", lo, [
|
|
847
848
|
d(y, { "tooltip-attributes": { maxWidth: "320" } }, {
|
|
848
|
-
tooltip:
|
|
849
|
-
|
|
850
|
-
innerHTML:
|
|
851
|
-
}, null, 8,
|
|
849
|
+
tooltip: u(() => [
|
|
850
|
+
w("span", {
|
|
851
|
+
innerHTML: t(C)("form.fields.methods.tooltip")
|
|
852
|
+
}, null, 8, ro)
|
|
852
853
|
]),
|
|
853
|
-
default:
|
|
854
|
-
U(" " +
|
|
854
|
+
default: u(() => [
|
|
855
|
+
U(" " + H(t(C)("form.fields.methods.label")), 1)
|
|
855
856
|
]),
|
|
856
857
|
_: 1
|
|
857
858
|
}),
|
|
858
|
-
|
|
859
|
-
d(
|
|
859
|
+
w("div", io, [
|
|
860
|
+
d(V, {
|
|
860
861
|
"enable-item-creation": "",
|
|
861
862
|
"item-creation-validator": i,
|
|
862
863
|
items: v.value,
|
|
863
864
|
"model-value": a.value,
|
|
864
|
-
placeholder:
|
|
865
|
-
"search-placeholder":
|
|
865
|
+
placeholder: t(C)("form.fields.methods.placeholder"),
|
|
866
|
+
"search-placeholder": t(C)("form.fields.methods.search_placeholder"),
|
|
866
867
|
onItemAdded: p[0] || (p[0] = (F) => A(F, !0)),
|
|
867
868
|
onItemRemoved: p[1] || (p[1] = (F) => A(F, !1)),
|
|
868
869
|
"onUpdate:modelValue": h
|
|
@@ -871,7 +872,7 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
871
872
|
]);
|
|
872
873
|
};
|
|
873
874
|
}
|
|
874
|
-
}),
|
|
875
|
+
}), no = /* @__PURE__ */ Z(ao, [["__scopeId", "data-v-6c94d6d2"]]), uo = { class: "routing-rule-container" }, co = ["innerHTML"], po = /* @__PURE__ */ z({
|
|
875
876
|
__name: "PathRules",
|
|
876
877
|
props: {
|
|
877
878
|
modelValue: { required: !0 },
|
|
@@ -879,51 +880,51 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
879
880
|
},
|
|
880
881
|
emits: /* @__PURE__ */ Y(["add", "remove"], ["update:modelValue"]),
|
|
881
882
|
setup(e, { emit: C }) {
|
|
882
|
-
const { i18n: { t: f } } = J.useI18n(),
|
|
883
|
+
const { i18n: { t: f } } = J.useI18n(), o = X(e, "modelValue"), a = C, v = Ve("configType", "basic");
|
|
883
884
|
return (i, A) => {
|
|
884
|
-
const h =
|
|
885
|
-
return m(),
|
|
885
|
+
const h = N("KLabel"), g = N("KInput");
|
|
886
|
+
return m(), k("div", uo, [
|
|
886
887
|
d(h, { "tooltip-attributes": { maxWidth: "320" } }, {
|
|
887
|
-
tooltip:
|
|
888
|
-
|
|
889
|
-
innerHTML:
|
|
890
|
-
}, null, 8,
|
|
888
|
+
tooltip: u(() => [
|
|
889
|
+
w("span", {
|
|
890
|
+
innerHTML: t(f)("form.fields.paths.tooltip")
|
|
891
|
+
}, null, 8, co)
|
|
891
892
|
]),
|
|
892
|
-
default:
|
|
893
|
-
U(" " +
|
|
893
|
+
default: u(() => [
|
|
894
|
+
U(" " + H(t(v) === "basic" ? t(f)("form.fields.paths.label_singular") : t(f)("form.fields.paths.label")), 1)
|
|
894
895
|
]),
|
|
895
896
|
_: 1
|
|
896
897
|
}),
|
|
897
|
-
d(
|
|
898
|
-
default:
|
|
899
|
-
(m(!0),
|
|
898
|
+
d(he, { name: "appear" }, {
|
|
899
|
+
default: u(() => [
|
|
900
|
+
(m(!0), k(G, null, re(t(v) === "basic" ? o.value.slice(0, 1) : o.value, (p, y) => (m(), k("div", {
|
|
900
901
|
key: y,
|
|
901
902
|
class: "routing-rule-input"
|
|
902
903
|
}, [
|
|
903
904
|
d(g, {
|
|
904
|
-
modelValue:
|
|
905
|
-
"onUpdate:modelValue": (
|
|
905
|
+
modelValue: o.value[y],
|
|
906
|
+
"onUpdate:modelValue": (V) => o.value[y] = V,
|
|
906
907
|
modelModifiers: { trim: !0 },
|
|
907
908
|
"data-testid": `route-form-paths-input-${y + 1}`,
|
|
908
|
-
placeholder:
|
|
909
|
+
placeholder: t(f)("form.fields.paths.placeholder")
|
|
909
910
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
910
|
-
d(
|
|
911
|
-
disabled:
|
|
912
|
-
"routing-rules-entity":
|
|
913
|
-
onRemove: (
|
|
911
|
+
d(Re, {
|
|
912
|
+
disabled: o.value.length === 1,
|
|
913
|
+
"routing-rules-entity": t(s).PATHS,
|
|
914
|
+
onRemove: (V) => a("remove", y)
|
|
914
915
|
}, null, 8, ["disabled", "routing-rules-entity", "onRemove"])
|
|
915
916
|
]))), 128))
|
|
916
917
|
]),
|
|
917
918
|
_: 1
|
|
918
919
|
}),
|
|
919
|
-
d(
|
|
920
|
-
"routing-rules-entity":
|
|
920
|
+
d(Ee, {
|
|
921
|
+
"routing-rules-entity": t(s).PATHS,
|
|
921
922
|
onAdd: A[0] || (A[0] = (p) => a("add"))
|
|
922
923
|
}, null, 8, ["routing-rules-entity"])
|
|
923
924
|
]);
|
|
924
925
|
};
|
|
925
926
|
}
|
|
926
|
-
}),
|
|
927
|
+
}), fo = /* @__PURE__ */ Z(po, [["__scopeId", "data-v-eb440a9e"]]), mo = { class: "routing-rule-container" }, vo = ["innerHTML"], ho = /* @__PURE__ */ z({
|
|
927
928
|
__name: "SniRules",
|
|
928
929
|
props: {
|
|
929
930
|
modelValue: { required: !0 },
|
|
@@ -931,51 +932,51 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
931
932
|
},
|
|
932
933
|
emits: /* @__PURE__ */ Y(["add", "remove"], ["update:modelValue"]),
|
|
933
934
|
setup(e, { emit: C }) {
|
|
934
|
-
const { i18n: { t: f } } = J.useI18n(),
|
|
935
|
+
const { i18n: { t: f } } = J.useI18n(), o = X(e, "modelValue"), a = C;
|
|
935
936
|
return (v, i) => {
|
|
936
|
-
const A =
|
|
937
|
-
return m(),
|
|
937
|
+
const A = N("KLabel"), h = N("KInput");
|
|
938
|
+
return m(), k("div", mo, [
|
|
938
939
|
d(A, { "tooltip-attributes": { maxWidth: "320" } }, {
|
|
939
|
-
tooltip:
|
|
940
|
-
|
|
941
|
-
innerHTML:
|
|
942
|
-
}, null, 8,
|
|
940
|
+
tooltip: u(() => [
|
|
941
|
+
w("span", {
|
|
942
|
+
innerHTML: t(f)("form.fields.snis.tooltip")
|
|
943
|
+
}, null, 8, vo)
|
|
943
944
|
]),
|
|
944
|
-
default:
|
|
945
|
-
U(" " +
|
|
945
|
+
default: u(() => [
|
|
946
|
+
U(" " + H(t(f)("form.fields.snis.label")), 1)
|
|
946
947
|
]),
|
|
947
948
|
_: 1
|
|
948
949
|
}),
|
|
949
|
-
d(
|
|
950
|
-
default:
|
|
951
|
-
(m(!0),
|
|
950
|
+
d(he, { name: "appear" }, {
|
|
951
|
+
default: u(() => [
|
|
952
|
+
(m(!0), k(G, null, re(o.value, (g, p) => (m(), k("div", {
|
|
952
953
|
key: p,
|
|
953
954
|
class: "routing-rule-input"
|
|
954
955
|
}, [
|
|
955
956
|
d(h, {
|
|
956
|
-
modelValue:
|
|
957
|
-
"onUpdate:modelValue": (y) =>
|
|
957
|
+
modelValue: o.value[p],
|
|
958
|
+
"onUpdate:modelValue": (y) => o.value[p] = y,
|
|
958
959
|
modelModifiers: { trim: !0 },
|
|
959
960
|
"data-testid": `route-form-snis-input-${p + 1}`,
|
|
960
|
-
placeholder:
|
|
961
|
+
placeholder: t(f)("form.fields.snis.placeholder")
|
|
961
962
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
962
|
-
d(
|
|
963
|
-
disabled:
|
|
964
|
-
"routing-rules-entity":
|
|
963
|
+
d(Re, {
|
|
964
|
+
disabled: o.value.length === 1,
|
|
965
|
+
"routing-rules-entity": t(s).SNIS,
|
|
965
966
|
onRemove: (y) => a("remove", p)
|
|
966
967
|
}, null, 8, ["disabled", "routing-rules-entity", "onRemove"])
|
|
967
968
|
]))), 128))
|
|
968
969
|
]),
|
|
969
970
|
_: 1
|
|
970
971
|
}),
|
|
971
|
-
d(
|
|
972
|
-
"routing-rules-entity":
|
|
972
|
+
d(Ee, {
|
|
973
|
+
"routing-rules-entity": t(s).SNIS,
|
|
973
974
|
onAdd: i[0] || (i[0] = (g) => a("add"))
|
|
974
975
|
}, null, 8, ["routing-rules-entity"])
|
|
975
976
|
]);
|
|
976
977
|
};
|
|
977
978
|
}
|
|
978
|
-
}),
|
|
979
|
+
}), go = /* @__PURE__ */ Z(ho, [["__scopeId", "data-v-e6782e08"]]), yo = { class: "routing-rule-container" }, bo = ["innerHTML"], So = /* @__PURE__ */ z({
|
|
979
980
|
__name: "SourceRules",
|
|
980
981
|
props: {
|
|
981
982
|
modelValue: { required: !0 },
|
|
@@ -983,64 +984,64 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
983
984
|
},
|
|
984
985
|
emits: /* @__PURE__ */ Y(["add", "remove"], ["update:modelValue"]),
|
|
985
986
|
setup(e, { emit: C }) {
|
|
986
|
-
const { i18n: { t: f } } = J.useI18n(),
|
|
987
|
+
const { i18n: { t: f } } = J.useI18n(), o = X(e, "modelValue"), a = C;
|
|
987
988
|
return (v, i) => {
|
|
988
|
-
const A =
|
|
989
|
-
return m(),
|
|
989
|
+
const A = N("KLabel"), h = N("KInput");
|
|
990
|
+
return m(), k("div", yo, [
|
|
990
991
|
d(A, { "tooltip-attributes": { maxWidth: "320" } }, {
|
|
991
|
-
tooltip:
|
|
992
|
-
|
|
993
|
-
innerHTML:
|
|
994
|
-
}, null, 8,
|
|
992
|
+
tooltip: u(() => [
|
|
993
|
+
w("span", {
|
|
994
|
+
innerHTML: t(f)("form.fields.sources.tooltip")
|
|
995
|
+
}, null, 8, bo)
|
|
995
996
|
]),
|
|
996
|
-
default:
|
|
997
|
-
U(" " +
|
|
997
|
+
default: u(() => [
|
|
998
|
+
U(" " + H(t(f)("form.fields.sources.label")), 1)
|
|
998
999
|
]),
|
|
999
1000
|
_: 1
|
|
1000
1001
|
}),
|
|
1001
|
-
d(
|
|
1002
|
-
default:
|
|
1003
|
-
(m(!0),
|
|
1002
|
+
d(he, { name: "appear" }, {
|
|
1003
|
+
default: u(() => [
|
|
1004
|
+
(m(!0), k(G, null, re(o.value, (g, p) => (m(), k("div", {
|
|
1004
1005
|
key: p,
|
|
1005
1006
|
class: "routing-rule-input"
|
|
1006
1007
|
}, [
|
|
1007
1008
|
d(h, {
|
|
1008
|
-
modelValue:
|
|
1009
|
-
"onUpdate:modelValue": (y) =>
|
|
1009
|
+
modelValue: o.value[p].ip,
|
|
1010
|
+
"onUpdate:modelValue": (y) => o.value[p].ip = y,
|
|
1010
1011
|
modelModifiers: { trim: !0 },
|
|
1011
1012
|
"data-testid": `route-form-sources-ip-input-${p + 1}`,
|
|
1012
|
-
placeholder:
|
|
1013
|
+
placeholder: t(f)("form.fields.sources.ip.placeholder")
|
|
1013
1014
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
1014
1015
|
d(h, {
|
|
1015
|
-
modelValue:
|
|
1016
|
-
"onUpdate:modelValue": (y) =>
|
|
1016
|
+
modelValue: o.value[p].port,
|
|
1017
|
+
"onUpdate:modelValue": (y) => o.value[p].port = y,
|
|
1017
1018
|
modelModifiers: { number: !0 },
|
|
1018
1019
|
"data-testid": `route-form-sources-port-input-${p + 1}`,
|
|
1019
1020
|
max: "65535",
|
|
1020
1021
|
min: "0",
|
|
1021
|
-
placeholder:
|
|
1022
|
+
placeholder: t(f)("form.fields.sources.port.placeholder"),
|
|
1022
1023
|
type: "number"
|
|
1023
1024
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "placeholder"]),
|
|
1024
|
-
d(
|
|
1025
|
-
disabled:
|
|
1026
|
-
"routing-rules-entity":
|
|
1025
|
+
d(Re, {
|
|
1026
|
+
disabled: o.value.length === 1,
|
|
1027
|
+
"routing-rules-entity": t(s).SOURCES,
|
|
1027
1028
|
onRemove: (y) => a("remove", p)
|
|
1028
1029
|
}, null, 8, ["disabled", "routing-rules-entity", "onRemove"])
|
|
1029
1030
|
]))), 128))
|
|
1030
1031
|
]),
|
|
1031
1032
|
_: 1
|
|
1032
1033
|
}),
|
|
1033
|
-
d(
|
|
1034
|
-
"routing-rules-entity":
|
|
1034
|
+
d(Ee, {
|
|
1035
|
+
"routing-rules-entity": t(s).SOURCES,
|
|
1035
1036
|
onAdd: i[0] || (i[0] = (g) => a("add"))
|
|
1036
1037
|
}, null, 8, ["routing-rules-entity"])
|
|
1037
1038
|
]);
|
|
1038
1039
|
};
|
|
1039
1040
|
}
|
|
1040
|
-
}),
|
|
1041
|
+
}), _o = /* @__PURE__ */ Z(So, [["__scopeId", "data-v-448078c1"]]), To = { class: "traditional-rules-hint" }, Io = { key: 0 }, Eo = ["innerHTML"], Ro = {
|
|
1041
1042
|
key: 0,
|
|
1042
1043
|
class: "route-form-fields-container route-form-advanced-fields-container"
|
|
1043
|
-
},
|
|
1044
|
+
}, Ao = ["innerHTML"], Oo = ["innerHTML"], ko = ["innerHTML"], Ho = ["innerHTML"], No = ["innerHTML"], Co = ["innerHTML"], xo = /* @__PURE__ */ z({
|
|
1044
1045
|
__name: "TraditionalRules",
|
|
1045
1046
|
props: /* @__PURE__ */ Y({
|
|
1046
1047
|
protocols: {},
|
|
@@ -1055,7 +1056,7 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1055
1056
|
}),
|
|
1056
1057
|
emits: ["update:fields", "update:customMethods"],
|
|
1057
1058
|
setup(e) {
|
|
1058
|
-
const { i18nT: C, i18n: f, i18n: { t:
|
|
1059
|
+
const { i18nT: C, i18n: f, i18n: { t: o } } = J.useI18n(), a = f.source.form.protocols, v = e, i = X(e, "fields"), A = X(e, "customMethods"), h = (r) => {
|
|
1059
1060
|
switch (r) {
|
|
1060
1061
|
case s.PATHS:
|
|
1061
1062
|
Array.isArray(i.value.paths) ? i.value.paths.push([...W[s.PATHS]][0]) : i.value.paths = [...W[s.PATHS]];
|
|
@@ -1079,232 +1080,232 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1079
1080
|
Array.isArray(i.value.destinations) ? i.value.destinations.push({ ...W[s.DESTINATIONS][0] }) : i.value.destinations = [{ ...W[s.DESTINATIONS][0] }];
|
|
1080
1081
|
break;
|
|
1081
1082
|
}
|
|
1082
|
-
}, g = async (r,
|
|
1083
|
-
if (typeof
|
|
1083
|
+
}, g = async (r, c) => {
|
|
1084
|
+
if (typeof c < "u") {
|
|
1084
1085
|
const S = i.value[r];
|
|
1085
|
-
if (Array.isArray(S) && (S.splice(
|
|
1086
|
+
if (Array.isArray(S) && (S.splice(c, 1), S.length > 0))
|
|
1086
1087
|
return;
|
|
1087
1088
|
}
|
|
1088
|
-
await
|
|
1089
|
+
await lt(() => {
|
|
1089
1090
|
delete i.value[r];
|
|
1090
1091
|
});
|
|
1091
|
-
}, p = (r) => r.some((
|
|
1092
|
+
}, p = (r) => r.some((c) => v.protocols.includes(c)), y = D(() => new Set(Pe[v.protocols])), V = D(() => {
|
|
1092
1093
|
if (p(["tls_passthrough"]))
|
|
1093
1094
|
return [F(s.SNIS)];
|
|
1094
|
-
const r = (v.configType === "basic" ? [s.PATHS, s.METHODS, s.HOSTS] :
|
|
1095
|
+
const r = (v.configType === "basic" ? [s.PATHS, s.METHODS, s.HOSTS] : Pe[v.protocols]).map((c) => F(c));
|
|
1095
1096
|
return [[...r].splice(0, r.length - 1).join(", "), r[r.length - 1]];
|
|
1096
1097
|
}), F = (r) => {
|
|
1097
1098
|
var S;
|
|
1098
1099
|
return ((S = f.source.form.fields[r]) == null ? void 0 : S.singular) || "";
|
|
1099
1100
|
};
|
|
1100
|
-
return (r,
|
|
1101
|
-
const S =
|
|
1101
|
+
return (r, c) => {
|
|
1102
|
+
const S = N("KCheckbox"), M = N("KSelect"), le = N("KInput"), j = N("KCard");
|
|
1102
1103
|
return m(), x(j, null, {
|
|
1103
|
-
default:
|
|
1104
|
+
default: u(() => {
|
|
1104
1105
|
var E;
|
|
1105
1106
|
return [
|
|
1106
|
-
|
|
1107
|
-
d(
|
|
1108
|
-
protocol:
|
|
1109
|
-
|
|
1107
|
+
w("span", To, [
|
|
1108
|
+
d(t(C), { keypath: "form.hint.rules_message" }, {
|
|
1109
|
+
protocol: u(() => [
|
|
1110
|
+
w("b", null, H(t(a)[e.protocols]), 1)
|
|
1110
1111
|
]),
|
|
1111
|
-
routingRules:
|
|
1112
|
-
d(
|
|
1113
|
-
keypath:
|
|
1112
|
+
routingRules: u(() => [
|
|
1113
|
+
d(t(C), {
|
|
1114
|
+
keypath: V.value[1] ? "form.hint.multiple_rules" : "form.hint.single_rule"
|
|
1114
1115
|
}, {
|
|
1115
|
-
routingRules:
|
|
1116
|
-
U(
|
|
1116
|
+
routingRules: u(() => [
|
|
1117
|
+
U(H(V.value[0]), 1)
|
|
1117
1118
|
]),
|
|
1118
|
-
lastRoutingRule:
|
|
1119
|
-
U(
|
|
1119
|
+
lastRoutingRule: u(() => [
|
|
1120
|
+
U(H(V.value[1]), 1)
|
|
1120
1121
|
]),
|
|
1121
1122
|
_: 1
|
|
1122
1123
|
}, 8, ["keypath"])
|
|
1123
1124
|
]),
|
|
1124
1125
|
_: 1
|
|
1125
1126
|
}),
|
|
1126
|
-
e.configType === "basic" ? (m(),
|
|
1127
|
+
e.configType === "basic" ? (m(), k("span", Io, H(t(o)("form.hint.advanced")), 1)) : P("", !0)
|
|
1127
1128
|
]),
|
|
1128
|
-
d(
|
|
1129
|
-
default:
|
|
1130
|
-
var
|
|
1129
|
+
d(he, { name: "appear" }, {
|
|
1130
|
+
default: u(() => {
|
|
1131
|
+
var _;
|
|
1131
1132
|
return [
|
|
1132
|
-
i.value.paths && y.value.has(
|
|
1133
|
+
i.value.paths && y.value.has(t(s).PATHS) ? (m(), x(fo, {
|
|
1133
1134
|
key: "paths-container",
|
|
1134
1135
|
modelValue: i.value.paths,
|
|
1135
|
-
"onUpdate:modelValue":
|
|
1136
|
-
onAdd:
|
|
1137
|
-
onRemove:
|
|
1136
|
+
"onUpdate:modelValue": c[0] || (c[0] = (T) => i.value.paths = T),
|
|
1137
|
+
onAdd: c[1] || (c[1] = (T) => h(t(s).PATHS)),
|
|
1138
|
+
onRemove: c[2] || (c[2] = (T) => g(t(s).PATHS, T))
|
|
1138
1139
|
}, null, 8, ["modelValue"])) : P("", !0),
|
|
1139
1140
|
p(["http", "https", "ws", "wss"]) ? (m(), x(S, {
|
|
1140
1141
|
key: 1,
|
|
1141
1142
|
modelValue: i.value.strip_path,
|
|
1142
|
-
"onUpdate:modelValue":
|
|
1143
|
+
"onUpdate:modelValue": c[3] || (c[3] = (T) => i.value.strip_path = T),
|
|
1143
1144
|
class: "route-form-strip-path",
|
|
1144
1145
|
"data-testid": "route-form-strip-path",
|
|
1145
|
-
disabled: !((
|
|
1146
|
-
label: o
|
|
1146
|
+
disabled: !((_ = i.value.paths) != null && _.some(Boolean)),
|
|
1147
|
+
label: t(o)("form.fields.strip_path.label"),
|
|
1147
1148
|
"label-attributes": {
|
|
1148
1149
|
tooltipAttributes: { maxWidth: "320" }
|
|
1149
1150
|
}
|
|
1150
1151
|
}, {
|
|
1151
|
-
tooltip:
|
|
1152
|
-
|
|
1153
|
-
innerHTML: o
|
|
1154
|
-
}, null, 8,
|
|
1152
|
+
tooltip: u(() => [
|
|
1153
|
+
w("span", {
|
|
1154
|
+
innerHTML: t(o)("form.fields.strip_path.tooltip")
|
|
1155
|
+
}, null, 8, Eo)
|
|
1155
1156
|
]),
|
|
1156
1157
|
_: 1
|
|
1157
1158
|
}, 8, ["modelValue", "disabled", "label"])) : P("", !0),
|
|
1158
|
-
i.value.methods && y.value.has(
|
|
1159
|
+
i.value.methods && y.value.has(t(s).METHODS) ? (m(), x(no, {
|
|
1159
1160
|
key: "methods-container",
|
|
1160
1161
|
"custom-methods": A.value,
|
|
1161
|
-
"onUpdate:customMethods":
|
|
1162
|
+
"onUpdate:customMethods": c[4] || (c[4] = (T) => A.value = T),
|
|
1162
1163
|
methods: i.value.methods,
|
|
1163
|
-
"onUpdate:methods":
|
|
1164
|
+
"onUpdate:methods": c[5] || (c[5] = (T) => i.value.methods = T)
|
|
1164
1165
|
}, null, 8, ["custom-methods", "methods"])) : P("", !0),
|
|
1165
|
-
i.value.hosts && y.value.has(
|
|
1166
|
+
i.value.hosts && y.value.has(t(s).HOSTS) ? (m(), x(so, {
|
|
1166
1167
|
key: "hosts-container",
|
|
1167
1168
|
modelValue: i.value.hosts,
|
|
1168
|
-
"onUpdate:modelValue":
|
|
1169
|
-
onAdd:
|
|
1170
|
-
onRemove:
|
|
1169
|
+
"onUpdate:modelValue": c[6] || (c[6] = (T) => i.value.hosts = T),
|
|
1170
|
+
onAdd: c[7] || (c[7] = (T) => h(t(s).HOSTS)),
|
|
1171
|
+
onRemove: c[8] || (c[8] = (T) => g(t(s).HOSTS, T))
|
|
1171
1172
|
}, null, 8, ["modelValue"])) : P("", !0),
|
|
1172
|
-
i.value.headers && e.configType === "advanced" && y.value.has(
|
|
1173
|
+
i.value.headers && e.configType === "advanced" && y.value.has(t(s).HEADERS) ? (m(), x(Zt, {
|
|
1173
1174
|
key: "headers-container",
|
|
1174
1175
|
modelValue: i.value.headers,
|
|
1175
|
-
"onUpdate:modelValue":
|
|
1176
|
-
onAdd:
|
|
1177
|
-
onRemove:
|
|
1176
|
+
"onUpdate:modelValue": c[9] || (c[9] = (T) => i.value.headers = T),
|
|
1177
|
+
onAdd: c[10] || (c[10] = (T) => h(t(s).HEADERS)),
|
|
1178
|
+
onRemove: c[11] || (c[11] = (T) => g(t(s).HEADERS, T))
|
|
1178
1179
|
}, null, 8, ["modelValue"])) : P("", !0),
|
|
1179
|
-
i.value.sources && y.value.has(
|
|
1180
|
+
i.value.sources && y.value.has(t(s).SOURCES) ? (m(), x(_o, {
|
|
1180
1181
|
key: "sources-container",
|
|
1181
1182
|
modelValue: i.value.sources,
|
|
1182
|
-
"onUpdate:modelValue":
|
|
1183
|
-
onAdd:
|
|
1184
|
-
onRemove:
|
|
1183
|
+
"onUpdate:modelValue": c[12] || (c[12] = (T) => i.value.sources = T),
|
|
1184
|
+
onAdd: c[13] || (c[13] = (T) => h(t(s).SOURCES)),
|
|
1185
|
+
onRemove: c[14] || (c[14] = (T) => g(t(s).SOURCES, T))
|
|
1185
1186
|
}, null, 8, ["modelValue"])) : P("", !0),
|
|
1186
|
-
i.value.destinations && y.value.has(
|
|
1187
|
+
i.value.destinations && y.value.has(t(s).DESTINATIONS) ? (m(), x(zt, {
|
|
1187
1188
|
key: "destinations-container",
|
|
1188
1189
|
modelValue: i.value.destinations,
|
|
1189
|
-
"onUpdate:modelValue":
|
|
1190
|
-
onAdd:
|
|
1191
|
-
onRemove:
|
|
1190
|
+
"onUpdate:modelValue": c[15] || (c[15] = (T) => i.value.destinations = T),
|
|
1191
|
+
onAdd: c[16] || (c[16] = (T) => h(t(s).DESTINATIONS)),
|
|
1192
|
+
onRemove: c[17] || (c[17] = (T) => g(t(s).DESTINATIONS, T))
|
|
1192
1193
|
}, null, 8, ["modelValue"])) : P("", !0),
|
|
1193
|
-
i.value.snis && e.configType === "advanced" && y.value.has(
|
|
1194
|
+
i.value.snis && e.configType === "advanced" && y.value.has(t(s).SNIS) ? (m(), x(go, {
|
|
1194
1195
|
key: "snis-container",
|
|
1195
1196
|
modelValue: i.value.snis,
|
|
1196
|
-
"onUpdate:modelValue":
|
|
1197
|
-
onAdd:
|
|
1198
|
-
onRemove:
|
|
1197
|
+
"onUpdate:modelValue": c[18] || (c[18] = (T) => i.value.snis = T),
|
|
1198
|
+
onAdd: c[19] || (c[19] = (T) => h(t(s).SNIS)),
|
|
1199
|
+
onRemove: c[20] || (c[20] = (T) => g(t(s).SNIS, T))
|
|
1199
1200
|
}, null, 8, ["modelValue"])) : P("", !0)
|
|
1200
1201
|
];
|
|
1201
1202
|
}),
|
|
1202
1203
|
_: 1
|
|
1203
1204
|
}),
|
|
1204
|
-
e.hideAdvanced ? P("", !0) : (m(),
|
|
1205
|
-
(E = i.value.paths) != null && E.some(Boolean) ? (m(), x(
|
|
1205
|
+
e.hideAdvanced ? P("", !0) : (m(), k("div", Ro, [
|
|
1206
|
+
(E = i.value.paths) != null && E.some(Boolean) ? (m(), x(M, {
|
|
1206
1207
|
key: 0,
|
|
1207
1208
|
modelValue: i.value.path_handling,
|
|
1208
|
-
"onUpdate:modelValue":
|
|
1209
|
+
"onUpdate:modelValue": c[21] || (c[21] = (_) => i.value.path_handling = _),
|
|
1209
1210
|
"data-testid": "route-form-path-handling",
|
|
1210
|
-
items:
|
|
1211
|
-
label: o
|
|
1211
|
+
items: t(Lt),
|
|
1212
|
+
label: t(o)("form.fields.path_handling.label"),
|
|
1212
1213
|
"label-attributes": {
|
|
1213
1214
|
tooltipAttributes: { maxWidth: "320" }
|
|
1214
1215
|
},
|
|
1215
1216
|
readonly: e.readonly,
|
|
1216
1217
|
width: "100%"
|
|
1217
1218
|
}, {
|
|
1218
|
-
"label-tooltip":
|
|
1219
|
-
|
|
1220
|
-
innerHTML: o
|
|
1221
|
-
}, null, 8,
|
|
1219
|
+
"label-tooltip": u(() => [
|
|
1220
|
+
w("span", {
|
|
1221
|
+
innerHTML: t(o)("form.fields.path_handling.tooltip")
|
|
1222
|
+
}, null, 8, Ao)
|
|
1222
1223
|
]),
|
|
1223
1224
|
_: 1
|
|
1224
1225
|
}, 8, ["modelValue", "items", "label", "readonly"])) : P("", !0),
|
|
1225
|
-
d(
|
|
1226
|
+
d(M, {
|
|
1226
1227
|
modelValue: i.value.https_redirect_status_code,
|
|
1227
|
-
"onUpdate:modelValue":
|
|
1228
|
+
"onUpdate:modelValue": c[22] || (c[22] = (_) => i.value.https_redirect_status_code = _),
|
|
1228
1229
|
"data-testid": "route-form-http-redirect-status-code",
|
|
1229
|
-
items:
|
|
1230
|
-
label: o
|
|
1230
|
+
items: t(ot),
|
|
1231
|
+
label: t(o)("form.fields.https_redirect_status_code.label"),
|
|
1231
1232
|
"label-attributes": {
|
|
1232
1233
|
tooltipAttributes: { maxWidth: "320" }
|
|
1233
1234
|
},
|
|
1234
1235
|
readonly: e.readonly,
|
|
1235
1236
|
width: "100%"
|
|
1236
1237
|
}, {
|
|
1237
|
-
"label-tooltip":
|
|
1238
|
-
|
|
1239
|
-
innerHTML: o
|
|
1240
|
-
}, null, 8,
|
|
1238
|
+
"label-tooltip": u(() => [
|
|
1239
|
+
w("span", {
|
|
1240
|
+
innerHTML: t(o)("form.fields.https_redirect_status_code.tooltip")
|
|
1241
|
+
}, null, 8, Oo)
|
|
1241
1242
|
]),
|
|
1242
1243
|
_: 1
|
|
1243
1244
|
}, 8, ["modelValue", "items", "label", "readonly"]),
|
|
1244
|
-
d(
|
|
1245
|
+
d(le, {
|
|
1245
1246
|
modelValue: i.value.regex_priority,
|
|
1246
|
-
"onUpdate:modelValue":
|
|
1247
|
+
"onUpdate:modelValue": c[23] || (c[23] = (_) => i.value.regex_priority = _),
|
|
1247
1248
|
autocomplete: "off",
|
|
1248
1249
|
"data-testid": "route-form-regex-priority",
|
|
1249
|
-
label: o
|
|
1250
|
+
label: t(o)("form.fields.regex_priority.label"),
|
|
1250
1251
|
"label-attributes": {
|
|
1251
1252
|
tooltipAttributes: { maxWidth: "320" }
|
|
1252
1253
|
},
|
|
1253
1254
|
readonly: e.readonly,
|
|
1254
1255
|
type: "number"
|
|
1255
1256
|
}, {
|
|
1256
|
-
"label-tooltip":
|
|
1257
|
-
|
|
1258
|
-
innerHTML: o
|
|
1259
|
-
}, null, 8,
|
|
1257
|
+
"label-tooltip": u(() => [
|
|
1258
|
+
w("span", {
|
|
1259
|
+
innerHTML: t(o)("form.fields.regex_priority.tooltip")
|
|
1260
|
+
}, null, 8, ko)
|
|
1260
1261
|
]),
|
|
1261
1262
|
_: 1
|
|
1262
1263
|
}, 8, ["modelValue", "label", "readonly"]),
|
|
1263
1264
|
d(S, {
|
|
1264
1265
|
modelValue: i.value.preserve_host,
|
|
1265
|
-
"onUpdate:modelValue":
|
|
1266
|
+
"onUpdate:modelValue": c[24] || (c[24] = (_) => i.value.preserve_host = _),
|
|
1266
1267
|
"data-testid": "route-form-preserve-host",
|
|
1267
|
-
label: o
|
|
1268
|
+
label: t(o)("form.fields.preserve_host.label"),
|
|
1268
1269
|
"label-attributes": {
|
|
1269
1270
|
tooltipAttributes: { maxWidth: "320" }
|
|
1270
1271
|
}
|
|
1271
1272
|
}, {
|
|
1272
|
-
tooltip:
|
|
1273
|
-
|
|
1274
|
-
innerHTML: o
|
|
1275
|
-
}, null, 8,
|
|
1273
|
+
tooltip: u(() => [
|
|
1274
|
+
w("span", {
|
|
1275
|
+
innerHTML: t(o)("form.fields.preserve_host.tooltip")
|
|
1276
|
+
}, null, 8, Ho)
|
|
1276
1277
|
]),
|
|
1277
1278
|
_: 1
|
|
1278
1279
|
}, 8, ["modelValue", "label"]),
|
|
1279
1280
|
d(S, {
|
|
1280
1281
|
modelValue: i.value.request_buffering,
|
|
1281
|
-
"onUpdate:modelValue":
|
|
1282
|
+
"onUpdate:modelValue": c[25] || (c[25] = (_) => i.value.request_buffering = _),
|
|
1282
1283
|
"data-testid": "route-form-request-buffering",
|
|
1283
|
-
label: o
|
|
1284
|
+
label: t(o)("form.fields.request_buffering.label"),
|
|
1284
1285
|
"label-attributes": {
|
|
1285
1286
|
tooltipAttributes: { maxWidth: "320" }
|
|
1286
1287
|
}
|
|
1287
1288
|
}, {
|
|
1288
|
-
tooltip:
|
|
1289
|
-
|
|
1290
|
-
innerHTML: o
|
|
1291
|
-
}, null, 8,
|
|
1289
|
+
tooltip: u(() => [
|
|
1290
|
+
w("span", {
|
|
1291
|
+
innerHTML: t(o)("form.fields.request_buffering.tooltip")
|
|
1292
|
+
}, null, 8, No)
|
|
1292
1293
|
]),
|
|
1293
1294
|
_: 1
|
|
1294
1295
|
}, 8, ["modelValue", "label"]),
|
|
1295
1296
|
d(S, {
|
|
1296
1297
|
modelValue: i.value.response_buffering,
|
|
1297
|
-
"onUpdate:modelValue":
|
|
1298
|
+
"onUpdate:modelValue": c[26] || (c[26] = (_) => i.value.response_buffering = _),
|
|
1298
1299
|
"data-testid": "route-form-response-buffering",
|
|
1299
|
-
label: o
|
|
1300
|
+
label: t(o)("form.fields.response_buffering.label"),
|
|
1300
1301
|
"label-attributes": {
|
|
1301
1302
|
tooltipAttributes: { maxWidth: "320" }
|
|
1302
1303
|
}
|
|
1303
1304
|
}, {
|
|
1304
|
-
tooltip:
|
|
1305
|
-
|
|
1306
|
-
innerHTML: o
|
|
1307
|
-
}, null, 8,
|
|
1305
|
+
tooltip: u(() => [
|
|
1306
|
+
w("span", {
|
|
1307
|
+
innerHTML: t(o)("form.fields.response_buffering.tooltip")
|
|
1308
|
+
}, null, 8, Co)
|
|
1308
1309
|
]),
|
|
1309
1310
|
_: 1
|
|
1310
1311
|
}, 8, ["modelValue", "label"])
|
|
@@ -1315,7 +1316,7 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1315
1316
|
});
|
|
1316
1317
|
};
|
|
1317
1318
|
}
|
|
1318
|
-
}),
|
|
1319
|
+
}), Qe = /* @__PURE__ */ Z(xo, [["__scopeId", "data-v-f3fa9614"]]), Vo = /* @__PURE__ */ z({
|
|
1319
1320
|
__name: "RouteFormExpressionsEditorLoader",
|
|
1320
1321
|
props: /* @__PURE__ */ Y({
|
|
1321
1322
|
protocol: {},
|
|
@@ -1326,51 +1327,51 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1326
1327
|
}),
|
|
1327
1328
|
emits: /* @__PURE__ */ Y(["notify"], ["update:modelValue"]),
|
|
1328
1329
|
setup(e, { emit: C }) {
|
|
1329
|
-
const { i18n: { t: f } } = J.useI18n(),
|
|
1330
|
-
render: () =>
|
|
1330
|
+
const { i18n: { t: f } } = J.useI18n(), o = {
|
|
1331
|
+
render: () => Ke("div", f("form.expressions_editor.loading"))
|
|
1331
1332
|
}, a = {
|
|
1332
|
-
render: () =>
|
|
1333
|
-
}, v =
|
|
1334
|
-
loader: async () => import("./RouteFormExpressionsEditor-
|
|
1335
|
-
loadingComponent:
|
|
1333
|
+
render: () => Ke("div", f("form.expressions_editor.error"))
|
|
1334
|
+
}, v = rt({
|
|
1335
|
+
loader: async () => import("./RouteFormExpressionsEditor-ykO-6Hk6.js"),
|
|
1336
|
+
loadingComponent: o,
|
|
1336
1337
|
errorComponent: a
|
|
1337
|
-
}), i = e, A = C, h = B(
|
|
1338
|
+
}), i = e, A = C, h = B(Se.LOADING), g = X(e, "modelValue"), p = (y) => {
|
|
1338
1339
|
g.value = y;
|
|
1339
1340
|
};
|
|
1340
|
-
return
|
|
1341
|
+
return Ye(async () => {
|
|
1341
1342
|
try {
|
|
1342
|
-
await (await import("@kong-ui-public/expressions")).asyncInit, h.value =
|
|
1343
|
+
await (await import("@kong-ui-public/expressions")).asyncInit, h.value = Se.READY;
|
|
1343
1344
|
} catch (y) {
|
|
1344
|
-
h.value =
|
|
1345
|
+
h.value = Se.ERROR, console.error(y);
|
|
1345
1346
|
}
|
|
1346
|
-
}), (y,
|
|
1347
|
-
h.value ===
|
|
1347
|
+
}), (y, V) => (m(), k(G, null, [
|
|
1348
|
+
h.value === t(Se).ERROR ? (m(), x(qe(a), {
|
|
1348
1349
|
key: 0,
|
|
1349
1350
|
"data-testid": "route-form-expressions-editor-loader-error"
|
|
1350
|
-
})) : h.value ===
|
|
1351
|
+
})) : h.value === t(Se).LOADING ? (m(), x(qe(o), {
|
|
1351
1352
|
key: 1,
|
|
1352
1353
|
"data-testid": "route-form-expressions-editor-loader-loading"
|
|
1353
|
-
})) : (m(), x(
|
|
1354
|
+
})) : (m(), x(t(v), {
|
|
1354
1355
|
key: 2,
|
|
1355
1356
|
modelValue: g.value,
|
|
1356
|
-
"onUpdate:modelValue":
|
|
1357
|
+
"onUpdate:modelValue": V[0] || (V[0] = (F) => g.value = F),
|
|
1357
1358
|
protocol: i.protocol,
|
|
1358
1359
|
"show-expressions-modal-entry": e.showExpressionsModalEntry,
|
|
1359
|
-
onNotify:
|
|
1360
|
+
onNotify: V[1] || (V[1] = (F) => A("notify", F))
|
|
1360
1361
|
}, {
|
|
1361
|
-
default:
|
|
1362
|
-
d(
|
|
1363
|
-
|
|
1362
|
+
default: u(() => [
|
|
1363
|
+
d(t(At), { size: t(Gt) }, null, 8, ["size"]),
|
|
1364
|
+
w("span", null, H(t(f)("form.expression_playground.test_link")), 1)
|
|
1364
1365
|
]),
|
|
1365
1366
|
_: 1
|
|
1366
1367
|
}, 8, ["modelValue", "protocol", "show-expressions-modal-entry"])),
|
|
1367
|
-
|
|
1368
|
+
Le(y.$slots, "after-editor", {
|
|
1368
1369
|
expression: { value: g.value, update: p },
|
|
1369
1370
|
state: h.value
|
|
1370
1371
|
})
|
|
1371
1372
|
], 64));
|
|
1372
1373
|
}
|
|
1373
|
-
}), wo = { class: "route-form-routing-rules-title-container" },
|
|
1374
|
+
}), wo = { class: "route-form-routing-rules-title-container" }, Do = { class: "routing-rules-title" }, Mo = { class: "route-form-fields-container route-form-advanced-fields-container" }, $o = /* @__PURE__ */ z({
|
|
1374
1375
|
__name: "ExpressionsRules",
|
|
1375
1376
|
props: /* @__PURE__ */ Y({
|
|
1376
1377
|
protocols: {},
|
|
@@ -1383,30 +1384,30 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1383
1384
|
}),
|
|
1384
1385
|
emits: /* @__PURE__ */ Y(["notify"], ["update:fields"]),
|
|
1385
1386
|
setup(e, { emit: C }) {
|
|
1386
|
-
const { i18n: { t: f } } = J.useI18n(),
|
|
1387
|
+
const { i18n: { t: f } } = J.useI18n(), o = e, a = X(e, "fields"), v = C, i = B(!0), A = D(() => o.protocols.split(",") || []), h = (g) => g.some((p) => o.protocols.includes(p));
|
|
1387
1388
|
return (g, p) => {
|
|
1388
|
-
const y =
|
|
1389
|
-
return m(),
|
|
1389
|
+
const y = N("KCard"), V = N("KSelect"), F = N("KInput"), r = N("KCheckbox"), c = N("KCollapse");
|
|
1390
|
+
return m(), k(G, null, [
|
|
1390
1391
|
d(y, null, {
|
|
1391
|
-
title:
|
|
1392
|
-
|
|
1393
|
-
(m(!0),
|
|
1392
|
+
title: u(() => [
|
|
1393
|
+
w("div", wo, [
|
|
1394
|
+
(m(!0), k(G, null, re(A.value, (S) => (m(), k("span", {
|
|
1394
1395
|
key: S,
|
|
1395
1396
|
class: "protocol-title"
|
|
1396
|
-
},
|
|
1397
|
-
|
|
1397
|
+
}, H(S.toUpperCase()), 1))), 128)),
|
|
1398
|
+
w("span", Do, H(t(f)("form.sections.routingExpression.title")), 1)
|
|
1398
1399
|
])
|
|
1399
1400
|
]),
|
|
1400
|
-
default:
|
|
1401
|
-
d(
|
|
1401
|
+
default: u(() => [
|
|
1402
|
+
d(Vo, {
|
|
1402
1403
|
modelValue: a.value.expression,
|
|
1403
1404
|
"onUpdate:modelValue": p[0] || (p[0] = (S) => a.value.expression = S),
|
|
1404
1405
|
protocol: A.value[0],
|
|
1405
1406
|
"show-expressions-modal-entry": e.showExpressionsModalEntry,
|
|
1406
1407
|
onNotify: p[1] || (p[1] = (S) => v("notify", S))
|
|
1407
1408
|
}, {
|
|
1408
|
-
"after-editor":
|
|
1409
|
-
|
|
1409
|
+
"after-editor": u((S) => [
|
|
1410
|
+
Le(g.$slots, "after-expressions-editor", {
|
|
1410
1411
|
expression: S.expression,
|
|
1411
1412
|
state: S.state
|
|
1412
1413
|
}, void 0, !0)
|
|
@@ -1416,23 +1417,23 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1416
1417
|
]),
|
|
1417
1418
|
_: 3
|
|
1418
1419
|
}),
|
|
1419
|
-
d(
|
|
1420
|
+
d(c, {
|
|
1420
1421
|
modelValue: i.value,
|
|
1421
1422
|
"onUpdate:modelValue": p[8] || (p[8] = (S) => i.value = S),
|
|
1422
1423
|
class: "route-form-advanced-fields-collapse",
|
|
1423
1424
|
"trigger-alignment": "leading",
|
|
1424
|
-
"trigger-label":
|
|
1425
|
+
"trigger-label": t(f)("form.show_more")
|
|
1425
1426
|
}, {
|
|
1426
|
-
default:
|
|
1427
|
+
default: u(() => [
|
|
1427
1428
|
d(y, null, {
|
|
1428
|
-
default:
|
|
1429
|
-
|
|
1430
|
-
d(
|
|
1429
|
+
default: u(() => [
|
|
1430
|
+
w("div", Mo, [
|
|
1431
|
+
d(V, {
|
|
1431
1432
|
modelValue: a.value.https_redirect_status_code,
|
|
1432
1433
|
"onUpdate:modelValue": p[2] || (p[2] = (S) => a.value.https_redirect_status_code = S),
|
|
1433
1434
|
"data-testid": "route-form-http-redirect-status-code",
|
|
1434
|
-
items:
|
|
1435
|
-
label:
|
|
1435
|
+
items: t(ot),
|
|
1436
|
+
label: t(f)("form.fields.https_redirect_status_code.label"),
|
|
1436
1437
|
readonly: e.readonly,
|
|
1437
1438
|
width: "100%"
|
|
1438
1439
|
}, null, 8, ["modelValue", "items", "label", "readonly"]),
|
|
@@ -1441,9 +1442,9 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1441
1442
|
"onUpdate:modelValue": p[3] || (p[3] = (S) => a.value.priority = S),
|
|
1442
1443
|
autocomplete: "off",
|
|
1443
1444
|
"data-testid": "route-form-priority",
|
|
1444
|
-
label:
|
|
1445
|
+
label: t(f)("form.fields.priority.label"),
|
|
1445
1446
|
"label-attributes": {
|
|
1446
|
-
info:
|
|
1447
|
+
info: t(f)("form.fields.priority.tooltip"),
|
|
1447
1448
|
tooltipAttributes: { maxWidth: "400" }
|
|
1448
1449
|
},
|
|
1449
1450
|
readonly: e.readonly,
|
|
@@ -1454,25 +1455,25 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1454
1455
|
modelValue: a.value.strip_path,
|
|
1455
1456
|
"onUpdate:modelValue": p[4] || (p[4] = (S) => a.value.strip_path = S),
|
|
1456
1457
|
"data-testid": "route-form-strip-path",
|
|
1457
|
-
label:
|
|
1458
|
+
label: t(f)("form.fields.strip_path.label")
|
|
1458
1459
|
}, null, 8, ["modelValue", "label"])) : P("", !0),
|
|
1459
1460
|
d(r, {
|
|
1460
1461
|
modelValue: a.value.preserve_host,
|
|
1461
1462
|
"onUpdate:modelValue": p[5] || (p[5] = (S) => a.value.preserve_host = S),
|
|
1462
1463
|
"data-testid": "route-form-preserve-host",
|
|
1463
|
-
label:
|
|
1464
|
+
label: t(f)("form.fields.preserve_host.label")
|
|
1464
1465
|
}, null, 8, ["modelValue", "label"]),
|
|
1465
1466
|
d(r, {
|
|
1466
1467
|
modelValue: a.value.request_buffering,
|
|
1467
1468
|
"onUpdate:modelValue": p[6] || (p[6] = (S) => a.value.request_buffering = S),
|
|
1468
1469
|
"data-testid": "route-form-request-buffering",
|
|
1469
|
-
label:
|
|
1470
|
+
label: t(f)("form.fields.request_buffering.label")
|
|
1470
1471
|
}, null, 8, ["modelValue", "label"]),
|
|
1471
1472
|
d(r, {
|
|
1472
1473
|
modelValue: a.value.response_buffering,
|
|
1473
1474
|
"onUpdate:modelValue": p[7] || (p[7] = (S) => a.value.response_buffering = S),
|
|
1474
1475
|
"data-testid": "route-form-response-buffering",
|
|
1475
|
-
label:
|
|
1476
|
+
label: t(f)("form.fields.response_buffering.label")
|
|
1476
1477
|
}, null, 8, ["modelValue", "label"])
|
|
1477
1478
|
])
|
|
1478
1479
|
]),
|
|
@@ -1484,10 +1485,10 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1484
1485
|
], 64);
|
|
1485
1486
|
};
|
|
1486
1487
|
}
|
|
1487
|
-
}),
|
|
1488
|
+
}), Uo = /* @__PURE__ */ Z($o, [["__scopeId", "data-v-e7571a47"]]), Po = { class: "config-type-container" }, Lo = {
|
|
1488
1489
|
key: 0,
|
|
1489
1490
|
class: "config-flavor"
|
|
1490
|
-
},
|
|
1491
|
+
}, Fo = /* @__PURE__ */ z({
|
|
1491
1492
|
__name: "RouteFormRulesComposer",
|
|
1492
1493
|
props: /* @__PURE__ */ Y({
|
|
1493
1494
|
protocols: {},
|
|
@@ -1504,8 +1505,8 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1504
1505
|
configFlavor: { required: !0 },
|
|
1505
1506
|
configFlavorModifiers: {},
|
|
1506
1507
|
fields: {
|
|
1507
|
-
default: () =>
|
|
1508
|
-
...
|
|
1508
|
+
default: () => Ce({
|
|
1509
|
+
...xe,
|
|
1509
1510
|
paths: [""],
|
|
1510
1511
|
regex_priority: 0,
|
|
1511
1512
|
path_handling: "v0",
|
|
@@ -1514,12 +1515,12 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1514
1515
|
})
|
|
1515
1516
|
},
|
|
1516
1517
|
fieldsModifiers: {},
|
|
1517
|
-
customMethods: { default: () =>
|
|
1518
|
+
customMethods: { default: () => Ce([]) },
|
|
1518
1519
|
customMethodsModifiers: {}
|
|
1519
1520
|
}),
|
|
1520
1521
|
emits: /* @__PURE__ */ Y(["notify", "update:payload", "update:protocols"], ["update:configType", "update:configFlavor", "update:fields", "update:customMethods"]),
|
|
1521
1522
|
setup(e, { emit: C }) {
|
|
1522
|
-
const f = e,
|
|
1523
|
+
const f = e, o = X(e, "configType"), a = X(e, "configFlavor"), v = X(e, "fields"), i = X(e, "customMethods"), A = C, { i18n: { t: h } } = J.useI18n(), g = [
|
|
1523
1524
|
{
|
|
1524
1525
|
value: q.TRADITIONAL,
|
|
1525
1526
|
label: h("form.flavors.traditional")
|
|
@@ -1528,7 +1529,7 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1528
1529
|
value: q.EXPRESSIONS,
|
|
1529
1530
|
label: h("form.flavors.expressions")
|
|
1530
1531
|
}
|
|
1531
|
-
], p =
|
|
1532
|
+
], p = D(() => [
|
|
1532
1533
|
{ label: h("form.protocols.grpc"), value: "grpc" },
|
|
1533
1534
|
{ label: h("form.protocols.grpcs"), value: "grpcs" },
|
|
1534
1535
|
{ label: h("form.protocols.grpc,grpcs"), value: "grpc,grpcs" },
|
|
@@ -1548,43 +1549,43 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1548
1549
|
{ label: h("form.protocols.wss"), value: "wss" },
|
|
1549
1550
|
{ label: h("form.protocols.ws,wss"), value: "ws,wss" }
|
|
1550
1551
|
] : []
|
|
1551
|
-
]), y =
|
|
1552
|
-
if (!new Set(
|
|
1552
|
+
]), y = D(() => f.recordFlavor ? f.recordFlavor : a.value), V = (E, _) => {
|
|
1553
|
+
if (!new Set(Pe[f.protocols]).has(E))
|
|
1553
1554
|
return [];
|
|
1554
1555
|
if ([s.PATHS, s.HOSTS, s.METHODS, s.SNIS].includes(E))
|
|
1555
|
-
return [...
|
|
1556
|
+
return [..._].filter((K) => !!K);
|
|
1556
1557
|
if (E === s.SOURCES || E === s.DESTINATIONS)
|
|
1557
|
-
return [...
|
|
1558
|
+
return [..._].filter((K) => !!K.ip || !!K.port).map((K) => ({
|
|
1558
1559
|
ip: K.ip || void 0,
|
|
1559
1560
|
port: !K.port && K.port !== 0 ? void 0 : K.port
|
|
1560
1561
|
}));
|
|
1561
1562
|
if (E === s.HEADERS)
|
|
1562
|
-
return [...
|
|
1563
|
-
}, F = (E) => E.some((
|
|
1563
|
+
return [..._].filter((K) => !!K.header);
|
|
1564
|
+
}, F = (E) => E.some((_) => f.protocols.includes(_)), r = () => {
|
|
1564
1565
|
if (y.value !== q.TRADITIONAL)
|
|
1565
1566
|
return null;
|
|
1566
|
-
const E = v.value,
|
|
1567
|
-
return
|
|
1568
|
-
},
|
|
1567
|
+
const E = v.value, _ = V(s.HEADERS, E.headers || []) || W[s.HEADERS];
|
|
1568
|
+
return _.length === 0 ? null : _.reduce((T, K) => (T[K.header] = K.values.split(","), T), {});
|
|
1569
|
+
}, c = D(() => (v.value.methods || []).filter((T) => Object.keys(Ie).includes(T)).concat(i.value.map((T) => T.label.toUpperCase()))), S = (E) => E != null && E.length ? E : null, M = D(() => ({
|
|
1569
1570
|
https_redirect_status_code: v.value.https_redirect_status_code,
|
|
1570
1571
|
strip_path: F(["http", "https", "ws", "wss"]) ? v.value.strip_path : !1,
|
|
1571
1572
|
preserve_host: v.value.preserve_host,
|
|
1572
1573
|
request_buffering: v.value.request_buffering,
|
|
1573
1574
|
response_buffering: v.value.response_buffering
|
|
1574
|
-
})),
|
|
1575
|
+
})), le = D(() => {
|
|
1575
1576
|
switch (y.value) {
|
|
1576
1577
|
case q.TRADITIONAL: {
|
|
1577
|
-
const E = v.value,
|
|
1578
|
-
...
|
|
1579
|
-
methods: S(
|
|
1580
|
-
hosts:
|
|
1581
|
-
paths:
|
|
1582
|
-
headers:
|
|
1578
|
+
const E = v.value, _ = S(V(s.PATHS, E.paths || [])), T = S(V(s.HOSTS, E.hosts || [])), K = {
|
|
1579
|
+
...M.value,
|
|
1580
|
+
methods: S(V(s.METHODS, c.value)),
|
|
1581
|
+
hosts: o.value === "basic" && T ? T.slice(0, 1) : T,
|
|
1582
|
+
paths: o.value === "basic" && _ ? _.slice(0, 1) : _,
|
|
1583
|
+
headers: o.value === "basic" ? null : r(),
|
|
1583
1584
|
regex_priority: Number(E.regex_priority),
|
|
1584
1585
|
path_handling: E.path_handling,
|
|
1585
|
-
sources: S(
|
|
1586
|
-
destinations: S(
|
|
1587
|
-
snis:
|
|
1586
|
+
sources: S(V(s.SOURCES, E.sources || [])),
|
|
1587
|
+
destinations: S(V(s.DESTINATIONS, E.destinations || [])),
|
|
1588
|
+
snis: o.value === "basic" ? null : S(V(s.SNIS, E.snis || []))
|
|
1588
1589
|
};
|
|
1589
1590
|
return {
|
|
1590
1591
|
type: y.value,
|
|
@@ -1596,7 +1597,7 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1596
1597
|
return {
|
|
1597
1598
|
type: y.value,
|
|
1598
1599
|
payload: {
|
|
1599
|
-
...
|
|
1600
|
+
...M.value,
|
|
1600
1601
|
expression: E.expression,
|
|
1601
1602
|
priority: Number(E.priority)
|
|
1602
1603
|
}
|
|
@@ -1608,79 +1609,79 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1608
1609
|
}), j = (E) => {
|
|
1609
1610
|
E && A("update:protocols", E);
|
|
1610
1611
|
};
|
|
1611
|
-
return
|
|
1612
|
+
return _e([() => f.recordFlavor, () => f.routeFlavors], ([E, _]) => {
|
|
1612
1613
|
if (E) {
|
|
1613
1614
|
a.value = E;
|
|
1614
1615
|
return;
|
|
1615
1616
|
}
|
|
1616
|
-
a.value = !
|
|
1617
|
-
}, { immediate: !0, deep: !0 }),
|
|
1617
|
+
a.value = !_.traditional && _.expressions ? q.EXPRESSIONS : q.TRADITIONAL;
|
|
1618
|
+
}, { immediate: !0, deep: !0 }), _e(o, (E) => {
|
|
1618
1619
|
E === "basic" && (a.value = q.TRADITIONAL, A("update:protocols", "http,https"));
|
|
1619
|
-
}),
|
|
1620
|
+
}), _e(le, (E) => {
|
|
1620
1621
|
A("update:payload", E);
|
|
1621
|
-
}, { deep: !0, immediate: !0 }), (E,
|
|
1622
|
-
const
|
|
1623
|
-
return m(),
|
|
1624
|
-
|
|
1625
|
-
d(
|
|
1626
|
-
modelValue:
|
|
1627
|
-
"onUpdate:modelValue":
|
|
1622
|
+
}, { deep: !0, immediate: !0 }), (E, _) => {
|
|
1623
|
+
const T = N("KRadio"), K = N("KLabel"), Ae = N("KTooltip"), ne = N("KSegmentedControl"), ee = N("KAlert"), ge = N("KSelect");
|
|
1624
|
+
return m(), k(G, null, [
|
|
1625
|
+
w("div", Po, [
|
|
1626
|
+
d(T, {
|
|
1627
|
+
modelValue: o.value,
|
|
1628
|
+
"onUpdate:modelValue": _[0] || (_[0] = ($) => o.value = $),
|
|
1628
1629
|
card: "",
|
|
1629
1630
|
"card-orientation": "horizontal",
|
|
1630
1631
|
"data-testid": "route-form-config-type-basic",
|
|
1631
|
-
description:
|
|
1632
|
-
disabled: !e.routeFlavors.traditional || e.recordFlavor ===
|
|
1633
|
-
label:
|
|
1632
|
+
description: t(h)("form.config_types.basic.description"),
|
|
1633
|
+
disabled: !e.routeFlavors.traditional || e.recordFlavor === t(q).EXPRESSIONS,
|
|
1634
|
+
label: t(h)("form.config_types.basic.label"),
|
|
1634
1635
|
"selected-value": "basic"
|
|
1635
1636
|
}, null, 8, ["modelValue", "description", "disabled", "label"]),
|
|
1636
|
-
d(
|
|
1637
|
-
modelValue:
|
|
1638
|
-
"onUpdate:modelValue":
|
|
1637
|
+
d(T, {
|
|
1638
|
+
modelValue: o.value,
|
|
1639
|
+
"onUpdate:modelValue": _[1] || (_[1] = ($) => o.value = $),
|
|
1639
1640
|
card: "",
|
|
1640
1641
|
"card-orientation": "horizontal",
|
|
1641
1642
|
"data-testid": "route-form-config-type-advanced",
|
|
1642
|
-
description:
|
|
1643
|
-
label:
|
|
1643
|
+
description: t(h)("form.config_types.advanced.description"),
|
|
1644
|
+
label: t(h)("form.config_types.advanced.label"),
|
|
1644
1645
|
"selected-value": "advanced"
|
|
1645
1646
|
}, null, 8, ["modelValue", "description", "label"])
|
|
1646
1647
|
]),
|
|
1647
|
-
|
|
1648
|
+
o.value === "basic" ? (m(), x(Qe, {
|
|
1648
1649
|
key: 0,
|
|
1649
1650
|
"custom-methods": i.value,
|
|
1650
|
-
"onUpdate:customMethods":
|
|
1651
|
+
"onUpdate:customMethods": _[2] || (_[2] = ($) => i.value = $),
|
|
1651
1652
|
fields: v.value,
|
|
1652
|
-
"onUpdate:fields":
|
|
1653
|
+
"onUpdate:fields": _[3] || (_[3] = ($) => v.value = $),
|
|
1653
1654
|
"config-type": "basic",
|
|
1654
1655
|
"hide-advanced": "",
|
|
1655
1656
|
protocols: e.protocols,
|
|
1656
1657
|
readonly: e.readonly
|
|
1657
|
-
}, null, 8, ["custom-methods", "fields", "protocols", "readonly"])) : (m(),
|
|
1658
|
-
e.routeFlavors.traditional && e.routeFlavors.expressions ? (m(),
|
|
1658
|
+
}, null, 8, ["custom-methods", "fields", "protocols", "readonly"])) : (m(), k(G, { key: 1 }, [
|
|
1659
|
+
e.routeFlavors.traditional && e.routeFlavors.expressions ? (m(), k("div", Lo, [
|
|
1659
1660
|
d(K, { class: "config-flavor-label" }, {
|
|
1660
|
-
default:
|
|
1661
|
-
U(
|
|
1661
|
+
default: u(() => [
|
|
1662
|
+
U(H(t(h)("form.config_flavor.label")), 1)
|
|
1662
1663
|
]),
|
|
1663
1664
|
_: 1
|
|
1664
1665
|
}),
|
|
1665
1666
|
d(ne, {
|
|
1666
1667
|
modelValue: a.value,
|
|
1667
|
-
"onUpdate:modelValue":
|
|
1668
|
+
"onUpdate:modelValue": _[4] || (_[4] = ($) => a.value = $),
|
|
1668
1669
|
class: "config-flavor-control",
|
|
1669
1670
|
"data-testid": "route-form-config-flavor",
|
|
1670
1671
|
options: g
|
|
1671
1672
|
}, {
|
|
1672
|
-
"option-label":
|
|
1673
|
-
var
|
|
1673
|
+
"option-label": u(({ option: $ }) => {
|
|
1674
|
+
var fe, de;
|
|
1674
1675
|
return [
|
|
1675
|
-
|
|
1676
|
-
(
|
|
1676
|
+
w("span", null, H($.label), 1),
|
|
1677
|
+
(fe = e.tooltips) != null && fe[$.value] ? (m(), x(Ae, {
|
|
1677
1678
|
key: 0,
|
|
1678
1679
|
class: "route-form-config-tabs-tooltip",
|
|
1679
1680
|
text: (de = e.tooltips) == null ? void 0 : de[$.value],
|
|
1680
1681
|
"tooltip-id": `route-form-config-tabs-tooltip-${$.value}`
|
|
1681
1682
|
}, {
|
|
1682
|
-
default:
|
|
1683
|
-
d(
|
|
1683
|
+
default: u(() => [
|
|
1684
|
+
d(t(Ot))
|
|
1684
1685
|
]),
|
|
1685
1686
|
_: 1
|
|
1686
1687
|
}, 8, ["text", "tooltip-id"])) : P("", !0)
|
|
@@ -1695,23 +1696,23 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1695
1696
|
class: "route-form-config-type-immutable-alert",
|
|
1696
1697
|
"data-testid": "route-config-type-immutable-alert"
|
|
1697
1698
|
}, {
|
|
1698
|
-
default:
|
|
1699
|
-
e.recordFlavor ? e.recordFlavor !== a.value ? (m(),
|
|
1700
|
-
U(
|
|
1701
|
-
], 64)) : P("", !0) : (m(),
|
|
1702
|
-
U(
|
|
1699
|
+
default: u(() => [
|
|
1700
|
+
e.recordFlavor ? e.recordFlavor !== a.value ? (m(), k(G, { key: 1 }, [
|
|
1701
|
+
U(H(t(h)("form.warning.cannotChangeFlavor.edit", { format: t(h)(`form.flavors.${e.recordFlavor}`) })), 1)
|
|
1702
|
+
], 64)) : P("", !0) : (m(), k(G, { key: 0 }, [
|
|
1703
|
+
U(H(t(h)("form.warning.cannotChangeFlavor.create")), 1)
|
|
1703
1704
|
], 64))
|
|
1704
1705
|
]),
|
|
1705
1706
|
_: 1
|
|
1706
1707
|
}, 8, ["appearance"])) : P("", !0),
|
|
1707
|
-
!e.recordFlavor || !(e.routeFlavors.traditional && e.routeFlavors.expressions && e.recordFlavor !== a.value) ? (m(),
|
|
1708
|
-
e.hideProtocols ? P("", !0) : (m(), x(
|
|
1708
|
+
!e.recordFlavor || !(e.routeFlavors.traditional && e.routeFlavors.expressions && e.recordFlavor !== a.value) ? (m(), k(G, { key: 2 }, [
|
|
1709
|
+
e.hideProtocols ? P("", !0) : (m(), x(ge, {
|
|
1709
1710
|
key: 0,
|
|
1710
1711
|
"data-testid": "route-form-protocols",
|
|
1711
1712
|
items: p.value,
|
|
1712
|
-
label:
|
|
1713
|
+
label: t(h)("form.fields.protocols.label"),
|
|
1713
1714
|
"label-attributes": {
|
|
1714
|
-
info:
|
|
1715
|
+
info: t(h)("form.fields.protocols.tooltip"),
|
|
1715
1716
|
tooltipAttributes: { maxWidth: "400" }
|
|
1716
1717
|
},
|
|
1717
1718
|
"model-value": e.protocols,
|
|
@@ -1720,40 +1721,40 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1720
1721
|
width: "100%",
|
|
1721
1722
|
"onUpdate:modelValue": j
|
|
1722
1723
|
}, null, 8, ["items", "label", "label-attributes", "model-value", "readonly"])),
|
|
1723
|
-
a.value ===
|
|
1724
|
+
a.value === t(q).TRADITIONAL ? (m(), x(Qe, {
|
|
1724
1725
|
key: 1,
|
|
1725
1726
|
"custom-methods": i.value,
|
|
1726
|
-
"onUpdate:customMethods":
|
|
1727
|
+
"onUpdate:customMethods": _[5] || (_[5] = ($) => i.value = $),
|
|
1727
1728
|
fields: v.value,
|
|
1728
|
-
"onUpdate:fields":
|
|
1729
|
+
"onUpdate:fields": _[6] || (_[6] = ($) => v.value = $),
|
|
1729
1730
|
"config-type": "advanced",
|
|
1730
1731
|
protocols: e.protocols,
|
|
1731
1732
|
readonly: e.readonly
|
|
1732
|
-
}, null, 8, ["custom-methods", "fields", "protocols", "readonly"])) : (m(), x(
|
|
1733
|
+
}, null, 8, ["custom-methods", "fields", "protocols", "readonly"])) : (m(), x(Uo, {
|
|
1733
1734
|
key: 2,
|
|
1734
1735
|
fields: v.value,
|
|
1735
|
-
"onUpdate:fields":
|
|
1736
|
+
"onUpdate:fields": _[7] || (_[7] = ($) => v.value = $),
|
|
1736
1737
|
protocols: e.protocols,
|
|
1737
1738
|
readonly: e.readonly,
|
|
1738
1739
|
"show-expressions-modal-entry": e.showExpressionsModalEntry,
|
|
1739
|
-
onNotify:
|
|
1740
|
+
onNotify: _[8] || (_[8] = ($) => A("notify", $))
|
|
1740
1741
|
}, null, 8, ["fields", "protocols", "readonly", "show-expressions-modal-entry"]))
|
|
1741
1742
|
], 64)) : P("", !0)
|
|
1742
1743
|
], 64))
|
|
1743
1744
|
], 64);
|
|
1744
1745
|
};
|
|
1745
1746
|
}
|
|
1746
|
-
}),
|
|
1747
|
-
var f,
|
|
1748
|
-
return !(typeof e.expression == "string" && e.expression.length > 0 || (e.protocols || []).sort().join(",") !== "http,https" || ((f = e[s.PATHS]) == null ? void 0 : f.length) > 1 || ((
|
|
1747
|
+
}), Ko = /* @__PURE__ */ Z(Fo, [["__scopeId", "data-v-cbda4882"]]), qo = (e) => {
|
|
1748
|
+
var f, o, a, v, i;
|
|
1749
|
+
return !(typeof e.expression == "string" && e.expression.length > 0 || (e.protocols || []).sort().join(",") !== "http,https" || ((f = e[s.PATHS]) == null ? void 0 : f.length) > 1 || ((o = e[s.HOSTS]) == null ? void 0 : o.length) > 1 || e[s.HEADERS] && typeof e[s.HEADERS] == "object" || ((a = e[s.SNIS]) == null ? void 0 : a.length) > 0 || ((v = e[s.SOURCES]) == null ? void 0 : v.length) > 0 || ((i = e[s.DESTINATIONS]) == null ? void 0 : i.length) > 0 || [
|
|
1749
1750
|
"path_handling",
|
|
1750
1751
|
"regex_priority",
|
|
1751
1752
|
"https_redirect_status_code",
|
|
1752
1753
|
"preserve_host",
|
|
1753
1754
|
"request_buffering",
|
|
1754
1755
|
"response_buffering"
|
|
1755
|
-
].some((A) => e[A] !==
|
|
1756
|
-
},
|
|
1756
|
+
].some((A) => e[A] !== Ft[A]));
|
|
1757
|
+
}, Bo = { class: "kong-ui-entities-route-form" }, Go = { key: 1 }, Wo = { "data-testid": "no-search-results" }, jo = { class: "route-form-service-dropdown-item" }, Xo = { class: "select-item-label" }, zo = { class: "select-item-description" }, Jo = /* @__PURE__ */ z({
|
|
1757
1758
|
__name: "RouteForm",
|
|
1758
1759
|
props: {
|
|
1759
1760
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1816,26 +1817,26 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1816
1817
|
},
|
|
1817
1818
|
emits: ["update", "error", "loading", "model-updated", "notify"],
|
|
1818
1819
|
setup(e, { expose: C, emit: f }) {
|
|
1819
|
-
var
|
|
1820
|
-
const
|
|
1821
|
-
!
|
|
1822
|
-
), A = B(void 0), h =
|
|
1820
|
+
var be;
|
|
1821
|
+
const o = e, a = f, v = B("basic"), i = B(
|
|
1822
|
+
!o.routeFlavors.traditional && o.routeFlavors.expressions ? q.EXPRESSIONS : q.TRADITIONAL
|
|
1823
|
+
), A = B(void 0), h = D(() => {
|
|
1823
1824
|
if (A.value)
|
|
1824
1825
|
return A.value;
|
|
1825
1826
|
if (i.value)
|
|
1826
1827
|
return i.value;
|
|
1827
|
-
if (
|
|
1828
|
+
if (o.routeFlavors.traditional)
|
|
1828
1829
|
return q.TRADITIONAL;
|
|
1829
|
-
if (
|
|
1830
|
+
if (o.routeFlavors.expressions)
|
|
1830
1831
|
return q.EXPRESSIONS;
|
|
1831
|
-
}), { i18n: { t: g } } = J.useI18n(), p =
|
|
1832
|
-
routeFlavors:
|
|
1832
|
+
}), { i18n: { t: g } } = J.useI18n(), p = tt(), { axiosInstance: y } = Fe((be = o.config) == null ? void 0 : be.axiosRequestConfig), { getMessageFromError: V } = ut(), F = (l) => l.name ? `${l.name} - ${l.value}` : l.value, r = Ce({
|
|
1833
|
+
routeFlavors: o.routeFlavors,
|
|
1833
1834
|
fields: {
|
|
1834
1835
|
name: "",
|
|
1835
1836
|
protocols: "http,https",
|
|
1836
1837
|
tags: "",
|
|
1837
1838
|
service_id: "",
|
|
1838
|
-
...
|
|
1839
|
+
...xe,
|
|
1839
1840
|
paths: [""],
|
|
1840
1841
|
snis: [""],
|
|
1841
1842
|
hosts: [""],
|
|
@@ -1851,242 +1852,242 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
1851
1852
|
isReadonly: !1,
|
|
1852
1853
|
errorMessage: ""
|
|
1853
1854
|
});
|
|
1854
|
-
|
|
1855
|
-
r.routeFlavors =
|
|
1855
|
+
_e(() => o.routeFlavors, (l) => {
|
|
1856
|
+
r.routeFlavors = l, l.traditional || (v.value = "advanced");
|
|
1856
1857
|
}, { immediate: !0, deep: !0 });
|
|
1857
|
-
const
|
|
1858
|
+
const c = B(), S = B([]), M = B([]), le = Ce({
|
|
1858
1859
|
name: "",
|
|
1859
1860
|
protocols: "http,https",
|
|
1860
1861
|
tags: "",
|
|
1861
1862
|
service_id: "",
|
|
1862
|
-
...
|
|
1863
|
+
...xe,
|
|
1863
1864
|
path_handling: "v0",
|
|
1864
1865
|
regex_priority: 0,
|
|
1865
1866
|
expression: "",
|
|
1866
1867
|
priority: 0
|
|
1867
|
-
}), j =
|
|
1868
|
-
gatewayInfo:
|
|
1868
|
+
}), j = o.config.app === "konnect" || ct({
|
|
1869
|
+
gatewayInfo: o.config.gatewayInfo,
|
|
1869
1870
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
1870
1871
|
supportedRange: {
|
|
1871
1872
|
enterprise: ["3.0"]
|
|
1872
1873
|
}
|
|
1873
|
-
}), E =
|
|
1874
|
-
var
|
|
1875
|
-
return (
|
|
1876
|
-
}),
|
|
1877
|
-
var
|
|
1878
|
-
p.push((
|
|
1879
|
-
}, K = (
|
|
1880
|
-
a("loading",
|
|
1881
|
-
},
|
|
1882
|
-
a("error",
|
|
1883
|
-
}, ne = (
|
|
1884
|
-
var
|
|
1885
|
-
return { header:
|
|
1886
|
-
}), ee = (
|
|
1887
|
-
var
|
|
1888
|
-
if (
|
|
1889
|
-
const
|
|
1890
|
-
A.value =
|
|
1874
|
+
}), E = D(() => o.routeId ? Ge.Edit : Ge.Create), _ = D(() => {
|
|
1875
|
+
var l, n, b;
|
|
1876
|
+
return (b = (n = Te.form[(l = o.config) == null ? void 0 : l.app]) == null ? void 0 : n.fetch) == null ? void 0 : b[o.serviceId ? "forGatewayService" : "all"].replace(/{serviceId}/gi, o.serviceId || "");
|
|
1877
|
+
}), T = () => {
|
|
1878
|
+
var l;
|
|
1879
|
+
p.push((l = o.config) == null ? void 0 : l.cancelRoute);
|
|
1880
|
+
}, K = (l) => {
|
|
1881
|
+
a("loading", l);
|
|
1882
|
+
}, Ae = (l) => {
|
|
1883
|
+
a("error", l);
|
|
1884
|
+
}, ne = (l) => Object.entries(l).map((n) => {
|
|
1885
|
+
var b;
|
|
1886
|
+
return { header: n[0], values: (b = n[1]) == null ? void 0 : b.join() };
|
|
1887
|
+
}), ee = (l) => l.some((n) => r.fields.protocols.includes(n)), ge = (l) => {
|
|
1888
|
+
var b, R;
|
|
1889
|
+
if (o.routeId) {
|
|
1890
|
+
const I = typeof l.expression == "string" && l.expression.length > 0 ? q.EXPRESSIONS : q.TRADITIONAL;
|
|
1891
|
+
A.value = I, qo(l) || (v.value = "advanced");
|
|
1891
1892
|
}
|
|
1892
|
-
(
|
|
1893
|
-
const
|
|
1894
|
-
r.fields.tags = (
|
|
1895
|
-
}, $ =
|
|
1893
|
+
(b = l == null ? void 0 : l.service) != null && b.id && (r.fields.service_id = l.service.id), r.fields.name = (l == null ? void 0 : l.name) || "";
|
|
1894
|
+
const n = (l == null ? void 0 : l.tags) || [];
|
|
1895
|
+
r.fields.tags = (n == null ? void 0 : n.join(", ")) || "", r.fields.preserve_host = typeof (l == null ? void 0 : l.preserve_host) > "u" ? !1 : l == null ? void 0 : l.preserve_host, r.fields.https_redirect_status_code = (l == null ? void 0 : l.https_redirect_status_code) || 426, (R = l == null ? void 0 : l.protocols) != null && R.length && (l.protocols.length > 1 ? r.fields.protocols = l.protocols.join() : r.fields.protocols = l.protocols[0]), r.fields.request_buffering = typeof (l == null ? void 0 : l.request_buffering) > "u" ? !0 : l == null ? void 0 : l.request_buffering, r.fields.response_buffering = typeof (l == null ? void 0 : l.response_buffering) > "u" ? !0 : l == null ? void 0 : l.response_buffering, r.fields.strip_path = typeof (l == null ? void 0 : l.strip_path) > "u" ? !0 : l == null ? void 0 : l.strip_path, ze(r) && (r.fields.regex_priority = (l == null ? void 0 : l.regex_priority) || 0, r.fields.path_handling = (l == null ? void 0 : l.path_handling) || "v0", l != null && l.paths && (r.fields.paths = l.paths), l != null && l.snis && (r.fields.snis = l.snis), l != null && l.hosts && (r.fields.hosts = l.hosts), l != null && l.methods && (r.fields.methods = l.methods.filter((I) => Object.keys(Ie).includes(I)), S.value = l.methods.filter((I) => !Object.keys(Ie).includes(I)).map((I) => ({ label: I, value: I })), M.value = [...S.value]), l != null && l.headers && (r.fields.headers = ne(l.headers)), l != null && l.sources && (r.fields.sources = l.sources), l != null && l.destinations && (r.fields.destinations = l.destinations)), Je(r) && (r.fields.expression = (l == null ? void 0 : l.expression) || "", r.fields.priority = (l == null ? void 0 : l.priority) || 0), Object.assign(le, JSON.parse(JSON.stringify(r.fields)));
|
|
1896
|
+
}, $ = D(() => {
|
|
1896
1897
|
switch (h.value) {
|
|
1897
1898
|
case q.TRADITIONAL: {
|
|
1898
|
-
if (
|
|
1899
|
-
const
|
|
1900
|
-
return !!r.fields.protocols && (ee(["http"]) && !!(
|
|
1899
|
+
if (ze(r)) {
|
|
1900
|
+
const l = r.fields.hosts ? !!r.fields.hosts.filter(Boolean).length : null, n = r.fields.paths ? !!r.fields.paths.filter(Boolean).length : null, b = r.fields.headers ? r.fields.headers.some(({ header: Q }) => !!Q) : null, R = r.fields.snis ? !!r.fields.snis.filter(Boolean).length : null, I = r.fields.destinations ? r.fields.destinations.some(({ ip: Q, port: ce }) => !!Q || !!ce) : null, te = r.fields.sources ? r.fields.sources.some(({ ip: Q, port: ce }) => !!Q || !!ce) : null, ae = r.fields.methods ? !!r.fields.methods.filter(Boolean).length : null;
|
|
1901
|
+
return !!r.fields.protocols && (ee(["http"]) && !!(l || ae || n || b) || ee(["https"]) && !!(l || ae || n || b || R) || ee(["grpc"]) && !!(l || n || b) || ee(["grpcs", "wss"]) && !!(l || n || b || R) || ee(["udp", "tls"]) && !!(I || te || R) || ee(["tcp"]) && !!(I || te) || ee(["tls_passthrough"]) && !!R || ee(["ws"]) && !!(l || n || b));
|
|
1901
1902
|
}
|
|
1902
1903
|
break;
|
|
1903
1904
|
}
|
|
1904
1905
|
case q.EXPRESSIONS: {
|
|
1905
|
-
if (
|
|
1906
|
+
if (Je(r))
|
|
1906
1907
|
return r.fields.expression.length > 0;
|
|
1907
1908
|
break;
|
|
1908
1909
|
}
|
|
1909
1910
|
}
|
|
1910
1911
|
return !0;
|
|
1911
|
-
}),
|
|
1912
|
-
var
|
|
1913
|
-
let
|
|
1914
|
-
return
|
|
1912
|
+
}), fe = D(() => !je(r.fields, le) || !je(S.value, M.value)), de = D(() => {
|
|
1913
|
+
var n, b;
|
|
1914
|
+
let l = `${o.config.apiBaseUrl}${Te.form[o.config.app][E.value][o.serviceId ? "forGatewayService" : "all"]}`;
|
|
1915
|
+
return o.config.app === "konnect" ? l = l.replace(/{controlPlaneId}/gi, ((n = o.config) == null ? void 0 : n.controlPlaneId) || "").replace(/{serviceId}/gi, o.serviceId || "") : o.config.app === "kongManager" && (l = l.replace(/\/{workspace}/gi, (b = o.config) != null && b.workspace ? `/${o.config.workspace}` : "").replace(/{serviceId}/gi, o.serviceId || "")), l = l.replace(/{id}/gi, o.routeId), l;
|
|
1915
1916
|
});
|
|
1916
|
-
|
|
1917
|
-
a("model-updated",
|
|
1917
|
+
_e(() => r.fields, () => {
|
|
1918
|
+
a("model-updated", me.value);
|
|
1918
1919
|
}, { deep: !0 });
|
|
1919
|
-
const
|
|
1920
|
-
var
|
|
1920
|
+
const me = D(() => {
|
|
1921
|
+
var l, n, b;
|
|
1921
1922
|
return {
|
|
1922
|
-
...!
|
|
1923
|
+
...!o.hideNameField && { name: r.fields.name || null },
|
|
1923
1924
|
protocols: r.fields.protocols.split(","),
|
|
1924
|
-
tags: (
|
|
1925
|
+
tags: (n = (l = r.fields.tags.split(",")) == null ? void 0 : l.map((R) => String(R || "").trim())) == null ? void 0 : n.filter((R) => R !== ""),
|
|
1925
1926
|
service: r.fields.service_id ? { id: r.fields.service_id } : null,
|
|
1926
|
-
...(
|
|
1927
|
+
...(b = c.value) == null ? void 0 : b.payload
|
|
1927
1928
|
};
|
|
1928
|
-
}),
|
|
1929
|
+
}), ie = (l) => {
|
|
1929
1930
|
switch (h.value) {
|
|
1930
1931
|
case q.TRADITIONAL: {
|
|
1931
|
-
if (!("regex_priority" in
|
|
1932
|
+
if (!("regex_priority" in l && "path_handling" in l))
|
|
1932
1933
|
return !1;
|
|
1933
1934
|
break;
|
|
1934
1935
|
}
|
|
1935
1936
|
case q.EXPRESSIONS: {
|
|
1936
|
-
if (!("priority" in
|
|
1937
|
+
if (!("priority" in l))
|
|
1937
1938
|
return !1;
|
|
1938
1939
|
break;
|
|
1939
1940
|
}
|
|
1940
1941
|
}
|
|
1941
|
-
return "service" in
|
|
1942
|
-
}, ue = async (
|
|
1943
|
-
var
|
|
1944
|
-
const
|
|
1942
|
+
return "service" in l && "tags" in l && "protocols" in l;
|
|
1943
|
+
}, ue = async (l) => {
|
|
1944
|
+
var b;
|
|
1945
|
+
const n = l && ie(l) ? l : me.value;
|
|
1945
1946
|
try {
|
|
1946
1947
|
r.isReadonly = !0;
|
|
1947
|
-
let
|
|
1948
|
-
E.value === "create" ?
|
|
1949
|
-
} catch (
|
|
1950
|
-
r.errorMessage =
|
|
1948
|
+
let R;
|
|
1949
|
+
E.value === "create" ? R = await y.post(de.value, n) : E.value === "edit" && (R = ((b = o.config) == null ? void 0 : b.app) === "konnect" ? await y.put(de.value, n) : await y.patch(de.value, n)), ge(R == null ? void 0 : R.data), a("update", R == null ? void 0 : R.data);
|
|
1950
|
+
} catch (R) {
|
|
1951
|
+
r.errorMessage = V(R), a("error", R);
|
|
1951
1952
|
} finally {
|
|
1952
1953
|
r.isReadonly = !1;
|
|
1953
1954
|
}
|
|
1954
1955
|
}, {
|
|
1955
|
-
debouncedQueryChange:
|
|
1956
|
-
loading:
|
|
1957
|
-
error:
|
|
1958
|
-
loadItems:
|
|
1959
|
-
results:
|
|
1960
|
-
} =
|
|
1956
|
+
debouncedQueryChange: ye,
|
|
1957
|
+
loading: He,
|
|
1958
|
+
error: we,
|
|
1959
|
+
loadItems: De,
|
|
1960
|
+
results: Me
|
|
1961
|
+
} = pt(o.config, Te.form[o.config.app].services, void 0, {
|
|
1961
1962
|
fetchedItemsKey: "data",
|
|
1962
1963
|
searchKeys: ["id", "name"]
|
|
1963
|
-
}),
|
|
1964
|
-
var
|
|
1965
|
-
return (
|
|
1964
|
+
}), $e = D(() => we.value ? g("errors.services.fetch") : ""), Oe = D(() => {
|
|
1965
|
+
var l;
|
|
1966
|
+
return (l = Me.value) == null ? void 0 : l.map((n) => ({ label: n.id, name: n.name, value: n.id }));
|
|
1966
1967
|
});
|
|
1967
|
-
return
|
|
1968
|
-
!
|
|
1969
|
-
}),
|
|
1970
|
-
a("model-updated",
|
|
1971
|
-
}), C({ saveFormData: ue, payload:
|
|
1972
|
-
const
|
|
1973
|
-
return m(),
|
|
1974
|
-
d(
|
|
1975
|
-
"can-submit": $.value &&
|
|
1968
|
+
return Ze(async () => {
|
|
1969
|
+
!o.hideServiceField && !o.serviceId ? await De() : r.fields.service_id = o.serviceId;
|
|
1970
|
+
}), Ye(() => {
|
|
1971
|
+
a("model-updated", me.value);
|
|
1972
|
+
}), C({ saveFormData: ue, payload: me }), it("configType", v), (l, n) => {
|
|
1973
|
+
const b = N("KInput"), R = N("KSelect");
|
|
1974
|
+
return m(), k("div", Bo, [
|
|
1975
|
+
d(t(ft), {
|
|
1976
|
+
"can-submit": $.value && fe.value,
|
|
1976
1977
|
config: e.config,
|
|
1977
1978
|
"edit-id": e.routeId,
|
|
1978
|
-
"entity-type":
|
|
1979
|
-
"error-message": r.errorMessage ||
|
|
1980
|
-
"fetch-url":
|
|
1981
|
-
"form-fields":
|
|
1979
|
+
"entity-type": t(et).Route,
|
|
1980
|
+
"error-message": r.errorMessage || $e.value,
|
|
1981
|
+
"fetch-url": _.value,
|
|
1982
|
+
"form-fields": me.value,
|
|
1982
1983
|
"is-readonly": r.isReadonly,
|
|
1983
|
-
onCancel:
|
|
1984
|
-
"onFetch:error":
|
|
1985
|
-
"onFetch:success":
|
|
1984
|
+
onCancel: T,
|
|
1985
|
+
"onFetch:error": Ae,
|
|
1986
|
+
"onFetch:success": ge,
|
|
1986
1987
|
onLoading: K,
|
|
1987
1988
|
onSubmit: ue
|
|
1988
1989
|
}, {
|
|
1989
|
-
"form-actions":
|
|
1990
|
-
|
|
1991
|
-
canSubmit: $.value &&
|
|
1992
|
-
cancel:
|
|
1990
|
+
"form-actions": u(() => [
|
|
1991
|
+
Le(l.$slots, "form-actions", {
|
|
1992
|
+
canSubmit: $.value && fe.value,
|
|
1993
|
+
cancel: T,
|
|
1993
1994
|
submit: ue
|
|
1994
1995
|
}, void 0, !0)
|
|
1995
1996
|
]),
|
|
1996
|
-
default:
|
|
1997
|
-
d(
|
|
1998
|
-
description:
|
|
1997
|
+
default: u(() => [
|
|
1998
|
+
d(t(We), {
|
|
1999
|
+
description: t(g)("form.sections.general.description"),
|
|
1999
2000
|
"hide-info-header": e.hideSectionsInfo,
|
|
2000
|
-
title:
|
|
2001
|
+
title: t(g)("form.sections.general.title")
|
|
2001
2002
|
}, {
|
|
2002
|
-
default:
|
|
2003
|
-
e.hideNameField ? P("", !0) : (m(), x(
|
|
2003
|
+
default: u(() => [
|
|
2004
|
+
e.hideNameField ? P("", !0) : (m(), x(b, {
|
|
2004
2005
|
key: 0,
|
|
2005
2006
|
modelValue: r.fields.name,
|
|
2006
|
-
"onUpdate:modelValue":
|
|
2007
|
+
"onUpdate:modelValue": n[0] || (n[0] = (I) => r.fields.name = I),
|
|
2007
2008
|
modelModifiers: { trim: !0 },
|
|
2008
2009
|
autocomplete: "off",
|
|
2009
2010
|
"data-testid": "route-form-name",
|
|
2010
|
-
label:
|
|
2011
|
-
placeholder:
|
|
2011
|
+
label: t(g)("form.fields.name.label"),
|
|
2012
|
+
placeholder: t(g)("form.fields.name.placeholder"),
|
|
2012
2013
|
readonly: r.isReadonly,
|
|
2013
2014
|
type: "text"
|
|
2014
2015
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"])),
|
|
2015
|
-
!e.hideServiceField && !e.serviceId ? (m(),
|
|
2016
|
-
d(
|
|
2016
|
+
!e.hideServiceField && !e.serviceId ? (m(), k("div", Go, [
|
|
2017
|
+
d(R, {
|
|
2017
2018
|
modelValue: r.fields.service_id,
|
|
2018
|
-
"onUpdate:modelValue":
|
|
2019
|
+
"onUpdate:modelValue": n[1] || (n[1] = (I) => r.fields.service_id = I),
|
|
2019
2020
|
clearable: "",
|
|
2020
2021
|
"data-testid": "route-form-service-id",
|
|
2021
2022
|
"enable-filtering": "",
|
|
2022
2023
|
"filter-function": () => !0,
|
|
2023
|
-
items:
|
|
2024
|
-
label:
|
|
2025
|
-
loading:
|
|
2026
|
-
placeholder:
|
|
2024
|
+
items: Oe.value,
|
|
2025
|
+
label: t(g)("form.fields.service_id.label"),
|
|
2026
|
+
loading: t(He),
|
|
2027
|
+
placeholder: t(g)("form.fields.service_id.placeholder"),
|
|
2027
2028
|
readonly: r.isReadonly,
|
|
2028
2029
|
"reuse-item-template": "",
|
|
2029
2030
|
width: "100%",
|
|
2030
|
-
onQueryChange:
|
|
2031
|
+
onQueryChange: t(ye)
|
|
2031
2032
|
}, {
|
|
2032
|
-
loading:
|
|
2033
|
-
|
|
2033
|
+
loading: u(() => [
|
|
2034
|
+
w("div", null, H(t(g)("actions.loading")), 1)
|
|
2034
2035
|
]),
|
|
2035
|
-
empty:
|
|
2036
|
-
|
|
2036
|
+
empty: u(() => [
|
|
2037
|
+
w("div", Wo, H(t(g)("search.no_results")), 1)
|
|
2037
2038
|
]),
|
|
2038
|
-
"selected-item-template":
|
|
2039
|
-
U(
|
|
2039
|
+
"selected-item-template": u(({ item: I }) => [
|
|
2040
|
+
U(H(F(I)), 1)
|
|
2040
2041
|
]),
|
|
2041
|
-
"item-template":
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2042
|
+
"item-template": u(({ item: I }) => [
|
|
2043
|
+
w("div", jo, [
|
|
2044
|
+
w("span", Xo, H(I.name), 1),
|
|
2045
|
+
w("span", zo, H(I.value), 1)
|
|
2045
2046
|
])
|
|
2046
2047
|
]),
|
|
2047
2048
|
_: 1
|
|
2048
2049
|
}, 8, ["modelValue", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"])
|
|
2049
2050
|
])) : P("", !0),
|
|
2050
|
-
d(
|
|
2051
|
+
d(b, {
|
|
2051
2052
|
modelValue: r.fields.tags,
|
|
2052
|
-
"onUpdate:modelValue":
|
|
2053
|
+
"onUpdate:modelValue": n[2] || (n[2] = (I) => r.fields.tags = I),
|
|
2053
2054
|
modelModifiers: { trim: !0 },
|
|
2054
2055
|
autocomplete: "off",
|
|
2055
2056
|
"data-testid": "route-form-tags",
|
|
2056
|
-
help:
|
|
2057
|
-
label:
|
|
2058
|
-
placeholder:
|
|
2057
|
+
help: t(g)("form.fields.tags.help"),
|
|
2058
|
+
label: t(g)("form.fields.tags.label"),
|
|
2059
|
+
placeholder: t(g)("form.fields.tags.placeholder"),
|
|
2059
2060
|
readonly: r.isReadonly,
|
|
2060
2061
|
type: "text"
|
|
2061
2062
|
}, null, 8, ["modelValue", "help", "label", "placeholder", "readonly"])
|
|
2062
2063
|
]),
|
|
2063
2064
|
_: 1
|
|
2064
2065
|
}, 8, ["description", "hide-info-header", "title"]),
|
|
2065
|
-
d(
|
|
2066
|
-
description:
|
|
2066
|
+
d(t(We), {
|
|
2067
|
+
description: t(g)("form.sections.config.description"),
|
|
2067
2068
|
"hide-info-header": e.hideSectionsInfo,
|
|
2068
|
-
title:
|
|
2069
|
+
title: t(g)("form.sections.config.title")
|
|
2069
2070
|
}, {
|
|
2070
|
-
default:
|
|
2071
|
-
d(
|
|
2071
|
+
default: u(() => [
|
|
2072
|
+
d(Ko, {
|
|
2072
2073
|
"config-flavor": i.value,
|
|
2073
|
-
"onUpdate:configFlavor":
|
|
2074
|
+
"onUpdate:configFlavor": n[3] || (n[3] = (I) => i.value = I),
|
|
2074
2075
|
"config-type": v.value,
|
|
2075
|
-
"onUpdate:configType":
|
|
2076
|
+
"onUpdate:configType": n[4] || (n[4] = (I) => v.value = I),
|
|
2076
2077
|
"custom-methods": S.value,
|
|
2077
|
-
"onUpdate:customMethods":
|
|
2078
|
+
"onUpdate:customMethods": n[5] || (n[5] = (I) => S.value = I),
|
|
2078
2079
|
fields: r.fields,
|
|
2079
|
-
"onUpdate:fields":
|
|
2080
|
-
"is-ws-supported":
|
|
2080
|
+
"onUpdate:fields": n[6] || (n[6] = (I) => r.fields = I),
|
|
2081
|
+
"is-ws-supported": t(j),
|
|
2081
2082
|
protocols: r.fields.protocols,
|
|
2082
2083
|
readonly: r.isReadonly,
|
|
2083
2084
|
"record-flavor": A.value,
|
|
2084
2085
|
"route-flavors": e.routeFlavors,
|
|
2085
2086
|
"show-expressions-modal-entry": e.showExpressionsModalEntry,
|
|
2086
2087
|
tooltips: e.configTabTooltips,
|
|
2087
|
-
onNotify:
|
|
2088
|
-
"onUpdate:payload":
|
|
2089
|
-
"onUpdate:protocols":
|
|
2088
|
+
onNotify: n[7] || (n[7] = (I) => a("notify", I)),
|
|
2089
|
+
"onUpdate:payload": n[8] || (n[8] = (I) => c.value = I),
|
|
2090
|
+
"onUpdate:protocols": n[9] || (n[9] = (I) => r.fields.protocols = I)
|
|
2090
2091
|
}, null, 8, ["config-flavor", "config-type", "custom-methods", "fields", "is-ws-supported", "protocols", "readonly", "record-flavor", "route-flavors", "show-expressions-modal-entry", "tooltips"])
|
|
2091
2092
|
]),
|
|
2092
2093
|
_: 1
|
|
@@ -2097,7 +2098,7 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
2097
2098
|
]);
|
|
2098
2099
|
};
|
|
2099
2100
|
}
|
|
2100
|
-
}),
|
|
2101
|
+
}), ps = /* @__PURE__ */ Z(Jo, [["__scopeId", "data-v-5be17e8c"]]), Qo = { class: "kong-ui-entities-routes-list" }, Yo = { class: "button-row" }, Zo = { key: 1 }, es = { key: 1 }, ts = { key: 1 }, os = { class: "route-list-cell-expression" }, ss = /* @__PURE__ */ z({
|
|
2101
2102
|
__name: "RouteList",
|
|
2102
2103
|
props: {
|
|
2103
2104
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2135,6 +2136,12 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
2135
2136
|
required: !1,
|
|
2136
2137
|
default: async () => !0
|
|
2137
2138
|
},
|
|
2139
|
+
/** A synchronous or asynchronous function, that returns a boolean, that evaluates if the user can start debugger session on a given entity */
|
|
2140
|
+
canDebug: {
|
|
2141
|
+
type: Function,
|
|
2142
|
+
required: !1,
|
|
2143
|
+
default: async () => !1
|
|
2144
|
+
},
|
|
2138
2145
|
title: {
|
|
2139
2146
|
type: String,
|
|
2140
2147
|
default: ""
|
|
@@ -2159,17 +2166,17 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
2159
2166
|
},
|
|
2160
2167
|
emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success"],
|
|
2161
2168
|
setup(e, { emit: C }) {
|
|
2162
|
-
var
|
|
2163
|
-
const f = C,
|
|
2169
|
+
var l;
|
|
2170
|
+
const f = C, o = e, { i18n: { t: a, formatUnixTimeStamp: v } } = J.useI18n(), i = tt(), { axiosInstance: A } = Fe((l = o.config) == null ? void 0 : l.axiosRequestConfig), { handleStateChange: h, hasRecords: g } = mt(() => M.value), p = D(() => g.value && o.config.app === "konnect"), y = D(() => !!o.config.serviceId), V = D(() => o.config.app !== "kongManager" || !!o.config.disableSorting), F = {
|
|
2164
2171
|
// the Name column is non-hidable
|
|
2165
2172
|
name: { label: a("routes.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
2166
2173
|
protocols: { label: a("routes.list.table_headers.protocols"), searchable: !0 },
|
|
2167
|
-
...!
|
|
2174
|
+
...!o.hideTraditionalColumns && {
|
|
2168
2175
|
hosts: { label: a("routes.list.table_headers.hosts"), searchable: !0 },
|
|
2169
2176
|
methods: { label: a("routes.list.table_headers.methods"), searchable: !0 },
|
|
2170
2177
|
paths: { label: a("routes.list.table_headers.paths"), searchable: !0 }
|
|
2171
2178
|
},
|
|
2172
|
-
...
|
|
2179
|
+
...o.hasExpressionColumn && {
|
|
2173
2180
|
expression: { label: a("routes.list.table_headers.expression"), tooltip: !0 }
|
|
2174
2181
|
},
|
|
2175
2182
|
tags: { label: a("routes.list.table_headers.tags"), sortable: !1 },
|
|
@@ -2179,179 +2186,182 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
2179
2186
|
columnVisibility: {
|
|
2180
2187
|
created_at: !1
|
|
2181
2188
|
}
|
|
2182
|
-
},
|
|
2183
|
-
var
|
|
2184
|
-
let
|
|
2185
|
-
return
|
|
2186
|
-
}),
|
|
2187
|
-
const
|
|
2188
|
-
if (
|
|
2189
|
+
}, c = F, S = D(() => {
|
|
2190
|
+
var b, R, I, te;
|
|
2191
|
+
let n = `${o.config.apiBaseUrl}${Te.list[o.config.app][o.config.serviceId ? "forGatewayService" : "all"]}`;
|
|
2192
|
+
return o.config.app === "konnect" ? n = n.replace(/{controlPlaneId}/gi, ((b = o.config) == null ? void 0 : b.controlPlaneId) || "").replace(/{serviceId}/gi, ((R = o.config) == null ? void 0 : R.serviceId) || "") : o.config.app === "kongManager" && (n = n.replace(/\/{workspace}/gi, (I = o.config) != null && I.workspace ? `/${o.config.workspace}` : "").replace(/{serviceId}/gi, ((te = o.config) == null ? void 0 : te.serviceId) || "")), n;
|
|
2193
|
+
}), M = B(""), le = D(() => {
|
|
2194
|
+
const n = o.config.app === "konnect" || o.config.isExactMatch;
|
|
2195
|
+
if (n)
|
|
2189
2196
|
return {
|
|
2190
|
-
isExactMatch:
|
|
2197
|
+
isExactMatch: n,
|
|
2191
2198
|
// force exact placeholder if `props.config.isExactMatch` is true
|
|
2192
|
-
placeholder: a(`search.placeholder.${
|
|
2199
|
+
placeholder: a(`search.placeholder.${o.config.isExactMatch ? "exact" : o.config.app}`)
|
|
2193
2200
|
};
|
|
2194
|
-
const { name:
|
|
2195
|
-
name:
|
|
2196
|
-
protocols:
|
|
2197
|
-
hosts:
|
|
2198
|
-
methods:
|
|
2201
|
+
const { name: b, protocols: R, hosts: I, methods: te, paths: ae, expression: Q } = F, ce = {
|
|
2202
|
+
name: b,
|
|
2203
|
+
protocols: R,
|
|
2204
|
+
hosts: I,
|
|
2205
|
+
methods: te,
|
|
2199
2206
|
paths: ae,
|
|
2200
|
-
...
|
|
2207
|
+
...o.hasExpressionColumn && { expression: Q }
|
|
2201
2208
|
};
|
|
2202
2209
|
return {
|
|
2203
|
-
isExactMatch:
|
|
2204
|
-
fields:
|
|
2205
|
-
schema:
|
|
2210
|
+
isExactMatch: n,
|
|
2211
|
+
fields: ce,
|
|
2212
|
+
schema: o.config.filterSchema
|
|
2206
2213
|
};
|
|
2207
2214
|
}), {
|
|
2208
2215
|
fetcher: j,
|
|
2209
2216
|
fetcherState: E,
|
|
2210
|
-
fetcherCacheKey:
|
|
2211
|
-
} =
|
|
2217
|
+
fetcherCacheKey: _
|
|
2218
|
+
} = vt(D(() => ({ ...o.config, cacheIdentifier: o.cacheIdentifier })), S), T = (n) => n.headerKey === "expression" ? {
|
|
2212
2219
|
style: {
|
|
2213
2220
|
maxWidth: "250px",
|
|
2214
2221
|
overflowX: "hidden",
|
|
2215
2222
|
textOverflow: "ellipsis"
|
|
2216
2223
|
}
|
|
2217
2224
|
} : {}, K = () => {
|
|
2218
|
-
|
|
2219
|
-
},
|
|
2220
|
-
|
|
2221
|
-
}, ne = B(null), ee = async (
|
|
2222
|
-
if (!await
|
|
2225
|
+
M.value = "";
|
|
2226
|
+
}, Ae = () => {
|
|
2227
|
+
_.value++;
|
|
2228
|
+
}, ne = B(null), ee = async (n, b) => {
|
|
2229
|
+
if (!await b(n.id)) {
|
|
2223
2230
|
f("copy:error", {
|
|
2224
|
-
entity:
|
|
2231
|
+
entity: n,
|
|
2225
2232
|
field: "id",
|
|
2226
2233
|
message: a("errors.copy")
|
|
2227
2234
|
});
|
|
2228
2235
|
return;
|
|
2229
2236
|
}
|
|
2230
2237
|
f("copy:success", {
|
|
2231
|
-
entity:
|
|
2238
|
+
entity: n,
|
|
2232
2239
|
field: "id",
|
|
2233
|
-
message: a("copy.success", { val:
|
|
2240
|
+
message: a("copy.success", { val: n.id })
|
|
2234
2241
|
});
|
|
2235
|
-
},
|
|
2236
|
-
const
|
|
2237
|
-
if (!await
|
|
2242
|
+
}, ge = async (n, b) => {
|
|
2243
|
+
const R = JSON.stringify(n);
|
|
2244
|
+
if (!await b(R)) {
|
|
2238
2245
|
f("copy:error", {
|
|
2239
|
-
entity:
|
|
2246
|
+
entity: n,
|
|
2240
2247
|
message: a("errors.copy")
|
|
2241
2248
|
});
|
|
2242
2249
|
return;
|
|
2243
2250
|
}
|
|
2244
2251
|
f("copy:success", {
|
|
2245
|
-
entity:
|
|
2252
|
+
entity: n,
|
|
2246
2253
|
message: a("copy.success_brief")
|
|
2247
2254
|
});
|
|
2248
|
-
}, $ = async (
|
|
2249
|
-
var
|
|
2250
|
-
await ((
|
|
2251
|
-
},
|
|
2255
|
+
}, $ = async (n) => {
|
|
2256
|
+
var R;
|
|
2257
|
+
await ((R = o.canRetrieve) == null ? void 0 : R.call(o, n)) && i.push(o.config.getViewRoute(n.id));
|
|
2258
|
+
}, fe = (n) => ({
|
|
2252
2259
|
label: a("actions.view"),
|
|
2253
|
-
to:
|
|
2254
|
-
}), de = (
|
|
2260
|
+
to: o.config.getViewRoute(n)
|
|
2261
|
+
}), de = (n) => ({
|
|
2255
2262
|
label: a("actions.edit"),
|
|
2256
|
-
to:
|
|
2257
|
-
}),
|
|
2258
|
-
|
|
2263
|
+
to: o.config.getEditRoute(n)
|
|
2264
|
+
}), me = (n) => ({
|
|
2265
|
+
label: a("actions.debugger"),
|
|
2266
|
+
to: o.config.getDebugRoute(n)
|
|
2267
|
+
}), ie = B(void 0), ue = B(!1), ye = B(!1), He = B(""), we = ht(o.config, S.value), De = (n) => {
|
|
2268
|
+
ie.value = n, ue.value = !0;
|
|
2259
2269
|
}, Me = () => {
|
|
2260
|
-
|
|
2261
|
-
},
|
|
2262
|
-
var
|
|
2263
|
-
if ((
|
|
2264
|
-
|
|
2270
|
+
ue.value = !1;
|
|
2271
|
+
}, $e = async () => {
|
|
2272
|
+
var n, b, R;
|
|
2273
|
+
if ((n = ie.value) != null && n.id) {
|
|
2274
|
+
ye.value = !0;
|
|
2265
2275
|
try {
|
|
2266
|
-
await A.delete(we(
|
|
2267
|
-
} catch (
|
|
2268
|
-
|
|
2276
|
+
await A.delete(we(ie.value.id)), ye.value = !1, ue.value = !1, _.value++, f("delete:success", ie.value);
|
|
2277
|
+
} catch (I) {
|
|
2278
|
+
He.value = ((R = (b = I.response) == null ? void 0 : b.data) == null ? void 0 : R.message) || I.message || a("errors.delete"), f("error", I);
|
|
2269
2279
|
} finally {
|
|
2270
|
-
|
|
2280
|
+
ye.value = !1;
|
|
2271
2281
|
}
|
|
2272
2282
|
}
|
|
2273
2283
|
};
|
|
2274
|
-
|
|
2275
|
-
var
|
|
2276
|
-
if (
|
|
2284
|
+
_e(E, (n) => {
|
|
2285
|
+
var b, R, I;
|
|
2286
|
+
if (n.status === gt.Error) {
|
|
2277
2287
|
ne.value = {
|
|
2278
2288
|
title: a("errors.general")
|
|
2279
|
-
}, (
|
|
2289
|
+
}, (I = (R = (b = n.error) == null ? void 0 : b.response) == null ? void 0 : R.data) != null && I.message && (ne.value.message = n.error.response.data.message), f("error", n.error);
|
|
2280
2290
|
return;
|
|
2281
2291
|
}
|
|
2282
2292
|
ne.value = null;
|
|
2283
2293
|
});
|
|
2284
|
-
const
|
|
2285
|
-
ctaPath:
|
|
2294
|
+
const Oe = B({
|
|
2295
|
+
ctaPath: o.config.createRoute,
|
|
2286
2296
|
ctaText: void 0,
|
|
2287
|
-
message: `${a("routes.list.empty_state.description")}${
|
|
2297
|
+
message: `${a("routes.list.empty_state.description")}${o.config.additionMessageForEmptyState ? ` ${o.config.additionMessageForEmptyState}` : ""}`,
|
|
2288
2298
|
title: a("routes.title")
|
|
2289
|
-
}),
|
|
2290
|
-
return
|
|
2291
|
-
|
|
2292
|
-
}), (
|
|
2293
|
-
const
|
|
2294
|
-
return m(),
|
|
2295
|
-
d(
|
|
2299
|
+
}), be = B(!1);
|
|
2300
|
+
return Ze(async () => {
|
|
2301
|
+
be.value = await o.canCreate(), be.value && (Oe.value.title = a("routes.list.empty_state.title"), Oe.value.ctaText = a("actions.create"));
|
|
2302
|
+
}), (n, b) => {
|
|
2303
|
+
const R = N("KButton"), I = N("KEmptyState"), te = N("KBadge"), ae = N("KTruncate"), Q = N("KDropdownItem"), ce = N("KClipboardProvider");
|
|
2304
|
+
return m(), k("div", Qo, [
|
|
2305
|
+
d(t(yt), {
|
|
2296
2306
|
"cache-identifier": e.cacheIdentifier,
|
|
2297
|
-
"cell-attributes":
|
|
2307
|
+
"cell-attributes": T,
|
|
2298
2308
|
"default-table-preferences": r,
|
|
2299
|
-
"disable-sorting":
|
|
2300
|
-
"empty-state-options":
|
|
2309
|
+
"disable-sorting": V.value,
|
|
2310
|
+
"empty-state-options": Oe.value,
|
|
2301
2311
|
"enable-entity-actions": "",
|
|
2302
2312
|
"error-message": ne.value,
|
|
2303
|
-
fetcher:
|
|
2304
|
-
"fetcher-cache-key":
|
|
2313
|
+
fetcher: t(j),
|
|
2314
|
+
"fetcher-cache-key": t(_),
|
|
2305
2315
|
"pagination-type": "offset",
|
|
2306
2316
|
"preferences-storage-key": "kong-ui-entities-routes-list",
|
|
2307
|
-
query:
|
|
2308
|
-
"table-headers":
|
|
2317
|
+
query: M.value,
|
|
2318
|
+
"table-headers": t(c),
|
|
2309
2319
|
title: e.title,
|
|
2310
2320
|
"title-tag": e.titleTag,
|
|
2311
2321
|
onClearSearchInput: K,
|
|
2312
|
-
"onClick:row":
|
|
2313
|
-
onSort:
|
|
2314
|
-
onState:
|
|
2315
|
-
},
|
|
2316
|
-
"toolbar-filter":
|
|
2317
|
-
d(
|
|
2318
|
-
modelValue:
|
|
2319
|
-
"onUpdate:modelValue":
|
|
2320
|
-
config:
|
|
2322
|
+
"onClick:row": b[7] || (b[7] = (O) => $(O)),
|
|
2323
|
+
onSort: Ae,
|
|
2324
|
+
onState: t(h)
|
|
2325
|
+
}, Be({
|
|
2326
|
+
"toolbar-filter": u(() => [
|
|
2327
|
+
d(t(St), {
|
|
2328
|
+
modelValue: M.value,
|
|
2329
|
+
"onUpdate:modelValue": b[0] || (b[0] = (O) => M.value = O),
|
|
2330
|
+
config: le.value
|
|
2321
2331
|
}, null, 8, ["modelValue", "config"])
|
|
2322
2332
|
]),
|
|
2323
|
-
"toolbar-button":
|
|
2324
|
-
(m(), x(
|
|
2333
|
+
"toolbar-button": u(() => [
|
|
2334
|
+
(m(), x(at, {
|
|
2325
2335
|
disabled: !e.useActionOutside,
|
|
2326
2336
|
to: "#kong-ui-app-page-header-action-button"
|
|
2327
2337
|
}, [
|
|
2328
|
-
|
|
2329
|
-
!y.value && p.value ? (m(), x(
|
|
2338
|
+
w("div", Yo, [
|
|
2339
|
+
!y.value && p.value ? (m(), x(R, {
|
|
2330
2340
|
key: 0,
|
|
2331
2341
|
appearance: "secondary",
|
|
2332
2342
|
class: "open-learning-hub",
|
|
2333
2343
|
"data-testid": "routes-learn-more-button",
|
|
2334
2344
|
icon: "",
|
|
2335
|
-
onClick:
|
|
2345
|
+
onClick: b[1] || (b[1] = (O) => n.$emit("click:learn-more"))
|
|
2336
2346
|
}, {
|
|
2337
|
-
default:
|
|
2338
|
-
d(
|
|
2347
|
+
default: u(() => [
|
|
2348
|
+
d(t(Xe), { decorative: "" })
|
|
2339
2349
|
]),
|
|
2340
2350
|
_: 1
|
|
2341
2351
|
})) : P("", !0),
|
|
2342
|
-
d(
|
|
2352
|
+
d(t(ke), {
|
|
2343
2353
|
"auth-function": () => e.canCreate()
|
|
2344
2354
|
}, {
|
|
2345
|
-
default:
|
|
2346
|
-
d(
|
|
2355
|
+
default: u(() => [
|
|
2356
|
+
d(R, {
|
|
2347
2357
|
appearance: "primary",
|
|
2348
2358
|
"data-testid": "toolbar-add-route",
|
|
2349
2359
|
size: e.useActionOutside ? "medium" : "large",
|
|
2350
2360
|
to: e.config.createRoute
|
|
2351
2361
|
}, {
|
|
2352
|
-
default:
|
|
2353
|
-
d(
|
|
2354
|
-
U(" " +
|
|
2362
|
+
default: u(() => [
|
|
2363
|
+
d(t(Ue)),
|
|
2364
|
+
U(" " + H(t(a)("routes.list.toolbar_actions.new_route")), 1)
|
|
2355
2365
|
]),
|
|
2356
2366
|
_: 1
|
|
2357
2367
|
}, 8, ["size", "to"])
|
|
@@ -2361,20 +2371,20 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
2361
2371
|
])
|
|
2362
2372
|
], 8, ["disabled"]))
|
|
2363
2373
|
]),
|
|
2364
|
-
name:
|
|
2365
|
-
|
|
2374
|
+
name: u(({ rowValue: O }) => [
|
|
2375
|
+
w("b", null, H(O ?? "-"), 1)
|
|
2366
2376
|
]),
|
|
2367
|
-
protocols:
|
|
2377
|
+
protocols: u(({ rowValue: O }) => [
|
|
2368
2378
|
d(ae, null, {
|
|
2369
|
-
default:
|
|
2370
|
-
(m(!0),
|
|
2379
|
+
default: u(() => [
|
|
2380
|
+
(m(!0), k(G, null, re(O, (L) => (m(), x(te, {
|
|
2371
2381
|
key: L,
|
|
2372
2382
|
appearance: "neutral",
|
|
2373
|
-
onClick:
|
|
2383
|
+
onClick: b[3] || (b[3] = Ne(() => {
|
|
2374
2384
|
}, ["stop"]))
|
|
2375
2385
|
}, {
|
|
2376
|
-
default:
|
|
2377
|
-
U(
|
|
2386
|
+
default: u(() => [
|
|
2387
|
+
U(H(L), 1)
|
|
2378
2388
|
]),
|
|
2379
2389
|
_: 2
|
|
2380
2390
|
}, 1024))), 128))
|
|
@@ -2382,140 +2392,151 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
2382
2392
|
_: 2
|
|
2383
2393
|
}, 1024)
|
|
2384
2394
|
]),
|
|
2385
|
-
hosts:
|
|
2386
|
-
(
|
|
2387
|
-
default:
|
|
2388
|
-
(m(!0),
|
|
2395
|
+
hosts: u(({ rowValue: O }) => [
|
|
2396
|
+
(O == null ? void 0 : O.length) > 0 ? (m(), x(ae, { key: 0 }, {
|
|
2397
|
+
default: u(() => [
|
|
2398
|
+
(m(!0), k(G, null, re(O, (L) => (m(), x(te, {
|
|
2389
2399
|
key: L,
|
|
2390
2400
|
appearance: "neutral",
|
|
2391
2401
|
tooltip: L,
|
|
2392
2402
|
"truncation-tooltip": "",
|
|
2393
|
-
onClick:
|
|
2403
|
+
onClick: b[4] || (b[4] = Ne(() => {
|
|
2394
2404
|
}, ["stop"]))
|
|
2395
2405
|
}, {
|
|
2396
|
-
default:
|
|
2397
|
-
U(
|
|
2406
|
+
default: u(() => [
|
|
2407
|
+
U(H(L), 1)
|
|
2398
2408
|
]),
|
|
2399
2409
|
_: 2
|
|
2400
2410
|
}, 1032, ["tooltip"]))), 128))
|
|
2401
2411
|
]),
|
|
2402
2412
|
_: 2
|
|
2403
|
-
}, 1024)) : (m(),
|
|
2413
|
+
}, 1024)) : (m(), k("span", Zo, "-"))
|
|
2404
2414
|
]),
|
|
2405
|
-
methods:
|
|
2406
|
-
(
|
|
2407
|
-
default:
|
|
2408
|
-
(m(!0),
|
|
2415
|
+
methods: u(({ rowValue: O }) => [
|
|
2416
|
+
(O == null ? void 0 : O.length) > 0 ? (m(), x(ae, { key: 0 }, {
|
|
2417
|
+
default: u(() => [
|
|
2418
|
+
(m(!0), k(G, null, re(O, (L) => (m(), x(te, {
|
|
2409
2419
|
key: L,
|
|
2410
|
-
appearance: Object.values(
|
|
2411
|
-
onClick:
|
|
2420
|
+
appearance: Object.values(t(Ht)).includes(L.toLowerCase()) ? L.toLowerCase() : "custom",
|
|
2421
|
+
onClick: b[5] || (b[5] = Ne(() => {
|
|
2412
2422
|
}, ["stop"]))
|
|
2413
2423
|
}, {
|
|
2414
|
-
default:
|
|
2415
|
-
U(
|
|
2424
|
+
default: u(() => [
|
|
2425
|
+
U(H(L), 1)
|
|
2416
2426
|
]),
|
|
2417
2427
|
_: 2
|
|
2418
2428
|
}, 1032, ["appearance"]))), 128))
|
|
2419
2429
|
]),
|
|
2420
2430
|
_: 2
|
|
2421
|
-
}, 1024)) : (m(),
|
|
2431
|
+
}, 1024)) : (m(), k("span", es, "-"))
|
|
2422
2432
|
]),
|
|
2423
|
-
paths:
|
|
2424
|
-
(
|
|
2425
|
-
default:
|
|
2426
|
-
(m(!0),
|
|
2433
|
+
paths: u(({ rowValue: O }) => [
|
|
2434
|
+
(O == null ? void 0 : O.length) > 0 ? (m(), x(ae, { key: 0 }, {
|
|
2435
|
+
default: u(() => [
|
|
2436
|
+
(m(!0), k(G, null, re(O, (L) => (m(), x(te, {
|
|
2427
2437
|
key: L,
|
|
2428
2438
|
appearance: "neutral",
|
|
2429
2439
|
tooltip: L,
|
|
2430
2440
|
"truncation-tooltip": "",
|
|
2431
|
-
onClick:
|
|
2441
|
+
onClick: b[6] || (b[6] = Ne(() => {
|
|
2432
2442
|
}, ["stop"]))
|
|
2433
2443
|
}, {
|
|
2434
|
-
default:
|
|
2435
|
-
U(
|
|
2444
|
+
default: u(() => [
|
|
2445
|
+
U(H(L), 1)
|
|
2436
2446
|
]),
|
|
2437
2447
|
_: 2
|
|
2438
2448
|
}, 1032, ["tooltip"]))), 128))
|
|
2439
2449
|
]),
|
|
2440
2450
|
_: 2
|
|
2441
|
-
}, 1024)) : (m(),
|
|
2451
|
+
}, 1024)) : (m(), k("span", ts, "-"))
|
|
2442
2452
|
]),
|
|
2443
|
-
tags:
|
|
2444
|
-
d(
|
|
2453
|
+
tags: u(({ rowValue: O }) => [
|
|
2454
|
+
d(t(bt), { tags: O }, null, 8, ["tags"])
|
|
2445
2455
|
]),
|
|
2446
|
-
expression:
|
|
2447
|
-
|
|
2456
|
+
expression: u(({ rowValue: O }) => [
|
|
2457
|
+
w("span", os, H(O || "-"), 1)
|
|
2448
2458
|
]),
|
|
2449
|
-
created_at:
|
|
2450
|
-
U(
|
|
2459
|
+
created_at: u(({ rowValue: O }) => [
|
|
2460
|
+
U(H(t(v)(O)), 1)
|
|
2451
2461
|
]),
|
|
2452
|
-
updated_at:
|
|
2453
|
-
U(
|
|
2462
|
+
updated_at: u(({ row: O, rowValue: L }) => [
|
|
2463
|
+
U(H(t(v)(L ?? O.created_at)), 1)
|
|
2454
2464
|
]),
|
|
2455
|
-
actions:
|
|
2456
|
-
d(
|
|
2457
|
-
default:
|
|
2458
|
-
d(
|
|
2465
|
+
actions: u(({ row: O }) => [
|
|
2466
|
+
d(ce, null, {
|
|
2467
|
+
default: u(({ copyToClipboard: L }) => [
|
|
2468
|
+
d(Q, {
|
|
2459
2469
|
"data-testid": "action-entity-copy-id",
|
|
2460
|
-
onClick: (
|
|
2470
|
+
onClick: (st) => ee(O, L)
|
|
2461
2471
|
}, {
|
|
2462
|
-
default:
|
|
2463
|
-
U(
|
|
2472
|
+
default: u(() => [
|
|
2473
|
+
U(H(t(a)("actions.copy_id")), 1)
|
|
2464
2474
|
]),
|
|
2465
2475
|
_: 1
|
|
2466
2476
|
}, 8, ["onClick"])
|
|
2467
2477
|
]),
|
|
2468
2478
|
_: 2
|
|
2469
2479
|
}, 1024),
|
|
2470
|
-
d(
|
|
2471
|
-
default:
|
|
2472
|
-
d(
|
|
2480
|
+
d(ce, null, {
|
|
2481
|
+
default: u(({ copyToClipboard: L }) => [
|
|
2482
|
+
d(Q, {
|
|
2473
2483
|
"data-testid": "action-entity-copy-json",
|
|
2474
|
-
onClick: (
|
|
2484
|
+
onClick: (st) => ge(O, L)
|
|
2475
2485
|
}, {
|
|
2476
|
-
default:
|
|
2477
|
-
U(
|
|
2486
|
+
default: u(() => [
|
|
2487
|
+
U(H(t(a)("actions.copy_json")), 1)
|
|
2478
2488
|
]),
|
|
2479
2489
|
_: 1
|
|
2480
2490
|
}, 8, ["onClick"])
|
|
2481
2491
|
]),
|
|
2482
2492
|
_: 2
|
|
2483
2493
|
}, 1024),
|
|
2484
|
-
d(
|
|
2485
|
-
"auth-function": () => e.canRetrieve(
|
|
2494
|
+
d(t(ke), {
|
|
2495
|
+
"auth-function": () => e.canRetrieve(O)
|
|
2486
2496
|
}, {
|
|
2487
|
-
default:
|
|
2488
|
-
d(
|
|
2497
|
+
default: u(() => [
|
|
2498
|
+
d(Q, {
|
|
2489
2499
|
"data-testid": "action-entity-view",
|
|
2490
2500
|
"has-divider": "",
|
|
2491
|
-
item:
|
|
2501
|
+
item: fe(O.id)
|
|
2502
|
+
}, null, 8, ["item"])
|
|
2503
|
+
]),
|
|
2504
|
+
_: 2
|
|
2505
|
+
}, 1032, ["auth-function"]),
|
|
2506
|
+
d(t(ke), {
|
|
2507
|
+
"auth-function": () => e.canDebug(O)
|
|
2508
|
+
}, {
|
|
2509
|
+
default: u(() => [
|
|
2510
|
+
d(Q, {
|
|
2511
|
+
"data-testid": "action-entity-debug",
|
|
2512
|
+
item: me(O.id)
|
|
2492
2513
|
}, null, 8, ["item"])
|
|
2493
2514
|
]),
|
|
2494
2515
|
_: 2
|
|
2495
2516
|
}, 1032, ["auth-function"]),
|
|
2496
|
-
d(
|
|
2497
|
-
"auth-function": () => e.canEdit(
|
|
2517
|
+
d(t(ke), {
|
|
2518
|
+
"auth-function": () => e.canEdit(O)
|
|
2498
2519
|
}, {
|
|
2499
|
-
default:
|
|
2500
|
-
d(
|
|
2520
|
+
default: u(() => [
|
|
2521
|
+
d(Q, {
|
|
2501
2522
|
"data-testid": "action-entity-edit",
|
|
2502
|
-
item: de(
|
|
2523
|
+
item: de(O.id)
|
|
2503
2524
|
}, null, 8, ["item"])
|
|
2504
2525
|
]),
|
|
2505
2526
|
_: 2
|
|
2506
2527
|
}, 1032, ["auth-function"]),
|
|
2507
|
-
d(
|
|
2508
|
-
"auth-function": () => e.canDelete(
|
|
2528
|
+
d(t(ke), {
|
|
2529
|
+
"auth-function": () => e.canDelete(O)
|
|
2509
2530
|
}, {
|
|
2510
|
-
default:
|
|
2511
|
-
d(
|
|
2531
|
+
default: u(() => [
|
|
2532
|
+
d(Q, {
|
|
2512
2533
|
danger: "",
|
|
2513
2534
|
"data-testid": "action-entity-delete",
|
|
2514
2535
|
"has-divider": "",
|
|
2515
|
-
onClick: (L) =>
|
|
2536
|
+
onClick: (L) => De(O)
|
|
2516
2537
|
}, {
|
|
2517
|
-
default:
|
|
2518
|
-
U(
|
|
2538
|
+
default: u(() => [
|
|
2539
|
+
U(H(t(a)("actions.delete")), 1)
|
|
2519
2540
|
]),
|
|
2520
2541
|
_: 1
|
|
2521
2542
|
}, 8, ["onClick"])
|
|
@@ -2525,50 +2546,50 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
2525
2546
|
]),
|
|
2526
2547
|
_: 2
|
|
2527
2548
|
}, [
|
|
2528
|
-
!
|
|
2549
|
+
!M.value && e.config.app === "konnect" ? {
|
|
2529
2550
|
name: "empty-state",
|
|
2530
|
-
fn:
|
|
2531
|
-
var
|
|
2551
|
+
fn: u(() => {
|
|
2552
|
+
var O;
|
|
2532
2553
|
return [
|
|
2533
|
-
d(
|
|
2554
|
+
d(I, {
|
|
2534
2555
|
"data-testid": e.config.serviceId ? "nested-routes-entity-empty-state" : "routes-entity-empty-state",
|
|
2535
2556
|
"icon-background": "",
|
|
2536
|
-
message:
|
|
2537
|
-
title:
|
|
2538
|
-
},
|
|
2539
|
-
icon:
|
|
2540
|
-
d(
|
|
2557
|
+
message: t(a)("routes.list.empty_state_v2.description"),
|
|
2558
|
+
title: t(a)("routes.list.empty_state_v2.title")
|
|
2559
|
+
}, Be({
|
|
2560
|
+
icon: u(() => [
|
|
2561
|
+
d(t(kt), { decorative: "" })
|
|
2541
2562
|
]),
|
|
2542
|
-
action:
|
|
2543
|
-
|
|
2563
|
+
action: u(() => [
|
|
2564
|
+
be.value ? (m(), x(R, {
|
|
2544
2565
|
key: 0,
|
|
2545
2566
|
"data-testid": "entity-create-button",
|
|
2546
2567
|
to: e.config.createRoute
|
|
2547
2568
|
}, {
|
|
2548
|
-
default:
|
|
2549
|
-
d(
|
|
2550
|
-
U(" " +
|
|
2569
|
+
default: u(() => [
|
|
2570
|
+
d(t(Ue), { decorative: "" }),
|
|
2571
|
+
U(" " + H(t(a)("routes.list.toolbar_actions.new_route")), 1)
|
|
2551
2572
|
]),
|
|
2552
2573
|
_: 1
|
|
2553
2574
|
}, 8, ["to"])) : P("", !0),
|
|
2554
|
-
d(
|
|
2575
|
+
d(R, {
|
|
2555
2576
|
appearance: "secondary",
|
|
2556
2577
|
"data-testid": "entity-learn-more-button",
|
|
2557
|
-
onClick:
|
|
2578
|
+
onClick: b[2] || (b[2] = (L) => n.$emit("click:learn-more"))
|
|
2558
2579
|
}, {
|
|
2559
|
-
default:
|
|
2560
|
-
d(
|
|
2561
|
-
U(" " +
|
|
2580
|
+
default: u(() => [
|
|
2581
|
+
d(t(Xe), { decorative: "" }),
|
|
2582
|
+
U(" " + H(t(a)("routes.list.empty_state_v2.learn_more")), 1)
|
|
2562
2583
|
]),
|
|
2563
2584
|
_: 1
|
|
2564
2585
|
})
|
|
2565
2586
|
]),
|
|
2566
2587
|
_: 2
|
|
2567
2588
|
}, [
|
|
2568
|
-
(
|
|
2589
|
+
(O = e.config) != null && O.isControlPlaneGroup ? {
|
|
2569
2590
|
name: "default",
|
|
2570
|
-
fn:
|
|
2571
|
-
U(
|
|
2591
|
+
fn: u(() => [
|
|
2592
|
+
U(H(t(a)("routes.list.empty_state_v2.group")), 1)
|
|
2572
2593
|
]),
|
|
2573
2594
|
key: "0"
|
|
2574
2595
|
} : void 0
|
|
@@ -2578,38 +2599,38 @@ const Xe = (e) => e.routeFlavors.traditional === !0, ze = (e) => e.routeFlavors.
|
|
|
2578
2599
|
key: "0"
|
|
2579
2600
|
} : void 0
|
|
2580
2601
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "title", "title-tag", "onState"]),
|
|
2581
|
-
d(
|
|
2582
|
-
"action-pending":
|
|
2583
|
-
description:
|
|
2584
|
-
"entity-name":
|
|
2585
|
-
"entity-type":
|
|
2586
|
-
error:
|
|
2587
|
-
title:
|
|
2588
|
-
visible:
|
|
2602
|
+
d(t(_t), {
|
|
2603
|
+
"action-pending": ye.value,
|
|
2604
|
+
description: t(a)("delete.description"),
|
|
2605
|
+
"entity-name": ie.value && (ie.value.name || ie.value.id),
|
|
2606
|
+
"entity-type": t(Tt).Route,
|
|
2607
|
+
error: He.value,
|
|
2608
|
+
title: t(a)("delete.title"),
|
|
2609
|
+
visible: ue.value,
|
|
2589
2610
|
onCancel: Me,
|
|
2590
|
-
onProceed:
|
|
2611
|
+
onProceed: $e
|
|
2591
2612
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
2592
2613
|
]);
|
|
2593
2614
|
};
|
|
2594
2615
|
}
|
|
2595
|
-
}),
|
|
2616
|
+
}), fs = /* @__PURE__ */ Z(ss, [["__scopeId", "data-v-f8e2719c"]]);
|
|
2596
2617
|
export {
|
|
2597
|
-
|
|
2598
|
-
|
|
2618
|
+
Se as E,
|
|
2619
|
+
ot as H,
|
|
2599
2620
|
W as I,
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2621
|
+
Ie as M,
|
|
2622
|
+
Pe as P,
|
|
2623
|
+
ps as R,
|
|
2624
|
+
cs as _,
|
|
2625
|
+
Ko as a,
|
|
2626
|
+
fs as b,
|
|
2606
2627
|
J as c,
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2628
|
+
Lt as d,
|
|
2629
|
+
xe as e,
|
|
2630
|
+
Ft as f,
|
|
2610
2631
|
q as g,
|
|
2611
2632
|
s as h,
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2633
|
+
Je as i,
|
|
2634
|
+
qo as j,
|
|
2635
|
+
ze as s
|
|
2615
2636
|
};
|