@kong-ui-public/entities-upstreams-targets 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as ee, ref as K, computed as
|
|
1
|
+
import { defineComponent as ee, ref as K, computed as F, watch as be, renderSlot as re, createCommentVNode as J, unref as u, onBeforeMount as at, resolveComponent as j, openBlock as C, createBlock as V, createSlots as Ke, withCtx as f, createElementVNode as A, createVNode as v, createTextVNode as W, toDisplayString as S, renderList as ke, createElementBlock as E, withModifiers as ul, withDirectives as Se, vShow as Ie, Fragment as pe, normalizeClass as Ae, withKeys as Vr, useSlots as jt, useCssVars as jl, inject as Rr, onMounted as Dr, onUnmounted as zr, resolveDynamicComponent as Me, normalizeStyle as ht, normalizeProps as Jr, guardReactiveProps as Wr, mergeProps as Qr, pushScopeId as pt, popScopeId as ft, reactive as st } from "vue";
|
|
2
2
|
import cl from "axios";
|
|
3
3
|
import { createI18n as Nl, i18nTComponent as Kl } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as Yr } from "@kong/kongponents";
|
|
@@ -248,10 +248,10 @@ function ds(e, a, t, l = {
|
|
|
248
248
|
headers: e.requestHeaders
|
|
249
249
|
}), { i18n: { t: i } } = Pt(), { debounce: s } = Gr(), c = s(async (H) => {
|
|
250
250
|
await R(H);
|
|
251
|
-
}, 200), o = K(!1), d = K(""), h = K(""), p = K([]), m = K([]), n = K(void 0),
|
|
252
|
-
let w = `${e.apiBaseUrl}${
|
|
251
|
+
}, 200), o = K(!1), d = K(""), h = K(""), p = K([]), m = K([]), n = K(void 0), q = u(a);
|
|
252
|
+
let w = `${e.apiBaseUrl}${q}`;
|
|
253
253
|
e.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
254
|
-
const { isValidUuid:
|
|
254
|
+
const { isValidUuid: y } = El(), $ = async () => {
|
|
255
255
|
try {
|
|
256
256
|
o.value = !0;
|
|
257
257
|
const { data: H } = await r.get(`${w}?size=${t}`);
|
|
@@ -262,7 +262,7 @@ function ds(e, a, t, l = {
|
|
|
262
262
|
o.value = !1;
|
|
263
263
|
}
|
|
264
264
|
}, N = K(""), R = async (H) => {
|
|
265
|
-
var I, g,
|
|
265
|
+
var I, g, O;
|
|
266
266
|
if (N.value !== H)
|
|
267
267
|
if (N.value = H || "", n.value === void 0)
|
|
268
268
|
try {
|
|
@@ -273,7 +273,7 @@ function ds(e, a, t, l = {
|
|
|
273
273
|
l.fetchedItemsKey in T ? p.value = T[l.fetchedItemsKey] : T != null && T.id ? p.value = [T] : p.value = [];
|
|
274
274
|
} else if (H) {
|
|
275
275
|
const U = [];
|
|
276
|
-
|
|
276
|
+
y(H) && l.searchKeys.includes("id") ? U.push((async () => {
|
|
277
277
|
const { data: x } = await r.get(`${w}/${H}`);
|
|
278
278
|
return [x[l.fetchedItemsKey] ?? x];
|
|
279
279
|
})()) : U.push(
|
|
@@ -297,7 +297,7 @@ function ds(e, a, t, l = {
|
|
|
297
297
|
o.value = !1;
|
|
298
298
|
}
|
|
299
299
|
else
|
|
300
|
-
o.value = !0, h.value = "", H ? (p.value = (
|
|
300
|
+
o.value = !0, h.value = "", H ? (p.value = (O = n.value) == null ? void 0 : O.filter((U) => {
|
|
301
301
|
var T;
|
|
302
302
|
let P = !1;
|
|
303
303
|
for (const x of l.searchKeys) {
|
|
@@ -318,7 +318,7 @@ function ds(e, a, t, l = {
|
|
|
318
318
|
};
|
|
319
319
|
}
|
|
320
320
|
function hs(e, a) {
|
|
321
|
-
const t = u(a), l =
|
|
321
|
+
const t = u(a), l = F(
|
|
322
322
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
323
323
|
);
|
|
324
324
|
return l.value.search = "", (r) => `${l.value.href}/${r}`;
|
|
@@ -365,17 +365,17 @@ function fs(e) {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
function Pl(e, a) {
|
|
368
|
-
const t = K(u(e)), l = K(u(a)), r =
|
|
368
|
+
const t = K(u(e)), l = K(u(a)), r = F(
|
|
369
369
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
370
|
-
), i =
|
|
370
|
+
), i = F(
|
|
371
371
|
() => l.value.startsWith("/") ? new URL(`${window.location.origin}${l.value}`) : new URL(l.value)
|
|
372
372
|
);
|
|
373
373
|
return (s) => {
|
|
374
374
|
const { page: c, pageSize: o, offset: d, sortColumnKey: h, sortColumnOrder: p, query: m } = s;
|
|
375
375
|
try {
|
|
376
376
|
let n = new URL(i.value.href);
|
|
377
|
-
return r.value && m ? (n.search = "", n = t.value.isExactMatch ? new URL(`${n.href}/${m}/`) : new URL(`${n.href}?filter[name][contains]=${m}`)) : (r.value || new URLSearchParams(m).forEach((
|
|
378
|
-
n.searchParams.append(w,
|
|
377
|
+
return r.value && m ? (n.search = "", n = t.value.isExactMatch ? new URL(`${n.href}/${m}/`) : new URL(`${n.href}?filter[name][contains]=${m}`)) : (r.value || new URLSearchParams(m).forEach((q, w) => {
|
|
378
|
+
n.searchParams.append(w, q);
|
|
379
379
|
}), h && n.searchParams.append("sort_by", h), p === "desc" && n.searchParams.append("sort_desc", "1"), n.searchParams.append("size", String(o))), d && c !== 1 && n.searchParams.append("offset", String(d)), n.href;
|
|
380
380
|
} catch (n) {
|
|
381
381
|
return console.error("RouteList(fetcher)", n), l.value;
|
|
@@ -383,48 +383,54 @@ function Pl(e, a) {
|
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
385
|
function ms(e, a, t = "data") {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
386
|
+
var l;
|
|
387
|
+
const r = u(a), { axiosInstance: i } = Et({
|
|
388
|
+
...e.axiosRequestConfig,
|
|
389
|
+
headers: { ...(l = e.axiosRequestConfig) == null ? void 0 : l.headers, ...e.requestHeaders }
|
|
390
|
+
}), s = Pl(e, r), c = K({
|
|
389
391
|
status: Oe.Idle
|
|
390
392
|
});
|
|
391
|
-
return { fetcher: async (
|
|
393
|
+
return { fetcher: async (o) => {
|
|
394
|
+
var d;
|
|
392
395
|
try {
|
|
393
|
-
|
|
394
|
-
let
|
|
395
|
-
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
const m =
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
396
|
+
c.value = { status: Oe.Loading };
|
|
397
|
+
let h = s(o);
|
|
398
|
+
h.includes("filter[name]") && (h = `${h}&page[size]=${o.pageSize}&page[number]=${o.page}`);
|
|
399
|
+
const p = await i.get(h);
|
|
400
|
+
if (p.status >= 400)
|
|
401
|
+
throw p;
|
|
402
|
+
const m = p.data, n = t && t.replace(/[^\w-_]/gi, "");
|
|
403
|
+
let q;
|
|
404
|
+
m[n] && Array.isArray(m[n]) ? q = m[n] : Array.isArray(m) ? q = m : q = Object.keys(m).length ? [m] : [];
|
|
405
|
+
const w = {
|
|
406
|
+
data: q,
|
|
407
|
+
total: q.length,
|
|
408
|
+
...m.offset ? {
|
|
403
409
|
pagination: {
|
|
404
|
-
offset:
|
|
410
|
+
offset: m.offset
|
|
405
411
|
}
|
|
406
412
|
} : null
|
|
407
413
|
};
|
|
408
|
-
return
|
|
414
|
+
return c.value = {
|
|
409
415
|
status: Oe.Idle,
|
|
410
|
-
response:
|
|
411
|
-
},
|
|
412
|
-
} catch (
|
|
413
|
-
const
|
|
416
|
+
response: w
|
|
417
|
+
}, w;
|
|
418
|
+
} catch (h) {
|
|
419
|
+
const p = {
|
|
414
420
|
data: [],
|
|
415
421
|
total: 0
|
|
416
422
|
};
|
|
417
|
-
return
|
|
423
|
+
return o.query && (((d = h.response) == null ? void 0 : d.status) === 404 || h.status === 404) ? (c.value = {
|
|
418
424
|
status: Oe.NoResults,
|
|
419
|
-
response:
|
|
420
|
-
error:
|
|
421
|
-
},
|
|
425
|
+
response: p,
|
|
426
|
+
error: h.response ? h : { response: h }
|
|
427
|
+
}, p) : (c.value = {
|
|
422
428
|
status: Oe.Error,
|
|
423
|
-
response:
|
|
424
|
-
error:
|
|
425
|
-
},
|
|
429
|
+
response: p,
|
|
430
|
+
error: h.response ? h : { response: h }
|
|
431
|
+
}, p);
|
|
426
432
|
}
|
|
427
|
-
}, fetcherState:
|
|
433
|
+
}, fetcherState: c };
|
|
428
434
|
}
|
|
429
435
|
function gs() {
|
|
430
436
|
const e = (t, l = "_") => t ? t.split(l).map((r) => r.toLowerCase() === "id" ? r.toUpperCase() : r.charAt(0).toUpperCase() + r.substring(1)).join(" ") : "", a = /(?:^|[\s-:'"])\w/g;
|
|
@@ -443,14 +449,14 @@ const Bl = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
443
449
|
}, hl = (e) => e === "*" || e === "x" || e === "X", pl = (e) => {
|
|
444
450
|
const a = parseInt(e, 10);
|
|
445
451
|
return isNaN(a) ? e : a;
|
|
446
|
-
},
|
|
452
|
+
}, ys = (e, a) => typeof e != typeof a ? [String(e), String(a)] : [e, a], vs = (e, a) => {
|
|
447
453
|
if (hl(e) || hl(a))
|
|
448
454
|
return 0;
|
|
449
|
-
const [t, l] =
|
|
455
|
+
const [t, l] = ys(pl(e), pl(a));
|
|
450
456
|
return t > l ? 1 : t < l ? -1 : 0;
|
|
451
457
|
}, fl = (e, a) => {
|
|
452
458
|
for (let t = 0; t < Math.max(e.length, a.length); t++) {
|
|
453
|
-
const l =
|
|
459
|
+
const l = vs(e[t] || "0", a[t] || "0");
|
|
454
460
|
if (l !== 0)
|
|
455
461
|
return l;
|
|
456
462
|
}
|
|
@@ -493,7 +499,7 @@ function ws(e) {
|
|
|
493
499
|
return be(e, (r) => {
|
|
494
500
|
r && !l.value && (a.value = r.offsetWidth, t.value = r.scrollWidth, l.value = !0);
|
|
495
501
|
}), {
|
|
496
|
-
isTruncated:
|
|
502
|
+
isTruncated: F(() => a.value < t.value)
|
|
497
503
|
};
|
|
498
504
|
}
|
|
499
505
|
const de = {
|
|
@@ -529,10 +535,10 @@ const de = {
|
|
|
529
535
|
}
|
|
530
536
|
},
|
|
531
537
|
setup(e) {
|
|
532
|
-
const a = e, { i18n: { t } } = de.useI18n(), { convertKeyToTitle: l } = de.useStringHelpers(), r =
|
|
538
|
+
const a = e, { i18n: { t } } = de.useI18n(), { convertKeyToTitle: l } = de.useStringHelpers(), r = F(() => a.item.key ?? "json-array-item"), i = F(() => a.item.value ?? a.item), s = F(() => {
|
|
533
539
|
const o = JSON.parse(JSON.stringify(i.value));
|
|
534
540
|
return a.isArrayItem && delete o.name, o;
|
|
535
|
-
}), c =
|
|
541
|
+
}), c = F(() => {
|
|
536
542
|
var o;
|
|
537
543
|
return a.isArrayItem ? (o = i.value) != null && o.name ? l(i.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: a.index }) : "";
|
|
538
544
|
});
|
|
@@ -574,7 +580,7 @@ const de = {
|
|
|
574
580
|
return (t, l) => {
|
|
575
581
|
const r = j("KButton");
|
|
576
582
|
return C(), E("div", null, [
|
|
577
|
-
|
|
583
|
+
v(r, {
|
|
578
584
|
appearance: "tertiary",
|
|
579
585
|
class: "navigation-button",
|
|
580
586
|
onClick: l[0] || (l[0] = (i) => t.$emit("navigation-click", e.item))
|
|
@@ -632,13 +638,13 @@ const de = {
|
|
|
632
638
|
},
|
|
633
639
|
emits: ["navigation-click"],
|
|
634
640
|
setup(e, { emit: a }) {
|
|
635
|
-
jl((
|
|
641
|
+
jl((q) => ({
|
|
636
642
|
"07753575": h.value ? "none" : `solid ${u(Us)} ${u(qs)}`,
|
|
637
643
|
"32d44ea8": d.value && c.value ? "block" : "flex",
|
|
638
644
|
"5036b738": d.value && c.value ? "100%" : t.slim ? "50%" : "25%",
|
|
639
645
|
"5038fd13": d.value && c.value ? "100%" : t.slim ? "50%" : "75%"
|
|
640
646
|
}));
|
|
641
|
-
const t = e, l = a, r = jt(), { i18n: { t: i, formatUnixTimeStamp: s } } = de.useI18n(), c =
|
|
647
|
+
const t = e, l = a, r = jt(), { i18n: { t: i, formatUnixTimeStamp: s } } = de.useI18n(), c = F(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), o = F(() => !!(t.item.tooltip || r["label-tooltip"])), d = F(() => t.item.type === le.Json || t.item.type === le.JsonArray), h = F(() => t.item.type === le.JsonArray), p = F(() => {
|
|
642
648
|
switch (t.item.type) {
|
|
643
649
|
case le.ID:
|
|
644
650
|
return {
|
|
@@ -708,8 +714,8 @@ const de = {
|
|
|
708
714
|
attrs: {
|
|
709
715
|
"data-testid": `${t.item.key}-internal-link`,
|
|
710
716
|
item: t.item,
|
|
711
|
-
onNavigationClick: (
|
|
712
|
-
l("navigation-click",
|
|
717
|
+
onNavigationClick: (q) => {
|
|
718
|
+
l("navigation-click", q);
|
|
713
719
|
}
|
|
714
720
|
}
|
|
715
721
|
};
|
|
@@ -749,15 +755,15 @@ const de = {
|
|
|
749
755
|
};
|
|
750
756
|
}
|
|
751
757
|
}), m = K(), { isTruncated: n } = de.useTruncationDetector(m);
|
|
752
|
-
return (
|
|
753
|
-
const
|
|
758
|
+
return (q, w) => {
|
|
759
|
+
const y = j("KLabel"), $ = j("KBadge"), N = j("KCopy"), R = j("KTooltip");
|
|
754
760
|
return C(), E("div", Ms, [
|
|
755
761
|
A("div", {
|
|
756
762
|
class: "config-card-details-label",
|
|
757
763
|
"data-testid": `${e.item.key}-label`
|
|
758
764
|
}, [
|
|
759
|
-
re(
|
|
760
|
-
y
|
|
765
|
+
re(q.$slots, "label", { item: e.item }, () => [
|
|
766
|
+
v(y, { "tooltip-attributes": { maxWidth: "500px" } }, Ke({
|
|
761
767
|
default: f(() => [
|
|
762
768
|
W(S(e.item.label) + " ", 1)
|
|
763
769
|
]),
|
|
@@ -769,7 +775,7 @@ const de = {
|
|
|
769
775
|
A("div", {
|
|
770
776
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
771
777
|
}, [
|
|
772
|
-
re(
|
|
778
|
+
re(q.$slots, "label-tooltip", {}, () => [
|
|
773
779
|
W(S(e.item.tooltip), 1)
|
|
774
780
|
], !0)
|
|
775
781
|
], 8, Ns)
|
|
@@ -783,7 +789,7 @@ const de = {
|
|
|
783
789
|
class: "config-card-details-value",
|
|
784
790
|
"data-testid": `${e.item.key}-property-value`
|
|
785
791
|
}, [
|
|
786
|
-
re(
|
|
792
|
+
re(q.$slots, e.item.key, {
|
|
787
793
|
rowValue: e.item.value
|
|
788
794
|
}, () => [
|
|
789
795
|
c.value ? (C(), E("div", Ps, [
|
|
@@ -902,7 +908,7 @@ const de = {
|
|
|
902
908
|
jl((r) => ({
|
|
903
909
|
"954d3eca": `${l.value}ch`
|
|
904
910
|
}));
|
|
905
|
-
const a = e, t =
|
|
911
|
+
const a = e, t = F(() => a.jsonRecord), l = F(() => {
|
|
906
912
|
var r;
|
|
907
913
|
if (!a.fetcherUrl)
|
|
908
914
|
return 0;
|
|
@@ -913,7 +919,7 @@ const de = {
|
|
|
913
919
|
const s = j("KBadge"), c = j("KCodeBlock");
|
|
914
920
|
return C(), E("div", Js, [
|
|
915
921
|
a.fetcherUrl ? (C(), E("div", Ws, [
|
|
916
|
-
|
|
922
|
+
v(s, {
|
|
917
923
|
appearance: a.requestMethod
|
|
918
924
|
}, {
|
|
919
925
|
default: f(() => [
|
|
@@ -921,7 +927,7 @@ const de = {
|
|
|
921
927
|
]),
|
|
922
928
|
_: 1
|
|
923
929
|
}, 8, ["appearance"]),
|
|
924
|
-
|
|
930
|
+
v(c, {
|
|
925
931
|
id: "json-endpoint-codeblock",
|
|
926
932
|
code: a.fetcherUrl,
|
|
927
933
|
"is-single-line": "",
|
|
@@ -989,7 +995,7 @@ Ze.prototype.constructor = Ze;
|
|
|
989
995
|
Ze.prototype.toString = function(e) {
|
|
990
996
|
return this.name + ": " + Jl(this, e);
|
|
991
997
|
};
|
|
992
|
-
var
|
|
998
|
+
var ye = Ze;
|
|
993
999
|
function _t(e, a, t, l, r) {
|
|
994
1000
|
var i = "", s = "", c = Math.floor(r / 2) - 1;
|
|
995
1001
|
return l - a > c && (i = " ... ", a = l - c + i.length), t - l > c && (s = " ...", t = l + c - s.length), {
|
|
@@ -1058,16 +1064,16 @@ function ci(e) {
|
|
|
1058
1064
|
function di(e, a) {
|
|
1059
1065
|
if (a = a || {}, Object.keys(a).forEach(function(t) {
|
|
1060
1066
|
if (oi.indexOf(t) === -1)
|
|
1061
|
-
throw new
|
|
1067
|
+
throw new ye('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1062
1068
|
}), this.options = a, this.tag = e, this.kind = a.kind || null, this.resolve = a.resolve || function() {
|
|
1063
1069
|
return !0;
|
|
1064
1070
|
}, this.construct = a.construct || function(t) {
|
|
1065
1071
|
return t;
|
|
1066
1072
|
}, this.instanceOf = a.instanceOf || null, this.predicate = a.predicate || null, this.represent = a.represent || null, this.representName = a.representName || null, this.defaultStyle = a.defaultStyle || null, this.multi = a.multi || !1, this.styleAliases = ci(a.styleAliases || null), ui.indexOf(this.kind) === -1)
|
|
1067
|
-
throw new
|
|
1073
|
+
throw new ye('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1068
1074
|
}
|
|
1069
1075
|
var fe = di;
|
|
1070
|
-
function
|
|
1076
|
+
function yl(e, a) {
|
|
1071
1077
|
var t = [];
|
|
1072
1078
|
return e[a].forEach(function(l) {
|
|
1073
1079
|
var r = t.length;
|
|
@@ -1108,20 +1114,20 @@ It.prototype.extend = function(e) {
|
|
|
1108
1114
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
1109
1115
|
e.implicit && (a = a.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
1110
1116
|
else
|
|
1111
|
-
throw new
|
|
1117
|
+
throw new ye("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1112
1118
|
a.forEach(function(r) {
|
|
1113
1119
|
if (!(r instanceof fe))
|
|
1114
|
-
throw new
|
|
1120
|
+
throw new ye("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1115
1121
|
if (r.loadKind && r.loadKind !== "scalar")
|
|
1116
|
-
throw new
|
|
1122
|
+
throw new ye("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1117
1123
|
if (r.multi)
|
|
1118
|
-
throw new
|
|
1124
|
+
throw new ye("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1119
1125
|
}), t.forEach(function(r) {
|
|
1120
1126
|
if (!(r instanceof fe))
|
|
1121
|
-
throw new
|
|
1127
|
+
throw new ye("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1122
1128
|
});
|
|
1123
1129
|
var l = Object.create(It.prototype);
|
|
1124
|
-
return l.implicit = (this.implicit || []).concat(a), l.explicit = (this.explicit || []).concat(t), l.compiledImplicit =
|
|
1130
|
+
return l.implicit = (this.implicit || []).concat(a), l.explicit = (this.explicit || []).concat(t), l.compiledImplicit = yl(l, "implicit"), l.compiledExplicit = yl(l, "explicit"), l.compiledTypeMap = hi(l.compiledImplicit, l.compiledExplicit), l;
|
|
1125
1131
|
};
|
|
1126
1132
|
var Wl = It, Ql = new fe("tag:yaml.org,2002:str", {
|
|
1127
1133
|
kind: "scalar",
|
|
@@ -1187,17 +1193,17 @@ function gi(e) {
|
|
|
1187
1193
|
var a = e.length;
|
|
1188
1194
|
return a === 4 && (e === "true" || e === "True" || e === "TRUE") || a === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1189
1195
|
}
|
|
1190
|
-
function
|
|
1196
|
+
function yi(e) {
|
|
1191
1197
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1192
1198
|
}
|
|
1193
|
-
function
|
|
1199
|
+
function vi(e) {
|
|
1194
1200
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1195
1201
|
}
|
|
1196
1202
|
var er = new fe("tag:yaml.org,2002:bool", {
|
|
1197
1203
|
kind: "scalar",
|
|
1198
1204
|
resolve: gi,
|
|
1199
|
-
construct:
|
|
1200
|
-
predicate:
|
|
1205
|
+
construct: yi,
|
|
1206
|
+
predicate: vi,
|
|
1201
1207
|
represent: {
|
|
1202
1208
|
lowercase: function(e) {
|
|
1203
1209
|
return e ? "true" : "false";
|
|
@@ -1529,7 +1535,7 @@ var hr = new fe("tag:yaml.org,2002:set", {
|
|
|
1529
1535
|
dr,
|
|
1530
1536
|
hr
|
|
1531
1537
|
]
|
|
1532
|
-
}), Ue = Object.prototype.hasOwnProperty, it = 1, pr = 2, fr = 3, nt = 4, St = 1, Qi = 2,
|
|
1538
|
+
}), Ue = Object.prototype.hasOwnProperty, it = 1, pr = 2, fr = 3, nt = 4, St = 1, Qi = 2, vl = 3, Yi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Zi = /[\x85\u2028\u2029]/, Gi = /[,\[\]\{\}]/, mr = /^(?:!|!!|![a-z\-]+!)$/i, gr = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1533
1539
|
function bl(e) {
|
|
1534
1540
|
return Object.prototype.toString.call(e);
|
|
1535
1541
|
}
|
|
@@ -1539,7 +1545,7 @@ function we(e) {
|
|
|
1539
1545
|
function Ne(e) {
|
|
1540
1546
|
return e === 9 || e === 32;
|
|
1541
1547
|
}
|
|
1542
|
-
function
|
|
1548
|
+
function ve(e) {
|
|
1543
1549
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1544
1550
|
}
|
|
1545
1551
|
function Re(e) {
|
|
@@ -1565,9 +1571,9 @@ function an(e) {
|
|
|
1565
1571
|
(e - 65536 & 1023) + 56320
|
|
1566
1572
|
);
|
|
1567
1573
|
}
|
|
1568
|
-
var
|
|
1574
|
+
var yr = new Array(256), vr = new Array(256);
|
|
1569
1575
|
for (var Pe = 0; Pe < 256; Pe++)
|
|
1570
|
-
|
|
1576
|
+
yr[Pe] = kl(Pe) ? 1 : 0, vr[Pe] = kl(Pe);
|
|
1571
1577
|
function ln(e, a) {
|
|
1572
1578
|
this.input = e, this.filename = a.filename || null, this.schema = a.schema || Lt, this.onWarning = a.onWarning || null, this.legacy = a.legacy || !1, this.json = a.json || !1, this.listener = a.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1573
1579
|
}
|
|
@@ -1580,7 +1586,7 @@ function br(e, a) {
|
|
|
1580
1586
|
line: e.line,
|
|
1581
1587
|
column: e.position - e.lineStart
|
|
1582
1588
|
};
|
|
1583
|
-
return t.snippet = ni(t), new
|
|
1589
|
+
return t.snippet = ni(t), new ye(a, t);
|
|
1584
1590
|
}
|
|
1585
1591
|
function L(e, a) {
|
|
1586
1592
|
throw br(e, a);
|
|
@@ -1662,7 +1668,7 @@ function oe(e, a, t) {
|
|
|
1662
1668
|
}
|
|
1663
1669
|
function mt(e) {
|
|
1664
1670
|
var a = e.position, t;
|
|
1665
|
-
return t = e.input.charCodeAt(a), !!((t === 45 || t === 46) && t === e.input.charCodeAt(a + 1) && t === e.input.charCodeAt(a + 2) && (a += 3, t = e.input.charCodeAt(a), t === 0 ||
|
|
1671
|
+
return t = e.input.charCodeAt(a), !!((t === 45 || t === 46) && t === e.input.charCodeAt(a + 1) && t === e.input.charCodeAt(a + 2) && (a += 3, t = e.input.charCodeAt(a), t === 0 || ve(t)));
|
|
1666
1672
|
}
|
|
1667
1673
|
function Rt(e, a) {
|
|
1668
1674
|
a === 1 ? e.result += " " : a > 1 && (e.result += ce.repeat(`
|
|
@@ -1670,14 +1676,14 @@ function Rt(e, a) {
|
|
|
1670
1676
|
}
|
|
1671
1677
|
function rn(e, a, t) {
|
|
1672
1678
|
var l, r, i, s, c, o, d, h, p = e.kind, m = e.result, n;
|
|
1673
|
-
if (n = e.input.charCodeAt(e.position),
|
|
1679
|
+
if (n = e.input.charCodeAt(e.position), ve(n) || Re(n) || n === 35 || n === 38 || n === 42 || n === 33 || n === 124 || n === 62 || n === 39 || n === 34 || n === 37 || n === 64 || n === 96 || (n === 63 || n === 45) && (r = e.input.charCodeAt(e.position + 1), ve(r) || t && Re(r)))
|
|
1674
1680
|
return !1;
|
|
1675
1681
|
for (e.kind = "scalar", e.result = "", i = s = e.position, c = !1; n !== 0; ) {
|
|
1676
1682
|
if (n === 58) {
|
|
1677
|
-
if (r = e.input.charCodeAt(e.position + 1),
|
|
1683
|
+
if (r = e.input.charCodeAt(e.position + 1), ve(r) || t && Re(r))
|
|
1678
1684
|
break;
|
|
1679
1685
|
} else if (n === 35) {
|
|
1680
|
-
if (l = e.input.charCodeAt(e.position - 1),
|
|
1686
|
+
if (l = e.input.charCodeAt(e.position - 1), ve(l))
|
|
1681
1687
|
break;
|
|
1682
1688
|
} else {
|
|
1683
1689
|
if (e.position === e.lineStart && mt(e) || t && Re(n))
|
|
@@ -1719,8 +1725,8 @@ function nn(e, a) {
|
|
|
1719
1725
|
if (c === 92) {
|
|
1720
1726
|
if (Fe(e, t, e.position, !0), c = e.input.charCodeAt(++e.position), we(c))
|
|
1721
1727
|
oe(e, !1, a);
|
|
1722
|
-
else if (c < 256 &&
|
|
1723
|
-
e.result +=
|
|
1728
|
+
else if (c < 256 && yr[c])
|
|
1729
|
+
e.result += vr[c], e.position++;
|
|
1724
1730
|
else if ((s = en(c)) > 0) {
|
|
1725
1731
|
for (r = s, i = 0; r > 0; r--)
|
|
1726
1732
|
c = e.input.charCodeAt(++e.position), (s = Xi(c)) >= 0 ? i = (i << 4) + s : L(e, "expected hexadecimal character");
|
|
@@ -1734,7 +1740,7 @@ function nn(e, a) {
|
|
|
1734
1740
|
L(e, "unexpected end of the stream within a double quoted scalar");
|
|
1735
1741
|
}
|
|
1736
1742
|
function on(e, a) {
|
|
1737
|
-
var t = !0, l, r, i, s = e.tag, c, o = e.anchor, d, h, p, m, n,
|
|
1743
|
+
var t = !0, l, r, i, s = e.tag, c, o = e.anchor, d, h, p, m, n, q = /* @__PURE__ */ Object.create(null), w, y, $, N;
|
|
1738
1744
|
if (N = e.input.charCodeAt(e.position), N === 91)
|
|
1739
1745
|
h = 93, n = !1, c = [];
|
|
1740
1746
|
else if (N === 123)
|
|
@@ -1744,7 +1750,7 @@ function on(e, a) {
|
|
|
1744
1750
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), N = e.input.charCodeAt(++e.position); N !== 0; ) {
|
|
1745
1751
|
if (oe(e, !0, a), N = e.input.charCodeAt(e.position), N === h)
|
|
1746
1752
|
return e.position++, e.tag = s, e.anchor = o, e.kind = n ? "mapping" : "sequence", e.result = c, !0;
|
|
1747
|
-
t ? N === 44 && L(e, "expected the node content, but found ','") : L(e, "missed comma between flow collection entries"),
|
|
1753
|
+
t ? N === 44 && L(e, "expected the node content, but found ','") : L(e, "missed comma between flow collection entries"), y = w = $ = null, p = m = !1, N === 63 && (d = e.input.charCodeAt(e.position + 1), ve(d) && (p = m = !0, e.position++, oe(e, !0, a))), l = e.line, r = e.lineStart, i = e.position, We(e, a, it, !1, !0), y = e.tag, w = e.result, oe(e, !0, a), N = e.input.charCodeAt(e.position), (m || e.line === l) && N === 58 && (p = !0, N = e.input.charCodeAt(++e.position), oe(e, !0, a), We(e, a, it, !1, !0), $ = e.result), n ? De(e, c, q, y, w, $, l, r, i) : p ? c.push(De(e, null, q, y, w, $, l, r, i)) : c.push(w), oe(e, !0, a), N = e.input.charCodeAt(e.position), N === 44 ? (t = !0, N = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1748
1754
|
}
|
|
1749
1755
|
L(e, "unexpected end of the stream within a flow collection");
|
|
1750
1756
|
}
|
|
@@ -1758,7 +1764,7 @@ function un(e, a) {
|
|
|
1758
1764
|
return !1;
|
|
1759
1765
|
for (e.kind = "scalar", e.result = ""; p !== 0; )
|
|
1760
1766
|
if (p = e.input.charCodeAt(++e.position), p === 43 || p === 45)
|
|
1761
|
-
St === r ? r = p === 43 ?
|
|
1767
|
+
St === r ? r = p === 43 ? vl : Qi : L(e, "repeat of a chomping mode identifier");
|
|
1762
1768
|
else if ((h = tn(p)) >= 0)
|
|
1763
1769
|
h === 0 ? L(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : s ? L(e, "repeat of an indentation width identifier") : (c = a + h - 1, s = !0);
|
|
1764
1770
|
else
|
|
@@ -1780,7 +1786,7 @@ function un(e, a) {
|
|
|
1780
1786
|
continue;
|
|
1781
1787
|
}
|
|
1782
1788
|
if (e.lineIndent < c) {
|
|
1783
|
-
r ===
|
|
1789
|
+
r === vl ? e.result += ce.repeat(`
|
|
1784
1790
|
`, i ? 1 + o : o) : r === St && i && (e.result += `
|
|
1785
1791
|
`);
|
|
1786
1792
|
break;
|
|
@@ -1799,7 +1805,7 @@ function wl(e, a) {
|
|
|
1799
1805
|
var t, l = e.tag, r = e.anchor, i = [], s, c = !1, o;
|
|
1800
1806
|
if (e.firstTabInLine !== -1)
|
|
1801
1807
|
return !1;
|
|
1802
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), o = e.input.charCodeAt(e.position); o !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, L(e, "tab characters must not be used in indentation")), !(o !== 45 || (s = e.input.charCodeAt(e.position + 1), !
|
|
1808
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), o = e.input.charCodeAt(e.position); o !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, L(e, "tab characters must not be used in indentation")), !(o !== 45 || (s = e.input.charCodeAt(e.position + 1), !ve(s)))); ) {
|
|
1803
1809
|
if (c = !0, e.position++, oe(e, !0, -1) && e.lineIndent <= a) {
|
|
1804
1810
|
i.push(null), o = e.input.charCodeAt(e.position);
|
|
1805
1811
|
continue;
|
|
@@ -1812,12 +1818,12 @@ function wl(e, a) {
|
|
|
1812
1818
|
return c ? (e.tag = l, e.anchor = r, e.kind = "sequence", e.result = i, !0) : !1;
|
|
1813
1819
|
}
|
|
1814
1820
|
function cn(e, a, t) {
|
|
1815
|
-
var l, r, i, s, c, o, d = e.tag, h = e.anchor, p = {}, m = /* @__PURE__ */ Object.create(null), n = null,
|
|
1821
|
+
var l, r, i, s, c, o, d = e.tag, h = e.anchor, p = {}, m = /* @__PURE__ */ Object.create(null), n = null, q = null, w = null, y = !1, $ = !1, N;
|
|
1816
1822
|
if (e.firstTabInLine !== -1)
|
|
1817
1823
|
return !1;
|
|
1818
1824
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = p), N = e.input.charCodeAt(e.position); N !== 0; ) {
|
|
1819
|
-
if (!
|
|
1820
|
-
N === 63 ? (
|
|
1825
|
+
if (!y && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, L(e, "tab characters must not be used in indentation")), l = e.input.charCodeAt(e.position + 1), i = e.line, (N === 63 || N === 58) && ve(l))
|
|
1826
|
+
N === 63 ? (y && (De(e, p, m, n, q, null, s, c, o), n = q = w = null), $ = !0, y = !0, r = !0) : y ? (y = !1, r = !0) : L(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, N = l;
|
|
1821
1827
|
else {
|
|
1822
1828
|
if (s = e.line, c = e.lineStart, o = e.position, !We(e, t, pr, !1, !0))
|
|
1823
1829
|
break;
|
|
@@ -1825,7 +1831,7 @@ function cn(e, a, t) {
|
|
|
1825
1831
|
for (N = e.input.charCodeAt(e.position); Ne(N); )
|
|
1826
1832
|
N = e.input.charCodeAt(++e.position);
|
|
1827
1833
|
if (N === 58)
|
|
1828
|
-
N = e.input.charCodeAt(++e.position),
|
|
1834
|
+
N = e.input.charCodeAt(++e.position), ve(N) || L(e, "a whitespace character is expected after the key-value separator within a block mapping"), y && (De(e, p, m, n, q, null, s, c, o), n = q = w = null), $ = !0, y = !1, r = !1, n = e.tag, q = e.result;
|
|
1829
1835
|
else if ($)
|
|
1830
1836
|
L(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1831
1837
|
else
|
|
@@ -1835,12 +1841,12 @@ function cn(e, a, t) {
|
|
|
1835
1841
|
else
|
|
1836
1842
|
return e.tag = d, e.anchor = h, !0;
|
|
1837
1843
|
}
|
|
1838
|
-
if ((e.line === i || e.lineIndent > a) && (
|
|
1844
|
+
if ((e.line === i || e.lineIndent > a) && (y && (s = e.line, c = e.lineStart, o = e.position), We(e, a, nt, !0, r) && (y ? q = e.result : w = e.result), y || (De(e, p, m, n, q, w, s, c, o), n = q = w = null), oe(e, !0, -1), N = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > a) && N !== 0)
|
|
1839
1845
|
L(e, "bad indentation of a mapping entry");
|
|
1840
1846
|
else if (e.lineIndent < a)
|
|
1841
1847
|
break;
|
|
1842
1848
|
}
|
|
1843
|
-
return
|
|
1849
|
+
return y && De(e, p, m, n, q, null, s, c, o), $ && (e.tag = d, e.anchor = h, e.kind = "mapping", e.result = p), $;
|
|
1844
1850
|
}
|
|
1845
1851
|
function dn(e) {
|
|
1846
1852
|
var a, t = !1, l = !1, r, i, s;
|
|
@@ -1852,7 +1858,7 @@ function dn(e) {
|
|
|
1852
1858
|
while (s !== 0 && s !== 62);
|
|
1853
1859
|
e.position < e.length ? (i = e.input.slice(a, e.position), s = e.input.charCodeAt(++e.position)) : L(e, "unexpected end of the stream within a verbatim tag");
|
|
1854
1860
|
} else {
|
|
1855
|
-
for (; s !== 0 && !
|
|
1861
|
+
for (; s !== 0 && !ve(s); )
|
|
1856
1862
|
s === 33 && (l ? L(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(a - 1, e.position + 1), mr.test(r) || L(e, "named tag handle cannot contain such characters"), l = !0, a = e.position + 1)), s = e.input.charCodeAt(++e.position);
|
|
1857
1863
|
i = e.input.slice(a, e.position), Gi.test(i) && L(e, "tag suffix cannot contain flow indicator characters");
|
|
1858
1864
|
}
|
|
@@ -1868,7 +1874,7 @@ function hn(e) {
|
|
|
1868
1874
|
var a, t;
|
|
1869
1875
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
1870
1876
|
return !1;
|
|
1871
|
-
for (e.anchor !== null && L(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), a = e.position; t !== 0 && !
|
|
1877
|
+
for (e.anchor !== null && L(e, "duplication of an anchor property"), t = e.input.charCodeAt(++e.position), a = e.position; t !== 0 && !ve(t) && !Re(t); )
|
|
1872
1878
|
t = e.input.charCodeAt(++e.position);
|
|
1873
1879
|
return e.position === a && L(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(a, e.position), !0;
|
|
1874
1880
|
}
|
|
@@ -1876,40 +1882,40 @@ function pn(e) {
|
|
|
1876
1882
|
var a, t, l;
|
|
1877
1883
|
if (l = e.input.charCodeAt(e.position), l !== 42)
|
|
1878
1884
|
return !1;
|
|
1879
|
-
for (l = e.input.charCodeAt(++e.position), a = e.position; l !== 0 && !
|
|
1885
|
+
for (l = e.input.charCodeAt(++e.position), a = e.position; l !== 0 && !ve(l) && !Re(l); )
|
|
1880
1886
|
l = e.input.charCodeAt(++e.position);
|
|
1881
1887
|
return e.position === a && L(e, "name of an alias node must contain at least one character"), t = e.input.slice(a, e.position), Ue.call(e.anchorMap, t) || L(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
1882
1888
|
}
|
|
1883
1889
|
function We(e, a, t, l, r) {
|
|
1884
|
-
var i, s, c, o = 1, d = !1, h = !1, p, m, n,
|
|
1890
|
+
var i, s, c, o = 1, d = !1, h = !1, p, m, n, q, w, y;
|
|
1885
1891
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = s = c = nt === t || fr === t, l && oe(e, !0, -1) && (d = !0, e.lineIndent > a ? o = 1 : e.lineIndent === a ? o = 0 : e.lineIndent < a && (o = -1)), o === 1)
|
|
1886
1892
|
for (; dn(e) || hn(e); )
|
|
1887
1893
|
oe(e, !0, -1) ? (d = !0, c = i, e.lineIndent > a ? o = 1 : e.lineIndent === a ? o = 0 : e.lineIndent < a && (o = -1)) : c = !1;
|
|
1888
|
-
if (c && (c = d || r), (o === 1 || nt === t) && (it === t || pr === t ? w = a : w = a + 1,
|
|
1894
|
+
if (c && (c = d || r), (o === 1 || nt === t) && (it === t || pr === t ? w = a : w = a + 1, y = e.position - e.lineStart, o === 1 ? c && (wl(e, y) || cn(e, y, w)) || on(e, w) ? h = !0 : (s && un(e, w) || sn(e, w) || nn(e, w) ? h = !0 : pn(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && L(e, "alias node should not have any properties")) : rn(e, w, it === t) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : o === 0 && (h = c && wl(e, y))), e.tag === null)
|
|
1889
1895
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1890
1896
|
else if (e.tag === "?") {
|
|
1891
1897
|
for (e.result !== null && e.kind !== "scalar" && L(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), p = 0, m = e.implicitTypes.length; p < m; p += 1)
|
|
1892
|
-
if (
|
|
1893
|
-
e.result =
|
|
1898
|
+
if (q = e.implicitTypes[p], q.resolve(e.result)) {
|
|
1899
|
+
e.result = q.construct(e.result), e.tag = q.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1894
1900
|
break;
|
|
1895
1901
|
}
|
|
1896
1902
|
} else if (e.tag !== "!") {
|
|
1897
1903
|
if (Ue.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1898
|
-
|
|
1904
|
+
q = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1899
1905
|
else
|
|
1900
|
-
for (
|
|
1906
|
+
for (q = null, n = e.typeMap.multi[e.kind || "fallback"], p = 0, m = n.length; p < m; p += 1)
|
|
1901
1907
|
if (e.tag.slice(0, n[p].tag.length) === n[p].tag) {
|
|
1902
|
-
|
|
1908
|
+
q = n[p];
|
|
1903
1909
|
break;
|
|
1904
1910
|
}
|
|
1905
|
-
|
|
1911
|
+
q || L(e, "unknown tag !<" + e.tag + ">"), e.result !== null && q.kind !== e.kind && L(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + q.kind + '", not "' + e.kind + '"'), q.resolve(e.result, e.tag) ? (e.result = q.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : L(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1906
1912
|
}
|
|
1907
1913
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || h;
|
|
1908
1914
|
}
|
|
1909
1915
|
function fn(e) {
|
|
1910
1916
|
var a = e.position, t, l, r, i = !1, s;
|
|
1911
1917
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (s = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), s = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || s !== 37)); ) {
|
|
1912
|
-
for (i = !0, s = e.input.charCodeAt(++e.position), t = e.position; s !== 0 && !
|
|
1918
|
+
for (i = !0, s = e.input.charCodeAt(++e.position), t = e.position; s !== 0 && !ve(s); )
|
|
1913
1919
|
s = e.input.charCodeAt(++e.position);
|
|
1914
1920
|
for (l = e.input.slice(t, e.position), r = [], l.length < 1 && L(e, "directive name must not be less than one character in length"); s !== 0; ) {
|
|
1915
1921
|
for (; Ne(s); )
|
|
@@ -1922,7 +1928,7 @@ function fn(e) {
|
|
|
1922
1928
|
}
|
|
1923
1929
|
if (we(s))
|
|
1924
1930
|
break;
|
|
1925
|
-
for (t = e.position; s !== 0 && !
|
|
1931
|
+
for (t = e.position; s !== 0 && !ve(s); )
|
|
1926
1932
|
s = e.input.charCodeAt(++e.position);
|
|
1927
1933
|
r.push(e.input.slice(t, e.position));
|
|
1928
1934
|
}
|
|
@@ -1960,12 +1966,12 @@ function gn(e, a) {
|
|
|
1960
1966
|
if (t.length !== 0) {
|
|
1961
1967
|
if (t.length === 1)
|
|
1962
1968
|
return t[0];
|
|
1963
|
-
throw new
|
|
1969
|
+
throw new ye("expected a single document in the stream, but found more");
|
|
1964
1970
|
}
|
|
1965
1971
|
}
|
|
1966
|
-
var
|
|
1967
|
-
loadAll:
|
|
1968
|
-
load:
|
|
1972
|
+
var yn = mn, vn = gn, Cr = {
|
|
1973
|
+
loadAll: yn,
|
|
1974
|
+
load: vn
|
|
1969
1975
|
}, _r = Object.prototype.toString, wr = Object.prototype.hasOwnProperty, Dt = 65279, bn = 9, Ge = 10, kn = 13, Cn = 32, _n = 33, wn = 34, xt = 35, Sn = 37, In = 38, xn = 39, An = 42, Sr = 44, Hn = 45, ut = 58, Tn = 61, qn = 62, On = 63, Fn = 64, Ir = 91, xr = 93, Un = 96, Ar = 123, $n = 124, Hr = 125, ge = {};
|
|
1970
1976
|
ge[0] = "\\0";
|
|
1971
1977
|
ge[7] = "\\a";
|
|
@@ -2017,7 +2023,7 @@ function Kn(e) {
|
|
|
2017
2023
|
else if (e <= 4294967295)
|
|
2018
2024
|
t = "U", l = 8;
|
|
2019
2025
|
else
|
|
2020
|
-
throw new
|
|
2026
|
+
throw new ye("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2021
2027
|
return "\\" + t + ce.repeat("0", l - a.length) + a;
|
|
2022
2028
|
}
|
|
2023
2029
|
var En = 1, Xe = 2;
|
|
@@ -2077,7 +2083,7 @@ function Tr(e) {
|
|
|
2077
2083
|
}
|
|
2078
2084
|
var qr = 1, Ht = 2, Or = 3, Fr = 4, Ve = 5;
|
|
2079
2085
|
function Rn(e, a, t, l, r, i, s, c) {
|
|
2080
|
-
var o, d = 0, h = null, p = !1, m = !1, n = l !== -1,
|
|
2086
|
+
var o, d = 0, h = null, p = !1, m = !1, n = l !== -1, q = -1, w = Ln(Ye(e, 0)) && Vn(Ye(e, e.length - 1));
|
|
2081
2087
|
if (a || s)
|
|
2082
2088
|
for (o = 0; o < e.length; d >= 65536 ? o += 2 : o++) {
|
|
2083
2089
|
if (d = Ye(e, o), !et(d))
|
|
@@ -2088,12 +2094,12 @@ function Rn(e, a, t, l, r, i, s, c) {
|
|
|
2088
2094
|
for (o = 0; o < e.length; d >= 65536 ? o += 2 : o++) {
|
|
2089
2095
|
if (d = Ye(e, o), d === Ge)
|
|
2090
2096
|
p = !0, n && (m = m || // Foldable line = too long, and not more-indented.
|
|
2091
|
-
o -
|
|
2097
|
+
o - q - 1 > l && e[q + 1] !== " ", q = o);
|
|
2092
2098
|
else if (!et(d))
|
|
2093
2099
|
return Ve;
|
|
2094
2100
|
w = w && xl(d, h, c), h = d;
|
|
2095
2101
|
}
|
|
2096
|
-
m = m || n && o -
|
|
2102
|
+
m = m || n && o - q - 1 > l && e[q + 1] !== " ";
|
|
2097
2103
|
}
|
|
2098
2104
|
return !p && !m ? w && !s && !r(e) ? qr : i === Xe ? Ve : Ht : t > 9 && Tr(e) ? Ve : s ? i === Xe ? Ve : Ht : m ? Fr : Or;
|
|
2099
2105
|
}
|
|
@@ -2128,7 +2134,7 @@ function Dn(e, a, t, l, r) {
|
|
|
2128
2134
|
case Ve:
|
|
2129
2135
|
return '"' + Jn(a) + '"';
|
|
2130
2136
|
default:
|
|
2131
|
-
throw new
|
|
2137
|
+
throw new ye("impossible error: invalid scalar style");
|
|
2132
2138
|
}
|
|
2133
2139
|
}();
|
|
2134
2140
|
}
|
|
@@ -2197,7 +2203,7 @@ function Yn(e, a, t, l) {
|
|
|
2197
2203
|
else if (typeof e.sortKeys == "function")
|
|
2198
2204
|
s.sort(e.sortKeys);
|
|
2199
2205
|
else if (e.sortKeys)
|
|
2200
|
-
throw new
|
|
2206
|
+
throw new ye("sortKeys must be a boolean or a function");
|
|
2201
2207
|
for (c = 0, o = s.length; c < o; c += 1)
|
|
2202
2208
|
m = "", (!l || r !== "") && (m += At(e, a)), d = s[c], h = t[d], e.replacer && (h = e.replacer.call(t, d, h)), He(e, a + 1, d, !0, !0, !0) && (p = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, p && (e.dump && Ge === e.dump.charCodeAt(0) ? m += "?" : m += "? "), m += e.dump, p && (m += At(e, a)), He(e, a + 1, h, !0, p) && (e.dump && Ge === e.dump.charCodeAt(0) ? m += ":" : m += ": ", m += e.dump, r += m));
|
|
2203
2209
|
e.tag = i, e.dump = r || "{}";
|
|
@@ -2212,7 +2218,7 @@ function Ol(e, a, t) {
|
|
|
2212
2218
|
else if (wr.call(c.represent, o))
|
|
2213
2219
|
l = c.represent[o](a, o);
|
|
2214
2220
|
else
|
|
2215
|
-
throw new
|
|
2221
|
+
throw new ye("!<" + c.tag + '> tag resolver accepts not "' + o + '" style');
|
|
2216
2222
|
e.dump = l;
|
|
2217
2223
|
}
|
|
2218
2224
|
return !0;
|
|
@@ -2236,7 +2242,7 @@ function He(e, a, t, l, r, i, s) {
|
|
|
2236
2242
|
else {
|
|
2237
2243
|
if (c === "[object Undefined]" || e.skipInvalid)
|
|
2238
2244
|
return !1;
|
|
2239
|
-
throw new
|
|
2245
|
+
throw new ye("unacceptable kind of an object to dump " + c);
|
|
2240
2246
|
}
|
|
2241
2247
|
e.tag !== null && e.tag !== "?" && (d = encodeURI(
|
|
2242
2248
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2278,7 +2284,7 @@ function zt(e, a) {
|
|
|
2278
2284
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + a + " instead, which is now safe by default.");
|
|
2279
2285
|
};
|
|
2280
2286
|
}
|
|
2281
|
-
var to = fe, ao = Wl, lo = Gl, ro = lr, so = rr, io = Lt, no = Cr.load, oo = Cr.loadAll, uo = eo.dump, co =
|
|
2287
|
+
var to = fe, ao = Wl, lo = Gl, ro = lr, so = rr, io = Lt, no = Cr.load, oo = Cr.loadAll, uo = eo.dump, co = ye, ho = {
|
|
2282
2288
|
binary: ur,
|
|
2283
2289
|
float: ar,
|
|
2284
2290
|
map: Zl,
|
|
@@ -2308,7 +2314,7 @@ var to = fe, ao = Wl, lo = Gl, ro = lr, so = rr, io = Lt, no = Cr.load, oo = Cr.
|
|
|
2308
2314
|
safeLoadAll: fo,
|
|
2309
2315
|
safeDump: mo
|
|
2310
2316
|
};
|
|
2311
|
-
const
|
|
2317
|
+
const yo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
2312
2318
|
__name: "YamlCodeBlock",
|
|
2313
2319
|
props: {
|
|
2314
2320
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2318,13 +2324,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2318
2324
|
}
|
|
2319
2325
|
},
|
|
2320
2326
|
setup(e) {
|
|
2321
|
-
const a = e, t =
|
|
2327
|
+
const a = e, t = F(() => {
|
|
2322
2328
|
const l = Object.fromEntries(Object.entries(a.yamlRecord).filter(([, r]) => r && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2323
2329
|
return Object.keys(l).length === 0 && l.constructor === Object ? "" : go.dump(l).trim();
|
|
2324
2330
|
});
|
|
2325
2331
|
return (l, r) => {
|
|
2326
2332
|
const i = j("KCodeBlock");
|
|
2327
|
-
return C(), E("div",
|
|
2333
|
+
return C(), E("div", yo, [
|
|
2328
2334
|
a.yamlRecord ? (C(), V(i, {
|
|
2329
2335
|
key: 0,
|
|
2330
2336
|
id: "yaml-codeblock",
|
|
@@ -2335,7 +2341,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2335
2341
|
]);
|
|
2336
2342
|
};
|
|
2337
2343
|
}
|
|
2338
|
-
}),
|
|
2344
|
+
}), vo = {
|
|
2339
2345
|
key: 0,
|
|
2340
2346
|
class: "config-card-display-form"
|
|
2341
2347
|
}, bo = ["data-testid"], ko = {
|
|
@@ -2380,14 +2386,14 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2380
2386
|
}
|
|
2381
2387
|
},
|
|
2382
2388
|
setup(e) {
|
|
2383
|
-
const a = e, t = jt(), { i18n: { t: l } } = de.useI18n(), r = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), i =
|
|
2389
|
+
const a = e, t = jt(), { i18n: { t: l } } = de.useI18n(), r = (s) => !!(s.tooltip || t[`${s.key}-label-tooltip`]), i = F(() => {
|
|
2384
2390
|
if (!a.record)
|
|
2385
2391
|
return a.record;
|
|
2386
2392
|
const s = JSON.parse(JSON.stringify(a.record));
|
|
2387
2393
|
return delete s.created_at, delete s.updated_at, s;
|
|
2388
2394
|
});
|
|
2389
2395
|
return (s, c) => (C(), E(pe, null, [
|
|
2390
|
-
e.format === "structured" ? (C(), E("div",
|
|
2396
|
+
e.format === "structured" ? (C(), E("div", vo, [
|
|
2391
2397
|
(C(!0), E(pe, null, ke(e.propListTypes, (o) => (C(), E("div", {
|
|
2392
2398
|
key: `config-card-details-${o}-props`,
|
|
2393
2399
|
class: Ae(`config-card-details-${o}-props`),
|
|
@@ -2495,7 +2501,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2495
2501
|
}
|
|
2496
2502
|
},
|
|
2497
2503
|
setup(e) {
|
|
2498
|
-
const a = e, t =
|
|
2504
|
+
const a = e, t = F(() => {
|
|
2499
2505
|
if (typeof a.size == "number" && a.size > 0)
|
|
2500
2506
|
return `${a.size}px`;
|
|
2501
2507
|
if (typeof a.size == "string") {
|
|
@@ -2504,7 +2510,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2504
2510
|
return `${i}px`;
|
|
2505
2511
|
}
|
|
2506
2512
|
return $e;
|
|
2507
|
-
}), l =
|
|
2513
|
+
}), l = F(() => ({
|
|
2508
2514
|
boxSizing: "border-box",
|
|
2509
2515
|
color: a.color,
|
|
2510
2516
|
display: a.display,
|
|
@@ -2594,7 +2600,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2594
2600
|
}
|
|
2595
2601
|
},
|
|
2596
2602
|
setup(e) {
|
|
2597
|
-
const a = e, t =
|
|
2603
|
+
const a = e, t = F(() => {
|
|
2598
2604
|
if (typeof a.size == "number" && a.size > 0)
|
|
2599
2605
|
return `${a.size}px`;
|
|
2600
2606
|
if (typeof a.size == "string") {
|
|
@@ -2603,7 +2609,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2603
2609
|
return `${i}px`;
|
|
2604
2610
|
}
|
|
2605
2611
|
return $e;
|
|
2606
|
-
}), l =
|
|
2612
|
+
}), l = F(() => ({
|
|
2607
2613
|
boxSizing: "border-box",
|
|
2608
2614
|
color: a.color,
|
|
2609
2615
|
display: a.display,
|
|
@@ -2693,7 +2699,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2693
2699
|
}
|
|
2694
2700
|
},
|
|
2695
2701
|
setup(e) {
|
|
2696
|
-
const a = e, t =
|
|
2702
|
+
const a = e, t = F(() => {
|
|
2697
2703
|
if (typeof a.size == "number" && a.size > 0)
|
|
2698
2704
|
return `${a.size}px`;
|
|
2699
2705
|
if (typeof a.size == "string") {
|
|
@@ -2702,7 +2708,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2702
2708
|
return `${i}px`;
|
|
2703
2709
|
}
|
|
2704
2710
|
return $e;
|
|
2705
|
-
}), l =
|
|
2711
|
+
}), l = F(() => ({
|
|
2706
2712
|
boxSizing: "border-box",
|
|
2707
2713
|
color: a.color,
|
|
2708
2714
|
display: a.display,
|
|
@@ -2792,7 +2798,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2792
2798
|
}
|
|
2793
2799
|
},
|
|
2794
2800
|
setup(e) {
|
|
2795
|
-
const a = e, t =
|
|
2801
|
+
const a = e, t = F(() => {
|
|
2796
2802
|
if (typeof a.size == "number" && a.size > 0)
|
|
2797
2803
|
return `${a.size}px`;
|
|
2798
2804
|
if (typeof a.size == "string") {
|
|
@@ -2801,7 +2807,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2801
2807
|
return `${i}px`;
|
|
2802
2808
|
}
|
|
2803
2809
|
return $e;
|
|
2804
|
-
}), l =
|
|
2810
|
+
}), l = F(() => ({
|
|
2805
2811
|
boxSizing: "border-box",
|
|
2806
2812
|
color: a.color,
|
|
2807
2813
|
display: a.display,
|
|
@@ -2960,13 +2966,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2960
2966
|
// the last property displayed
|
|
2961
2967
|
section: ne.Basic
|
|
2962
2968
|
}
|
|
2963
|
-
}, n = K(!1),
|
|
2964
|
-
var g,
|
|
2965
|
-
if (!
|
|
2969
|
+
}, n = K(!1), q = K(!1), w = K(""), y = K({}), $ = F(() => {
|
|
2970
|
+
var g, O, U;
|
|
2971
|
+
if (!y.value)
|
|
2966
2972
|
return [];
|
|
2967
|
-
const T = [], P = Object.keys(
|
|
2968
|
-
for (const x in
|
|
2969
|
-
const M = (
|
|
2973
|
+
const T = [], P = Object.keys(y.value).length;
|
|
2974
|
+
for (const x in y.value) {
|
|
2975
|
+
const M = (O = (g = r.configSchema) == null ? void 0 : g[x]) == null ? void 0 : O.order, D = (U = m[x]) == null ? void 0 : U.order;
|
|
2970
2976
|
let Y = P;
|
|
2971
2977
|
(D || D === 0) && (Y = D === -1 ? P + 1 : D), M && (Y = M === -1 ? P + 1 : M), T.push([x, Y]);
|
|
2972
2978
|
}
|
|
@@ -2974,7 +2980,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2974
2980
|
return x[1] - M[1];
|
|
2975
2981
|
}), T.map((x) => {
|
|
2976
2982
|
var M, D;
|
|
2977
|
-
const Y = x[0], Q = (M =
|
|
2983
|
+
const Y = x[0], Q = (M = y.value) == null ? void 0 : M[Y], z = ((D = r.configSchema) == null ? void 0 : D[Y]) || {}, X = m[Y];
|
|
2978
2984
|
return {
|
|
2979
2985
|
key: Y,
|
|
2980
2986
|
value: Q,
|
|
@@ -2985,13 +2991,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
2985
2991
|
section: z.section ?? ((X == null ? void 0 : X.section) || ne.Advanced)
|
|
2986
2992
|
};
|
|
2987
2993
|
}).filter((x) => !x.hidden && x.key !== r.pluginConfigKey);
|
|
2988
|
-
}), N =
|
|
2989
|
-
var g,
|
|
2990
|
-
if (!
|
|
2994
|
+
}), N = F(() => {
|
|
2995
|
+
var g, O;
|
|
2996
|
+
if (!y.value || !r.pluginConfigKey)
|
|
2991
2997
|
return [];
|
|
2992
|
-
const U =
|
|
2998
|
+
const U = y.value[r.pluginConfigKey] || {}, T = Object.keys(U).length, P = [];
|
|
2993
2999
|
for (const x in U) {
|
|
2994
|
-
const M = (
|
|
3000
|
+
const M = (O = (g = r.pluginConfigSchema) == null ? void 0 : g[x]) == null ? void 0 : O.order, D = U[x];
|
|
2995
3001
|
let Y = D != null && D !== "" ? T - 1 : T;
|
|
2996
3002
|
M && (Y = M === -1 ? T + 1 : M), P.push([x, Y]);
|
|
2997
3003
|
}
|
|
@@ -3010,50 +3016,50 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3010
3016
|
section: ne.Plugin
|
|
3011
3017
|
};
|
|
3012
3018
|
}).filter((x) => !x.hidden);
|
|
3013
|
-
}), R =
|
|
3014
|
-
var g,
|
|
3019
|
+
}), R = F(() => {
|
|
3020
|
+
var g, O, U, T;
|
|
3015
3021
|
return {
|
|
3016
3022
|
basic: (g = $.value) == null ? void 0 : g.filter((P) => P.section === ne.Basic),
|
|
3017
|
-
advanced: (
|
|
3023
|
+
advanced: (O = $.value) == null ? void 0 : O.filter((P) => P.section === ne.Advanced),
|
|
3018
3024
|
plugin: (T = N.value) == null ? void 0 : T.concat((U = $.value) == null ? void 0 : U.filter((P) => P.section === ne.Plugin))
|
|
3019
3025
|
};
|
|
3020
|
-
}), H =
|
|
3026
|
+
}), H = F(() => {
|
|
3021
3027
|
const g = [];
|
|
3022
3028
|
return R.value.basic.length && g.push("basic"), R.value.advanced.length && g.push("advanced"), R.value.plugin.length && g.push("plugin"), g;
|
|
3023
|
-
}), I =
|
|
3024
|
-
var g,
|
|
3029
|
+
}), I = F(() => {
|
|
3030
|
+
var g, O;
|
|
3025
3031
|
let U = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3026
|
-
return r.config.app === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (U = U.replace(/\/{workspace}/gi, (
|
|
3032
|
+
return r.config.app === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (U = U.replace(/\/{workspace}/gi, (O = r.config) != null && O.workspace ? `/${r.config.workspace}` : "")), U = U.replace(/{id}/gi, r.config.entityId), U;
|
|
3027
3033
|
});
|
|
3028
3034
|
return be(n, (g) => {
|
|
3029
3035
|
l("loading", g);
|
|
3030
3036
|
}, { immediate: !0 }), at(async () => {
|
|
3031
|
-
|
|
3037
|
+
q.value = !1, n.value = !0;
|
|
3032
3038
|
try {
|
|
3033
3039
|
const { data: g } = await o.get(I.value);
|
|
3034
3040
|
if (r.dataKey)
|
|
3035
3041
|
if (typeof g[r.dataKey] < "u")
|
|
3036
|
-
|
|
3042
|
+
y.value = { ...g[r.dataKey] };
|
|
3037
3043
|
else
|
|
3038
3044
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3039
3045
|
else
|
|
3040
|
-
|
|
3041
|
-
Object.keys(r.configSchema).filter((
|
|
3042
|
-
|
|
3046
|
+
y.value = { ...g };
|
|
3047
|
+
Object.keys(r.configSchema).filter((O) => r.configSchema[O].forceShow).forEach((O) => {
|
|
3048
|
+
y.value && typeof y.value[O] > "u" && (y.value[O] = null);
|
|
3043
3049
|
}), l("fetch:success", g);
|
|
3044
3050
|
} catch (g) {
|
|
3045
|
-
const
|
|
3046
|
-
w.value =
|
|
3051
|
+
const O = s(g);
|
|
3052
|
+
w.value = O.startsWith("code") ? i("baseConfigCard.errors.load") : O, q.value = !0, l("fetch:error", g);
|
|
3047
3053
|
} finally {
|
|
3048
3054
|
n.value = !1;
|
|
3049
3055
|
}
|
|
3050
|
-
}), (g,
|
|
3056
|
+
}), (g, O) => {
|
|
3051
3057
|
const U = j("KLabel"), T = j("KSelect"), P = j("KButton"), x = j("KSkeleton"), M = j("KEmptyState"), D = j("KCard");
|
|
3052
3058
|
return C(), V(D, { class: "kong-ui-entity-base-config-card" }, Ke({
|
|
3053
3059
|
actions: f(() => [
|
|
3054
3060
|
A("div", Wo, [
|
|
3055
3061
|
re(g.$slots, "actions", {}, void 0, !0),
|
|
3056
|
-
|
|
3062
|
+
v(U, {
|
|
3057
3063
|
class: "config-format-select-label",
|
|
3058
3064
|
"data-testid": "config-format-select-label"
|
|
3059
3065
|
}, {
|
|
@@ -3062,7 +3068,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3062
3068
|
]),
|
|
3063
3069
|
_: 1
|
|
3064
3070
|
}),
|
|
3065
|
-
|
|
3071
|
+
v(T, {
|
|
3066
3072
|
"data-testid": "select-config-format",
|
|
3067
3073
|
items: d,
|
|
3068
3074
|
onChange: p
|
|
@@ -3079,7 +3085,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3079
3085
|
rel: "noopener",
|
|
3080
3086
|
target: "_blank"
|
|
3081
3087
|
}, [
|
|
3082
|
-
|
|
3088
|
+
v(u($o), { size: u($s) }, null, 8, ["size"])
|
|
3083
3089
|
], 8, Qo)
|
|
3084
3090
|
]),
|
|
3085
3091
|
_: 1
|
|
@@ -3092,7 +3098,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3092
3098
|
"data-testid": "config-card-loader",
|
|
3093
3099
|
"table-columns": 2,
|
|
3094
3100
|
type: "table"
|
|
3095
|
-
})) :
|
|
3101
|
+
})) : q.value ? (C(), V(M, {
|
|
3096
3102
|
key: 1,
|
|
3097
3103
|
"data-testid": "config-card-fetch-error",
|
|
3098
3104
|
"icon-variant": "error"
|
|
@@ -3103,13 +3109,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3103
3109
|
_: 1
|
|
3104
3110
|
})) : J("", !0),
|
|
3105
3111
|
A("div", Yo, [
|
|
3106
|
-
|
|
3112
|
+
v(_o, {
|
|
3107
3113
|
config: e.config,
|
|
3108
3114
|
"fetcher-url": I.value,
|
|
3109
3115
|
format: h.value,
|
|
3110
3116
|
"prop-list-types": H.value,
|
|
3111
3117
|
"property-collections": R.value,
|
|
3112
|
-
record:
|
|
3118
|
+
record: y.value
|
|
3113
3119
|
}, Ke({ _: 2 }, [
|
|
3114
3120
|
ke(Object.keys(g.$slots), (Y) => ({
|
|
3115
3121
|
name: Y,
|
|
@@ -3199,13 +3205,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3199
3205
|
var t;
|
|
3200
3206
|
const l = a, r = e, i = Nt(), { i18n: { t: s } } = de.useI18n(), { getMessageFromError: c } = de.useErrors(), { axiosInstance: o } = de.useAxios({
|
|
3201
3207
|
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3202
|
-
}), d = K(!1), h = K(!1), p = K(""), m =
|
|
3208
|
+
}), d = K(!1), h = K(!1), p = K(""), m = F(() => r.canSubmit === !1 || r.isReadonly), n = K(!1), q = F(() => {
|
|
3203
3209
|
var H, I;
|
|
3204
3210
|
let g = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3205
3211
|
return r.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((H = r.config) == null ? void 0 : H.controlPlaneId) || "") : r.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (I = r.config) != null && I.workspace ? `/${r.config.workspace}` : "")), r.editId ? (g = g.replace(/{id}/gi, r.editId), g) : (g = g.replace(/\/{id}/gi, ""), g);
|
|
3206
3212
|
}), w = () => {
|
|
3207
3213
|
n.value = !n.value;
|
|
3208
|
-
},
|
|
3214
|
+
}, y = () => {
|
|
3209
3215
|
r.config.cancelRoute ? i.push(r.config.cancelRoute) : $();
|
|
3210
3216
|
}, $ = () => {
|
|
3211
3217
|
l("cancel");
|
|
@@ -3227,7 +3233,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3227
3233
|
if (r.editId)
|
|
3228
3234
|
try {
|
|
3229
3235
|
h.value = !1, d.value = !0;
|
|
3230
|
-
const { data: H } = await o.get(
|
|
3236
|
+
const { data: H } = await o.get(q.value);
|
|
3231
3237
|
l("fetch:success", H);
|
|
3232
3238
|
} catch (H) {
|
|
3233
3239
|
const I = c(H);
|
|
@@ -3236,18 +3242,18 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3236
3242
|
d.value = !1;
|
|
3237
3243
|
}
|
|
3238
3244
|
}), (H, I) => {
|
|
3239
|
-
const g = j("KSkeleton"),
|
|
3245
|
+
const g = j("KSkeleton"), O = j("KEmptyState"), U = j("KAlert"), T = j("KButton"), P = j("KTabs"), x = j("KSlideout"), M = j("KCard");
|
|
3240
3246
|
return C(), V(M, { class: "kong-ui-entity-base-form" }, {
|
|
3241
3247
|
default: f(() => [
|
|
3242
3248
|
d.value ? (C(), V(g, {
|
|
3243
3249
|
key: 0,
|
|
3244
3250
|
type: "form"
|
|
3245
|
-
})) : h.value ? (C(), V(
|
|
3251
|
+
})) : h.value ? (C(), V(O, {
|
|
3246
3252
|
key: 1,
|
|
3247
3253
|
"action-button-text": u(s)("baseForm.actions.back"),
|
|
3248
3254
|
"data-testid": "form-fetch-error",
|
|
3249
3255
|
"icon-variant": "error",
|
|
3250
|
-
onClickAction:
|
|
3256
|
+
onClickAction: y
|
|
3251
3257
|
}, {
|
|
3252
3258
|
default: f(() => [
|
|
3253
3259
|
A("h3", null, S(p.value), 1)
|
|
@@ -3268,7 +3274,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3268
3274
|
}, null, 8, ["message"])) : J("", !0),
|
|
3269
3275
|
A("div", Xo, [
|
|
3270
3276
|
re(H.$slots, "form-actions", {}, () => [
|
|
3271
|
-
|
|
3277
|
+
v(T, {
|
|
3272
3278
|
appearance: "tertiary",
|
|
3273
3279
|
"data-testid": "form-view-configuration",
|
|
3274
3280
|
onClick: I[0] || (I[0] = (D) => w())
|
|
@@ -3278,7 +3284,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3278
3284
|
]),
|
|
3279
3285
|
_: 1
|
|
3280
3286
|
}),
|
|
3281
|
-
|
|
3287
|
+
v(T, {
|
|
3282
3288
|
appearance: "secondary",
|
|
3283
3289
|
"data-testid": "form-cancel",
|
|
3284
3290
|
disabled: e.isReadonly,
|
|
@@ -3289,7 +3295,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3289
3295
|
]),
|
|
3290
3296
|
_: 1
|
|
3291
3297
|
}, 8, ["disabled"]),
|
|
3292
|
-
|
|
3298
|
+
v(T, {
|
|
3293
3299
|
appearance: "primary",
|
|
3294
3300
|
"data-testid": "form-submit",
|
|
3295
3301
|
disabled: m.value,
|
|
@@ -3303,7 +3309,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3303
3309
|
], !0)
|
|
3304
3310
|
])
|
|
3305
3311
|
], 32)),
|
|
3306
|
-
|
|
3312
|
+
v(x, {
|
|
3307
3313
|
"close-on-blur": !1,
|
|
3308
3314
|
"data-testid": "form-view-configuration-slideout",
|
|
3309
3315
|
"has-overlay": !1,
|
|
@@ -3314,20 +3320,20 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3314
3320
|
}, {
|
|
3315
3321
|
default: f(() => [
|
|
3316
3322
|
A("div", null, S(u(s)("baseForm.configuration.message")), 1),
|
|
3317
|
-
|
|
3323
|
+
v(P, {
|
|
3318
3324
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3319
3325
|
tabs: R.value
|
|
3320
3326
|
}, {
|
|
3321
3327
|
json: f(() => [
|
|
3322
|
-
|
|
3328
|
+
v(Dl, {
|
|
3323
3329
|
config: e.config,
|
|
3324
|
-
"fetcher-url":
|
|
3330
|
+
"fetcher-url": q.value,
|
|
3325
3331
|
"json-record": r.formFields,
|
|
3326
3332
|
"request-method": r.editId ? "put" : "post"
|
|
3327
3333
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
3328
3334
|
]),
|
|
3329
3335
|
yaml: f(() => [
|
|
3330
|
-
|
|
3336
|
+
v(Ur, {
|
|
3331
3337
|
"yaml-record": r.formFields
|
|
3332
3338
|
}, null, 8, ["yaml-record"])
|
|
3333
3339
|
]),
|
|
@@ -3357,43 +3363,43 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3357
3363
|
}
|
|
3358
3364
|
},
|
|
3359
3365
|
setup(e) {
|
|
3360
|
-
const a = e, t =
|
|
3366
|
+
const a = e, t = F(() => {
|
|
3361
3367
|
var w;
|
|
3362
3368
|
return ((w = a.rowEl) == null ? void 0 : w.querySelector(`[data-testid="${a.keyName}"]`)) || null;
|
|
3363
|
-
}), l =
|
|
3369
|
+
}), l = F(() => {
|
|
3364
3370
|
var w;
|
|
3365
3371
|
return ((w = t.value) == null ? void 0 : w.querySelector('[data-testid="first-col"]')) || null;
|
|
3366
|
-
}), r =
|
|
3367
|
-
var w,
|
|
3372
|
+
}), r = F(() => {
|
|
3373
|
+
var w, y;
|
|
3368
3374
|
const $ = (w = a.rowEl) == null ? void 0 : w.querySelectorAll("td");
|
|
3369
|
-
return $ ? ((
|
|
3375
|
+
return $ ? ((y = $[0]) == null ? void 0 : y.getAttribute("data-testid")) === a.keyName : !1;
|
|
3370
3376
|
});
|
|
3371
3377
|
let i;
|
|
3372
3378
|
const s = () => {
|
|
3373
3379
|
i && (i.disconnect(), i = void 0);
|
|
3374
3380
|
}, c = () => {
|
|
3375
|
-
var w,
|
|
3376
|
-
d.value = ((w = l.value) == null ? void 0 : w.getBoundingClientRect().width) || 0, h.value = ((
|
|
3377
|
-
}, o = K({}), d = K(0), h = K(0), p = K(""), m =
|
|
3381
|
+
var w, y, $;
|
|
3382
|
+
d.value = ((w = l.value) == null ? void 0 : w.getBoundingClientRect().width) || 0, h.value = ((y = t.value) == null ? void 0 : y.clientWidth) || 0, p.value = (($ = o.value) == null ? void 0 : $.innerText) || "";
|
|
3383
|
+
}, o = K({}), d = K(0), h = K(0), p = K(""), m = F(() => [l.value, t.value]), n = be(
|
|
3378
3384
|
m,
|
|
3379
3385
|
(w) => {
|
|
3380
3386
|
if (r.value && (s(), "ResizeObserver" in window && window)) {
|
|
3381
|
-
i = new ResizeObserver((
|
|
3387
|
+
i = new ResizeObserver((y) => {
|
|
3382
3388
|
window.requestAnimationFrame(() => {
|
|
3383
|
-
!Array.isArray(
|
|
3389
|
+
!Array.isArray(y) || !y.length || c();
|
|
3384
3390
|
});
|
|
3385
3391
|
});
|
|
3386
|
-
for (const
|
|
3387
|
-
|
|
3392
|
+
for (const y of w)
|
|
3393
|
+
y && i.observe(y);
|
|
3388
3394
|
}
|
|
3389
3395
|
},
|
|
3390
3396
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3391
|
-
),
|
|
3397
|
+
), q = F(() => r.value ? d.value > h.value : !1);
|
|
3392
3398
|
return Dr(() => {
|
|
3393
3399
|
c();
|
|
3394
3400
|
}), zr(() => {
|
|
3395
3401
|
n();
|
|
3396
|
-
}), (w,
|
|
3402
|
+
}), (w, y) => {
|
|
3397
3403
|
const $ = j("KTooltip");
|
|
3398
3404
|
return C(), E("span", {
|
|
3399
3405
|
ref_key: "contentRef",
|
|
@@ -3401,10 +3407,10 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3401
3407
|
class: "content-wrapper"
|
|
3402
3408
|
}, [
|
|
3403
3409
|
r.value ? (C(), E("span", tu, [
|
|
3404
|
-
|
|
3410
|
+
v($, {
|
|
3405
3411
|
"max-width": "300",
|
|
3406
3412
|
placement: "bottomStart",
|
|
3407
|
-
text:
|
|
3413
|
+
text: q.value ? p.value : ""
|
|
3408
3414
|
}, {
|
|
3409
3415
|
default: f(() => [
|
|
3410
3416
|
re(w.$slots, "default", {}, void 0, !0)
|
|
@@ -3528,7 +3534,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3528
3534
|
},
|
|
3529
3535
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3530
3536
|
setup(e, { emit: a }) {
|
|
3531
|
-
const t = e, l = a, { i18n: { t: r } } = de.useI18n(), i =
|
|
3537
|
+
const t = e, l = a, { i18n: { t: r } } = de.useI18n(), i = F(() => {
|
|
3532
3538
|
var I, g;
|
|
3533
3539
|
return typeof t.errorMessage == "string" ? {
|
|
3534
3540
|
hasError: !!t.errorMessage,
|
|
@@ -3539,14 +3545,14 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3539
3545
|
title: (I = t.errorMessage) == null ? void 0 : I.title,
|
|
3540
3546
|
message: (g = t.errorMessage) == null ? void 0 : g.message
|
|
3541
3547
|
};
|
|
3542
|
-
}), s =
|
|
3548
|
+
}), s = F(() => t.cacheIdentifier || t.preferencesStorageKey), c = (I) => I.hasData || !!t.query, o = F(() => {
|
|
3543
3549
|
const I = [];
|
|
3544
3550
|
return Object.keys(t.tableHeaders).forEach((g) => {
|
|
3545
|
-
const
|
|
3551
|
+
const O = t.tableHeaders[g];
|
|
3546
3552
|
I.push({
|
|
3547
|
-
label:
|
|
3553
|
+
label: O.label ?? g,
|
|
3548
3554
|
key: g,
|
|
3549
|
-
sortable:
|
|
3555
|
+
sortable: O.sortable ?? !1
|
|
3550
3556
|
});
|
|
3551
3557
|
}), t.enableEntityActions && I.push({
|
|
3552
3558
|
key: "actions",
|
|
@@ -3570,14 +3576,14 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3570
3576
|
textOverflow: "ellipsis"
|
|
3571
3577
|
}), g;
|
|
3572
3578
|
}, n = () => {
|
|
3573
|
-
l("empty-state-cta-clicked"),
|
|
3574
|
-
},
|
|
3579
|
+
l("empty-state-cta-clicked"), q();
|
|
3580
|
+
}, q = () => {
|
|
3575
3581
|
l("clear-search-input");
|
|
3576
|
-
}, w =
|
|
3582
|
+
}, w = F(() => t.disableRowClick ? void 0 : (I, g) => {
|
|
3577
3583
|
l("click:row", g);
|
|
3578
|
-
}),
|
|
3584
|
+
}), y = (I) => {
|
|
3579
3585
|
l("sort", I);
|
|
3580
|
-
}, { setTablePreferences: $, getTablePreferences: N } = es(), R =
|
|
3586
|
+
}, { setTablePreferences: $, getTablePreferences: N } = es(), R = F(() => {
|
|
3581
3587
|
const I = N(t.preferencesStorageKey);
|
|
3582
3588
|
return {
|
|
3583
3589
|
...t.initialFetcherParams,
|
|
@@ -3587,13 +3593,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3587
3593
|
t.preferencesStorageKey && $(t.preferencesStorageKey, I);
|
|
3588
3594
|
};
|
|
3589
3595
|
return (I, g) => {
|
|
3590
|
-
const
|
|
3596
|
+
const O = j("KIcon"), U = j("KButton"), T = j("KDropdown"), P = j("KTable"), x = j("KCard");
|
|
3591
3597
|
return C(), V(x, {
|
|
3592
3598
|
class: "kong-ui-entity-base-table",
|
|
3593
3599
|
title: e.title
|
|
3594
3600
|
}, {
|
|
3595
3601
|
default: f(() => [
|
|
3596
|
-
|
|
3602
|
+
v(P, {
|
|
3597
3603
|
ref_key: "tableRefs",
|
|
3598
3604
|
ref: h,
|
|
3599
3605
|
"cache-identifier": s.value,
|
|
@@ -3620,7 +3626,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3620
3626
|
"search-input": e.query,
|
|
3621
3627
|
onKtableEmptyStateCtaClicked: n,
|
|
3622
3628
|
"onRow:click": w.value,
|
|
3623
|
-
onSort: g[0] || (g[0] = (M) =>
|
|
3629
|
+
onSort: g[0] || (g[0] = (M) => y(M)),
|
|
3624
3630
|
"onUpdate:tablePreferences": H
|
|
3625
3631
|
}, Ke({
|
|
3626
3632
|
toolbar: f(({ state: M }) => [
|
|
@@ -3638,7 +3644,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3638
3644
|
class: "actions-container",
|
|
3639
3645
|
"data-testid": M.name
|
|
3640
3646
|
}, [
|
|
3641
|
-
|
|
3647
|
+
v(T, {
|
|
3642
3648
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
3643
3649
|
width: e.dropdownMenuWidth
|
|
3644
3650
|
}, {
|
|
@@ -3650,13 +3656,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3650
3656
|
}, void 0, !0)
|
|
3651
3657
|
]),
|
|
3652
3658
|
default: f(() => [
|
|
3653
|
-
|
|
3659
|
+
v(U, {
|
|
3654
3660
|
class: "actions-trigger",
|
|
3655
3661
|
"data-testid": "overflow-actions-button",
|
|
3656
3662
|
size: "small"
|
|
3657
3663
|
}, {
|
|
3658
3664
|
icon: f(() => [
|
|
3659
|
-
|
|
3665
|
+
v(O, {
|
|
3660
3666
|
color: u(Os),
|
|
3661
3667
|
icon: "more",
|
|
3662
3668
|
size: "16"
|
|
@@ -3674,7 +3680,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3674
3680
|
ke(e.tableHeaders, (M, D) => ({
|
|
3675
3681
|
name: D,
|
|
3676
3682
|
fn: f(({ row: Y, rowKey: Q, rowValue: z }) => [
|
|
3677
|
-
|
|
3683
|
+
v(lu, {
|
|
3678
3684
|
"key-name": String(D),
|
|
3679
3685
|
"row-el": p(Y)
|
|
3680
3686
|
}, {
|
|
@@ -3694,7 +3700,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3694
3700
|
e.query ? void 0 : {
|
|
3695
3701
|
name: "empty-state-action-icon",
|
|
3696
3702
|
fn: f(() => [
|
|
3697
|
-
|
|
3703
|
+
v(u(Ho))
|
|
3698
3704
|
]),
|
|
3699
3705
|
key: "0"
|
|
3700
3706
|
}
|
|
@@ -3749,7 +3755,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3749
3755
|
},
|
|
3750
3756
|
emits: ["cancel", "proceed"],
|
|
3751
3757
|
setup(e, { emit: a }) {
|
|
3752
|
-
const { i18nT: t } = de.useI18n(), l = e, r = a, i =
|
|
3758
|
+
const { i18nT: t } = de.useI18n(), l = e, r = a, i = F(() => l.needConfirm ? l.entityName : ""), s = () => {
|
|
3753
3759
|
r("cancel");
|
|
3754
3760
|
}, c = () => {
|
|
3755
3761
|
r("proceed");
|
|
@@ -3769,14 +3775,14 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3769
3775
|
}, {
|
|
3770
3776
|
default: f(() => [
|
|
3771
3777
|
e.error ? (C(), E("div", ou, [
|
|
3772
|
-
|
|
3778
|
+
v(h, { appearance: "danger" }, {
|
|
3773
3779
|
default: f(() => [
|
|
3774
3780
|
W(S(e.error), 1)
|
|
3775
3781
|
]),
|
|
3776
3782
|
_: 1
|
|
3777
3783
|
})
|
|
3778
3784
|
])) : J("", !0),
|
|
3779
|
-
|
|
3785
|
+
v(u(t), {
|
|
3780
3786
|
class: "message",
|
|
3781
3787
|
keypath: l.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3782
3788
|
tag: "p"
|
|
@@ -3846,7 +3852,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3846
3852
|
}), gu = {
|
|
3847
3853
|
key: 1,
|
|
3848
3854
|
class: "kong-ui-entity-filter"
|
|
3849
|
-
},
|
|
3855
|
+
}, yu = { class: "kong-ui-entity-filter-menu" }, vu = ["data-testid"], bu = ["onClick", "onKeydown"], ku = { class: "menu-item-indicator" }, Cu = { class: "menu-item-body" }, _u = ["for"], wu = { class: "menu-item-buttons" }, Su = { class: "filter-clear-button-container" }, Iu = /* @__PURE__ */ ee({
|
|
3850
3856
|
__name: "EntityFilter",
|
|
3851
3857
|
props: {
|
|
3852
3858
|
// filter config, either exact match or fuzzy match
|
|
@@ -3866,12 +3872,12 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3866
3872
|
},
|
|
3867
3873
|
emits: ["update:modelValue"],
|
|
3868
3874
|
setup(e, { emit: a }) {
|
|
3869
|
-
const { i18n: { t } } = de.useI18n(), l = e, r = a, i = K(!1), s = K({}), c = K(/* @__PURE__ */ new Set()), o =
|
|
3875
|
+
const { i18n: { t } } = de.useI18n(), l = e, r = a, i = K(!1), s = K({}), c = K(/* @__PURE__ */ new Set()), o = F(() => {
|
|
3870
3876
|
const H = [];
|
|
3871
3877
|
return new URLSearchParams(l.modelValue).forEach((I, g) => {
|
|
3872
3878
|
I !== "" && H.push(g);
|
|
3873
3879
|
}), H;
|
|
3874
|
-
}), d =
|
|
3880
|
+
}), d = F(() => {
|
|
3875
3881
|
const H = l.config.fields;
|
|
3876
3882
|
return Object.keys(H).filter((I) => H[I].searchable).map((I) => ({
|
|
3877
3883
|
label: H[I].label || I,
|
|
@@ -3892,13 +3898,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3892
3898
|
r("update:modelValue", H);
|
|
3893
3899
|
}, n = () => {
|
|
3894
3900
|
m("");
|
|
3895
|
-
},
|
|
3901
|
+
}, q = (H) => `filter-${H}`, w = (H) => {
|
|
3896
3902
|
var I, g;
|
|
3897
|
-
return (((g = (I = l.config.schema) == null ? void 0 : I[H]) == null ? void 0 : g.values) ?? []).map((
|
|
3898
|
-
value:
|
|
3899
|
-
label:
|
|
3903
|
+
return (((g = (I = l.config.schema) == null ? void 0 : I[H]) == null ? void 0 : g.values) ?? []).map((O) => ({
|
|
3904
|
+
value: O,
|
|
3905
|
+
label: O
|
|
3900
3906
|
}));
|
|
3901
|
-
},
|
|
3907
|
+
}, y = (H) => {
|
|
3902
3908
|
var I, g;
|
|
3903
3909
|
return ((g = (I = l.config.schema) == null ? void 0 : I[H]) == null ? void 0 : g.type) ?? "text";
|
|
3904
3910
|
}, $ = (H) => {
|
|
@@ -3909,11 +3915,11 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3909
3915
|
}, N = () => {
|
|
3910
3916
|
s.value = {}, R(!0);
|
|
3911
3917
|
}, R = (H = !1) => {
|
|
3912
|
-
const I = Object.keys(s.value).reduce((g,
|
|
3918
|
+
const I = Object.keys(s.value).reduce((g, O) => (s.value[O] && (g[O] = `${s.value[O]}`), g), {});
|
|
3913
3919
|
H && (i.value = !1), r("update:modelValue", new URLSearchParams(I).toString());
|
|
3914
3920
|
};
|
|
3915
3921
|
return (H, I) => {
|
|
3916
|
-
const g = j("KInput"),
|
|
3922
|
+
const g = j("KInput"), O = j("KButton"), U = j("KSelect");
|
|
3917
3923
|
return e.config.isExactMatch ? (C(), V(g, {
|
|
3918
3924
|
key: 0,
|
|
3919
3925
|
autocomplete: "off",
|
|
@@ -3924,10 +3930,10 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3924
3930
|
"onUpdate:modelValue": m
|
|
3925
3931
|
}, {
|
|
3926
3932
|
before: f(() => [
|
|
3927
|
-
|
|
3933
|
+
v(Fl)
|
|
3928
3934
|
]),
|
|
3929
3935
|
after: f(() => [
|
|
3930
|
-
Se(
|
|
3936
|
+
Se(v(u(zo), {
|
|
3931
3937
|
class: "kong-ui-entity-filter-clear",
|
|
3932
3938
|
onClick: n
|
|
3933
3939
|
}, null, 512), [
|
|
@@ -3936,13 +3942,13 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3936
3942
|
]),
|
|
3937
3943
|
_: 1
|
|
3938
3944
|
}, 8, ["model-value", "placeholder"])) : (C(), E("div", gu, [
|
|
3939
|
-
|
|
3945
|
+
v(O, {
|
|
3940
3946
|
appearance: "tertiary",
|
|
3941
3947
|
"data-testid": "filter-button",
|
|
3942
3948
|
onClick: h
|
|
3943
3949
|
}, {
|
|
3944
3950
|
default: f(() => [
|
|
3945
|
-
|
|
3951
|
+
v(Fl),
|
|
3946
3952
|
W(" " + S(u(t)("filter.filterButtonText")) + " " + S(o.value.length > 0 ? `(${o.value.length})` : ""), 1)
|
|
3947
3953
|
]),
|
|
3948
3954
|
_: 1
|
|
@@ -3953,7 +3959,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3953
3959
|
}, null, 512), [
|
|
3954
3960
|
[Ie, i.value]
|
|
3955
3961
|
]),
|
|
3956
|
-
Se(A("div",
|
|
3962
|
+
Se(A("div", yu, [
|
|
3957
3963
|
(C(!0), E(pe, null, ke(d.value, (T) => {
|
|
3958
3964
|
var P, x;
|
|
3959
3965
|
return C(), E("div", {
|
|
@@ -3972,7 +3978,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3972
3978
|
Se(A("span", ku, null, 512), [
|
|
3973
3979
|
[Ie, o.value.includes(T.value)]
|
|
3974
3980
|
]),
|
|
3975
|
-
|
|
3981
|
+
v(u(Po), {
|
|
3976
3982
|
class: Ae(["menu-item-expand-icon", { expanded: c.value.has(T.value) }]),
|
|
3977
3983
|
color: u(Fs)
|
|
3978
3984
|
}, null, 8, ["class", "color"])
|
|
@@ -3980,29 +3986,29 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
3980
3986
|
Se(A("div", Cu, [
|
|
3981
3987
|
A("label", {
|
|
3982
3988
|
class: "menu-item-label",
|
|
3983
|
-
for:
|
|
3989
|
+
for: q(T.value)
|
|
3984
3990
|
}, S(u(t)("filter.fieldLabel")), 9, _u),
|
|
3985
3991
|
((x = (P = e.config.schema) == null ? void 0 : P[T.value]) == null ? void 0 : x.type) === "select" ? (C(), V(U, {
|
|
3986
3992
|
key: 0,
|
|
3987
|
-
id:
|
|
3993
|
+
id: q(T.value),
|
|
3988
3994
|
modelValue: s.value[T.value],
|
|
3989
3995
|
"onUpdate:modelValue": (M) => s.value[T.value] = M,
|
|
3990
3996
|
items: w(T.value),
|
|
3991
3997
|
placeholder: u(t)("filter.selectPlaceholder")
|
|
3992
3998
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (C(), V(g, {
|
|
3993
3999
|
key: 1,
|
|
3994
|
-
id:
|
|
4000
|
+
id: q(T.value),
|
|
3995
4001
|
modelValue: s.value[T.value],
|
|
3996
4002
|
"onUpdate:modelValue": (M) => s.value[T.value] = M,
|
|
3997
4003
|
autocomplete: "off",
|
|
3998
4004
|
placeholder: u(t)("filter.inputPlaceholder"),
|
|
3999
|
-
type:
|
|
4005
|
+
type: y(T.value)
|
|
4000
4006
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4001
4007
|
], 512), [
|
|
4002
4008
|
[Ie, c.value.has(T.value)]
|
|
4003
4009
|
]),
|
|
4004
4010
|
Se(A("div", wu, [
|
|
4005
|
-
|
|
4011
|
+
v(O, {
|
|
4006
4012
|
appearance: "tertiary",
|
|
4007
4013
|
"data-testid": "apply-filter",
|
|
4008
4014
|
size: "small",
|
|
@@ -4013,7 +4019,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
4013
4019
|
]),
|
|
4014
4020
|
_: 1
|
|
4015
4021
|
}),
|
|
4016
|
-
|
|
4022
|
+
v(O, {
|
|
4017
4023
|
appearance: "tertiary",
|
|
4018
4024
|
"data-testid": "clear-filter",
|
|
4019
4025
|
size: "small",
|
|
@@ -4027,10 +4033,10 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
4027
4033
|
], 512), [
|
|
4028
4034
|
[Ie, c.value.has(T.value)]
|
|
4029
4035
|
])
|
|
4030
|
-
], 8,
|
|
4036
|
+
], 8, vu);
|
|
4031
4037
|
}), 128)),
|
|
4032
4038
|
A("div", Su, [
|
|
4033
|
-
|
|
4039
|
+
v(O, {
|
|
4034
4040
|
appearance: "tertiary",
|
|
4035
4041
|
size: "small",
|
|
4036
4042
|
onClick: N
|
|
@@ -4069,7 +4075,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
4069
4075
|
}
|
|
4070
4076
|
},
|
|
4071
4077
|
setup(e) {
|
|
4072
|
-
const a = e, t = K(void 0), l =
|
|
4078
|
+
const a = e, t = K(void 0), l = F(() => t.value === !0 || t.value !== void 0 && a.forceShow === !0);
|
|
4073
4079
|
return be(() => a.authFunction, async () => {
|
|
4074
4080
|
t.value = await a.authFunction();
|
|
4075
4081
|
}, { immediate: !0 }), (r, i) => l.value ? re(r.$slots, "default", {
|
|
@@ -4136,7 +4142,7 @@ const vo = { class: "yaml-config" }, Ur = /* @__PURE__ */ ee({
|
|
|
4136
4142
|
])
|
|
4137
4143
|
], 2));
|
|
4138
4144
|
}
|
|
4139
|
-
}), lt = /* @__PURE__ */ Ce(Fu, [["__scopeId", "data-v-3565daa7"]]), { useAxios:
|
|
4145
|
+
}), lt = /* @__PURE__ */ Ce(Fu, [["__scopeId", "data-v-3565daa7"]]), { useAxios: yt, useDeleteUrlBuilder: Nr, useErrors: Kr, useExternalLinkCreator: Ec, useFetchUrlBuilder: Pc, useFetcher: Er, useDebouncedFilter: Ul, useStringHelpers: Bc, useHelpers: Uu, useGatewayFeatureSupported: Lc, useTruncationDetector: Vc } = de, $u = {
|
|
4140
4146
|
list: {
|
|
4141
4147
|
table_headers: {
|
|
4142
4148
|
id: "ID",
|
|
@@ -4885,7 +4891,7 @@ const dt = [
|
|
|
4885
4891
|
value: "599"
|
|
4886
4892
|
}
|
|
4887
4893
|
], qt = 10, Ot = 65536, Ku = 0, Eu = 65535, ze = 0, Je = 255, Pr = 0, Br = 255, Pu = 0, Bu = 65535, $l = 0, Ml = 65535, Lu = 0, Vu = 2 ** 31, Ft = ["200", "302"], Ut = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226", "300", "301", "302", "303", "304", "305", "306", "307", "308"], $t = ["429", "404", "500", "501", "502", "503", "504", "505"], Mt = ["429", "500", "503"];
|
|
4888
|
-
function
|
|
4894
|
+
function vt() {
|
|
4889
4895
|
const e = (o) => /^\d+$/.test(o), a = (o, d, h) => {
|
|
4890
4896
|
if (e(o)) {
|
|
4891
4897
|
const p = Number(o);
|
|
@@ -4945,9 +4951,9 @@ function yt() {
|
|
|
4945
4951
|
stringToNumberArray: t,
|
|
4946
4952
|
numberToStringArray: l,
|
|
4947
4953
|
upstreamsResponseToFields: (o) => {
|
|
4948
|
-
var h, p, m, n,
|
|
4954
|
+
var h, p, m, n, q, w, y, $, N, R, H, I, g, O, U, T, P, x, M, D, Y, Q, z, X, ue, B, Z, te, k, b, _, se, G, ie, he, ae, me, je, Ee, Jt, Wt, Qt, Yt, Zt, Gt, Xt, ea, ta, aa, la, ra, sa, ia, na, oa, ua, ca, da, ha, pa, fa, ma, ga, ya, va, ba, ka, Ca, _a, wa, Sa, Ia, xa, Aa, Ha, Ta, qa, Oa, Fa, Ua, $a, Ma, ja, Na, Ka, Ea, Pa, Ba, La, Va, Ra, Da, za, Ja, Wa, Qa, Ya, Za, Ga, Xa, el, tl, al, ll, rl, sl, il, nl, ol;
|
|
4949
4955
|
const d = r();
|
|
4950
|
-
return d.name = o.name || "", d.algorithm = o.algorithm || "round-robin", d.hostHeader = o.host_header || "", d.clientCertificate = o.client_certificate ? (h = o.client_certificate) == null ? void 0 : h.id : "", d.tags = ((p = o.tags) == null ? void 0 : p.join(", ")) || "", d.slots = o.slots !== null && o.slots !== void 0 ? o.slots.toString() : "10000", d.hashOn = o.hash_on || "none", d.hashFallback = o.hash_fallback || "none", d.hashOnHeader = o.hash_on_header || "", d.hashOnCookie = o.hash_on_cookie || "", d.hashOnCookiePath = o.hash_on_cookie_path || "/", d.hashOnQueryArgument = o.hash_on_query_arg || "", d.hashOnUriCapture = o.hash_on_uri_capture || "", d.hashFallbackHeader = o.hash_fallback_header || "", d.hashFallbackQueryArgument = o.hash_fallback_query_arg || "", d.hashFallbackUriCapture = o.hash_fallback_uri_capture || "", d.healthchecksThreshold = o.healthchecks.threshold !== null && o.healthchecks.threshold !== void 0 ? o.healthchecks.threshold.toString() : "", d.activeHealthSwitch = ((n = (m = o.healthchecks.active) == null ? void 0 : m.healthy) == null ? void 0 : n.interval) !== 0 || ((w = (
|
|
4956
|
+
return d.name = o.name || "", d.algorithm = o.algorithm || "round-robin", d.hostHeader = o.host_header || "", d.clientCertificate = o.client_certificate ? (h = o.client_certificate) == null ? void 0 : h.id : "", d.tags = ((p = o.tags) == null ? void 0 : p.join(", ")) || "", d.slots = o.slots !== null && o.slots !== void 0 ? o.slots.toString() : "10000", d.hashOn = o.hash_on || "none", d.hashFallback = o.hash_fallback || "none", d.hashOnHeader = o.hash_on_header || "", d.hashOnCookie = o.hash_on_cookie || "", d.hashOnCookiePath = o.hash_on_cookie_path || "/", d.hashOnQueryArgument = o.hash_on_query_arg || "", d.hashOnUriCapture = o.hash_on_uri_capture || "", d.hashFallbackHeader = o.hash_fallback_header || "", d.hashFallbackQueryArgument = o.hash_fallback_query_arg || "", d.hashFallbackUriCapture = o.hash_fallback_uri_capture || "", d.healthchecksThreshold = o.healthchecks.threshold !== null && o.healthchecks.threshold !== void 0 ? o.healthchecks.threshold.toString() : "", d.activeHealthSwitch = ((n = (m = o.healthchecks.active) == null ? void 0 : m.healthy) == null ? void 0 : n.interval) !== 0 || ((w = (q = o.healthchecks.active) == null ? void 0 : q.unhealthy) == null ? void 0 : w.interval) !== 0, d.activeHealthCheck.type = ((y = o.healthchecks.active) == null ? void 0 : y.type) || "http", d.activeHealthCheck.httpPath = (($ = o.healthchecks.active) == null ? void 0 : $.http_path) || "/", d.activeHealthCheck.timeout = ((N = o.healthchecks.active) == null ? void 0 : N.timeout) !== null && ((R = o.healthchecks.active) == null ? void 0 : R.timeout) !== void 0 ? (I = (H = o.healthchecks.active) == null ? void 0 : H.timeout) == null ? void 0 : I.toString() : "", d.activeHealthCheck.concurrency = ((g = o.healthchecks.active) == null ? void 0 : g.concurrency) !== null && ((O = o.healthchecks.active) == null ? void 0 : O.concurrency) !== void 0 ? (T = (U = o.healthchecks.active) == null ? void 0 : U.concurrency) == null ? void 0 : T.toString() : "", d.activeHealthCheck.httpsSni = ((P = o.healthchecks.active) == null ? void 0 : P.https_sni) || "", d.activeHealthCheck.verifySsl = ((x = o.healthchecks.active) == null ? void 0 : x.https_verify_certificate) || !1, d.activeHealthCheck.headers = (M = o.healthchecks.active) != null && M.headers && Object.entries((D = o.healthchecks.active) == null ? void 0 : D.headers).length > 0 ? Object.entries((Y = o.healthchecks.active) == null ? void 0 : Y.headers).map(([Lr, kt]) => ({ key: Lr, values: kt == null ? void 0 : kt.join(", ") })) : [{ key: "", values: "" }], d.activeHealthCheck.interval = ((z = (Q = o.healthchecks.active) == null ? void 0 : Q.healthy) == null ? void 0 : z.interval) !== null && ((ue = (X = o.healthchecks.active) == null ? void 0 : X.healthy) == null ? void 0 : ue.interval) !== void 0 ? (te = (Z = (B = o.healthchecks.active) == null ? void 0 : B.healthy) == null ? void 0 : Z.interval) == null ? void 0 : te.toString() : "0", d.activeHealthCheck.interval = ((b = (k = o.healthchecks.active) == null ? void 0 : k.healthy) == null ? void 0 : b.interval) !== null && ((se = (_ = o.healthchecks.active) == null ? void 0 : _.healthy) == null ? void 0 : se.interval) !== void 0 ? (he = (ie = (G = o.healthchecks.active) == null ? void 0 : G.healthy) == null ? void 0 : ie.interval) == null ? void 0 : he.toString() : "0", d.activeHealthCheck.successes = ((me = (ae = o.healthchecks.active) == null ? void 0 : ae.healthy) == null ? void 0 : me.successes) !== null && ((Ee = (je = o.healthchecks.active) == null ? void 0 : je.healthy) == null ? void 0 : Ee.successes) !== void 0 ? (Qt = (Wt = (Jt = o.healthchecks.active) == null ? void 0 : Jt.healthy) == null ? void 0 : Wt.successes) == null ? void 0 : Qt.toString() : "0", d.activeHealthCheck.httpStatuses = (Zt = (Yt = o.healthchecks.active) == null ? void 0 : Yt.healthy) != null && Zt.http_statuses ? l(((Xt = (Gt = o.healthchecks.active) == null ? void 0 : Gt.healthy) == null ? void 0 : Xt.http_statuses) || []) : Ft, d.activeHealthCheck.unhealthyInterval = ((ta = (ea = o.healthchecks.active) == null ? void 0 : ea.unhealthy) == null ? void 0 : ta.interval) !== null && ((la = (aa = o.healthchecks.active) == null ? void 0 : aa.unhealthy) == null ? void 0 : la.interval) !== void 0 ? (ia = (sa = (ra = o.healthchecks.active) == null ? void 0 : ra.unhealthy) == null ? void 0 : sa.interval) == null ? void 0 : ia.toString() : "0", d.activeHealthCheck.httpFailures = ((oa = (na = o.healthchecks.active) == null ? void 0 : na.unhealthy) == null ? void 0 : oa.http_failures) !== null && ((ca = (ua = o.healthchecks.active) == null ? void 0 : ua.unhealthy) == null ? void 0 : ca.http_failures) !== void 0 ? (pa = (ha = (da = o.healthchecks.active) == null ? void 0 : da.unhealthy) == null ? void 0 : ha.http_failures) == null ? void 0 : pa.toString() : "0", d.activeHealthCheck.unhealthyTimeouts = ((ma = (fa = o.healthchecks.active) == null ? void 0 : fa.unhealthy) == null ? void 0 : ma.timeouts) !== null && ((ya = (ga = o.healthchecks.active) == null ? void 0 : ga.unhealthy) == null ? void 0 : ya.timeouts) !== void 0 ? (ka = (ba = (va = o.healthchecks.active) == null ? void 0 : va.unhealthy) == null ? void 0 : ba.timeouts) == null ? void 0 : ka.toString() : "0", d.activeHealthCheck.unhealthyHttpStatuses = (_a = (Ca = o.healthchecks.active) == null ? void 0 : Ca.unhealthy) != null && _a.http_statuses ? l(((Sa = (wa = o.healthchecks.active) == null ? void 0 : wa.unhealthy) == null ? void 0 : Sa.http_statuses) || []) : $t, d.passiveHealthSwitch = ((xa = (Ia = o.healthchecks.passive) == null ? void 0 : Ia.healthy) == null ? void 0 : xa.successes) !== 0 || ((Ha = (Aa = o.healthchecks.passive) == null ? void 0 : Aa.unhealthy) == null ? void 0 : Ha.timeouts) !== 0 || ((qa = (Ta = o.healthchecks.passive) == null ? void 0 : Ta.unhealthy) == null ? void 0 : qa.tcp_failures) !== 0 || ((Fa = (Oa = o.healthchecks.passive) == null ? void 0 : Oa.unhealthy) == null ? void 0 : Fa.http_failures) !== 0, d.passiveHealthCheck.type = ((Ua = o.healthchecks.passive) == null ? void 0 : Ua.type) || "http", d.passiveHealthCheck.successes = ((Ma = ($a = o.healthchecks.passive) == null ? void 0 : $a.healthy) == null ? void 0 : Ma.successes) !== null && ((Na = (ja = o.healthchecks.passive) == null ? void 0 : ja.healthy) == null ? void 0 : Na.successes) !== void 0 ? (Pa = (Ea = (Ka = o.healthchecks.passive) == null ? void 0 : Ka.healthy) == null ? void 0 : Ea.successes) == null ? void 0 : Pa.toString() : "0", d.passiveHealthCheck.httpStatuses = (La = (Ba = o.healthchecks.passive) == null ? void 0 : Ba.healthy) != null && La.http_statuses ? l(((Ra = (Va = o.healthchecks.passive) == null ? void 0 : Va.healthy) == null ? void 0 : Ra.http_statuses) || []) : Ut, d.passiveHealthCheck.timeouts = ((za = (Da = o.healthchecks.passive) == null ? void 0 : Da.unhealthy) == null ? void 0 : za.timeouts) !== null && ((Wa = (Ja = o.healthchecks.passive) == null ? void 0 : Ja.unhealthy) == null ? void 0 : Wa.timeouts) !== void 0 ? (Za = (Ya = (Qa = o.healthchecks.passive) == null ? void 0 : Qa.unhealthy) == null ? void 0 : Ya.timeouts) == null ? void 0 : Za.toString() : "0", d.passiveHealthCheck.tcpFailures = ((Xa = (Ga = o.healthchecks.passive) == null ? void 0 : Ga.unhealthy) == null ? void 0 : Xa.tcp_failures) !== null && ((tl = (el = o.healthchecks.passive) == null ? void 0 : el.unhealthy) == null ? void 0 : tl.tcp_failures) !== void 0 ? (rl = (ll = (al = o.healthchecks.passive) == null ? void 0 : al.unhealthy) == null ? void 0 : ll.tcp_failures) == null ? void 0 : rl.toString() : "", d.passiveHealthCheck.unhealthyHttpStatuses = (il = (sl = o.healthchecks.passive) == null ? void 0 : sl.unhealthy) != null && il.http_statuses ? l(((ol = (nl = o.healthchecks.passive) == null ? void 0 : nl.unhealthy) == null ? void 0 : ol.http_statuses) || []) : Mt, d;
|
|
4951
4957
|
},
|
|
4952
4958
|
getDefaultUpstreamFields: r,
|
|
4953
4959
|
objectsAreEqual: (o, d) => {
|
|
@@ -4963,7 +4969,7 @@ function yt() {
|
|
|
4963
4969
|
const Te = {
|
|
4964
4970
|
useI18n: Nu,
|
|
4965
4971
|
useMultiselectCreation: tt,
|
|
4966
|
-
useHelpers:
|
|
4972
|
+
useHelpers: vt
|
|
4967
4973
|
}, Be = "/api/runtime_groups/{controlPlaneId}", Le = "/{workspace}", Qe = {
|
|
4968
4974
|
list: {
|
|
4969
4975
|
konnect: `${Be}/upstreams`,
|
|
@@ -5032,17 +5038,17 @@ const Te = {
|
|
|
5032
5038
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
5033
5039
|
setup(e, { emit: a }) {
|
|
5034
5040
|
var ue;
|
|
5035
|
-
const t = a, l = e, { i18n: { t: r } } = Te.useI18n(), i = Nt(), { axiosInstance: s } =
|
|
5041
|
+
const t = a, l = e, { i18n: { t: r } } = Te.useI18n(), i = Nt(), { axiosInstance: s } = yt({
|
|
5036
5042
|
headers: (ue = l.config) == null ? void 0 : ue.requestHeaders
|
|
5037
|
-
}), c = K(1), o =
|
|
5043
|
+
}), c = K(1), o = F(() => l.config.app !== "kongManager" || !!l.config.disableSorting), d = {
|
|
5038
5044
|
name: { label: r("upstreams.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
5039
5045
|
slots: { label: r("upstreams.list.table_headers.slots"), searchable: !0, sortable: !0 },
|
|
5040
5046
|
tags: { label: r("upstreams.list.table_headers.tags"), sortable: !1 }
|
|
5041
|
-
}, h = d, p =
|
|
5047
|
+
}, h = d, p = F(() => {
|
|
5042
5048
|
var Z, te;
|
|
5043
5049
|
let B = `${l.config.apiBaseUrl}${Qe.list[l.config.app]}`;
|
|
5044
5050
|
return l.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((Z = l.config) == null ? void 0 : Z.controlPlaneId) || "") : l.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (te = l.config) != null && te.workspace ? `/${l.config.workspace}` : "")), B;
|
|
5045
|
-
}), m = K(""), n =
|
|
5051
|
+
}), m = K(""), n = F(() => {
|
|
5046
5052
|
const B = l.config.app === "konnect" || l.config.isExactMatch;
|
|
5047
5053
|
if (B)
|
|
5048
5054
|
return {
|
|
@@ -5055,7 +5061,7 @@ const Te = {
|
|
|
5055
5061
|
fields: { name: Z, slots: te },
|
|
5056
5062
|
schema: l.config.filterSchema
|
|
5057
5063
|
};
|
|
5058
|
-
}), { fetcher:
|
|
5064
|
+
}), { fetcher: q, fetcherState: w } = Er(l.config, p.value), y = () => {
|
|
5059
5065
|
m.value = "";
|
|
5060
5066
|
}, $ = () => {
|
|
5061
5067
|
c.value++;
|
|
@@ -5093,7 +5099,7 @@ const Te = {
|
|
|
5093
5099
|
}, g = (B) => ({
|
|
5094
5100
|
label: r("upstreams.actions.view"),
|
|
5095
5101
|
to: l.config.getViewRoute(B)
|
|
5096
|
-
}),
|
|
5102
|
+
}), O = (B) => ({
|
|
5097
5103
|
label: r("upstreams.actions.edit"),
|
|
5098
5104
|
to: l.config.getEditRoute(B)
|
|
5099
5105
|
}), U = K(void 0), T = K(!1), P = K(!1), x = K(""), M = Nr(l.config, p.value), D = (B) => {
|
|
@@ -5134,26 +5140,26 @@ const Te = {
|
|
|
5134
5140
|
}), (B, Z) => {
|
|
5135
5141
|
const te = j("KButton"), k = j("KBadge"), b = j("KTruncate"), _ = j("KDropdownItem"), se = j("KClipboardProvider");
|
|
5136
5142
|
return C(), E("div", Ru, [
|
|
5137
|
-
|
|
5143
|
+
v(u(Mr), {
|
|
5138
5144
|
"cache-identifier": e.cacheIdentifier,
|
|
5139
5145
|
"disable-pagination-page-jump": "",
|
|
5140
5146
|
"disable-sorting": o.value,
|
|
5141
5147
|
"empty-state-options": X.value,
|
|
5142
5148
|
"enable-entity-actions": "",
|
|
5143
5149
|
"error-message": N.value,
|
|
5144
|
-
fetcher: u(
|
|
5150
|
+
fetcher: u(q),
|
|
5145
5151
|
"fetcher-cache-key": c.value,
|
|
5146
5152
|
"pagination-type": "offset",
|
|
5147
5153
|
"preferences-storage-key": "kong-ui-entities-upstreams-list",
|
|
5148
5154
|
query: m.value,
|
|
5149
5155
|
"table-headers": u(h),
|
|
5150
5156
|
"use-action-outside": e.useActionOutside,
|
|
5151
|
-
onClearSearchInput:
|
|
5157
|
+
onClearSearchInput: y,
|
|
5152
5158
|
"onClick:row": Z[1] || (Z[1] = (G) => I(G)),
|
|
5153
5159
|
onSort: $
|
|
5154
5160
|
}, {
|
|
5155
5161
|
"toolbar-filter": f(() => [
|
|
5156
|
-
|
|
5162
|
+
v(u(xu), {
|
|
5157
5163
|
modelValue: m.value,
|
|
5158
5164
|
"onUpdate:modelValue": Z[0] || (Z[0] = (G) => m.value = G),
|
|
5159
5165
|
config: n.value
|
|
@@ -5164,11 +5170,11 @@ const Te = {
|
|
|
5164
5170
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
5165
5171
|
}, {
|
|
5166
5172
|
default: f(() => [
|
|
5167
|
-
|
|
5173
|
+
v(u(xe), {
|
|
5168
5174
|
"auth-function": () => e.canCreate()
|
|
5169
5175
|
}, {
|
|
5170
5176
|
default: f(() => [
|
|
5171
|
-
Se(
|
|
5177
|
+
Se(v(te, {
|
|
5172
5178
|
appearance: "primary",
|
|
5173
5179
|
"data-testid": "toolbar-add-upstream",
|
|
5174
5180
|
icon: "plus",
|
|
@@ -5193,7 +5199,7 @@ const Te = {
|
|
|
5193
5199
|
A("span", Du, S(G), 1)
|
|
5194
5200
|
]),
|
|
5195
5201
|
tags: f(({ rowValue: G }) => [
|
|
5196
|
-
|
|
5202
|
+
v(b, null, {
|
|
5197
5203
|
default: f(() => [
|
|
5198
5204
|
(C(!0), E(pe, null, ke(G, (ie) => (C(), V(k, {
|
|
5199
5205
|
key: ie,
|
|
@@ -5209,9 +5215,9 @@ const Te = {
|
|
|
5209
5215
|
}, 1024)
|
|
5210
5216
|
]),
|
|
5211
5217
|
actions: f(({ row: G }) => [
|
|
5212
|
-
|
|
5218
|
+
v(se, null, {
|
|
5213
5219
|
default: f(({ copyToClipboard: ie }) => [
|
|
5214
|
-
|
|
5220
|
+
v(_, {
|
|
5215
5221
|
"data-testid": "action-entity-copy-id",
|
|
5216
5222
|
onClick: (he) => R(G, ie)
|
|
5217
5223
|
}, {
|
|
@@ -5223,9 +5229,9 @@ const Te = {
|
|
|
5223
5229
|
]),
|
|
5224
5230
|
_: 2
|
|
5225
5231
|
}, 1024),
|
|
5226
|
-
|
|
5232
|
+
v(se, null, {
|
|
5227
5233
|
default: f(({ copyToClipboard: ie }) => [
|
|
5228
|
-
|
|
5234
|
+
v(_, {
|
|
5229
5235
|
"data-testid": "action-entity-copy-json",
|
|
5230
5236
|
onClick: (he) => H(G, ie)
|
|
5231
5237
|
}, {
|
|
@@ -5237,11 +5243,11 @@ const Te = {
|
|
|
5237
5243
|
]),
|
|
5238
5244
|
_: 2
|
|
5239
5245
|
}, 1024),
|
|
5240
|
-
|
|
5246
|
+
v(u(xe), {
|
|
5241
5247
|
"auth-function": () => e.canRetrieve(G)
|
|
5242
5248
|
}, {
|
|
5243
5249
|
default: f(() => [
|
|
5244
|
-
|
|
5250
|
+
v(_, {
|
|
5245
5251
|
"data-testid": "action-entity-view",
|
|
5246
5252
|
"has-divider": "",
|
|
5247
5253
|
item: g(G.id)
|
|
@@ -5249,22 +5255,22 @@ const Te = {
|
|
|
5249
5255
|
]),
|
|
5250
5256
|
_: 2
|
|
5251
5257
|
}, 1032, ["auth-function"]),
|
|
5252
|
-
|
|
5258
|
+
v(u(xe), {
|
|
5253
5259
|
"auth-function": () => e.canEdit(G)
|
|
5254
5260
|
}, {
|
|
5255
5261
|
default: f(() => [
|
|
5256
|
-
|
|
5262
|
+
v(_, {
|
|
5257
5263
|
"data-testid": "action-entity-edit",
|
|
5258
|
-
item:
|
|
5264
|
+
item: O(G.id)
|
|
5259
5265
|
}, null, 8, ["item"])
|
|
5260
5266
|
]),
|
|
5261
5267
|
_: 2
|
|
5262
5268
|
}, 1032, ["auth-function"]),
|
|
5263
|
-
|
|
5269
|
+
v(u(xe), {
|
|
5264
5270
|
"auth-function": () => e.canDelete(G)
|
|
5265
5271
|
}, {
|
|
5266
5272
|
default: f(() => [
|
|
5267
|
-
|
|
5273
|
+
v(_, {
|
|
5268
5274
|
danger: "",
|
|
5269
5275
|
"data-testid": "action-entity-delete",
|
|
5270
5276
|
"has-divider": "",
|
|
@@ -5281,7 +5287,7 @@ const Te = {
|
|
|
5281
5287
|
]),
|
|
5282
5288
|
_: 1
|
|
5283
5289
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
5284
|
-
|
|
5290
|
+
v(u(jr), {
|
|
5285
5291
|
"action-pending": P.value,
|
|
5286
5292
|
description: u(r)("upstreams.delete.description"),
|
|
5287
5293
|
"entity-name": U.value && (U.value.name || U.value.id),
|
|
@@ -5345,12 +5351,12 @@ const Te = {
|
|
|
5345
5351
|
emits: ["update", "error", "loading", "cancel"],
|
|
5346
5352
|
setup(e, { emit: a }) {
|
|
5347
5353
|
var I;
|
|
5348
|
-
const t = a, l = e, { i18n: { t: r } } = Te.useI18n(), { getMessageFromError: i } = Kr(), { axiosInstance: s } =
|
|
5354
|
+
const t = a, l = e, { i18n: { t: r } } = Te.useI18n(), { getMessageFromError: i } = Kr(), { axiosInstance: s } = yt({
|
|
5349
5355
|
headers: (I = l.config) == null ? void 0 : I.requestHeaders
|
|
5350
|
-
}), c =
|
|
5356
|
+
}), c = F(() => {
|
|
5351
5357
|
var g;
|
|
5352
5358
|
return rt.form[l.config.app].edit.replace(/{upstreamId}/gi, ((g = l.config) == null ? void 0 : g.upstreamId) || "");
|
|
5353
|
-
}), o =
|
|
5359
|
+
}), o = F(() => l.targetId ? _e.Edit : _e.Create), d = F(() => o.value === _e.Edit ? r("targets.form.edit.title") : r("targets.form.create.title")), h = st({
|
|
5354
5360
|
fields: {
|
|
5355
5361
|
target: "",
|
|
5356
5362
|
weight: 100,
|
|
@@ -5366,40 +5372,40 @@ const Te = {
|
|
|
5366
5372
|
target: "",
|
|
5367
5373
|
weight: 100,
|
|
5368
5374
|
tags: ""
|
|
5369
|
-
}, n =
|
|
5375
|
+
}, n = F(() => {
|
|
5370
5376
|
const g = parseInt(h.fields.weight.toString(), 10);
|
|
5371
5377
|
return g < 0 || g > 65535;
|
|
5372
|
-
}),
|
|
5378
|
+
}), q = F(
|
|
5373
5379
|
() => JSON.stringify(h.fields) !== JSON.stringify(p) && !!h.fields.target && !!h.fields.weight && !n.value
|
|
5374
5380
|
), w = (g) => {
|
|
5375
|
-
var
|
|
5376
|
-
h.fields.target = (g == null ? void 0 : g.target) || "", h.fields.weight = (g == null ? void 0 : g.weight) ?? "", h.fields.tags = ((
|
|
5377
|
-
},
|
|
5381
|
+
var O;
|
|
5382
|
+
h.fields.target = (g == null ? void 0 : g.target) || "", h.fields.weight = (g == null ? void 0 : g.weight) ?? "", h.fields.tags = ((O = g == null ? void 0 : g.tags) == null ? void 0 : O.join(", ")) || "", Object.assign(p, h.fields);
|
|
5383
|
+
}, y = () => {
|
|
5378
5384
|
h.errorMessage = "", t("cancel");
|
|
5379
|
-
}, $ =
|
|
5380
|
-
var
|
|
5385
|
+
}, $ = F(() => {
|
|
5386
|
+
var O, U;
|
|
5381
5387
|
let g = `${l.config.apiBaseUrl}${rt.form[l.config.app].validate}`;
|
|
5382
|
-
return l.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((
|
|
5383
|
-
}), N =
|
|
5384
|
-
var
|
|
5388
|
+
return l.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((O = l.config) == null ? void 0 : O.controlPlaneId) || "") : l.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (U = l.config) != null && U.workspace ? `/${l.config.workspace}` : "")), g = g.replace(/{id}/gi, l.targetId), g;
|
|
5389
|
+
}), N = F(() => {
|
|
5390
|
+
var O, U, T, P;
|
|
5385
5391
|
let g = `${l.config.apiBaseUrl}${rt.form[l.config.app][o.value]}`;
|
|
5386
|
-
return l.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((
|
|
5387
|
-
}), R =
|
|
5388
|
-
var g,
|
|
5392
|
+
return l.config.app === "konnect" ? g = g.replace(/{controlPlaneId}/gi, ((O = l.config) == null ? void 0 : O.controlPlaneId) || "").replace(/{upstreamId}/gi, ((U = l.config) == null ? void 0 : U.upstreamId) || "") : l.config.app === "kongManager" && (g = g.replace(/\/{workspace}/gi, (T = l.config) != null && T.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, ((P = l.config) == null ? void 0 : P.upstreamId) || "")), g = g.replace(/{id}/gi, l.targetId), g;
|
|
5393
|
+
}), R = F(() => {
|
|
5394
|
+
var g, O, U;
|
|
5389
5395
|
return {
|
|
5390
5396
|
target: h.fields.target,
|
|
5391
5397
|
weight: parseInt(h.fields.weight),
|
|
5392
|
-
tags: (U = (
|
|
5398
|
+
tags: (U = (O = (g = h.fields.tags) == null ? void 0 : g.split(",")) == null ? void 0 : O.map((T) => String(T || "").trim())) == null ? void 0 : U.filter((T) => T !== ""),
|
|
5393
5399
|
upstream: { id: l.config.upstreamId }
|
|
5394
5400
|
};
|
|
5395
5401
|
}), H = async () => {
|
|
5396
|
-
var g,
|
|
5402
|
+
var g, O;
|
|
5397
5403
|
try {
|
|
5398
5404
|
h.isReadonly = !0, h.errorMessage = "";
|
|
5399
5405
|
let U;
|
|
5400
5406
|
if (await s.post($.value, R.value), o.value === "create" ? U = await s.post(N.value, R.value) : o.value === "edit" && (U = ((g = l.config) == null ? void 0 : g.app) === "konnect" ? await s.put(N.value, R.value) : await s.patch(N.value, R.value)), U) {
|
|
5401
5407
|
const { data: T } = U;
|
|
5402
|
-
h.fields.target = (T == null ? void 0 : T.name) || "", h.fields.weight = (T == null ? void 0 : T.weight) ?? 100, h.fields.tags = ((
|
|
5408
|
+
h.fields.target = (T == null ? void 0 : T.name) || "", h.fields.weight = (T == null ? void 0 : T.weight) ?? 100, h.fields.tags = ((O = T == null ? void 0 : T.tags) == null ? void 0 : O.join(", ")) || "", t("update", T), Object.assign(h.fields, m);
|
|
5403
5409
|
}
|
|
5404
5410
|
} catch (U) {
|
|
5405
5411
|
h.errorMessage = i(U), t("error", U);
|
|
@@ -5409,39 +5415,39 @@ const Te = {
|
|
|
5409
5415
|
};
|
|
5410
5416
|
return be(() => l.targetId, () => {
|
|
5411
5417
|
Object.assign(h.fields, m);
|
|
5412
|
-
}), (g,
|
|
5418
|
+
}), (g, O) => {
|
|
5413
5419
|
const U = j("KInput"), T = j("KPrompt");
|
|
5414
5420
|
return C(), V(T, {
|
|
5415
|
-
"action-button-disabled": !
|
|
5421
|
+
"action-button-disabled": !q.value || h.isReadonly,
|
|
5416
5422
|
"action-button-text": u(r)("targets.form.buttons.save"),
|
|
5417
5423
|
"cancel-button-text": u(r)("targets.form.buttons.cancel"),
|
|
5418
5424
|
title: d.value,
|
|
5419
5425
|
visible: e.isVisible,
|
|
5420
|
-
onCancel:
|
|
5426
|
+
onCancel: y,
|
|
5421
5427
|
onProceed: H
|
|
5422
5428
|
}, {
|
|
5423
5429
|
default: f(() => [
|
|
5424
5430
|
A("div", Ju, [
|
|
5425
|
-
|
|
5431
|
+
v(u($r), {
|
|
5426
5432
|
config: e.config,
|
|
5427
5433
|
"edit-id": e.targetId,
|
|
5428
5434
|
"error-message": h.errorMessage,
|
|
5429
5435
|
"fetch-url": c.value,
|
|
5430
5436
|
"form-fields": R.value,
|
|
5431
5437
|
"is-readonly": h.isReadonly,
|
|
5432
|
-
onCancel:
|
|
5433
|
-
"onFetch:error":
|
|
5438
|
+
onCancel: y,
|
|
5439
|
+
"onFetch:error": O[3] || (O[3] = (P) => g.$emit("error", P)),
|
|
5434
5440
|
"onFetch:success": w,
|
|
5435
|
-
onLoading:
|
|
5441
|
+
onLoading: O[4] || (O[4] = (P) => g.$emit("loading", P))
|
|
5436
5442
|
}, {
|
|
5437
5443
|
default: f(() => [
|
|
5438
5444
|
A("div", Wu, [
|
|
5439
5445
|
g.$slots.info ? (C(), E("div", Qu, [
|
|
5440
5446
|
re(g.$slots, "info", {}, void 0, !0)
|
|
5441
5447
|
])) : J("", !0),
|
|
5442
|
-
|
|
5448
|
+
v(U, {
|
|
5443
5449
|
modelValue: h.fields.target,
|
|
5444
|
-
"onUpdate:modelValue":
|
|
5450
|
+
"onUpdate:modelValue": O[0] || (O[0] = (P) => h.fields.target = P),
|
|
5445
5451
|
modelModifiers: { trim: !0 },
|
|
5446
5452
|
autocomplete: "off",
|
|
5447
5453
|
class: "target-form-input",
|
|
@@ -5453,9 +5459,9 @@ const Te = {
|
|
|
5453
5459
|
required: "",
|
|
5454
5460
|
type: "text"
|
|
5455
5461
|
}, null, 8, ["modelValue", "label", "label-attributes", "placeholder", "readonly"]),
|
|
5456
|
-
|
|
5462
|
+
v(U, {
|
|
5457
5463
|
modelValue: h.fields.weight,
|
|
5458
|
-
"onUpdate:modelValue":
|
|
5464
|
+
"onUpdate:modelValue": O[1] || (O[1] = (P) => h.fields.weight = P),
|
|
5459
5465
|
autocomplete: "off",
|
|
5460
5466
|
class: "target-form-input",
|
|
5461
5467
|
"data-testid": "target-form-weight",
|
|
@@ -5469,9 +5475,9 @@ const Te = {
|
|
|
5469
5475
|
required: "",
|
|
5470
5476
|
type: "number"
|
|
5471
5477
|
}, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "readonly"]),
|
|
5472
|
-
|
|
5478
|
+
v(U, {
|
|
5473
5479
|
modelValue: h.fields.tags,
|
|
5474
|
-
"onUpdate:modelValue":
|
|
5480
|
+
"onUpdate:modelValue": O[2] || (O[2] = (P) => h.fields.tags = P),
|
|
5475
5481
|
modelModifiers: { trim: !0 },
|
|
5476
5482
|
autocomplete: "off",
|
|
5477
5483
|
class: "target-form-input",
|
|
@@ -5533,21 +5539,21 @@ const Te = {
|
|
|
5533
5539
|
emits: ["error", "copy:success", "copy:error", "delete:success", "health-actions:healthy", "health-actions:unhealthy", "create:target", "update:target"],
|
|
5534
5540
|
setup(e, { emit: a }) {
|
|
5535
5541
|
var te;
|
|
5536
|
-
const t = a, l = e, { i18n: { t: r } } = Te.useI18n(), { axiosInstance: i } =
|
|
5542
|
+
const t = a, l = e, { i18n: { t: r } } = Te.useI18n(), { axiosInstance: i } = yt({
|
|
5537
5543
|
headers: (te = l.config) == null ? void 0 : te.requestHeaders
|
|
5538
|
-
}), s = K(1), c =
|
|
5544
|
+
}), s = K(1), c = F(() => l.config.app !== "kongManager" || !!l.config.disableSorting), d = {
|
|
5539
5545
|
target: { label: r("targets.list.table_headers.target_address"), sortable: !0 },
|
|
5540
5546
|
weight: { label: r("targets.list.table_headers.weight"), sortable: !0 },
|
|
5541
5547
|
tags: { label: r("targets.list.table_headers.tags"), sortable: !1 }
|
|
5542
|
-
}, h =
|
|
5548
|
+
}, h = F(() => {
|
|
5543
5549
|
var b, _, se, G;
|
|
5544
5550
|
let k = `${l.config.apiBaseUrl}${rt.list[l.config.app]}`;
|
|
5545
5551
|
return l.config.app === "konnect" ? k = k.replace(/{controlPlaneId}/gi, ((b = l.config) == null ? void 0 : b.controlPlaneId) || "").replace(/{upstreamId}/gi, ((_ = l.config) == null ? void 0 : _.upstreamId) || "") : l.config.app === "kongManager" && (k = k.replace(/\/{workspace}/gi, (se = l.config) != null && se.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, ((G = l.config) == null ? void 0 : G.upstreamId) || "")), k;
|
|
5546
5552
|
}), { fetcher: p, fetcherState: m } = Er(l.config, h.value), n = () => {
|
|
5547
5553
|
s.value++;
|
|
5548
|
-
},
|
|
5554
|
+
}, q = K(null), w = () => {
|
|
5549
5555
|
X.value = !0;
|
|
5550
|
-
},
|
|
5556
|
+
}, y = (k, b) => {
|
|
5551
5557
|
const _ = k.id;
|
|
5552
5558
|
if (!b(_)) {
|
|
5553
5559
|
t("copy:error", {
|
|
@@ -5577,32 +5583,32 @@ const Te = {
|
|
|
5577
5583
|
});
|
|
5578
5584
|
}, N = (k) => {
|
|
5579
5585
|
z.value = k, X.value = !0;
|
|
5580
|
-
}, R = (k) => l.config.app === "konnect" ? !1 : l.config.canMarkHealthy(k), H = (k) => l.config.app === "konnect" ? !1 : l.config.canMarkUnhealthy(k), I = K(void 0), g = K(!1),
|
|
5586
|
+
}, R = (k) => l.config.app === "konnect" ? !1 : l.config.canMarkHealthy(k), H = (k) => l.config.app === "konnect" ? !1 : l.config.canMarkUnhealthy(k), I = K(void 0), g = K(!1), O = K(!1), U = K(""), T = Nr(l.config, h.value), P = (k) => {
|
|
5581
5587
|
I.value = k, g.value = !0;
|
|
5582
5588
|
}, x = () => {
|
|
5583
5589
|
g.value = !1;
|
|
5584
5590
|
}, M = async () => {
|
|
5585
5591
|
var k, b, _;
|
|
5586
5592
|
if ((k = I.value) != null && k.id) {
|
|
5587
|
-
|
|
5593
|
+
O.value = !0;
|
|
5588
5594
|
try {
|
|
5589
|
-
await i.delete(T(I.value.id)),
|
|
5595
|
+
await i.delete(T(I.value.id)), O.value = !1, g.value = !1, s.value++, t("delete:success", I.value);
|
|
5590
5596
|
} catch (se) {
|
|
5591
5597
|
U.value = ((_ = (b = se.response) == null ? void 0 : b.data) == null ? void 0 : _.message) || se.message || r("targets.errors.delete"), t("error", se);
|
|
5592
5598
|
} finally {
|
|
5593
|
-
|
|
5599
|
+
O.value = !1;
|
|
5594
5600
|
}
|
|
5595
5601
|
}
|
|
5596
5602
|
}, D = K(!0);
|
|
5597
5603
|
be(m, (k) => {
|
|
5598
5604
|
var b, _, se, G;
|
|
5599
5605
|
if (Array.isArray((b = k == null ? void 0 : k.response) == null ? void 0 : b.data) && (D.value = k.response.data.length > 0), k.status === Oe.Error) {
|
|
5600
|
-
|
|
5606
|
+
q.value = {
|
|
5601
5607
|
title: r("targets.errors.general")
|
|
5602
|
-
}, (G = (se = (_ = k.error) == null ? void 0 : _.response) == null ? void 0 : se.data) != null && G.message && (
|
|
5608
|
+
}, (G = (se = (_ = k.error) == null ? void 0 : _.response) == null ? void 0 : se.data) != null && G.message && (q.value.message = k.error.response.data.message), t("error", k.error);
|
|
5603
5609
|
return;
|
|
5604
5610
|
}
|
|
5605
|
-
|
|
5611
|
+
q.value = null;
|
|
5606
5612
|
});
|
|
5607
5613
|
const Y = K({
|
|
5608
5614
|
ctaText: void 0,
|
|
@@ -5616,7 +5622,7 @@ const Te = {
|
|
|
5616
5622
|
at(async () => {
|
|
5617
5623
|
await l.canCreate() && (Y.value.title = r("targets.list.empty_state.title"), Y.value.ctaText = r("targets.actions.create"));
|
|
5618
5624
|
});
|
|
5619
|
-
const Q =
|
|
5625
|
+
const Q = F(() => ({
|
|
5620
5626
|
app: l.config.app,
|
|
5621
5627
|
apiBaseUrl: l.config.apiBaseUrl,
|
|
5622
5628
|
upstreamId: l.config.upstreamId,
|
|
@@ -5639,13 +5645,13 @@ const Te = {
|
|
|
5639
5645
|
return (k, b) => {
|
|
5640
5646
|
const _ = j("KButton"), se = j("KBadge"), G = j("KTruncate"), ie = j("KDropdownItem"), he = j("KClipboardProvider");
|
|
5641
5647
|
return C(), E("div", Gu, [
|
|
5642
|
-
|
|
5648
|
+
v(u(Mr), {
|
|
5643
5649
|
"cache-identifier": e.cacheIdentifier,
|
|
5644
5650
|
"disable-pagination-page-jump": "",
|
|
5645
5651
|
"disable-sorting": c.value,
|
|
5646
5652
|
"empty-state-options": Y.value,
|
|
5647
5653
|
"enable-entity-actions": "",
|
|
5648
|
-
"error-message":
|
|
5654
|
+
"error-message": q.value,
|
|
5649
5655
|
fetcher: u(p),
|
|
5650
5656
|
"fetcher-cache-key": s.value,
|
|
5651
5657
|
"pagination-type": "offset",
|
|
@@ -5660,11 +5666,11 @@ const Te = {
|
|
|
5660
5666
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
5661
5667
|
}, {
|
|
5662
5668
|
default: f(() => [
|
|
5663
|
-
|
|
5669
|
+
v(u(xe), {
|
|
5664
5670
|
"auth-function": () => e.canCreate()
|
|
5665
5671
|
}, {
|
|
5666
5672
|
default: f(() => [
|
|
5667
|
-
Se(
|
|
5673
|
+
Se(v(_, {
|
|
5668
5674
|
appearance: "primary",
|
|
5669
5675
|
"data-testid": "toolbar-new-target",
|
|
5670
5676
|
icon: "plus",
|
|
@@ -5689,7 +5695,7 @@ const Te = {
|
|
|
5689
5695
|
A("span", Xu, S(ae), 1)
|
|
5690
5696
|
]),
|
|
5691
5697
|
tags: f(({ rowValue: ae }) => [
|
|
5692
|
-
|
|
5698
|
+
v(G, null, {
|
|
5693
5699
|
default: f(() => [
|
|
5694
5700
|
(C(!0), E(pe, null, ke(ae, (me) => (C(), V(se, {
|
|
5695
5701
|
key: me,
|
|
@@ -5705,11 +5711,11 @@ const Te = {
|
|
|
5705
5711
|
}, 1024)
|
|
5706
5712
|
]),
|
|
5707
5713
|
actions: f(({ row: ae }) => [
|
|
5708
|
-
|
|
5714
|
+
v(he, null, {
|
|
5709
5715
|
default: f(({ copyToClipboard: me }) => [
|
|
5710
|
-
|
|
5716
|
+
v(ie, {
|
|
5711
5717
|
"data-testid": "action-entity-copy-id",
|
|
5712
|
-
onClick: (je) =>
|
|
5718
|
+
onClick: (je) => y(ae, me)
|
|
5713
5719
|
}, {
|
|
5714
5720
|
default: f(() => [
|
|
5715
5721
|
W(S(u(r)("targets.actions.copy_id")), 1)
|
|
@@ -5719,9 +5725,9 @@ const Te = {
|
|
|
5719
5725
|
]),
|
|
5720
5726
|
_: 2
|
|
5721
5727
|
}, 1024),
|
|
5722
|
-
|
|
5728
|
+
v(he, null, {
|
|
5723
5729
|
default: f(({ copyToClipboard: me }) => [
|
|
5724
|
-
|
|
5730
|
+
v(ie, {
|
|
5725
5731
|
"data-testid": "action-entity-copy-json",
|
|
5726
5732
|
onClick: (je) => $(ae, me)
|
|
5727
5733
|
}, {
|
|
@@ -5733,11 +5739,11 @@ const Te = {
|
|
|
5733
5739
|
]),
|
|
5734
5740
|
_: 2
|
|
5735
5741
|
}, 1024),
|
|
5736
|
-
|
|
5742
|
+
v(u(xe), {
|
|
5737
5743
|
"auth-function": () => e.canEdit(ae)
|
|
5738
5744
|
}, {
|
|
5739
5745
|
default: f(() => [
|
|
5740
|
-
|
|
5746
|
+
v(ie, {
|
|
5741
5747
|
"data-testid": "action-entity-edit",
|
|
5742
5748
|
"has-divider": "",
|
|
5743
5749
|
onClick: (me) => N(ae.id)
|
|
@@ -5750,11 +5756,11 @@ const Te = {
|
|
|
5750
5756
|
]),
|
|
5751
5757
|
_: 2
|
|
5752
5758
|
}, 1032, ["auth-function"]),
|
|
5753
|
-
|
|
5759
|
+
v(u(xe), {
|
|
5754
5760
|
"auth-function": () => R(ae)
|
|
5755
5761
|
}, {
|
|
5756
5762
|
default: f(() => [
|
|
5757
|
-
|
|
5763
|
+
v(ie, {
|
|
5758
5764
|
"data-testid": "action-target-mark-healthy",
|
|
5759
5765
|
onClick: (me) => t("health-actions:healthy", ae)
|
|
5760
5766
|
}, {
|
|
@@ -5766,11 +5772,11 @@ const Te = {
|
|
|
5766
5772
|
]),
|
|
5767
5773
|
_: 2
|
|
5768
5774
|
}, 1032, ["auth-function"]),
|
|
5769
|
-
|
|
5775
|
+
v(u(xe), {
|
|
5770
5776
|
"auth-function": () => H(ae)
|
|
5771
5777
|
}, {
|
|
5772
5778
|
default: f(() => [
|
|
5773
|
-
|
|
5779
|
+
v(ie, {
|
|
5774
5780
|
"data-testid": "action-target-mark-unhealthy",
|
|
5775
5781
|
onClick: (me) => t("health-actions:unhealthy", ae)
|
|
5776
5782
|
}, {
|
|
@@ -5782,11 +5788,11 @@ const Te = {
|
|
|
5782
5788
|
]),
|
|
5783
5789
|
_: 2
|
|
5784
5790
|
}, 1032, ["auth-function"]),
|
|
5785
|
-
|
|
5791
|
+
v(u(xe), {
|
|
5786
5792
|
"auth-function": () => e.canDelete(ae)
|
|
5787
5793
|
}, {
|
|
5788
5794
|
default: f(() => [
|
|
5789
|
-
|
|
5795
|
+
v(ie, {
|
|
5790
5796
|
danger: "",
|
|
5791
5797
|
"data-testid": "action-entity-delete",
|
|
5792
5798
|
"has-divider": "",
|
|
@@ -5803,8 +5809,8 @@ const Te = {
|
|
|
5803
5809
|
]),
|
|
5804
5810
|
_: 1
|
|
5805
5811
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "table-headers", "use-action-outside"]),
|
|
5806
|
-
|
|
5807
|
-
"action-pending":
|
|
5812
|
+
v(u(jr), {
|
|
5813
|
+
"action-pending": O.value,
|
|
5808
5814
|
description: u(r)("targets.delete.description"),
|
|
5809
5815
|
"entity-type": u(Kt).Target,
|
|
5810
5816
|
error: U.value,
|
|
@@ -5814,7 +5820,7 @@ const Te = {
|
|
|
5814
5820
|
onCancel: x,
|
|
5815
5821
|
onProceed: M
|
|
5816
5822
|
}, null, 8, ["action-pending", "description", "entity-type", "error", "title", "visible"]),
|
|
5817
|
-
|
|
5823
|
+
v(Zu, {
|
|
5818
5824
|
config: Q.value,
|
|
5819
5825
|
"is-visible": X.value,
|
|
5820
5826
|
"target-id": z.value,
|
|
@@ -5877,25 +5883,25 @@ const Te = {
|
|
|
5877
5883
|
debouncedQueryChange: p,
|
|
5878
5884
|
loading: m,
|
|
5879
5885
|
loadItems: n,
|
|
5880
|
-
results:
|
|
5881
|
-
} = Ul(r.config, (Y = Qe.form[(D = r.config) == null ? void 0 : D.app]) == null ? void 0 : Y.getCertificates), w = K(""),
|
|
5886
|
+
results: q
|
|
5887
|
+
} = Ul(r.config, (Y = Qe.form[(D = r.config) == null ? void 0 : D.app]) == null ? void 0 : Y.getCertificates), w = K(""), y = F(() => {
|
|
5882
5888
|
var Q;
|
|
5883
5889
|
return !!r.name && !((Q = h.value) != null && Q.some((z) => z.host === r.name));
|
|
5884
|
-
}), $ =
|
|
5890
|
+
}), $ = F(() => {
|
|
5885
5891
|
var z, X, ue;
|
|
5886
|
-
const Q =
|
|
5892
|
+
const Q = y.value && r.name.includes((z = w.value) == null ? void 0 : z.toLowerCase());
|
|
5887
5893
|
return (ue = d.value) == null ? void 0 : ue.map((B) => ({ label: B.host, value: B.id })).concat(
|
|
5888
5894
|
Q ? [{ label: r.name, value: ((X = H.value) == null ? void 0 : X.value) || r.name }] : []
|
|
5889
5895
|
);
|
|
5890
|
-
}), N =
|
|
5896
|
+
}), N = F(() => {
|
|
5891
5897
|
var Q;
|
|
5892
|
-
return (Q =
|
|
5893
|
-
}), R = K(""), H = K({ value: "", label: "" }), I =
|
|
5898
|
+
return (Q = q.value) == null ? void 0 : Q.map((z) => ({ label: z.id, value: z.id }));
|
|
5899
|
+
}), R = K(""), H = K({ value: "", label: "" }), I = F(() => {
|
|
5894
5900
|
var Q, z;
|
|
5895
5901
|
return ((Q = $.value.find((X) => X.value === R.value)) == null ? void 0 : Q.label) || ((z = H.value) == null ? void 0 : z.label);
|
|
5896
5902
|
}), g = (Q) => {
|
|
5897
5903
|
w.value = Q, s(Q);
|
|
5898
|
-
},
|
|
5904
|
+
}, O = (Q) => {
|
|
5899
5905
|
H.value = Q;
|
|
5900
5906
|
}, U = () => {
|
|
5901
5907
|
H.value = { value: "", label: "" };
|
|
@@ -5921,7 +5927,7 @@ const Te = {
|
|
|
5921
5927
|
key: 0,
|
|
5922
5928
|
type: "form"
|
|
5923
5929
|
})) : (C(), E("div", tc, [
|
|
5924
|
-
|
|
5930
|
+
v(ue, {
|
|
5925
5931
|
class: "name-select margin-bottom-6",
|
|
5926
5932
|
clearable: "",
|
|
5927
5933
|
"data-testid": "upstreams-form-name",
|
|
@@ -5937,13 +5943,13 @@ const Te = {
|
|
|
5937
5943
|
readonly: e.readonly,
|
|
5938
5944
|
required: "",
|
|
5939
5945
|
width: "100%",
|
|
5940
|
-
onItemAdded:
|
|
5946
|
+
onItemAdded: O,
|
|
5941
5947
|
onItemRemoved: U,
|
|
5942
5948
|
onQueryChange: g,
|
|
5943
5949
|
"onUpdate:modelValue": T
|
|
5944
5950
|
}, {
|
|
5945
5951
|
"label-tooltip": f(() => [
|
|
5946
|
-
|
|
5952
|
+
v(u(t), {
|
|
5947
5953
|
keypath: "upstreams.form.fields.name.tooltip",
|
|
5948
5954
|
scope: "global"
|
|
5949
5955
|
}, {
|
|
@@ -5955,7 +5961,7 @@ const Te = {
|
|
|
5955
5961
|
]),
|
|
5956
5962
|
_: 1
|
|
5957
5963
|
}, 8, ["items", "label", "loading", "model-value", "placeholder", "readonly", "onUpdate:modelValue"]),
|
|
5958
|
-
|
|
5964
|
+
v(B, {
|
|
5959
5965
|
autocomplete: "off",
|
|
5960
5966
|
class: "margin-bottom-6",
|
|
5961
5967
|
"data-testid": "upstreams-form-host-header",
|
|
@@ -5965,7 +5971,7 @@ const Te = {
|
|
|
5965
5971
|
type: "text",
|
|
5966
5972
|
"onUpdate:modelValue": z[0] || (z[0] = (Z) => i("update:host-header", Z))
|
|
5967
5973
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
5968
|
-
|
|
5974
|
+
v(ue, {
|
|
5969
5975
|
class: "certificate-select margin-bottom-6",
|
|
5970
5976
|
clearable: "",
|
|
5971
5977
|
"data-testid": "upstreams-form-client-certificate",
|
|
@@ -5982,7 +5988,7 @@ const Te = {
|
|
|
5982
5988
|
onQueryChange: u(p),
|
|
5983
5989
|
"onUpdate:modelValue": z[1] || (z[1] = (Z) => i("update:client-certificate", Z))
|
|
5984
5990
|
}, null, 8, ["items", "label", "label-attributes", "loading", "model-value", "placeholder", "readonly", "onQueryChange"]),
|
|
5985
|
-
|
|
5991
|
+
v(B, {
|
|
5986
5992
|
autocomplete: "off",
|
|
5987
5993
|
"data-testid": "upstreams-form-tags",
|
|
5988
5994
|
help: u(l)("upstreams.form.fields.tags.help"),
|
|
@@ -6062,7 +6068,7 @@ const Te = {
|
|
|
6062
6068
|
},
|
|
6063
6069
|
emits: ["update:algorithm", "update:slots", "update:hash-on", "update:hash-fallback", "update:hash-on-header", "update:hash-on-cookie", "update:hash-on-cookie-path", "update:hash-on-query-argument", "update:hash-on-uri-capture", "update:hash-fallback-header", "update:hash-fallback-query-argument", "update:hash-fallback-uri-capture"],
|
|
6064
6070
|
setup(e, { emit: a }) {
|
|
6065
|
-
const { i18nT: t, i18n: { t: l } } = Te.useI18n(), { inRange: r } =
|
|
6071
|
+
const { i18nT: t, i18n: { t: l } } = Te.useI18n(), { inRange: r } = vt(), i = e, s = a, c = K([
|
|
6066
6072
|
{
|
|
6067
6073
|
label: l("upstreams.form.algorithms.round_robin_label"),
|
|
6068
6074
|
value: "round-robin",
|
|
@@ -6130,9 +6136,9 @@ const Te = {
|
|
|
6130
6136
|
}), be(() => i.hashFallback, (p, m) => {
|
|
6131
6137
|
m === "header" && p !== m && s("update:hash-fallback-header", ""), m === "cookie" && p !== m && (s("update:hash-on-cookie", ""), s("update:hash-on-cookie-path", "/")), m === "query_arg" && p !== m && s("update:hash-fallback-query-argument", ""), m === "uri_capture" && p !== m && s("update:hash-fallback-uri-capture", "");
|
|
6132
6138
|
});
|
|
6133
|
-
const d =
|
|
6139
|
+
const d = F(() => i.hashOn === "cookie" || i.hashOn === "none"), h = F(() => i.slots ? r(i.slots, qt, Ot) ? "" : l("upstreams.form.errors.in_range") : "");
|
|
6134
6140
|
return (p, m) => {
|
|
6135
|
-
const n = j("KExternalLink"),
|
|
6141
|
+
const n = j("KExternalLink"), q = j("KSelect"), w = j("KInput"), y = j("KCard");
|
|
6136
6142
|
return C(), V(u(lt), {
|
|
6137
6143
|
class: "kong-ui-entities-upstreams-load-balancing",
|
|
6138
6144
|
title: u(l)("upstreams.form.load_balancing.title")
|
|
@@ -6140,7 +6146,7 @@ const Te = {
|
|
|
6140
6146
|
description: f(() => [
|
|
6141
6147
|
A("p", null, [
|
|
6142
6148
|
W(S(u(l)("upstreams.form.load_balancing.help")) + " ", 1),
|
|
6143
|
-
|
|
6149
|
+
v(n, {
|
|
6144
6150
|
"hide-icon": "",
|
|
6145
6151
|
href: u(bt).upstreamObject
|
|
6146
6152
|
}, {
|
|
@@ -6152,7 +6158,7 @@ const Te = {
|
|
|
6152
6158
|
])
|
|
6153
6159
|
]),
|
|
6154
6160
|
default: f(() => [
|
|
6155
|
-
|
|
6161
|
+
v(q, {
|
|
6156
6162
|
class: "algorithm-select",
|
|
6157
6163
|
items: c.value,
|
|
6158
6164
|
label: u(l)("upstreams.form.fields.algorithm.label"),
|
|
@@ -6161,7 +6167,7 @@ const Te = {
|
|
|
6161
6167
|
width: "100%",
|
|
6162
6168
|
"onUpdate:modelValue": m[0] || (m[0] = ($) => s("update:algorithm", $))
|
|
6163
6169
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
6164
|
-
|
|
6170
|
+
v(w, {
|
|
6165
6171
|
autocomplete: "off",
|
|
6166
6172
|
"data-testid": "upstreams-form-slots",
|
|
6167
6173
|
error: !!h.value,
|
|
@@ -6175,11 +6181,11 @@ const Te = {
|
|
|
6175
6181
|
type: "number",
|
|
6176
6182
|
"onUpdate:modelValue": m[1] || (m[1] = ($) => s("update:slots", $))
|
|
6177
6183
|
}, null, 8, ["error", "error-message", "help", "label", "max", "min", "model-value", "readonly"]),
|
|
6178
|
-
y
|
|
6184
|
+
v(y, null, {
|
|
6179
6185
|
default: f(() => [
|
|
6180
6186
|
A("h5", rc, S(u(l)("upstreams.form.fields.hash_on.label")), 1),
|
|
6181
6187
|
A("p", sc, S(u(l)("upstreams.form.fields.hash_on.help")), 1),
|
|
6182
|
-
|
|
6188
|
+
v(q, {
|
|
6183
6189
|
class: "hash-on-select",
|
|
6184
6190
|
items: o.value,
|
|
6185
6191
|
label: u(l)("upstreams.form.fields.hash_on.label"),
|
|
@@ -6201,7 +6207,7 @@ const Te = {
|
|
|
6201
6207
|
"onUpdate:modelValue": m[3] || (m[3] = ($) => s("update:hash-on-header", $))
|
|
6202
6208
|
}, null, 8, ["label", "model-value", "readonly"])) : J("", !0),
|
|
6203
6209
|
e.hashOn === "cookie" ? (C(), E(pe, { key: 1 }, [
|
|
6204
|
-
|
|
6210
|
+
v(w, {
|
|
6205
6211
|
autocomplete: "off",
|
|
6206
6212
|
class: "margin-top-6",
|
|
6207
6213
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
@@ -6212,7 +6218,7 @@ const Te = {
|
|
|
6212
6218
|
type: "text",
|
|
6213
6219
|
"onUpdate:modelValue": m[4] || (m[4] = ($) => s("update:hash-on-cookie", $))
|
|
6214
6220
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
6215
|
-
|
|
6221
|
+
v(w, {
|
|
6216
6222
|
autocomplete: "off",
|
|
6217
6223
|
class: "margin-top-6",
|
|
6218
6224
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
@@ -6251,11 +6257,11 @@ const Te = {
|
|
|
6251
6257
|
]),
|
|
6252
6258
|
_: 1
|
|
6253
6259
|
}),
|
|
6254
|
-
y
|
|
6260
|
+
v(y, null, {
|
|
6255
6261
|
default: f(() => [
|
|
6256
6262
|
A("h5", ic, S(u(l)("upstreams.form.fields.hash_fallback.label")), 1),
|
|
6257
6263
|
A("p", nc, S(u(l)("upstreams.form.fields.hash_fallback.help")), 1),
|
|
6258
|
-
|
|
6264
|
+
v(q, {
|
|
6259
6265
|
class: "hash-fallback-select",
|
|
6260
6266
|
disabled: d.value,
|
|
6261
6267
|
items: o.value,
|
|
@@ -6267,7 +6273,7 @@ const Te = {
|
|
|
6267
6273
|
"onUpdate:modelValue": m[8] || (m[8] = ($) => s("update:hash-fallback", $))
|
|
6268
6274
|
}, {
|
|
6269
6275
|
"label-tooltip": f(() => [
|
|
6270
|
-
|
|
6276
|
+
v(u(t), {
|
|
6271
6277
|
keypath: "upstreams.form.fields.hash_fallback.tooltip",
|
|
6272
6278
|
scope: "global"
|
|
6273
6279
|
}, {
|
|
@@ -6295,7 +6301,7 @@ const Te = {
|
|
|
6295
6301
|
"onUpdate:modelValue": m[9] || (m[9] = ($) => s("update:hash-fallback-header", $))
|
|
6296
6302
|
}, null, 8, ["label", "model-value", "readonly"])) : J("", !0),
|
|
6297
6303
|
e.hashFallback === "cookie" ? (C(), E(pe, { key: 1 }, [
|
|
6298
|
-
|
|
6304
|
+
v(w, {
|
|
6299
6305
|
autocomplete: "off",
|
|
6300
6306
|
class: "margin-top-6",
|
|
6301
6307
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
@@ -6306,7 +6312,7 @@ const Te = {
|
|
|
6306
6312
|
type: "text",
|
|
6307
6313
|
"onUpdate:modelValue": m[10] || (m[10] = ($) => s("update:hash-on-cookie", $))
|
|
6308
6314
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
6309
|
-
|
|
6315
|
+
v(w, {
|
|
6310
6316
|
autocomplete: "off",
|
|
6311
6317
|
class: "margin-top-6",
|
|
6312
6318
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
@@ -6383,7 +6389,7 @@ const Te = {
|
|
|
6383
6389
|
description: f(() => [
|
|
6384
6390
|
A("p", null, [
|
|
6385
6391
|
W(S(u(t)("upstreams.form.health_check.help")) + " ", 1),
|
|
6386
|
-
|
|
6392
|
+
v(s, {
|
|
6387
6393
|
"hide-icon": "",
|
|
6388
6394
|
href: u(bt).loadBalancing
|
|
6389
6395
|
}, {
|
|
@@ -6395,11 +6401,11 @@ const Te = {
|
|
|
6395
6401
|
])
|
|
6396
6402
|
]),
|
|
6397
6403
|
default: f(() => [
|
|
6398
|
-
|
|
6404
|
+
v(o, null, {
|
|
6399
6405
|
default: f(() => [
|
|
6400
6406
|
A("h5", cc, S(u(t)("upstreams.form.fields.active_health_checks.label")), 1),
|
|
6401
6407
|
A("p", dc, S(u(t)("upstreams.form.fields.active_health_checks.help")), 1),
|
|
6402
|
-
|
|
6408
|
+
v(c, {
|
|
6403
6409
|
class: "active-health-switch",
|
|
6404
6410
|
"data-testid": "active-health-switch",
|
|
6405
6411
|
disabled: e.readonly,
|
|
@@ -6409,11 +6415,11 @@ const Te = {
|
|
|
6409
6415
|
]),
|
|
6410
6416
|
_: 1
|
|
6411
6417
|
}),
|
|
6412
|
-
|
|
6418
|
+
v(o, null, {
|
|
6413
6419
|
default: f(() => [
|
|
6414
6420
|
A("h5", hc, S(u(t)("upstreams.form.fields.passive_health_checks.label")), 1),
|
|
6415
6421
|
A("p", pc, S(u(t)("upstreams.form.fields.passive_health_checks.help")), 1),
|
|
6416
|
-
|
|
6422
|
+
v(c, {
|
|
6417
6423
|
class: "passive-health-switch",
|
|
6418
6424
|
"data-testid": "passive-health-switch",
|
|
6419
6425
|
disabled: e.readonly,
|
|
@@ -6423,7 +6429,7 @@ const Te = {
|
|
|
6423
6429
|
]),
|
|
6424
6430
|
_: 1
|
|
6425
6431
|
}),
|
|
6426
|
-
|
|
6432
|
+
v(d, {
|
|
6427
6433
|
autocomplete: "off",
|
|
6428
6434
|
"data-testid": "upstreams-form-healthchecks-threshold",
|
|
6429
6435
|
label: u(t)("upstreams.form.fields.healthchecks_threshold.label"),
|
|
@@ -6439,7 +6445,7 @@ const Te = {
|
|
|
6439
6445
|
}, 8, ["title"]);
|
|
6440
6446
|
};
|
|
6441
6447
|
}
|
|
6442
|
-
}), mc = /* @__PURE__ */ qe(fc, [["__scopeId", "data-v-bfdc5a59"]]), gc = { key: 2 },
|
|
6448
|
+
}), mc = /* @__PURE__ */ qe(fc, [["__scopeId", "data-v-bfdc5a59"]]), gc = { key: 2 }, yc = { class: "fields-group-title" }, vc = { class: "fields-group-text" }, bc = { class: "fields-group-title" }, kc = { class: "fields-group-text" }, Cc = /* @__PURE__ */ ee({
|
|
6443
6449
|
__name: "UpstreamsFormActiveHealthCheck",
|
|
6444
6450
|
props: {
|
|
6445
6451
|
config: {
|
|
@@ -6514,7 +6520,7 @@ const Te = {
|
|
|
6514
6520
|
},
|
|
6515
6521
|
emits: ["update:type", "update:http-path", "update:timeout", "update:concurrency", "update:https-sni", "update:verify-ssl", "update:headers", "update:interval", "update:successes", "update:http-statuses", "update:unhealthy-interval", "update:http-failures", "update:tcp-failures", "update:unhealthy-http-statuses", "update:unhealthy-timeouts"],
|
|
6516
6522
|
setup(e, { emit: a }) {
|
|
6517
|
-
const { i18n: { t } } = Te.useI18n(), { objectsAreEqual: l } =
|
|
6523
|
+
const { i18n: { t } } = Te.useI18n(), { objectsAreEqual: l } = vt(), r = e, i = a, s = K([
|
|
6518
6524
|
{
|
|
6519
6525
|
label: t("upstreams.form.healthcheck_type_labels.http"),
|
|
6520
6526
|
value: "http",
|
|
@@ -6540,13 +6546,13 @@ const Te = {
|
|
|
6540
6546
|
value: "grpcs",
|
|
6541
6547
|
selected: !1
|
|
6542
6548
|
}
|
|
6543
|
-
]), c =
|
|
6549
|
+
]), c = F(() => r.type === "https" || r.type === "grpcs"), o = F(() => r.type === "tcp"), {
|
|
6544
6550
|
trackNewItems: d
|
|
6545
6551
|
} = tt({ replaceId: !0 }), {
|
|
6546
6552
|
trackNewItems: h
|
|
6547
6553
|
} = tt({ replaceId: !0 });
|
|
6548
|
-
be(() => r.type, (w,
|
|
6549
|
-
|
|
6554
|
+
be(() => r.type, (w, y) => {
|
|
6555
|
+
y === "tcp" && w !== y && i("update:tcp-failures", "5"), (y === "https" || y === "grpcs") && w !== y && (i("update:https-sni", ""), i("update:verify-ssl", !1)), y !== "tcp" && w === "tcp" && (i("update:http-path", "/"), i("update:http-statuses", Ft), i("update:unhealthy-http-statuses", $t));
|
|
6550
6556
|
});
|
|
6551
6557
|
const p = K([{ key: "", values: "" }]);
|
|
6552
6558
|
be(() => r.headers, (w) => {
|
|
@@ -6559,11 +6565,11 @@ const Te = {
|
|
|
6559
6565
|
i("update:headers", p.value);
|
|
6560
6566
|
}, n = () => {
|
|
6561
6567
|
p.value.push({ key: "", values: "" }), m();
|
|
6562
|
-
},
|
|
6568
|
+
}, q = (w) => {
|
|
6563
6569
|
w === 0 && p.value.length === 1 ? p.value[0] = { key: "", values: "" } : p.value.splice(w, 1), m();
|
|
6564
6570
|
};
|
|
6565
|
-
return (w,
|
|
6566
|
-
const $ = j("KExternalLink"), N = j("KSelect"), R = j("KInput"), H = j("KCheckbox"), I = j("KLabel"), g = j("KIcon"),
|
|
6571
|
+
return (w, y) => {
|
|
6572
|
+
const $ = j("KExternalLink"), N = j("KSelect"), R = j("KInput"), H = j("KCheckbox"), I = j("KLabel"), g = j("KIcon"), O = j("KButton"), U = j("KMultiselect"), T = j("KCard");
|
|
6567
6573
|
return C(), V(u(lt), {
|
|
6568
6574
|
class: "kong-ui-entities-upstreams-active-healthcheck",
|
|
6569
6575
|
title: u(t)("upstreams.form.active_health_check.title")
|
|
@@ -6571,7 +6577,7 @@ const Te = {
|
|
|
6571
6577
|
description: f(() => [
|
|
6572
6578
|
A("p", null, [
|
|
6573
6579
|
W(S(u(t)("upstreams.form.active_health_check.help")) + " ", 1),
|
|
6574
|
-
|
|
6580
|
+
v($, {
|
|
6575
6581
|
"hide-icon": "",
|
|
6576
6582
|
href: u(bt).upstreamObject
|
|
6577
6583
|
}, {
|
|
@@ -6585,14 +6591,14 @@ const Te = {
|
|
|
6585
6591
|
default: f(() => {
|
|
6586
6592
|
var P;
|
|
6587
6593
|
return [
|
|
6588
|
-
|
|
6594
|
+
v(N, {
|
|
6589
6595
|
class: "active-healthcheck-type-select",
|
|
6590
6596
|
items: s.value,
|
|
6591
6597
|
label: u(t)("upstreams.form.fields.active_healthcheck_type.label"),
|
|
6592
6598
|
"model-value": e.type,
|
|
6593
6599
|
readonly: e.readonly,
|
|
6594
6600
|
width: "100%",
|
|
6595
|
-
"onUpdate:modelValue":
|
|
6601
|
+
"onUpdate:modelValue": y[0] || (y[0] = (x) => i("update:type", x))
|
|
6596
6602
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
6597
6603
|
o.value ? J("", !0) : (C(), V(R, {
|
|
6598
6604
|
key: 0,
|
|
@@ -6602,9 +6608,9 @@ const Te = {
|
|
|
6602
6608
|
"model-value": e.httpPath,
|
|
6603
6609
|
readonly: e.readonly,
|
|
6604
6610
|
type: "text",
|
|
6605
|
-
"onUpdate:modelValue":
|
|
6611
|
+
"onUpdate:modelValue": y[1] || (y[1] = (x) => i("update:http-path", x))
|
|
6606
6612
|
}, null, 8, ["label", "model-value", "readonly"])),
|
|
6607
|
-
|
|
6613
|
+
v(R, {
|
|
6608
6614
|
autocomplete: "off",
|
|
6609
6615
|
"data-testid": "active-healthcheck-timeout",
|
|
6610
6616
|
label: u(t)("upstreams.form.fields.timeout.label"),
|
|
@@ -6613,9 +6619,9 @@ const Te = {
|
|
|
6613
6619
|
"model-value": e.timeout,
|
|
6614
6620
|
readonly: e.readonly,
|
|
6615
6621
|
type: "number",
|
|
6616
|
-
"onUpdate:modelValue":
|
|
6622
|
+
"onUpdate:modelValue": y[2] || (y[2] = (x) => i("update:timeout", x))
|
|
6617
6623
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6618
|
-
|
|
6624
|
+
v(R, {
|
|
6619
6625
|
autocomplete: "off",
|
|
6620
6626
|
"data-testid": "active-healthcheck-concurrency",
|
|
6621
6627
|
label: u(t)("upstreams.form.fields.concurrency.label"),
|
|
@@ -6624,10 +6630,10 @@ const Te = {
|
|
|
6624
6630
|
"model-value": e.concurrency,
|
|
6625
6631
|
readonly: e.readonly,
|
|
6626
6632
|
type: "number",
|
|
6627
|
-
"onUpdate:modelValue":
|
|
6633
|
+
"onUpdate:modelValue": y[3] || (y[3] = (x) => i("update:concurrency", x))
|
|
6628
6634
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6629
6635
|
c.value ? (C(), E(pe, { key: 1 }, [
|
|
6630
|
-
|
|
6636
|
+
v(R, {
|
|
6631
6637
|
autocomplete: "off",
|
|
6632
6638
|
class: "margin-bottom-6",
|
|
6633
6639
|
"data-testid": "active-healthcheck-https-sni",
|
|
@@ -6635,18 +6641,18 @@ const Te = {
|
|
|
6635
6641
|
"model-value": e.httpsSni,
|
|
6636
6642
|
readonly: e.readonly,
|
|
6637
6643
|
type: "text",
|
|
6638
|
-
"onUpdate:modelValue":
|
|
6644
|
+
"onUpdate:modelValue": y[4] || (y[4] = (x) => i("update:https-sni", x))
|
|
6639
6645
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
6640
|
-
|
|
6646
|
+
v(H, {
|
|
6641
6647
|
"data-testid": "active-healthcheck-verify-ssl",
|
|
6642
6648
|
disabled: e.readonly,
|
|
6643
6649
|
label: u(t)("upstreams.form.fields.verify_ssl.label"),
|
|
6644
6650
|
"model-value": e.verifySsl,
|
|
6645
|
-
"onUpdate:modelValue":
|
|
6651
|
+
"onUpdate:modelValue": y[5] || (y[5] = (x) => i("update:verify-ssl", x))
|
|
6646
6652
|
}, null, 8, ["disabled", "label", "model-value"])
|
|
6647
6653
|
], 64)) : J("", !0),
|
|
6648
6654
|
((P = e.config) == null ? void 0 : P.app) === "kongManager" ? (C(), E("div", gc, [
|
|
6649
|
-
|
|
6655
|
+
v(I, {
|
|
6650
6656
|
info: u(t)("upstreams.form.fields.headers.tooltip_active"),
|
|
6651
6657
|
"tooltip-attributes": { maxWidth: "250px" }
|
|
6652
6658
|
}, {
|
|
@@ -6660,7 +6666,7 @@ const Te = {
|
|
|
6660
6666
|
key: `${x.header}_${M}`,
|
|
6661
6667
|
class: Ae(["headers-row", { "margin-top-6": M > 0 }])
|
|
6662
6668
|
}, [
|
|
6663
|
-
|
|
6669
|
+
v(R, {
|
|
6664
6670
|
modelValue: p.value[M].key,
|
|
6665
6671
|
"onUpdate:modelValue": (D) => p.value[M].key = D,
|
|
6666
6672
|
autocomplete: "off",
|
|
@@ -6669,7 +6675,7 @@ const Te = {
|
|
|
6669
6675
|
type: "text",
|
|
6670
6676
|
onBlur: m
|
|
6671
6677
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
6672
|
-
|
|
6678
|
+
v(R, {
|
|
6673
6679
|
modelValue: p.value[M].values,
|
|
6674
6680
|
"onUpdate:modelValue": (D) => p.value[M].values = D,
|
|
6675
6681
|
autocomplete: "off",
|
|
@@ -6678,21 +6684,21 @@ const Te = {
|
|
|
6678
6684
|
type: "text",
|
|
6679
6685
|
onBlur: m
|
|
6680
6686
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
6681
|
-
|
|
6687
|
+
v(O, {
|
|
6682
6688
|
appearance: "tertiary",
|
|
6683
6689
|
class: "btn-remove",
|
|
6684
6690
|
"data-testid": "btn-remove-header",
|
|
6685
|
-
onClick: (D) =>
|
|
6691
|
+
onClick: (D) => q(M)
|
|
6686
6692
|
}, {
|
|
6687
6693
|
icon: f(() => [
|
|
6688
|
-
|
|
6694
|
+
v(g, {
|
|
6689
6695
|
class: "delete-item",
|
|
6690
6696
|
icon: "trash"
|
|
6691
6697
|
})
|
|
6692
6698
|
]),
|
|
6693
6699
|
_: 2
|
|
6694
6700
|
}, 1032, ["onClick"]),
|
|
6695
|
-
p.value && M === p.value.length - 1 ? (C(), V(
|
|
6701
|
+
p.value && M === p.value.length - 1 ? (C(), V(O, {
|
|
6696
6702
|
key: 0,
|
|
6697
6703
|
appearance: "tertiary",
|
|
6698
6704
|
class: "btn-add-header",
|
|
@@ -6700,7 +6706,7 @@ const Te = {
|
|
|
6700
6706
|
onClick: n
|
|
6701
6707
|
}, {
|
|
6702
6708
|
icon: f(() => [
|
|
6703
|
-
|
|
6709
|
+
v(g, {
|
|
6704
6710
|
color: "$kui-color-text-primary-strong",
|
|
6705
6711
|
icon: "plus",
|
|
6706
6712
|
size: "22"
|
|
@@ -6711,11 +6717,11 @@ const Te = {
|
|
|
6711
6717
|
], 2))), 128))
|
|
6712
6718
|
])
|
|
6713
6719
|
])) : J("", !0),
|
|
6714
|
-
|
|
6720
|
+
v(T, null, {
|
|
6715
6721
|
default: f(() => [
|
|
6716
|
-
A("h5",
|
|
6717
|
-
A("p",
|
|
6718
|
-
|
|
6722
|
+
A("h5", yc, S(u(t)("upstreams.form.healthy.label")), 1),
|
|
6723
|
+
A("p", vc, S(u(t)("upstreams.form.healthy.help")), 1),
|
|
6724
|
+
v(R, {
|
|
6719
6725
|
autocomplete: "off",
|
|
6720
6726
|
class: "margin-bottom-6",
|
|
6721
6727
|
"data-testid": "active-healthcheck-interval",
|
|
@@ -6726,9 +6732,9 @@ const Te = {
|
|
|
6726
6732
|
"model-value": e.interval,
|
|
6727
6733
|
readonly: e.readonly,
|
|
6728
6734
|
type: "number",
|
|
6729
|
-
"onUpdate:modelValue":
|
|
6735
|
+
"onUpdate:modelValue": y[6] || (y[6] = (x) => i("update:interval", x))
|
|
6730
6736
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
6731
|
-
|
|
6737
|
+
v(R, {
|
|
6732
6738
|
autocomplete: "off",
|
|
6733
6739
|
"data-testid": "active-healthcheck-successes",
|
|
6734
6740
|
label: u(t)("upstreams.form.fields.successes.label"),
|
|
@@ -6737,7 +6743,7 @@ const Te = {
|
|
|
6737
6743
|
"model-value": e.successes,
|
|
6738
6744
|
readonly: e.readonly,
|
|
6739
6745
|
type: "number",
|
|
6740
|
-
"onUpdate:modelValue":
|
|
6746
|
+
"onUpdate:modelValue": y[7] || (y[7] = (x) => i("update:successes", x))
|
|
6741
6747
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6742
6748
|
o.value ? J("", !0) : (C(), V(U, {
|
|
6743
6749
|
key: 0,
|
|
@@ -6749,18 +6755,18 @@ const Te = {
|
|
|
6749
6755
|
"model-value": e.httpStatuses,
|
|
6750
6756
|
readonly: e.readonly,
|
|
6751
6757
|
width: "100%",
|
|
6752
|
-
onItemAdded:
|
|
6753
|
-
onItemRemoved:
|
|
6754
|
-
"onUpdate:modelValue":
|
|
6758
|
+
onItemAdded: y[8] || (y[8] = (x) => u(d)(x, !0)),
|
|
6759
|
+
onItemRemoved: y[9] || (y[9] = (x) => u(d)(x, !1)),
|
|
6760
|
+
"onUpdate:modelValue": y[10] || (y[10] = (x) => i("update:http-statuses", x))
|
|
6755
6761
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
6756
6762
|
]),
|
|
6757
6763
|
_: 1
|
|
6758
6764
|
}),
|
|
6759
|
-
|
|
6765
|
+
v(T, null, {
|
|
6760
6766
|
default: f(() => [
|
|
6761
6767
|
A("h5", bc, S(u(t)("upstreams.form.unhealthy.label")), 1),
|
|
6762
6768
|
A("p", kc, S(u(t)("upstreams.form.unhealthy.help")), 1),
|
|
6763
|
-
|
|
6769
|
+
v(R, {
|
|
6764
6770
|
autocomplete: "off",
|
|
6765
6771
|
class: "margin-bottom-6",
|
|
6766
6772
|
"data-testid": "active-healthcheck-unhealthy-interval",
|
|
@@ -6771,7 +6777,7 @@ const Te = {
|
|
|
6771
6777
|
"model-value": e.unhealthyInterval,
|
|
6772
6778
|
readonly: e.readonly,
|
|
6773
6779
|
type: "number",
|
|
6774
|
-
"onUpdate:modelValue":
|
|
6780
|
+
"onUpdate:modelValue": y[11] || (y[11] = (x) => i("update:unhealthy-interval", x))
|
|
6775
6781
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
6776
6782
|
o.value ? (C(), V(R, {
|
|
6777
6783
|
key: 0,
|
|
@@ -6784,9 +6790,9 @@ const Te = {
|
|
|
6784
6790
|
"model-value": e.tcpFailures,
|
|
6785
6791
|
readonly: e.readonly,
|
|
6786
6792
|
type: "number",
|
|
6787
|
-
"onUpdate:modelValue":
|
|
6793
|
+
"onUpdate:modelValue": y[12] || (y[12] = (x) => i("update:tcp-failures", x))
|
|
6788
6794
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])) : (C(), E(pe, { key: 1 }, [
|
|
6789
|
-
|
|
6795
|
+
v(R, {
|
|
6790
6796
|
autocomplete: "off",
|
|
6791
6797
|
class: "margin-bottom-6",
|
|
6792
6798
|
"data-testid": "active-healthcheck-http-failures",
|
|
@@ -6796,9 +6802,9 @@ const Te = {
|
|
|
6796
6802
|
"model-value": e.httpFailures,
|
|
6797
6803
|
readonly: e.readonly,
|
|
6798
6804
|
type: "number",
|
|
6799
|
-
"onUpdate:modelValue":
|
|
6805
|
+
"onUpdate:modelValue": y[13] || (y[13] = (x) => i("update:http-failures", x))
|
|
6800
6806
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6801
|
-
|
|
6807
|
+
v(U, {
|
|
6802
6808
|
autocomplete: "off",
|
|
6803
6809
|
class: "margin-bottom-6 active-healthcheck-unhealthy-http-statuses",
|
|
6804
6810
|
"enable-item-creation": "",
|
|
@@ -6807,12 +6813,12 @@ const Te = {
|
|
|
6807
6813
|
"model-value": e.unhealthyHttpStatuses,
|
|
6808
6814
|
readonly: e.readonly,
|
|
6809
6815
|
width: "100%",
|
|
6810
|
-
onItemAdded:
|
|
6811
|
-
onItemRemoved:
|
|
6812
|
-
"onUpdate:modelValue":
|
|
6816
|
+
onItemAdded: y[14] || (y[14] = (x) => u(h)(x, !0)),
|
|
6817
|
+
onItemRemoved: y[15] || (y[15] = (x) => u(h)(x, !1)),
|
|
6818
|
+
"onUpdate:modelValue": y[16] || (y[16] = (x) => i("update:unhealthy-http-statuses", x))
|
|
6813
6819
|
}, null, 8, ["items", "label", "model-value", "readonly"])
|
|
6814
6820
|
], 64)),
|
|
6815
|
-
|
|
6821
|
+
v(R, {
|
|
6816
6822
|
autocomplete: "off",
|
|
6817
6823
|
"data-testid": "active-healthcheck-unhealthy-timeouts",
|
|
6818
6824
|
label: u(t)("upstreams.form.fields.timeouts.label"),
|
|
@@ -6821,7 +6827,7 @@ const Te = {
|
|
|
6821
6827
|
"model-value": e.unhealthyTimeouts,
|
|
6822
6828
|
readonly: e.readonly,
|
|
6823
6829
|
type: "number",
|
|
6824
|
-
"onUpdate:modelValue":
|
|
6830
|
+
"onUpdate:modelValue": y[17] || (y[17] = (x) => i("update:unhealthy-timeouts", x))
|
|
6825
6831
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])
|
|
6826
6832
|
]),
|
|
6827
6833
|
_: 1
|
|
@@ -6897,7 +6903,7 @@ const Te = {
|
|
|
6897
6903
|
value: "grpcs",
|
|
6898
6904
|
selected: !1
|
|
6899
6905
|
}
|
|
6900
|
-
]), s =
|
|
6906
|
+
]), s = F(() => l.type === "tcp"), {
|
|
6901
6907
|
trackNewItems: c
|
|
6902
6908
|
} = tt({ replaceId: !0 }), {
|
|
6903
6909
|
trackNewItems: o
|
|
@@ -6905,7 +6911,7 @@ const Te = {
|
|
|
6905
6911
|
return be(() => l.type, (d, h) => {
|
|
6906
6912
|
h === "tcp" && d !== h && r("update:tcp-failures", "5"), h !== "tcp" && d === "tcp" && (r("update:http-statuses", Ut), r("update:unhealthy-http-statuses", Mt));
|
|
6907
6913
|
}), (d, h) => {
|
|
6908
|
-
const p = j("KExternalLink"), m = j("KSelect"), n = j("KInput"),
|
|
6914
|
+
const p = j("KExternalLink"), m = j("KSelect"), n = j("KInput"), q = j("KMultiselect"), w = j("KCard");
|
|
6909
6915
|
return C(), V(u(lt), {
|
|
6910
6916
|
class: "kong-ui-entities-upstreams-passive-healthcheck",
|
|
6911
6917
|
title: u(t)("upstreams.form.passive_health_check.title")
|
|
@@ -6913,7 +6919,7 @@ const Te = {
|
|
|
6913
6919
|
description: f(() => [
|
|
6914
6920
|
A("p", null, [
|
|
6915
6921
|
W(S(u(t)("upstreams.form.passive_health_check.help")) + " ", 1),
|
|
6916
|
-
|
|
6922
|
+
v(p, {
|
|
6917
6923
|
"hide-icon": "",
|
|
6918
6924
|
href: u(bt).upstreamObject
|
|
6919
6925
|
}, {
|
|
@@ -6925,20 +6931,20 @@ const Te = {
|
|
|
6925
6931
|
])
|
|
6926
6932
|
]),
|
|
6927
6933
|
default: f(() => [
|
|
6928
|
-
|
|
6934
|
+
v(m, {
|
|
6929
6935
|
class: "passive-healthcheck-type-select",
|
|
6930
6936
|
items: i.value,
|
|
6931
6937
|
label: u(t)("upstreams.form.fields.passive_health_check_type.label"),
|
|
6932
6938
|
"model-value": e.type,
|
|
6933
6939
|
readonly: e.readonly,
|
|
6934
6940
|
width: "100%",
|
|
6935
|
-
"onUpdate:modelValue": h[0] || (h[0] = (
|
|
6941
|
+
"onUpdate:modelValue": h[0] || (h[0] = (y) => r("update:type", y))
|
|
6936
6942
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
6937
|
-
|
|
6943
|
+
v(w, null, {
|
|
6938
6944
|
default: f(() => [
|
|
6939
6945
|
A("h5", wc, S(u(t)("upstreams.form.passive_healthy.label")), 1),
|
|
6940
6946
|
A("p", Sc, S(u(t)("upstreams.form.passive_healthy.help")), 1),
|
|
6941
|
-
|
|
6947
|
+
v(n, {
|
|
6942
6948
|
autocomplete: "off",
|
|
6943
6949
|
"data-testid": "passive-healthcheck-successes",
|
|
6944
6950
|
label: u(t)("upstreams.form.fields.successes.label"),
|
|
@@ -6947,9 +6953,9 @@ const Te = {
|
|
|
6947
6953
|
"model-value": e.successes,
|
|
6948
6954
|
readonly: e.readonly,
|
|
6949
6955
|
type: "number",
|
|
6950
|
-
"onUpdate:modelValue": h[1] || (h[1] = (
|
|
6956
|
+
"onUpdate:modelValue": h[1] || (h[1] = (y) => r("update:successes", y))
|
|
6951
6957
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6952
|
-
s.value ? J("", !0) : (C(), V(
|
|
6958
|
+
s.value ? J("", !0) : (C(), V(q, {
|
|
6953
6959
|
key: 0,
|
|
6954
6960
|
class: "margin-top-6 passive-healthcheck-http-statuses",
|
|
6955
6961
|
"enable-item-creation": "",
|
|
@@ -6958,18 +6964,18 @@ const Te = {
|
|
|
6958
6964
|
"model-value": e.httpStatuses,
|
|
6959
6965
|
readonly: e.readonly,
|
|
6960
6966
|
width: "100%",
|
|
6961
|
-
onItemAdded: h[2] || (h[2] = (
|
|
6962
|
-
onItemRemoved: h[3] || (h[3] = (
|
|
6963
|
-
"onUpdate:modelValue": h[4] || (h[4] = (
|
|
6967
|
+
onItemAdded: h[2] || (h[2] = (y) => u(c)(y, !0)),
|
|
6968
|
+
onItemRemoved: h[3] || (h[3] = (y) => u(c)(y, !1)),
|
|
6969
|
+
"onUpdate:modelValue": h[4] || (h[4] = (y) => r("update:http-statuses", y))
|
|
6964
6970
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
6965
6971
|
]),
|
|
6966
6972
|
_: 1
|
|
6967
6973
|
}),
|
|
6968
|
-
|
|
6974
|
+
v(w, null, {
|
|
6969
6975
|
default: f(() => [
|
|
6970
6976
|
A("h5", Ic, S(u(t)("upstreams.form.passive_unhealthy.label")), 1),
|
|
6971
6977
|
A("p", xc, S(u(t)("upstreams.form.passive_unhealthy.help")), 1),
|
|
6972
|
-
|
|
6978
|
+
v(n, {
|
|
6973
6979
|
autocomplete: "off",
|
|
6974
6980
|
"data-testid": "passive-healthcheck-timeouts",
|
|
6975
6981
|
label: u(t)("upstreams.form.fields.timeouts.label"),
|
|
@@ -6978,7 +6984,7 @@ const Te = {
|
|
|
6978
6984
|
"model-value": e.timeouts,
|
|
6979
6985
|
readonly: e.readonly,
|
|
6980
6986
|
type: "number",
|
|
6981
|
-
"onUpdate:modelValue": h[5] || (h[5] = (
|
|
6987
|
+
"onUpdate:modelValue": h[5] || (h[5] = (y) => r("update:timeouts", y))
|
|
6982
6988
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6983
6989
|
s.value ? (C(), V(n, {
|
|
6984
6990
|
key: 0,
|
|
@@ -6991,9 +6997,9 @@ const Te = {
|
|
|
6991
6997
|
"model-value": e.tcpFailures,
|
|
6992
6998
|
readonly: e.readonly,
|
|
6993
6999
|
type: "number",
|
|
6994
|
-
"onUpdate:modelValue": h[6] || (h[6] = (
|
|
7000
|
+
"onUpdate:modelValue": h[6] || (h[6] = (y) => r("update:tcp-failures", y))
|
|
6995
7001
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])) : (C(), E(pe, { key: 1 }, [
|
|
6996
|
-
|
|
7002
|
+
v(n, {
|
|
6997
7003
|
autocomplete: "off",
|
|
6998
7004
|
class: "margin-top-6",
|
|
6999
7005
|
"data-testid": "passive-healthcheck-http-failures",
|
|
@@ -7003,9 +7009,9 @@ const Te = {
|
|
|
7003
7009
|
"model-value": e.httpFailures,
|
|
7004
7010
|
readonly: e.readonly,
|
|
7005
7011
|
type: "number",
|
|
7006
|
-
"onUpdate:modelValue": h[7] || (h[7] = (
|
|
7012
|
+
"onUpdate:modelValue": h[7] || (h[7] = (y) => r("update:http-failures", y))
|
|
7007
7013
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
7008
|
-
|
|
7014
|
+
v(q, {
|
|
7009
7015
|
autocomplete: "off",
|
|
7010
7016
|
class: "margin-top-6 passive-healthcheck-unhealthy-http-statuses",
|
|
7011
7017
|
"enable-item-creation": "",
|
|
@@ -7014,9 +7020,9 @@ const Te = {
|
|
|
7014
7020
|
"model-value": e.unhealthyHttpStatuses,
|
|
7015
7021
|
readonly: e.readonly,
|
|
7016
7022
|
width: "100%",
|
|
7017
|
-
onItemAdded: h[8] || (h[8] = (
|
|
7018
|
-
onItemRemoved: h[9] || (h[9] = (
|
|
7019
|
-
"onUpdate:modelValue": h[10] || (h[10] = (
|
|
7023
|
+
onItemAdded: h[8] || (h[8] = (y) => u(o)(y, !0)),
|
|
7024
|
+
onItemRemoved: h[9] || (h[9] = (y) => u(o)(y, !1)),
|
|
7025
|
+
"onUpdate:modelValue": h[10] || (h[10] = (y) => r("update:unhealthy-http-statuses", y))
|
|
7020
7026
|
}, null, 8, ["items", "label", "model-value", "readonly"])
|
|
7021
7027
|
], 64))
|
|
7022
7028
|
]),
|
|
@@ -7046,21 +7052,21 @@ const Te = {
|
|
|
7046
7052
|
emits: ["update", "error", "loading"],
|
|
7047
7053
|
setup(e, { emit: a }) {
|
|
7048
7054
|
var te;
|
|
7049
|
-
const t = e, l = a, { inRange: r, stringToNumberArray: i, upstreamsResponseToFields: s, getDefaultUpstreamFields: c, objectsAreEqual: o, cloneDeep: d } =
|
|
7055
|
+
const t = e, l = a, { inRange: r, stringToNumberArray: i, upstreamsResponseToFields: s, getDefaultUpstreamFields: c, objectsAreEqual: o, cloneDeep: d } = vt(), { axiosInstance: h } = yt({
|
|
7050
7056
|
headers: (te = t.config) == null ? void 0 : te.requestHeaders
|
|
7051
7057
|
}), { getMessageFromError: p } = Kr(), m = Nt(), n = st({
|
|
7052
7058
|
fields: c(),
|
|
7053
7059
|
readonly: !1,
|
|
7054
7060
|
errorMessage: ""
|
|
7055
|
-
}),
|
|
7061
|
+
}), q = st(c()), w = F(() => !o(n.fields, q)), y = (k) => {
|
|
7056
7062
|
n.fields.activeHealthCheck.interval = k ? "5" : "0", n.fields.activeHealthCheck.successes = k ? "5" : "0", n.fields.activeHealthCheck.httpFailures = k ? "5" : "0", n.fields.activeHealthCheck.unhealthyInterval = k ? "5" : "0";
|
|
7057
7063
|
}, $ = (k) => {
|
|
7058
7064
|
n.fields.passiveHealthCheck.timeouts = k ? "5" : "0", n.fields.passiveHealthCheck.successes = k ? "80" : "0";
|
|
7059
|
-
}, N =
|
|
7065
|
+
}, N = F(() => n.fields.slots ? r(n.fields.slots, qt, Ot) : !0), R = F(() => n.fields.hashOn === "header" ? !!n.fields.hashOnHeader : !0), H = F(() => n.fields.hashOn === "cookie" || n.fields.hashFallback === "cookie" ? !!n.fields.hashOnCookie : !0), I = F(() => n.fields.hashOn === "cookie" || n.fields.hashFallback === "cookie" ? !!n.fields.hashOnCookiePath : !0), g = F(() => n.fields.hashOn === "query_arg" ? !!n.fields.hashOnQueryArgument : !0), O = F(() => n.fields.hashOn === "uri_capture" ? !!n.fields.hashOnUriCapture : !0), U = F(() => n.fields.hashFallback === "header" ? !!n.fields.hashFallbackHeader : !0), T = F(() => n.fields.hashFallback === "query_arg" ? !!n.fields.hashFallbackQueryArgument : !0), P = F(() => n.fields.hashFallback === "uri_capture" ? !!n.fields.hashFallbackUriCapture : !0), x = F(() => !!n.fields.name && N.value && R.value && H.value && I.value && g.value && O.value && U.value && T.value && P.value), M = F(() => t.upstreamId ? _e.Edit : _e.Create), D = F(() => {
|
|
7060
7066
|
var k, b;
|
|
7061
7067
|
return (b = Qe.form[(k = t.config) == null ? void 0 : k.app]) == null ? void 0 : b.edit;
|
|
7062
7068
|
}), Y = (k) => {
|
|
7063
|
-
Object.assign(n.fields, s(k)), Object.assign(
|
|
7069
|
+
Object.assign(n.fields, s(k)), Object.assign(q, d(n.fields));
|
|
7064
7070
|
}, Q = () => {
|
|
7065
7071
|
var k;
|
|
7066
7072
|
m.push(((k = t.config) == null ? void 0 : k.cancelRoute) || { name: "upstreams-list" });
|
|
@@ -7068,7 +7074,7 @@ const Te = {
|
|
|
7068
7074
|
l("loading", k);
|
|
7069
7075
|
}, X = (k) => {
|
|
7070
7076
|
l("error", k);
|
|
7071
|
-
}, ue =
|
|
7077
|
+
}, ue = F(() => {
|
|
7072
7078
|
var b, _, se, G, ie;
|
|
7073
7079
|
const k = {
|
|
7074
7080
|
name: n.fields.name,
|
|
@@ -7131,7 +7137,7 @@ const Te = {
|
|
|
7131
7137
|
}
|
|
7132
7138
|
};
|
|
7133
7139
|
return (k, b) => (C(), E("div", Tc, [
|
|
7134
|
-
|
|
7140
|
+
v(u($r), {
|
|
7135
7141
|
"can-submit": x.value && w.value,
|
|
7136
7142
|
config: e.config,
|
|
7137
7143
|
"edit-id": e.upstreamId,
|
|
@@ -7146,7 +7152,7 @@ const Te = {
|
|
|
7146
7152
|
onSubmit: Z
|
|
7147
7153
|
}, {
|
|
7148
7154
|
default: f(() => [
|
|
7149
|
-
|
|
7155
|
+
v(lc, {
|
|
7150
7156
|
"client-certificate": n.fields.clientCertificate,
|
|
7151
7157
|
"onUpdate:clientCertificate": b[0] || (b[0] = (_) => n.fields.clientCertificate = _),
|
|
7152
7158
|
"host-header": n.fields.hostHeader,
|
|
@@ -7158,7 +7164,7 @@ const Te = {
|
|
|
7158
7164
|
config: e.config,
|
|
7159
7165
|
readonly: n.readonly
|
|
7160
7166
|
}, null, 8, ["client-certificate", "host-header", "name", "tags", "config", "readonly"]),
|
|
7161
|
-
|
|
7167
|
+
v(uc, {
|
|
7162
7168
|
algorithm: n.fields.algorithm,
|
|
7163
7169
|
"onUpdate:algorithm": b[4] || (b[4] = (_) => n.fields.algorithm = _),
|
|
7164
7170
|
"hash-fallback": n.fields.hashFallback,
|
|
@@ -7185,11 +7191,11 @@ const Te = {
|
|
|
7185
7191
|
"onUpdate:slots": b[15] || (b[15] = (_) => n.fields.slots = _),
|
|
7186
7192
|
readonly: n.readonly
|
|
7187
7193
|
}, null, 8, ["algorithm", "hash-fallback", "hash-fallback-header", "hash-fallback-query-argument", "hash-fallback-uri-capture", "hash-on", "hash-on-cookie", "hash-on-cookie-path", "hash-on-header", "hash-on-query-argument", "hash-on-uri-capture", "slots", "readonly"]),
|
|
7188
|
-
|
|
7194
|
+
v(mc, {
|
|
7189
7195
|
"active-health-switch": n.fields.activeHealthSwitch,
|
|
7190
7196
|
"onUpdate:activeHealthSwitch": [
|
|
7191
7197
|
b[16] || (b[16] = (_) => n.fields.activeHealthSwitch = _),
|
|
7192
|
-
|
|
7198
|
+
y
|
|
7193
7199
|
],
|
|
7194
7200
|
"healthchecks-threshold": n.fields.healthchecksThreshold,
|
|
7195
7201
|
"onUpdate:healthchecksThreshold": b[17] || (b[17] = (_) => n.fields.healthchecksThreshold = _),
|
|
@@ -7285,7 +7291,7 @@ const Te = {
|
|
|
7285
7291
|
},
|
|
7286
7292
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
7287
7293
|
setup(e) {
|
|
7288
|
-
const a = e, { i18n: { t }, i18nT: l } = Te.useI18n(), { getPropValue: r } = Uu(), i =
|
|
7294
|
+
const a = e, { i18n: { t }, i18nT: l } = Te.useI18n(), { getPropValue: r } = Uu(), i = F(() => Qe.form[a.config.app].edit), s = K({
|
|
7289
7295
|
id: {},
|
|
7290
7296
|
name: {},
|
|
7291
7297
|
created_at: {},
|
|
@@ -7360,7 +7366,7 @@ const Te = {
|
|
|
7360
7366
|
}
|
|
7361
7367
|
});
|
|
7362
7368
|
return (c, o) => (C(), E("div", null, [
|
|
7363
|
-
|
|
7369
|
+
v(u(Go), {
|
|
7364
7370
|
config: e.config,
|
|
7365
7371
|
"config-card-doc": e.configCardDoc,
|
|
7366
7372
|
"config-schema": s.value,
|
|
@@ -7371,7 +7377,7 @@ const Te = {
|
|
|
7371
7377
|
onLoading: o[2] || (o[2] = (d) => c.$emit("loading", d))
|
|
7372
7378
|
}, {
|
|
7373
7379
|
"name-label-tooltip": f(() => [
|
|
7374
|
-
|
|
7380
|
+
v(u(l), {
|
|
7375
7381
|
keypath: "upstreams.form.fields.name.tooltip",
|
|
7376
7382
|
scope: "global"
|
|
7377
7383
|
}, {
|
|
@@ -7382,7 +7388,7 @@ const Te = {
|
|
|
7382
7388
|
})
|
|
7383
7389
|
]),
|
|
7384
7390
|
"hash_on-label-tooltip": f(({ row: d }) => [
|
|
7385
|
-
|
|
7391
|
+
v(u(l), {
|
|
7386
7392
|
keypath: "upstreams.form.fields.hash_on.tooltip",
|
|
7387
7393
|
scope: "global"
|
|
7388
7394
|
}, {
|
|
@@ -7393,7 +7399,7 @@ const Te = {
|
|
|
7393
7399
|
}, 1024)
|
|
7394
7400
|
]),
|
|
7395
7401
|
"hash_on_header-label-tooltip": f(() => [
|
|
7396
|
-
|
|
7402
|
+
v(u(l), {
|
|
7397
7403
|
keypath: "upstreams.form.hash_tooltips.hash_on_header.text",
|
|
7398
7404
|
scope: "global"
|
|
7399
7405
|
}, {
|
|
@@ -7407,7 +7413,7 @@ const Te = {
|
|
|
7407
7413
|
})
|
|
7408
7414
|
]),
|
|
7409
7415
|
"hash_on_uri_capture-label-tooltip": f(() => [
|
|
7410
|
-
|
|
7416
|
+
v(u(l), {
|
|
7411
7417
|
keypath: "upstreams.form.hash_tooltips.hash_on_uri_capture.text",
|
|
7412
7418
|
scope: "global"
|
|
7413
7419
|
}, {
|
|
@@ -7421,7 +7427,7 @@ const Te = {
|
|
|
7421
7427
|
})
|
|
7422
7428
|
]),
|
|
7423
7429
|
"hash_on_query_arg-label-tooltip": f(() => [
|
|
7424
|
-
|
|
7430
|
+
v(u(l), {
|
|
7425
7431
|
keypath: "upstreams.form.hash_tooltips.hash_on_query_arg.text",
|
|
7426
7432
|
scope: "global"
|
|
7427
7433
|
}, {
|
|
@@ -7435,7 +7441,7 @@ const Te = {
|
|
|
7435
7441
|
})
|
|
7436
7442
|
]),
|
|
7437
7443
|
"hash_on_cookie-label-tooltip": f(() => [
|
|
7438
|
-
|
|
7444
|
+
v(u(l), {
|
|
7439
7445
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie.text",
|
|
7440
7446
|
scope: "global"
|
|
7441
7447
|
}, {
|
|
@@ -7452,7 +7458,7 @@ const Te = {
|
|
|
7452
7458
|
})
|
|
7453
7459
|
]),
|
|
7454
7460
|
"hash_on_cookie_path-label-tooltip": f(() => [
|
|
7455
|
-
|
|
7461
|
+
v(u(l), {
|
|
7456
7462
|
keypath: "upstreams.form.hash_tooltips.hash_on_cookie_path.text",
|
|
7457
7463
|
scope: "global"
|
|
7458
7464
|
}, {
|
|
@@ -7469,7 +7475,7 @@ const Te = {
|
|
|
7469
7475
|
})
|
|
7470
7476
|
]),
|
|
7471
7477
|
"slots-label-tooltip": f(() => [
|
|
7472
|
-
|
|
7478
|
+
v(u(l), {
|
|
7473
7479
|
keypath: "upstreams.form.hash_tooltips.slots.text",
|
|
7474
7480
|
scope: "global"
|
|
7475
7481
|
}, {
|
|
@@ -7492,7 +7498,7 @@ const Te = {
|
|
|
7492
7498
|
})
|
|
7493
7499
|
]),
|
|
7494
7500
|
"hash_fallback-label-tooltip": f(() => [
|
|
7495
|
-
|
|
7501
|
+
v(u(l), {
|
|
7496
7502
|
keypath: "upstreams.form.hash_tooltips.hash_fallback.text",
|
|
7497
7503
|
scope: "global"
|
|
7498
7504
|
}, {
|
|
@@ -7506,7 +7512,7 @@ const Te = {
|
|
|
7506
7512
|
})
|
|
7507
7513
|
]),
|
|
7508
7514
|
"hash_fallback_header-label-tooltip": f(() => [
|
|
7509
|
-
|
|
7515
|
+
v(u(l), {
|
|
7510
7516
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_header.text",
|
|
7511
7517
|
scope: "global"
|
|
7512
7518
|
}, {
|
|
@@ -7520,7 +7526,7 @@ const Te = {
|
|
|
7520
7526
|
})
|
|
7521
7527
|
]),
|
|
7522
7528
|
"hash_fallback_query_arg-label-tooltip": f(() => [
|
|
7523
|
-
|
|
7529
|
+
v(u(l), {
|
|
7524
7530
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_query_arg.text",
|
|
7525
7531
|
scope: "global"
|
|
7526
7532
|
}, {
|
|
@@ -7534,7 +7540,7 @@ const Te = {
|
|
|
7534
7540
|
})
|
|
7535
7541
|
]),
|
|
7536
7542
|
"hash_fallback_uri_capture-label-tooltip": f(() => [
|
|
7537
|
-
|
|
7543
|
+
v(u(l), {
|
|
7538
7544
|
keypath: "upstreams.form.hash_tooltips.hash_fallback_uri_capture.text",
|
|
7539
7545
|
scope: "global"
|
|
7540
7546
|
}, {
|
|
@@ -7548,7 +7554,7 @@ const Te = {
|
|
|
7548
7554
|
})
|
|
7549
7555
|
]),
|
|
7550
7556
|
"host_header-label-tooltip": f(() => [
|
|
7551
|
-
|
|
7557
|
+
v(u(l), {
|
|
7552
7558
|
keypath: "upstreams.form.hash_tooltips.host_header.text",
|
|
7553
7559
|
scope: "global"
|
|
7554
7560
|
}, {
|