@kong-ui-public/entities-upstreams-targets 3.3.18 → 3.3.19
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.
|
@@ -247,71 +247,67 @@ function Ci(e, a, t, l = {
|
|
|
247
247
|
searchKeys: ["id"]
|
|
248
248
|
}) {
|
|
249
249
|
t || (t = "1000");
|
|
250
|
-
const { axiosInstance: r } = Dt(e.axiosRequestConfig), { i18n: { t: s } } = Ct(), { debounce: i } = ni(), c = i(async (
|
|
251
|
-
await N(
|
|
250
|
+
const { axiosInstance: r } = Dt(e.axiosRequestConfig), { i18n: { t: s } } = Ct(), { debounce: i } = ni(), c = i(async ($) => {
|
|
251
|
+
await N($);
|
|
252
252
|
}, 200), o = B(!1), d = B(""), h = B(""), p = B([]), g = B([]), n = B(void 0), H = A(() => {
|
|
253
|
-
const
|
|
254
|
-
return e.app === "konnect" ?
|
|
255
|
-
}), { isValidUuid:
|
|
253
|
+
const $ = `${e.apiBaseUrl}${u(a)}`;
|
|
254
|
+
return e.app === "konnect" ? $.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? $.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : $;
|
|
255
|
+
}), { isValidUuid: O } = Jl(), v = async () => {
|
|
256
256
|
try {
|
|
257
257
|
o.value = !0;
|
|
258
|
-
const { data:
|
|
259
|
-
|
|
258
|
+
const { data: $ } = await r.get(`${H.value}?size=${t}`);
|
|
259
|
+
$ != null && $.next || (n.value = l.fetchedItemsKey in $ ? $[l.fetchedItemsKey] : []), g.value = l.fetchedItemsKey in $ ? $[l.fetchedItemsKey] : [], p.value = g.value;
|
|
260
260
|
} catch {
|
|
261
261
|
p.value = [], d.value = s("debouncedFilter.errors.fetch");
|
|
262
262
|
} finally {
|
|
263
263
|
o.value = !1;
|
|
264
264
|
}
|
|
265
|
-
}, T = B(""), N = async (
|
|
266
|
-
var
|
|
267
|
-
if (T.value !==
|
|
268
|
-
if (
|
|
265
|
+
}, T = B(""), N = async ($) => {
|
|
266
|
+
var U, M, m;
|
|
267
|
+
if (T.value !== $) {
|
|
268
|
+
if (T.value = $ ?? "", !$) {
|
|
269
269
|
p.value = g.value;
|
|
270
270
|
return;
|
|
271
|
-
}
|
|
272
|
-
T.value = U || "";
|
|
271
|
+
}
|
|
273
272
|
if (n.value === void 0)
|
|
274
273
|
try {
|
|
275
274
|
if (o.value = !0, d.value = "", h.value = "", e.app === "konnect") {
|
|
276
|
-
|
|
277
|
-
U && (_ += `/${U}`);
|
|
278
|
-
const { data: q } = await r.get(`${_}?size=${t}`);
|
|
275
|
+
const _ = `${H.value}/${$}`, { data: q } = await r.get(`${_}?size=${t}`);
|
|
279
276
|
l.fetchedItemsKey in q ? p.value = q[l.fetchedItemsKey] : q != null && q[l.exactMatchKey ?? "id"] ? p.value = [q] : p.value = [];
|
|
280
|
-
} else
|
|
277
|
+
} else {
|
|
281
278
|
const _ = [];
|
|
282
|
-
|
|
283
|
-
const { data: x } = await r.get(`${H.value}/${
|
|
279
|
+
O($) && l.searchKeys.includes("id") ? _.push((async () => {
|
|
280
|
+
const { data: x } = await r.get(`${H.value}/${$}`);
|
|
284
281
|
return [x[l.fetchedItemsKey] ?? x];
|
|
285
282
|
})()) : _.push(
|
|
286
283
|
...l.searchKeys.filter((x) => x !== "id").map(async (x) => {
|
|
287
|
-
const { data: V } = await r.get(`${H.value}?${x}=${
|
|
284
|
+
const { data: V } = await r.get(`${H.value}?${x}=${$}`);
|
|
288
285
|
return V[l.fetchedItemsKey];
|
|
289
286
|
})
|
|
290
287
|
);
|
|
291
|
-
const q = await Promise.all(_),
|
|
292
|
-
p.value = [], (
|
|
288
|
+
const q = await Promise.all(_), F = /* @__PURE__ */ new Set();
|
|
289
|
+
p.value = [], (U = q == null ? void 0 : q.forEach) == null || U.call(q, (x) => {
|
|
293
290
|
var V;
|
|
294
291
|
(V = x == null ? void 0 : x.forEach) == null || V.call(x, (E) => {
|
|
295
|
-
|
|
292
|
+
F.has(E.id) || (F.add(E.id), p.value.push(E));
|
|
296
293
|
});
|
|
297
294
|
});
|
|
298
|
-
}
|
|
299
|
-
p.value = g.value;
|
|
295
|
+
}
|
|
300
296
|
} catch (_) {
|
|
301
297
|
((M = _ == null ? void 0 : _.response) == null ? void 0 : M.status) === 404 ? h.value = s("debouncedFilter.errors.invalid") : (p.value = [], d.value = s("debouncedFilter.errors.fetch"));
|
|
302
298
|
} finally {
|
|
303
299
|
o.value = !1;
|
|
304
300
|
}
|
|
305
301
|
else
|
|
306
|
-
o.value = !0, h.value = "",
|
|
302
|
+
o.value = !0, h.value = "", p.value = (m = n.value) == null ? void 0 : m.filter((_) => {
|
|
307
303
|
var q;
|
|
308
|
-
let
|
|
304
|
+
let F = !1;
|
|
309
305
|
for (const x of l.searchKeys) {
|
|
310
306
|
const V = typeof _[x] == "string" ? (q = _[x]) == null ? void 0 : q.toLowerCase() : _[x];
|
|
311
|
-
V != null && V.includes(
|
|
307
|
+
V != null && V.includes($.toLowerCase()) && (F = !0);
|
|
312
308
|
}
|
|
313
|
-
return
|
|
314
|
-
}), (!p.value || !p.value.length) && (h.value = s("debouncedFilter.errors.invalid"))
|
|
309
|
+
return F;
|
|
310
|
+
}), (!p.value || !p.value.length) && (h.value = s("debouncedFilter.errors.invalid")), o.value = !1;
|
|
315
311
|
}
|
|
316
312
|
};
|
|
317
313
|
return {
|
|
@@ -381,8 +377,8 @@ function Wl(e, a) {
|
|
|
381
377
|
const { page: c, pageSize: o, offset: d, sortColumnKey: h, sortColumnOrder: p, query: g } = i;
|
|
382
378
|
try {
|
|
383
379
|
let n = new URL(s.value.href);
|
|
384
|
-
return r.value && g ? (n.search = "", n = t.value.isExactMatch ? new URL(`${n.href}/${g}/`) : new URL(`${n.href}?filter[name][contains]=${g}`)) : (r.value || new URLSearchParams(g).forEach((H,
|
|
385
|
-
n.searchParams.append(
|
|
380
|
+
return r.value && g ? (n.search = "", n = t.value.isExactMatch ? new URL(`${n.href}/${g}/`) : new URL(`${n.href}?filter[name][contains]=${g}`)) : (r.value || new URLSearchParams(g).forEach((H, O) => {
|
|
381
|
+
n.searchParams.append(O, H);
|
|
386
382
|
}), 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;
|
|
387
383
|
} catch (n) {
|
|
388
384
|
return console.error("RouteList(fetcher)", n), l.value;
|
|
@@ -483,13 +479,13 @@ const Ql = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
483
479
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
484
480
|
if (_l.indexOf(e) === -1)
|
|
485
481
|
throw new Error(`Invalid operator, expected one of ${_l.join("|")}`);
|
|
486
|
-
},
|
|
487
|
-
function
|
|
482
|
+
}, Oi = (e) => typeof e == "string" && /^[v\d]/.test(e) && Ql.test(e);
|
|
483
|
+
function Fi(e) {
|
|
488
484
|
const { gatewayInfo: a, supportedRange: t } = e;
|
|
489
485
|
if (!a)
|
|
490
486
|
return !0;
|
|
491
487
|
const { edition: l, version: r } = a;
|
|
492
|
-
if (!
|
|
488
|
+
if (!Oi(r))
|
|
493
489
|
return console.error("Invalid version"), !1;
|
|
494
490
|
const s = t[l];
|
|
495
491
|
if (!s)
|
|
@@ -522,7 +518,7 @@ const de = {
|
|
|
522
518
|
useHelpers: Jl,
|
|
523
519
|
useStringHelpers: Ii,
|
|
524
520
|
useI18n: Ct,
|
|
525
|
-
useGatewayFeatureSupported:
|
|
521
|
+
useGatewayFeatureSupported: Fi,
|
|
526
522
|
useTruncationDetector: Ui,
|
|
527
523
|
useValidators: $i
|
|
528
524
|
}, Ni = {
|
|
@@ -776,8 +772,8 @@ const de = {
|
|
|
776
772
|
};
|
|
777
773
|
}
|
|
778
774
|
}), g = B(), { isTruncated: n } = de.useTruncationDetector(g);
|
|
779
|
-
return (H,
|
|
780
|
-
const v = j("KLabel"), T = j("KBadge"), N = j("KCopy"),
|
|
775
|
+
return (H, O) => {
|
|
776
|
+
const v = j("KLabel"), T = j("KBadge"), N = j("KCopy"), $ = j("KTooltip");
|
|
781
777
|
return k(), K("div", Di, [
|
|
782
778
|
I("div", {
|
|
783
779
|
class: "config-card-details-label",
|
|
@@ -820,15 +816,15 @@ const de = {
|
|
|
820
816
|
key: 0,
|
|
821
817
|
"data-testid": `${e.item.key}-badge-tags`
|
|
822
818
|
}, [
|
|
823
|
-
(k(!0), K(ye, null, Ce(e.item.value, (
|
|
819
|
+
(k(!0), K(ye, null, Ce(e.item.value, (U, M) => (k(), P(T, {
|
|
824
820
|
key: `${e.item.key}-badge-tag-${M}`,
|
|
825
821
|
class: "config-badge",
|
|
826
822
|
"data-testid": `${e.item.key}-badge-tag-${M}`,
|
|
827
|
-
tooltip:
|
|
823
|
+
tooltip: U,
|
|
828
824
|
"truncation-tooltip": ""
|
|
829
825
|
}, {
|
|
830
826
|
default: f(() => [
|
|
831
|
-
J(S(
|
|
827
|
+
J(S(U), 1)
|
|
832
828
|
]),
|
|
833
829
|
_: 2
|
|
834
830
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
@@ -838,24 +834,24 @@ const de = {
|
|
|
838
834
|
class: "copy-uuid-array",
|
|
839
835
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
840
836
|
}, [
|
|
841
|
-
(k(!0), K(ye, null, Ce(e.item.value, (
|
|
837
|
+
(k(!0), K(ye, null, Ce(e.item.value, (U, M) => (k(), P(N, ri({ ref_for: !0 }, p.value.childAttrs, {
|
|
842
838
|
key: `${e.item.key}-copy-uuid-${M}`,
|
|
843
839
|
"data-testid": `${e.item.key}-copy-uuid-${M}`,
|
|
844
|
-
text:
|
|
840
|
+
text: U
|
|
845
841
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
846
842
|
], 8, Gi)) : p.value.additionalComponent === "KMethodBadge" ? (k(), K("div", {
|
|
847
843
|
key: 2,
|
|
848
844
|
class: "method-badge-array",
|
|
849
845
|
"data-testid": `${e.item.key}-badge-methods`
|
|
850
846
|
}, [
|
|
851
|
-
(k(!0), K(ye, null, Ce(e.item.value, (
|
|
847
|
+
(k(!0), K(ye, null, Ce(e.item.value, (U, M) => (k(), P(T, {
|
|
852
848
|
key: `${e.item.key}-badge-method-${M}`,
|
|
853
|
-
appearance: Object.values(u(ii)).includes(
|
|
849
|
+
appearance: Object.values(u(ii)).includes(U.toLowerCase()) ? U.toLowerCase() : "custom",
|
|
854
850
|
class: "config-badge",
|
|
855
851
|
"data-testid": `${e.item.key}-badge-method-${M}`
|
|
856
852
|
}, {
|
|
857
853
|
default: f(() => [
|
|
858
|
-
J(S(
|
|
854
|
+
J(S(U), 1)
|
|
859
855
|
]),
|
|
860
856
|
_: 2
|
|
861
857
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
@@ -864,13 +860,13 @@ const de = {
|
|
|
864
860
|
key: 3,
|
|
865
861
|
"data-testid": `${t.item.key}-json-array-content`
|
|
866
862
|
}, [
|
|
867
|
-
(k(!0), K(ye, null, Ce(e.item.value, (
|
|
863
|
+
(k(!0), K(ye, null, Ce(e.item.value, (U, M) => (k(), P(Yl, {
|
|
868
864
|
key: `json-array-item-${M}`,
|
|
869
865
|
index: M,
|
|
870
866
|
"is-array-item": "",
|
|
871
|
-
item:
|
|
867
|
+
item: U
|
|
872
868
|
}, null, 8, ["index", "item"]))), 128))
|
|
873
|
-
], 8, es)) : (k(), P(
|
|
869
|
+
], 8, es)) : (k(), P($, {
|
|
874
870
|
key: 4,
|
|
875
871
|
text: u(n) ? e.item.value : ""
|
|
876
872
|
}, {
|
|
@@ -1122,10 +1118,10 @@ function _s() {
|
|
|
1122
1118
|
arguments[a].forEach(l);
|
|
1123
1119
|
return e;
|
|
1124
1120
|
}
|
|
1125
|
-
function
|
|
1121
|
+
function Ot(e) {
|
|
1126
1122
|
return this.extend(e);
|
|
1127
1123
|
}
|
|
1128
|
-
|
|
1124
|
+
Ot.prototype.extend = function(e) {
|
|
1129
1125
|
var a = [], t = [];
|
|
1130
1126
|
if (e instanceof fe)
|
|
1131
1127
|
t.push(e);
|
|
@@ -1146,10 +1142,10 @@ Ft.prototype.extend = function(e) {
|
|
|
1146
1142
|
if (!(r instanceof fe))
|
|
1147
1143
|
throw new ve("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1148
1144
|
});
|
|
1149
|
-
var l = Object.create(
|
|
1145
|
+
var l = Object.create(Ot.prototype);
|
|
1150
1146
|
return l.implicit = (this.implicit || []).concat(a), l.explicit = (this.explicit || []).concat(t), l.compiledImplicit = wl(l, "implicit"), l.compiledExplicit = wl(l, "explicit"), l.compiledTypeMap = _s(l.compiledImplicit, l.compiledExplicit), l;
|
|
1151
1147
|
};
|
|
1152
|
-
var ar =
|
|
1148
|
+
var ar = Ot, lr = new fe("tag:yaml.org,2002:str", {
|
|
1153
1149
|
kind: "scalar",
|
|
1154
1150
|
construct: function(e) {
|
|
1155
1151
|
return e !== null ? e : "";
|
|
@@ -1241,10 +1237,10 @@ function Ts(e) {
|
|
|
1241
1237
|
function qs(e) {
|
|
1242
1238
|
return 48 <= e && e <= 55;
|
|
1243
1239
|
}
|
|
1244
|
-
function
|
|
1240
|
+
function Os(e) {
|
|
1245
1241
|
return 48 <= e && e <= 57;
|
|
1246
1242
|
}
|
|
1247
|
-
function
|
|
1243
|
+
function Fs(e) {
|
|
1248
1244
|
if (e === null) return !1;
|
|
1249
1245
|
var a = e.length, t = 0, l = !1, r;
|
|
1250
1246
|
if (!a) return !1;
|
|
@@ -1278,7 +1274,7 @@ function Os(e) {
|
|
|
1278
1274
|
if (r === "_") return !1;
|
|
1279
1275
|
for (; t < a; t++)
|
|
1280
1276
|
if (r = e[t], r !== "_") {
|
|
1281
|
-
if (!
|
|
1277
|
+
if (!Os(e.charCodeAt(t)))
|
|
1282
1278
|
return !1;
|
|
1283
1279
|
l = !0;
|
|
1284
1280
|
}
|
|
@@ -1299,7 +1295,7 @@ function $s(e) {
|
|
|
1299
1295
|
}
|
|
1300
1296
|
var ur = new fe("tag:yaml.org,2002:int", {
|
|
1301
1297
|
kind: "scalar",
|
|
1302
|
-
resolve:
|
|
1298
|
+
resolve: Fs,
|
|
1303
1299
|
construct: Us,
|
|
1304
1300
|
predicate: $s,
|
|
1305
1301
|
represent: {
|
|
@@ -1730,7 +1726,7 @@ function vn(e, a) {
|
|
|
1730
1726
|
R(e, "unexpected end of the stream within a double quoted scalar");
|
|
1731
1727
|
}
|
|
1732
1728
|
function yn(e, a) {
|
|
1733
|
-
var t = !0, l, r, s, i = e.tag, c, o = e.anchor, d, h, p, g, n, H = /* @__PURE__ */ Object.create(null),
|
|
1729
|
+
var t = !0, l, r, s, i = e.tag, c, o = e.anchor, d, h, p, g, n, H = /* @__PURE__ */ Object.create(null), O, v, T, N;
|
|
1734
1730
|
if (N = e.input.charCodeAt(e.position), N === 91)
|
|
1735
1731
|
h = 93, n = !1, c = [];
|
|
1736
1732
|
else if (N === 123)
|
|
@@ -1740,7 +1736,7 @@ function yn(e, a) {
|
|
|
1740
1736
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), N = e.input.charCodeAt(++e.position); N !== 0; ) {
|
|
1741
1737
|
if (oe(e, !0, a), N = e.input.charCodeAt(e.position), N === h)
|
|
1742
1738
|
return e.position++, e.tag = i, e.anchor = o, e.kind = n ? "mapping" : "sequence", e.result = c, !0;
|
|
1743
|
-
t ? N === 44 && R(e, "expected the node content, but found ','") : R(e, "missed comma between flow collection entries"), v =
|
|
1739
|
+
t ? N === 44 && R(e, "expected the node content, but found ','") : R(e, "missed comma between flow collection entries"), v = O = T = null, p = g = !1, N === 63 && (d = e.input.charCodeAt(e.position + 1), be(d) && (p = g = !0, e.position++, oe(e, !0, a))), l = e.line, r = e.lineStart, s = e.position, Ge(e, a, ft, !1, !0), v = e.tag, O = e.result, oe(e, !0, a), N = e.input.charCodeAt(e.position), (g || e.line === l) && N === 58 && (p = !0, N = e.input.charCodeAt(++e.position), oe(e, !0, a), Ge(e, a, ft, !1, !0), T = e.result), n ? Qe(e, c, H, v, O, T, l, r, s) : p ? c.push(Qe(e, null, H, v, O, T, l, r, s)) : c.push(O), oe(e, !0, a), N = e.input.charCodeAt(e.position), N === 44 ? (t = !0, N = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1744
1740
|
}
|
|
1745
1741
|
R(e, "unexpected end of the stream within a flow collection");
|
|
1746
1742
|
}
|
|
@@ -1807,11 +1803,11 @@ function Tl(e, a) {
|
|
|
1807
1803
|
return c ? (e.tag = l, e.anchor = r, e.kind = "sequence", e.result = s, !0) : !1;
|
|
1808
1804
|
}
|
|
1809
1805
|
function kn(e, a, t) {
|
|
1810
|
-
var l, r, s, i, c, o, d = e.tag, h = e.anchor, p = {}, g = /* @__PURE__ */ Object.create(null), n = null, H = null,
|
|
1806
|
+
var l, r, s, i, c, o, d = e.tag, h = e.anchor, p = {}, g = /* @__PURE__ */ Object.create(null), n = null, H = null, O = null, v = !1, T = !1, N;
|
|
1811
1807
|
if (e.firstTabInLine !== -1) return !1;
|
|
1812
1808
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = p), N = e.input.charCodeAt(e.position); N !== 0; ) {
|
|
1813
1809
|
if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, R(e, "tab characters must not be used in indentation")), l = e.input.charCodeAt(e.position + 1), s = e.line, (N === 63 || N === 58) && be(l))
|
|
1814
|
-
N === 63 ? (v && (Qe(e, p, g, n, H, null, i, c, o), n = H =
|
|
1810
|
+
N === 63 ? (v && (Qe(e, p, g, n, H, null, i, c, o), n = H = O = null), T = !0, v = !0, r = !0) : v ? (v = !1, r = !0) : R(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, N = l;
|
|
1815
1811
|
else {
|
|
1816
1812
|
if (i = e.line, c = e.lineStart, o = e.position, !Ge(e, t, Cr, !1, !0))
|
|
1817
1813
|
break;
|
|
@@ -1819,7 +1815,7 @@ function kn(e, a, t) {
|
|
|
1819
1815
|
for (N = e.input.charCodeAt(e.position); Ke(N); )
|
|
1820
1816
|
N = e.input.charCodeAt(++e.position);
|
|
1821
1817
|
if (N === 58)
|
|
1822
|
-
N = e.input.charCodeAt(++e.position), be(N) || R(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (Qe(e, p, g, n, H, null, i, c, o), n = H =
|
|
1818
|
+
N = e.input.charCodeAt(++e.position), be(N) || R(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (Qe(e, p, g, n, H, null, i, c, o), n = H = O = null), T = !0, v = !1, r = !1, n = e.tag, H = e.result;
|
|
1823
1819
|
else if (T)
|
|
1824
1820
|
R(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1825
1821
|
else
|
|
@@ -1829,7 +1825,7 @@ function kn(e, a, t) {
|
|
|
1829
1825
|
else
|
|
1830
1826
|
return e.tag = d, e.anchor = h, !0;
|
|
1831
1827
|
}
|
|
1832
|
-
if ((e.line === s || e.lineIndent > a) && (v && (i = e.line, c = e.lineStart, o = e.position), Ge(e, a, mt, !0, r) && (v ? H = e.result :
|
|
1828
|
+
if ((e.line === s || e.lineIndent > a) && (v && (i = e.line, c = e.lineStart, o = e.position), Ge(e, a, mt, !0, r) && (v ? H = e.result : O = e.result), v || (Qe(e, p, g, n, H, O, i, c, o), n = H = O = null), oe(e, !0, -1), N = e.input.charCodeAt(e.position)), (e.line === s || e.lineIndent > a) && N !== 0)
|
|
1833
1829
|
R(e, "bad indentation of a mapping entry");
|
|
1834
1830
|
else if (e.lineIndent < a)
|
|
1835
1831
|
break;
|
|
@@ -1872,11 +1868,11 @@ function wn(e) {
|
|
|
1872
1868
|
return e.position === a && R(e, "name of an alias node must contain at least one character"), t = e.input.slice(a, e.position), Me.call(e.anchorMap, t) || R(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
1873
1869
|
}
|
|
1874
1870
|
function Ge(e, a, t, l, r) {
|
|
1875
|
-
var s, i, c, o = 1, d = !1, h = !1, p, g, n, H,
|
|
1871
|
+
var s, i, c, o = 1, d = !1, h = !1, p, g, n, H, O, v;
|
|
1876
1872
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, s = i = c = mt === t || _r === 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)
|
|
1877
1873
|
for (; Cn(e) || _n(e); )
|
|
1878
1874
|
oe(e, !0, -1) ? (d = !0, c = s, e.lineIndent > a ? o = 1 : e.lineIndent === a ? o = 0 : e.lineIndent < a && (o = -1)) : c = !1;
|
|
1879
|
-
if (c && (c = d || r), (o === 1 || mt === t) && (ft === t || Cr === t ?
|
|
1875
|
+
if (c && (c = d || r), (o === 1 || mt === t) && (ft === t || Cr === t ? O = a : O = a + 1, v = e.position - e.lineStart, o === 1 ? c && (Tl(e, v) || kn(e, v, O)) || yn(e, O) ? h = !0 : (i && bn(e, O) || gn(e, O) || vn(e, O) ? h = !0 : wn(e) ? (h = !0, (e.tag !== null || e.anchor !== null) && R(e, "alias node should not have any properties")) : mn(e, O, ft === t) && (h = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : o === 0 && (h = c && Tl(e, v))), e.tag === null)
|
|
1880
1876
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1881
1877
|
else if (e.tag === "?") {
|
|
1882
1878
|
for (e.result !== null && e.kind !== "scalar" && R(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), p = 0, g = e.implicitTypes.length; p < g; p += 1)
|
|
@@ -1956,7 +1952,7 @@ function In(e, a) {
|
|
|
1956
1952
|
var An = xn, Hn = In, Tr = {
|
|
1957
1953
|
loadAll: An,
|
|
1958
1954
|
load: Hn
|
|
1959
|
-
}, qr = Object.prototype.toString,
|
|
1955
|
+
}, qr = Object.prototype.toString, Or = Object.prototype.hasOwnProperty, Zt = 65279, Tn = 9, at = 10, qn = 13, On = 32, Fn = 33, Un = 34, Ft = 35, $n = 37, Nn = 38, Mn = 39, jn = 42, Fr = 44, Kn = 45, vt = 58, Bn = 61, En = 62, Pn = 63, Vn = 64, Ur = 91, $r = 93, Ln = 96, Nr = 123, Rn = 124, Mr = 125, ge = {};
|
|
1960
1956
|
ge[0] = "\\0";
|
|
1961
1957
|
ge[7] = "\\a";
|
|
1962
1958
|
ge[8] = "\\b";
|
|
@@ -1994,7 +1990,7 @@ function Jn(e, a) {
|
|
|
1994
1990
|
var t, l, r, s, i, c, o;
|
|
1995
1991
|
if (a === null) return {};
|
|
1996
1992
|
for (t = {}, l = Object.keys(a), r = 0, s = l.length; r < s; r += 1)
|
|
1997
|
-
i = l[r], c = String(a[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), o = e.compiledTypeMap.fallback[i], o &&
|
|
1993
|
+
i = l[r], c = String(a[i]), i.slice(0, 2) === "!!" && (i = "tag:yaml.org,2002:" + i.slice(2)), o = e.compiledTypeMap.fallback[i], o && Or.call(o.styleAliases, c) && (c = o.styleAliases[c]), t[i] = c;
|
|
1998
1994
|
return t;
|
|
1999
1995
|
}
|
|
2000
1996
|
function Wn(e) {
|
|
@@ -2032,26 +2028,26 @@ function Yn(e, a) {
|
|
|
2032
2028
|
return !1;
|
|
2033
2029
|
}
|
|
2034
2030
|
function yt(e) {
|
|
2035
|
-
return e ===
|
|
2031
|
+
return e === On || e === Tn;
|
|
2036
2032
|
}
|
|
2037
2033
|
function rt(e) {
|
|
2038
2034
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Zt || 65536 <= e && e <= 1114111;
|
|
2039
2035
|
}
|
|
2040
|
-
function
|
|
2036
|
+
function Ol(e) {
|
|
2041
2037
|
return rt(e) && e !== Zt && e !== qn && e !== at;
|
|
2042
2038
|
}
|
|
2043
|
-
function
|
|
2044
|
-
var l =
|
|
2039
|
+
function Fl(e, a, t) {
|
|
2040
|
+
var l = Ol(e), r = l && !yt(e);
|
|
2045
2041
|
return (
|
|
2046
2042
|
// ns-plain-safe
|
|
2047
2043
|
(t ? (
|
|
2048
2044
|
// c = flow-in
|
|
2049
2045
|
l
|
|
2050
|
-
) : l && e !==
|
|
2046
|
+
) : l && e !== Fr && e !== Ur && e !== $r && e !== Nr && e !== Mr) && e !== Ft && !(a === vt && !r) || Ol(a) && !yt(a) && e === Ft || a === vt && r
|
|
2051
2047
|
);
|
|
2052
2048
|
}
|
|
2053
2049
|
function Gn(e) {
|
|
2054
|
-
return rt(e) && e !== Zt && !yt(e) && e !== Kn && e !== Pn && e !== vt && e !==
|
|
2050
|
+
return rt(e) && e !== Zt && !yt(e) && e !== Kn && e !== Pn && e !== vt && e !== Fr && e !== Ur && e !== $r && e !== Nr && e !== Mr && e !== Ft && e !== Nn && e !== jn && e !== Fn && e !== Rn && e !== Bn && e !== En && e !== Mn && e !== Un && e !== $n && e !== Vn && e !== Ln;
|
|
2055
2051
|
}
|
|
2056
2052
|
function Xn(e) {
|
|
2057
2053
|
return !yt(e) && e !== vt;
|
|
@@ -2066,12 +2062,12 @@ function jr(e) {
|
|
|
2066
2062
|
}
|
|
2067
2063
|
var Kr = 1, $t = 2, Br = 3, Er = 4, Je = 5;
|
|
2068
2064
|
function eo(e, a, t, l, r, s, i, c) {
|
|
2069
|
-
var o, d = 0, h = null, p = !1, g = !1, n = l !== -1, H = -1,
|
|
2065
|
+
var o, d = 0, h = null, p = !1, g = !1, n = l !== -1, H = -1, O = Gn(et(e, 0)) && Xn(et(e, e.length - 1));
|
|
2070
2066
|
if (a || i)
|
|
2071
2067
|
for (o = 0; o < e.length; d >= 65536 ? o += 2 : o++) {
|
|
2072
2068
|
if (d = et(e, o), !rt(d))
|
|
2073
2069
|
return Je;
|
|
2074
|
-
|
|
2070
|
+
O = O && Fl(d, h, c), h = d;
|
|
2075
2071
|
}
|
|
2076
2072
|
else {
|
|
2077
2073
|
for (o = 0; o < e.length; d >= 65536 ? o += 2 : o++) {
|
|
@@ -2080,11 +2076,11 @@ function eo(e, a, t, l, r, s, i, c) {
|
|
|
2080
2076
|
o - H - 1 > l && e[H + 1] !== " ", H = o);
|
|
2081
2077
|
else if (!rt(d))
|
|
2082
2078
|
return Je;
|
|
2083
|
-
|
|
2079
|
+
O = O && Fl(d, h, c), h = d;
|
|
2084
2080
|
}
|
|
2085
2081
|
g = g || n && o - H - 1 > l && e[H + 1] !== " ";
|
|
2086
2082
|
}
|
|
2087
|
-
return !p && !g ?
|
|
2083
|
+
return !p && !g ? O && !i && !r(e) ? Kr : s === lt ? Je : $t : t > 9 && jr(e) ? Je : i ? s === lt ? Je : $t : g ? Er : Br;
|
|
2088
2084
|
}
|
|
2089
2085
|
function to(e, a, t, l, r) {
|
|
2090
2086
|
e.dump = function() {
|
|
@@ -2163,19 +2159,19 @@ function lo(e) {
|
|
|
2163
2159
|
function ro(e, a, t) {
|
|
2164
2160
|
var l = "", r = e.tag, s, i, c;
|
|
2165
2161
|
for (s = 0, i = t.length; s < i; s += 1)
|
|
2166
|
-
c = t[s], e.replacer && (c = e.replacer.call(t, String(s), c)), (
|
|
2162
|
+
c = t[s], e.replacer && (c = e.replacer.call(t, String(s), c)), (Oe(e, a, c, !1, !1) || typeof c > "u" && Oe(e, a, null, !1, !1)) && (l !== "" && (l += "," + (e.condenseFlow ? "" : " ")), l += e.dump);
|
|
2167
2163
|
e.tag = r, e.dump = "[" + l + "]";
|
|
2168
2164
|
}
|
|
2169
2165
|
function Ml(e, a, t, l) {
|
|
2170
2166
|
var r = "", s = e.tag, i, c, o;
|
|
2171
2167
|
for (i = 0, c = t.length; i < c; i += 1)
|
|
2172
|
-
o = t[i], e.replacer && (o = e.replacer.call(t, String(i), o)), (
|
|
2168
|
+
o = t[i], e.replacer && (o = e.replacer.call(t, String(i), o)), (Oe(e, a + 1, o, !0, !0, !1, !0) || typeof o > "u" && Oe(e, a + 1, null, !0, !0, !1, !0)) && ((!l || r !== "") && (r += Ut(e, a)), e.dump && at === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2173
2169
|
e.tag = s, e.dump = r || "[]";
|
|
2174
2170
|
}
|
|
2175
2171
|
function io(e, a, t) {
|
|
2176
2172
|
var l = "", r = e.tag, s = Object.keys(t), i, c, o, d, h;
|
|
2177
2173
|
for (i = 0, c = s.length; i < c; i += 1)
|
|
2178
|
-
h = "", l !== "" && (h += ", "), e.condenseFlow && (h += '"'), o = s[i], d = t[o], e.replacer && (d = e.replacer.call(t, o, d)),
|
|
2174
|
+
h = "", l !== "" && (h += ", "), e.condenseFlow && (h += '"'), o = s[i], d = t[o], e.replacer && (d = e.replacer.call(t, o, d)), Oe(e, a, o, !1, !1) && (e.dump.length > 1024 && (h += "? "), h += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), Oe(e, a, d, !1, !1) && (h += e.dump, l += h));
|
|
2179
2175
|
e.tag = r, e.dump = "{" + l + "}";
|
|
2180
2176
|
}
|
|
2181
2177
|
function so(e, a, t, l) {
|
|
@@ -2187,7 +2183,7 @@ function so(e, a, t, l) {
|
|
|
2187
2183
|
else if (e.sortKeys)
|
|
2188
2184
|
throw new ve("sortKeys must be a boolean or a function");
|
|
2189
2185
|
for (c = 0, o = i.length; c < o; c += 1)
|
|
2190
|
-
g = "", (!l || r !== "") && (g += Ut(e, a)), d = i[c], h = t[d], e.replacer && (h = e.replacer.call(t, d, h)),
|
|
2186
|
+
g = "", (!l || r !== "") && (g += Ut(e, a)), d = i[c], h = t[d], e.replacer && (h = e.replacer.call(t, d, h)), Oe(e, a + 1, d, !0, !0, !0) && (p = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, p && (e.dump && at === e.dump.charCodeAt(0) ? g += "?" : g += "? "), g += e.dump, p && (g += Ut(e, a)), Oe(e, a + 1, h, !0, p) && (e.dump && at === e.dump.charCodeAt(0) ? g += ":" : g += ": ", g += e.dump, r += g));
|
|
2191
2187
|
e.tag = s, e.dump = r || "{}";
|
|
2192
2188
|
}
|
|
2193
2189
|
function jl(e, a, t) {
|
|
@@ -2197,7 +2193,7 @@ function jl(e, a, t) {
|
|
|
2197
2193
|
if (t ? c.multi && c.representName ? e.tag = c.representName(a) : e.tag = c.tag : e.tag = "?", c.represent) {
|
|
2198
2194
|
if (o = e.styleMap[c.tag] || c.defaultStyle, qr.call(c.represent) === "[object Function]")
|
|
2199
2195
|
l = c.represent(a, o);
|
|
2200
|
-
else if (
|
|
2196
|
+
else if (Or.call(c.represent, o))
|
|
2201
2197
|
l = c.represent[o](a, o);
|
|
2202
2198
|
else
|
|
2203
2199
|
throw new ve("!<" + c.tag + '> tag resolver accepts not "' + o + '" style');
|
|
@@ -2207,7 +2203,7 @@ function jl(e, a, t) {
|
|
|
2207
2203
|
}
|
|
2208
2204
|
return !1;
|
|
2209
2205
|
}
|
|
2210
|
-
function
|
|
2206
|
+
function Oe(e, a, t, l, r, s, i) {
|
|
2211
2207
|
e.tag = null, e.dump = t, jl(e, t, !1) || jl(e, t, !0);
|
|
2212
2208
|
var c = qr.call(e.dump), o = l, d;
|
|
2213
2209
|
l && (l = e.flowLevel < 0 || e.flowLevel > a);
|
|
@@ -2254,7 +2250,7 @@ function oo(e, a) {
|
|
|
2254
2250
|
var t = new Zn(a);
|
|
2255
2251
|
t.noRefs || no(e, t);
|
|
2256
2252
|
var l = e;
|
|
2257
|
-
return t.replacer && (l = t.replacer.call({ "": l }, "", l)),
|
|
2253
|
+
return t.replacer && (l = t.replacer.call({ "": l }, "", l)), Oe(t, 0, l, !0, !0) ? t.dump + `
|
|
2258
2254
|
` : "";
|
|
2259
2255
|
}
|
|
2260
2256
|
var uo = oo, co = {
|
|
@@ -2328,7 +2324,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
2328
2324
|
}, To = ["data-testid"], qo = {
|
|
2329
2325
|
key: 0,
|
|
2330
2326
|
class: "config-card-prop-section-title"
|
|
2331
|
-
},
|
|
2327
|
+
}, Oo = /* @__PURE__ */ X({
|
|
2332
2328
|
__name: "ConfigCardDisplay",
|
|
2333
2329
|
props: {
|
|
2334
2330
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2419,7 +2415,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
2419
2415
|
}, null, 8, ["yaml-record"])) : D("", !0)
|
|
2420
2416
|
], 64));
|
|
2421
2417
|
}
|
|
2422
|
-
}),
|
|
2418
|
+
}), Fo = /* @__PURE__ */ we(Oo, [["__scopeId", "data-v-2052238b"]]), Ie = "24px", nt = (e, a) => {
|
|
2423
2419
|
const t = e.__vccOpts || e;
|
|
2424
2420
|
for (const [l, r] of a)
|
|
2425
2421
|
t[l] = r;
|
|
@@ -3056,19 +3052,19 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3056
3052
|
// the last property displayed
|
|
3057
3053
|
section: ne.Basic
|
|
3058
3054
|
}
|
|
3059
|
-
}, n = B(!1), H = B(!1),
|
|
3055
|
+
}, n = B(!1), H = B(!1), O = B(""), v = B({}), T = A(() => {
|
|
3060
3056
|
var m, _, q;
|
|
3061
3057
|
if (!v.value)
|
|
3062
3058
|
return [];
|
|
3063
|
-
const
|
|
3059
|
+
const F = [], x = Object.keys(v.value).length;
|
|
3064
3060
|
for (const V in v.value) {
|
|
3065
3061
|
const E = (_ = (m = r.configSchema) == null ? void 0 : m[V]) == null ? void 0 : _.order, Q = (q = g[V]) == null ? void 0 : q.order;
|
|
3066
3062
|
let Z = x;
|
|
3067
|
-
(Q || Q === 0) && (Z = Q === -1 ? x + 1 : Q), E && (Z = E === -1 ? x + 1 : E),
|
|
3063
|
+
(Q || Q === 0) && (Z = Q === -1 ? x + 1 : Q), E && (Z = E === -1 ? x + 1 : E), F.push([V, Z]);
|
|
3068
3064
|
}
|
|
3069
|
-
return
|
|
3065
|
+
return F.sort(function(V, E) {
|
|
3070
3066
|
return V[1] - E[1];
|
|
3071
|
-
}),
|
|
3067
|
+
}), F.map((V) => {
|
|
3072
3068
|
var E, Q;
|
|
3073
3069
|
const Z = V[0], W = (E = v.value) == null ? void 0 : E[Z], z = ((Q = r.configSchema) == null ? void 0 : Q[Z]) || {}, ee = g[Z];
|
|
3074
3070
|
return {
|
|
@@ -3085,11 +3081,11 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3085
3081
|
var m, _;
|
|
3086
3082
|
if (!v.value || !r.pluginConfigKey)
|
|
3087
3083
|
return [];
|
|
3088
|
-
const q = v.value[r.pluginConfigKey] || {},
|
|
3084
|
+
const q = v.value[r.pluginConfigKey] || {}, F = Object.keys(q).length, x = [];
|
|
3089
3085
|
for (const V in q) {
|
|
3090
3086
|
const E = (_ = (m = r.pluginConfigSchema) == null ? void 0 : m[V]) == null ? void 0 : _.order, Q = q[V];
|
|
3091
|
-
let Z = Q != null && Q !== "" ?
|
|
3092
|
-
E && (Z = E === -1 ?
|
|
3087
|
+
let Z = Q != null && Q !== "" ? F - 1 : F;
|
|
3088
|
+
E && (Z = E === -1 ? F + 1 : E), x.push([V, Z]);
|
|
3093
3089
|
}
|
|
3094
3090
|
return x.sort(function(V, E) {
|
|
3095
3091
|
return V[1] - E[1];
|
|
@@ -3106,16 +3102,16 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3106
3102
|
section: ne.Plugin
|
|
3107
3103
|
};
|
|
3108
3104
|
}).filter((V) => !V.hidden);
|
|
3109
|
-
}),
|
|
3110
|
-
var m, _, q,
|
|
3105
|
+
}), $ = A(() => {
|
|
3106
|
+
var m, _, q, F;
|
|
3111
3107
|
return {
|
|
3112
3108
|
basic: (m = T.value) == null ? void 0 : m.filter((x) => x.section === ne.Basic),
|
|
3113
3109
|
advanced: (_ = T.value) == null ? void 0 : _.filter((x) => x.section === ne.Advanced),
|
|
3114
|
-
plugin: (
|
|
3110
|
+
plugin: (F = N.value) == null ? void 0 : F.concat((q = T.value) == null ? void 0 : q.filter((x) => x.section === ne.Plugin))
|
|
3115
3111
|
};
|
|
3116
|
-
}),
|
|
3112
|
+
}), U = A(() => {
|
|
3117
3113
|
const m = [];
|
|
3118
|
-
return
|
|
3114
|
+
return $.value.basic.length && m.push("basic"), $.value.advanced.length && m.push("advanced"), $.value.plugin.length && m.push("plugin"), m;
|
|
3119
3115
|
}), M = A(() => {
|
|
3120
3116
|
var m, _;
|
|
3121
3117
|
let q = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
@@ -3139,12 +3135,12 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3139
3135
|
}), l("fetch:success", m);
|
|
3140
3136
|
} catch (m) {
|
|
3141
3137
|
const _ = i(m);
|
|
3142
|
-
|
|
3138
|
+
O.value = _.startsWith("code") ? s("baseConfigCard.errors.load") : _, H.value = !0, l("fetch:error", m);
|
|
3143
3139
|
} finally {
|
|
3144
3140
|
n.value = !1;
|
|
3145
3141
|
}
|
|
3146
3142
|
}), (m, _) => {
|
|
3147
|
-
const q = j("KLabel"),
|
|
3143
|
+
const q = j("KLabel"), F = j("KSelect"), x = j("KButton"), V = j("KSkeleton"), E = j("KEmptyState"), Q = j("KCard");
|
|
3148
3144
|
return k(), P(Q, {
|
|
3149
3145
|
class: "kong-ui-entity-base-config-card",
|
|
3150
3146
|
"title-tag": e.titleTag
|
|
@@ -3161,7 +3157,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3161
3157
|
]),
|
|
3162
3158
|
_: 1
|
|
3163
3159
|
}),
|
|
3164
|
-
y(
|
|
3160
|
+
y(F, {
|
|
3165
3161
|
"data-testid": "select-config-format",
|
|
3166
3162
|
items: d,
|
|
3167
3163
|
onChange: p
|
|
@@ -3197,17 +3193,17 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3197
3193
|
"icon-variant": "error"
|
|
3198
3194
|
}, {
|
|
3199
3195
|
default: f(() => [
|
|
3200
|
-
I("h3", null, S(
|
|
3196
|
+
I("h3", null, S(O.value), 1)
|
|
3201
3197
|
]),
|
|
3202
3198
|
_: 1
|
|
3203
3199
|
})) : D("", !0),
|
|
3204
3200
|
I("div", hu, [
|
|
3205
|
-
y(
|
|
3201
|
+
y(Fo, {
|
|
3206
3202
|
config: e.config,
|
|
3207
3203
|
"fetcher-url": M.value,
|
|
3208
3204
|
format: h.value,
|
|
3209
|
-
"prop-list-types":
|
|
3210
|
-
"property-collections":
|
|
3205
|
+
"prop-list-types": U.value,
|
|
3206
|
+
"property-collections": $.value,
|
|
3211
3207
|
record: v.value
|
|
3212
3208
|
}, Be({ _: 2 }, [
|
|
3213
3209
|
Ce(Object.keys(m.$slots), (Z) => ({
|
|
@@ -3311,10 +3307,10 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3311
3307
|
setup(e, { emit: a }) {
|
|
3312
3308
|
var t;
|
|
3313
3309
|
const l = a, r = e, s = Lt(), { i18n: { t: i } } = de.useI18n(), { getMessageFromError: c } = de.useErrors(), { axiosInstance: o } = de.useAxios((t = r.config) == null ? void 0 : t.axiosRequestConfig), d = B(!1), h = B(!1), p = B(""), g = A(() => r.canSubmit === !1 || r.isReadonly), n = B(!1), H = A(() => {
|
|
3314
|
-
var
|
|
3310
|
+
var U, M;
|
|
3315
3311
|
let m = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3316
|
-
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((
|
|
3317
|
-
}),
|
|
3312
|
+
return r.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((U = r.config) == null ? void 0 : U.controlPlaneId) || "") : r.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (M = r.config) != null && M.workspace ? `/${r.config.workspace}` : "")), r.editId ? (m = m.replace(/{id}/gi, r.editId), m) : (m = m.replace(/\/{id}/gi, ""), m);
|
|
3313
|
+
}), O = () => {
|
|
3318
3314
|
n.value = !n.value;
|
|
3319
3315
|
}, v = () => {
|
|
3320
3316
|
r.config.cancelRoute ? s.push(r.config.cancelRoute) : T();
|
|
@@ -3322,7 +3318,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3322
3318
|
l("cancel");
|
|
3323
3319
|
}, N = () => {
|
|
3324
3320
|
g.value || l("submit");
|
|
3325
|
-
},
|
|
3321
|
+
}, $ = B([
|
|
3326
3322
|
{
|
|
3327
3323
|
title: i("baseForm.configuration.yaml"),
|
|
3328
3324
|
hash: "#yaml"
|
|
@@ -3332,22 +3328,22 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3332
3328
|
hash: "#json"
|
|
3333
3329
|
}
|
|
3334
3330
|
]);
|
|
3335
|
-
return ke(() => d.value, (
|
|
3336
|
-
l("loading",
|
|
3331
|
+
return ke(() => d.value, (U) => {
|
|
3332
|
+
l("loading", U);
|
|
3337
3333
|
}, { immediate: !0 }), st(async () => {
|
|
3338
3334
|
if (r.editId)
|
|
3339
3335
|
try {
|
|
3340
3336
|
h.value = !1, d.value = !0;
|
|
3341
|
-
const { data:
|
|
3342
|
-
l("fetch:success",
|
|
3343
|
-
} catch (
|
|
3344
|
-
const M = c(
|
|
3345
|
-
p.value = M.startsWith("code") ? i("baseForm.errors.edit") : M, h.value = !0, l("fetch:error",
|
|
3337
|
+
const { data: U } = await o.get(H.value);
|
|
3338
|
+
l("fetch:success", U);
|
|
3339
|
+
} catch (U) {
|
|
3340
|
+
const M = c(U);
|
|
3341
|
+
p.value = M.startsWith("code") ? i("baseForm.errors.edit") : M, h.value = !0, l("fetch:error", U);
|
|
3346
3342
|
} finally {
|
|
3347
3343
|
d.value = !1;
|
|
3348
3344
|
}
|
|
3349
|
-
}), (
|
|
3350
|
-
const m = j("KSkeleton"), _ = j("KEmptyState"), q = j("KAlert"),
|
|
3345
|
+
}), (U, M) => {
|
|
3346
|
+
const m = j("KSkeleton"), _ = j("KEmptyState"), q = j("KAlert"), F = j("KButton"), x = j("KTabs"), V = j("KSlideout");
|
|
3351
3347
|
return k(), P(_e(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3352
3348
|
default: f(() => [
|
|
3353
3349
|
d.value ? (k(), P(m, {
|
|
@@ -3371,7 +3367,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3371
3367
|
onReset: ml(T, ["prevent"]),
|
|
3372
3368
|
onSubmit: ml(N, ["prevent"])
|
|
3373
3369
|
}, [
|
|
3374
|
-
re(
|
|
3370
|
+
re(U.$slots, "default", {}, void 0, !0),
|
|
3375
3371
|
e.errorMessage ? (k(), P(q, {
|
|
3376
3372
|
key: 0,
|
|
3377
3373
|
appearance: "danger",
|
|
@@ -3379,18 +3375,18 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3379
3375
|
message: e.errorMessage
|
|
3380
3376
|
}, null, 8, ["message"])) : D("", !0),
|
|
3381
3377
|
I("div", gu, [
|
|
3382
|
-
re(
|
|
3383
|
-
y(
|
|
3378
|
+
re(U.$slots, "form-actions", {}, () => [
|
|
3379
|
+
y(F, {
|
|
3384
3380
|
appearance: "tertiary",
|
|
3385
3381
|
"data-testid": "form-view-configuration",
|
|
3386
|
-
onClick: M[0] || (M[0] = (E) =>
|
|
3382
|
+
onClick: M[0] || (M[0] = (E) => O())
|
|
3387
3383
|
}, {
|
|
3388
3384
|
default: f(() => [
|
|
3389
3385
|
J(S(u(i)("baseForm.actions.viewConfiguration")), 1)
|
|
3390
3386
|
]),
|
|
3391
3387
|
_: 1
|
|
3392
3388
|
}),
|
|
3393
|
-
y(
|
|
3389
|
+
y(F, {
|
|
3394
3390
|
appearance: "secondary",
|
|
3395
3391
|
"data-testid": "form-cancel",
|
|
3396
3392
|
disabled: e.isReadonly,
|
|
@@ -3401,7 +3397,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3401
3397
|
]),
|
|
3402
3398
|
_: 1
|
|
3403
3399
|
}, 8, ["disabled"]),
|
|
3404
|
-
y(
|
|
3400
|
+
y(F, {
|
|
3405
3401
|
appearance: "primary",
|
|
3406
3402
|
"data-testid": "form-submit",
|
|
3407
3403
|
disabled: g.value,
|
|
@@ -3422,13 +3418,13 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3422
3418
|
"offset-top": 60,
|
|
3423
3419
|
title: u(i)("baseForm.configuration.title"),
|
|
3424
3420
|
visible: n.value,
|
|
3425
|
-
onClose: M[1] || (M[1] = (E) =>
|
|
3421
|
+
onClose: M[1] || (M[1] = (E) => O())
|
|
3426
3422
|
}, {
|
|
3427
3423
|
default: f(() => [
|
|
3428
3424
|
I("div", null, S(u(i)("baseForm.configuration.message")), 1),
|
|
3429
3425
|
y(x, {
|
|
3430
3426
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3431
|
-
tabs:
|
|
3427
|
+
tabs: $.value
|
|
3432
3428
|
}, {
|
|
3433
3429
|
json: f(() => [
|
|
3434
3430
|
y(Xl, {
|
|
@@ -3486,12 +3482,12 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3486
3482
|
i && (i.disconnect(), i = void 0);
|
|
3487
3483
|
}, o = () => {
|
|
3488
3484
|
var v, T, N;
|
|
3489
|
-
let
|
|
3485
|
+
let $ = ((v = t.value) == null ? void 0 : v.clientWidth) || 0;
|
|
3490
3486
|
if (t.value && "getComputedStyle" in window) {
|
|
3491
|
-
const
|
|
3492
|
-
|
|
3487
|
+
const U = window.getComputedStyle(t.value);
|
|
3488
|
+
$ -= (parseFloat(U.paddingLeft) || 0) + (parseFloat(U.paddingRight) || 0);
|
|
3493
3489
|
}
|
|
3494
|
-
h.value = ((T = l.value) == null ? void 0 : T.getBoundingClientRect().width) || 0, p.value =
|
|
3490
|
+
h.value = ((T = l.value) == null ? void 0 : T.getBoundingClientRect().width) || 0, p.value = $, g.value = ((N = d.value) == null ? void 0 : N.innerText) || "";
|
|
3495
3491
|
}, d = B({}), h = B(0), p = B(0), g = B(""), n = A(() => [l.value, t.value]), H = ke(
|
|
3496
3492
|
n,
|
|
3497
3493
|
(v) => {
|
|
@@ -3506,7 +3502,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3506
3502
|
}
|
|
3507
3503
|
},
|
|
3508
3504
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3509
|
-
),
|
|
3505
|
+
), O = A(() => s.value ? h.value > p.value : !1);
|
|
3510
3506
|
return ei(() => {
|
|
3511
3507
|
o();
|
|
3512
3508
|
}), ti(() => {
|
|
@@ -3525,7 +3521,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3525
3521
|
y(N, {
|
|
3526
3522
|
"max-width": "300",
|
|
3527
3523
|
placement: "bottom-start",
|
|
3528
|
-
text:
|
|
3524
|
+
text: O.value ? g.value : ""
|
|
3529
3525
|
}, {
|
|
3530
3526
|
default: f(() => [
|
|
3531
3527
|
re(v.$slots, "default", {}, void 0, !0)
|
|
@@ -3703,23 +3699,23 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3703
3699
|
l("empty-state-cta-clicked"), H();
|
|
3704
3700
|
}, H = () => {
|
|
3705
3701
|
l("clear-search-input");
|
|
3706
|
-
},
|
|
3702
|
+
}, O = A(() => t.disableRowClick ? void 0 : (m, _) => {
|
|
3707
3703
|
l("click:row", _);
|
|
3708
3704
|
}), v = (m) => {
|
|
3709
3705
|
l("sort", m);
|
|
3710
|
-
}, { setTablePreferences: T, getTablePreferences: N } = ui(),
|
|
3706
|
+
}, { setTablePreferences: T, getTablePreferences: N } = ui(), $ = B(N(i.value)), U = A(() => {
|
|
3711
3707
|
const m = N(i.value);
|
|
3712
3708
|
return {
|
|
3713
3709
|
...t.initialFetcherParams,
|
|
3714
3710
|
...m
|
|
3715
3711
|
};
|
|
3716
3712
|
}), M = (m) => {
|
|
3717
|
-
|
|
3718
|
-
!("hidable" in _) ||
|
|
3713
|
+
$.value = m, o.value.forEach((_) => {
|
|
3714
|
+
!("hidable" in _) || !$.value.columnVisibility || _.hidable === !1 && ($.value.columnVisibility[_.key] = !0);
|
|
3719
3715
|
}), i.value && T(i.value, m);
|
|
3720
3716
|
};
|
|
3721
3717
|
return (m, _) => {
|
|
3722
|
-
const q = j("KButton"),
|
|
3718
|
+
const q = j("KButton"), F = j("KDropdown"), x = j("KTable"), V = j("KCard");
|
|
3723
3719
|
return k(), P(V, {
|
|
3724
3720
|
class: "kong-ui-entity-base-table",
|
|
3725
3721
|
title: e.title,
|
|
@@ -3745,7 +3741,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3745
3741
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3746
3742
|
headers: o.value,
|
|
3747
3743
|
"hide-pagination-when-optional": "",
|
|
3748
|
-
"initial-fetcher-params":
|
|
3744
|
+
"initial-fetcher-params": U.value,
|
|
3749
3745
|
loading: e.isLoading,
|
|
3750
3746
|
"pagination-offset": e.paginationType === "offset",
|
|
3751
3747
|
"resize-columns": "",
|
|
@@ -3753,9 +3749,9 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3753
3749
|
"search-input": e.query,
|
|
3754
3750
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3755
3751
|
sortable: !e.disableSorting,
|
|
3756
|
-
"table-preferences":
|
|
3752
|
+
"table-preferences": $.value,
|
|
3757
3753
|
onEmptyStateActionClick: n,
|
|
3758
|
-
"onRow:click":
|
|
3754
|
+
"onRow:click": O.value,
|
|
3759
3755
|
onSort: _[0] || (_[0] = (E) => v(E)),
|
|
3760
3756
|
"onUpdate:tablePreferences": M
|
|
3761
3757
|
}, Be({
|
|
@@ -3774,7 +3770,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3774
3770
|
class: "actions-container",
|
|
3775
3771
|
"data-testid": E.name
|
|
3776
3772
|
}, [
|
|
3777
|
-
y(
|
|
3773
|
+
y(F, {
|
|
3778
3774
|
"kpop-attributes": { placement: "bottom-end" },
|
|
3779
3775
|
width: e.dropdownMenuWidth
|
|
3780
3776
|
}, {
|
|
@@ -3953,7 +3949,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3953
3949
|
width: "20",
|
|
3954
3950
|
x: "0",
|
|
3955
3951
|
y: "0"
|
|
3956
|
-
}, qu = ["fill"],
|
|
3952
|
+
}, qu = ["fill"], Ou = { mask: "url(#mask0_180_20349)" }, Fu = ["fill"], Kl = /* @__PURE__ */ X({
|
|
3957
3953
|
__name: "IconFilter",
|
|
3958
3954
|
props: {
|
|
3959
3955
|
color: {
|
|
@@ -3970,11 +3966,11 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
3970
3966
|
width: "20"
|
|
3971
3967
|
}, null, 8, qu)
|
|
3972
3968
|
]),
|
|
3973
|
-
I("g",
|
|
3969
|
+
I("g", Ou, [
|
|
3974
3970
|
I("path", {
|
|
3975
3971
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3976
3972
|
fill: e.color
|
|
3977
|
-
}, null, 8,
|
|
3973
|
+
}, null, 8, Fu)
|
|
3978
3974
|
])
|
|
3979
3975
|
]));
|
|
3980
3976
|
}
|
|
@@ -4002,55 +3998,55 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
4002
3998
|
emits: ["update:modelValue"],
|
|
4003
3999
|
setup(e, { emit: a }) {
|
|
4004
4000
|
const { i18n: { t } } = de.useI18n(), l = e, r = a, s = B(!1), i = B({}), c = B(/* @__PURE__ */ new Set()), o = A(() => {
|
|
4005
|
-
const
|
|
4001
|
+
const U = [];
|
|
4006
4002
|
return new URLSearchParams(l.modelValue).forEach((M, m) => {
|
|
4007
|
-
M !== "" &&
|
|
4008
|
-
}),
|
|
4003
|
+
M !== "" && U.push(m);
|
|
4004
|
+
}), U;
|
|
4009
4005
|
}), d = A(() => {
|
|
4010
|
-
const
|
|
4011
|
-
return Object.keys(
|
|
4006
|
+
const U = l.config.fields;
|
|
4007
|
+
return Object.keys(U).filter((M) => {
|
|
4012
4008
|
var m;
|
|
4013
|
-
return (m =
|
|
4009
|
+
return (m = U == null ? void 0 : U[M]) == null ? void 0 : m.searchable;
|
|
4014
4010
|
}).map((M) => ({
|
|
4015
|
-
label:
|
|
4011
|
+
label: U[M].label || M,
|
|
4016
4012
|
value: M,
|
|
4017
4013
|
expanded: !1
|
|
4018
4014
|
}));
|
|
4019
4015
|
});
|
|
4020
|
-
ke(() => l.modelValue, (
|
|
4021
|
-
i.value = {}, new URLSearchParams(
|
|
4016
|
+
ke(() => l.modelValue, (U) => {
|
|
4017
|
+
i.value = {}, new URLSearchParams(U).forEach((M, m) => {
|
|
4022
4018
|
i.value[m] = M;
|
|
4023
4019
|
});
|
|
4024
4020
|
});
|
|
4025
4021
|
const h = () => {
|
|
4026
4022
|
s.value = !s.value;
|
|
4027
|
-
}, p = (
|
|
4028
|
-
c.value.has(
|
|
4029
|
-
}, g = (
|
|
4030
|
-
r("update:modelValue",
|
|
4023
|
+
}, p = (U) => {
|
|
4024
|
+
c.value.has(U) ? c.value.delete(U) : c.value.add(U);
|
|
4025
|
+
}, g = (U) => {
|
|
4026
|
+
r("update:modelValue", U);
|
|
4031
4027
|
}, n = () => {
|
|
4032
4028
|
g("");
|
|
4033
|
-
}, H = (
|
|
4029
|
+
}, H = (U) => `filter-${U}`, O = (U) => {
|
|
4034
4030
|
var M, m;
|
|
4035
|
-
return (((m = (M = l.config.schema) == null ? void 0 : M[
|
|
4031
|
+
return (((m = (M = l.config.schema) == null ? void 0 : M[U]) == null ? void 0 : m.values) ?? []).map((_) => ({
|
|
4036
4032
|
value: _,
|
|
4037
4033
|
label: _
|
|
4038
4034
|
}));
|
|
4039
|
-
}, v = (
|
|
4035
|
+
}, v = (U) => {
|
|
4040
4036
|
var M, m;
|
|
4041
|
-
return ((m = (M = l.config.schema) == null ? void 0 : M[
|
|
4042
|
-
}, T = (
|
|
4037
|
+
return ((m = (M = l.config.schema) == null ? void 0 : M[U]) == null ? void 0 : m.type) ?? "text";
|
|
4038
|
+
}, T = (U) => {
|
|
4043
4039
|
i.value = {
|
|
4044
4040
|
...i.value,
|
|
4045
|
-
[
|
|
4046
|
-
},
|
|
4041
|
+
[U]: ""
|
|
4042
|
+
}, $();
|
|
4047
4043
|
}, N = () => {
|
|
4048
|
-
i.value = {},
|
|
4049
|
-
},
|
|
4044
|
+
i.value = {}, $(!0);
|
|
4045
|
+
}, $ = (U = !1) => {
|
|
4050
4046
|
const M = Object.keys(i.value).reduce((m, _) => (i.value[_] && (m[_] = `${i.value[_]}`), m), {});
|
|
4051
|
-
|
|
4047
|
+
U && (s.value = !1), r("update:modelValue", new URLSearchParams(M).toString());
|
|
4052
4048
|
};
|
|
4053
|
-
return (
|
|
4049
|
+
return (U, M) => {
|
|
4054
4050
|
const m = j("KInput"), _ = j("KButton"), q = j("KSelect");
|
|
4055
4051
|
return e.config.isExactMatch ? (k(), P(m, {
|
|
4056
4052
|
key: 0,
|
|
@@ -4092,59 +4088,59 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
4092
4088
|
[He, s.value]
|
|
4093
4089
|
]),
|
|
4094
4090
|
Ae(I("div", $u, [
|
|
4095
|
-
(k(!0), K(ye, null, Ce(d.value, (
|
|
4091
|
+
(k(!0), K(ye, null, Ce(d.value, (F) => {
|
|
4096
4092
|
var x, V;
|
|
4097
4093
|
return k(), K("div", {
|
|
4098
|
-
key:
|
|
4094
|
+
key: F.value,
|
|
4099
4095
|
class: "kong-ui-entity-filter-menu-item",
|
|
4100
|
-
"data-testid":
|
|
4096
|
+
"data-testid": F.value
|
|
4101
4097
|
}, [
|
|
4102
4098
|
I("span", {
|
|
4103
|
-
class: qe(["menu-item-title", { expanded: c.value.has(
|
|
4099
|
+
class: qe(["menu-item-title", { expanded: c.value.has(F.value) }]),
|
|
4104
4100
|
role: "button",
|
|
4105
4101
|
tabindex: "0",
|
|
4106
|
-
onClick: (E) => p(
|
|
4107
|
-
onKeydown: Gr((E) => p(
|
|
4102
|
+
onClick: (E) => p(F.value),
|
|
4103
|
+
onKeydown: Gr((E) => p(F.value), ["enter"])
|
|
4108
4104
|
}, [
|
|
4109
|
-
J(S(
|
|
4105
|
+
J(S(F.label) + " ", 1),
|
|
4110
4106
|
Ae(I("span", ju, null, 512), [
|
|
4111
|
-
[He, o.value.includes(
|
|
4107
|
+
[He, o.value.includes(F.value)]
|
|
4112
4108
|
]),
|
|
4113
4109
|
y(u(Zo), {
|
|
4114
|
-
class: qe(["menu-item-expand-icon", { expanded: c.value.has(
|
|
4110
|
+
class: qe(["menu-item-expand-icon", { expanded: c.value.has(F.value) }]),
|
|
4115
4111
|
color: u(Vi)
|
|
4116
4112
|
}, null, 8, ["class", "color"])
|
|
4117
4113
|
], 42, Mu),
|
|
4118
4114
|
Ae(I("div", Ku, [
|
|
4119
4115
|
I("label", {
|
|
4120
4116
|
class: "menu-item-label",
|
|
4121
|
-
for: H(
|
|
4117
|
+
for: H(F.value)
|
|
4122
4118
|
}, S(u(t)("filter.fieldLabel")), 9, Bu),
|
|
4123
|
-
((V = (x = e.config.schema) == null ? void 0 : x[
|
|
4119
|
+
((V = (x = e.config.schema) == null ? void 0 : x[F.value]) == null ? void 0 : V.type) === "select" ? (k(), P(q, {
|
|
4124
4120
|
key: 0,
|
|
4125
|
-
id: H(
|
|
4126
|
-
modelValue: i.value[
|
|
4127
|
-
"onUpdate:modelValue": (E) => i.value[
|
|
4128
|
-
items: F
|
|
4121
|
+
id: H(F.value),
|
|
4122
|
+
modelValue: i.value[F.value],
|
|
4123
|
+
"onUpdate:modelValue": (E) => i.value[F.value] = E,
|
|
4124
|
+
items: O(F.value),
|
|
4129
4125
|
placeholder: u(t)("filter.selectPlaceholder")
|
|
4130
4126
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (k(), P(m, {
|
|
4131
4127
|
key: 1,
|
|
4132
|
-
id: H(
|
|
4133
|
-
modelValue: i.value[
|
|
4134
|
-
"onUpdate:modelValue": (E) => i.value[
|
|
4128
|
+
id: H(F.value),
|
|
4129
|
+
modelValue: i.value[F.value],
|
|
4130
|
+
"onUpdate:modelValue": (E) => i.value[F.value] = E,
|
|
4135
4131
|
autocomplete: "off",
|
|
4136
4132
|
placeholder: u(t)("filter.inputPlaceholder"),
|
|
4137
|
-
type: v(
|
|
4133
|
+
type: v(F.value)
|
|
4138
4134
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4139
4135
|
], 512), [
|
|
4140
|
-
[He, c.value.has(
|
|
4136
|
+
[He, c.value.has(F.value)]
|
|
4141
4137
|
]),
|
|
4142
4138
|
Ae(I("div", Eu, [
|
|
4143
4139
|
y(_, {
|
|
4144
4140
|
appearance: "tertiary",
|
|
4145
4141
|
"data-testid": "apply-filter",
|
|
4146
4142
|
size: "small",
|
|
4147
|
-
onClick: M[0] || (M[0] = (E) =>
|
|
4143
|
+
onClick: M[0] || (M[0] = (E) => $(!0))
|
|
4148
4144
|
}, {
|
|
4149
4145
|
default: f(() => [
|
|
4150
4146
|
J(S(u(t)("filter.applyButtonText")), 1)
|
|
@@ -4155,7 +4151,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
4155
4151
|
appearance: "tertiary",
|
|
4156
4152
|
"data-testid": "clear-filter",
|
|
4157
4153
|
size: "small",
|
|
4158
|
-
onClick: (E) => T(
|
|
4154
|
+
onClick: (E) => T(F.value)
|
|
4159
4155
|
}, {
|
|
4160
4156
|
default: f(() => [
|
|
4161
4157
|
J(S(u(t)("filter.clearButtonText")), 1)
|
|
@@ -4163,7 +4159,7 @@ const Ao = { class: "yaml-config" }, Pr = /* @__PURE__ */ X({
|
|
|
4163
4159
|
_: 2
|
|
4164
4160
|
}, 1032, ["onClick"])
|
|
4165
4161
|
], 512), [
|
|
4166
|
-
[He, c.value.has(
|
|
4162
|
+
[He, c.value.has(F.value)]
|
|
4167
4163
|
])
|
|
4168
4164
|
], 8, Nu);
|
|
4169
4165
|
}), 128)),
|
|
@@ -5330,9 +5326,9 @@ function St() {
|
|
|
5330
5326
|
stringToNumberArray: t,
|
|
5331
5327
|
numberToStringArray: l,
|
|
5332
5328
|
upstreamsResponseToFields: (o) => {
|
|
5333
|
-
var h, p, g, n, H,
|
|
5329
|
+
var h, p, g, n, H, O, v, T, N, $, U, M, m, _, q, F, x, V, E, Q, Z, W, z, ee, ue, L, Y, te, C, b, w, ie, G, se, he, le, me, je, Le, Xt, ea, ta, aa, la, ra, ia, sa, na, oa, ua, ca, da, ha, pa, fa, ma, ga, va, ya, ba, ka, Ca, _a, wa, Sa, xa, Ia, Aa, Ha, Ta, qa, Oa, Fa, Ua, $a, Na, Ma, ja, Ka, Ba, Ea, Pa, Va, La, Ra, Da, za, Ja, Wa, Qa, Za, Ya, Ga, Xa, el, tl, al, ll, rl, il, sl, nl, ol, ul, cl, dl, hl, pl, fl;
|
|
5334
5330
|
const d = r();
|
|
5335
|
-
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 = (g = o.healthchecks.active) == null ? void 0 : g.healthy) == null ? void 0 : n.interval) !== 0 || ((
|
|
5331
|
+
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 = (g = o.healthchecks.active) == null ? void 0 : g.healthy) == null ? void 0 : n.interval) !== 0 || ((O = (H = o.healthchecks.active) == null ? void 0 : H.unhealthy) == null ? void 0 : O.interval) !== 0, d.activeHealthCheck.type = ((v = o.healthchecks.active) == null ? void 0 : v.type) || "http", d.activeHealthCheck.httpPath = ((T = o.healthchecks.active) == null ? void 0 : T.http_path) || "/", d.activeHealthCheck.timeout = ((N = o.healthchecks.active) == null ? void 0 : N.timeout) !== null && (($ = o.healthchecks.active) == null ? void 0 : $.timeout) !== void 0 ? (M = (U = o.healthchecks.active) == null ? void 0 : U.timeout) == null ? void 0 : M.toString() : "", d.activeHealthCheck.concurrency = ((m = o.healthchecks.active) == null ? void 0 : m.concurrency) !== null && ((_ = o.healthchecks.active) == null ? void 0 : _.concurrency) !== void 0 ? (F = (q = o.healthchecks.active) == null ? void 0 : q.concurrency) == null ? void 0 : F.toString() : "", d.activeHealthCheck.httpsSni = ((x = o.healthchecks.active) == null ? void 0 : x.https_sni) || "", d.activeHealthCheck.verifySsl = ((V = o.healthchecks.active) == null ? void 0 : V.https_verify_certificate) || !1, d.activeHealthCheck.headers = (E = o.healthchecks.active) != null && E.headers && Object.entries((Q = o.healthchecks.active) == null ? void 0 : Q.headers).length > 0 ? Object.entries((Z = o.healthchecks.active) == null ? void 0 : Z.headers).map(([Yr, It]) => ({ key: Yr, values: It == null ? void 0 : It.join(", ") })) : [{ key: "", values: "" }], d.activeHealthCheck.interval = ((z = (W = o.healthchecks.active) == null ? void 0 : W.healthy) == null ? void 0 : z.interval) !== null && ((ue = (ee = o.healthchecks.active) == null ? void 0 : ee.healthy) == null ? void 0 : ue.interval) !== void 0 ? (te = (Y = (L = o.healthchecks.active) == null ? void 0 : L.healthy) == null ? void 0 : Y.interval) == null ? void 0 : te.toString() : "0", d.activeHealthCheck.interval = ((b = (C = o.healthchecks.active) == null ? void 0 : C.healthy) == null ? void 0 : b.interval) !== null && ((ie = (w = o.healthchecks.active) == null ? void 0 : w.healthy) == null ? void 0 : ie.interval) !== void 0 ? (he = (se = (G = o.healthchecks.active) == null ? void 0 : G.healthy) == null ? void 0 : se.interval) == null ? void 0 : he.toString() : "0", d.activeHealthCheck.successes = ((me = (le = o.healthchecks.active) == null ? void 0 : le.healthy) == null ? void 0 : me.successes) !== null && ((Le = (je = o.healthchecks.active) == null ? void 0 : je.healthy) == null ? void 0 : Le.successes) !== void 0 ? (ta = (ea = (Xt = o.healthchecks.active) == null ? void 0 : Xt.healthy) == null ? void 0 : ea.successes) == null ? void 0 : ta.toString() : "0", d.activeHealthCheck.httpStatuses = (la = (aa = o.healthchecks.active) == null ? void 0 : aa.healthy) != null && la.http_statuses ? l(((ia = (ra = o.healthchecks.active) == null ? void 0 : ra.healthy) == null ? void 0 : ia.http_statuses) || []) : Kt, d.activeHealthCheck.unhealthyInterval = ((na = (sa = o.healthchecks.active) == null ? void 0 : sa.unhealthy) == null ? void 0 : na.interval) !== null && ((ua = (oa = o.healthchecks.active) == null ? void 0 : oa.unhealthy) == null ? void 0 : ua.interval) !== void 0 ? (ha = (da = (ca = o.healthchecks.active) == null ? void 0 : ca.unhealthy) == null ? void 0 : da.interval) == null ? void 0 : ha.toString() : "0", d.activeHealthCheck.httpFailures = ((fa = (pa = o.healthchecks.active) == null ? void 0 : pa.unhealthy) == null ? void 0 : fa.http_failures) !== null && ((ga = (ma = o.healthchecks.active) == null ? void 0 : ma.unhealthy) == null ? void 0 : ga.http_failures) !== void 0 ? (ba = (ya = (va = o.healthchecks.active) == null ? void 0 : va.unhealthy) == null ? void 0 : ya.http_failures) == null ? void 0 : ba.toString() : "0", d.activeHealthCheck.unhealthyTimeouts = ((Ca = (ka = o.healthchecks.active) == null ? void 0 : ka.unhealthy) == null ? void 0 : Ca.timeouts) !== null && ((wa = (_a = o.healthchecks.active) == null ? void 0 : _a.unhealthy) == null ? void 0 : wa.timeouts) !== void 0 ? (Ia = (xa = (Sa = o.healthchecks.active) == null ? void 0 : Sa.unhealthy) == null ? void 0 : xa.timeouts) == null ? void 0 : Ia.toString() : "0", d.activeHealthCheck.unhealthyHttpStatuses = (Ha = (Aa = o.healthchecks.active) == null ? void 0 : Aa.unhealthy) != null && Ha.http_statuses ? l(((qa = (Ta = o.healthchecks.active) == null ? void 0 : Ta.unhealthy) == null ? void 0 : qa.http_statuses) || []) : Et, d.passiveHealthSwitch = ((Fa = (Oa = o.healthchecks.passive) == null ? void 0 : Oa.healthy) == null ? void 0 : Fa.successes) !== 0 || (($a = (Ua = o.healthchecks.passive) == null ? void 0 : Ua.unhealthy) == null ? void 0 : $a.timeouts) !== 0 || ((Ma = (Na = o.healthchecks.passive) == null ? void 0 : Na.unhealthy) == null ? void 0 : Ma.tcp_failures) !== 0 || ((Ka = (ja = o.healthchecks.passive) == null ? void 0 : ja.unhealthy) == null ? void 0 : Ka.http_failures) !== 0, d.passiveHealthCheck.type = ((Ba = o.healthchecks.passive) == null ? void 0 : Ba.type) || "http", d.passiveHealthCheck.successes = ((Pa = (Ea = o.healthchecks.passive) == null ? void 0 : Ea.healthy) == null ? void 0 : Pa.successes) !== null && ((La = (Va = o.healthchecks.passive) == null ? void 0 : Va.healthy) == null ? void 0 : La.successes) !== void 0 ? (za = (Da = (Ra = o.healthchecks.passive) == null ? void 0 : Ra.healthy) == null ? void 0 : Da.successes) == null ? void 0 : za.toString() : "0", d.passiveHealthCheck.httpStatuses = (Wa = (Ja = o.healthchecks.passive) == null ? void 0 : Ja.healthy) != null && Wa.http_statuses ? l(((Za = (Qa = o.healthchecks.passive) == null ? void 0 : Qa.healthy) == null ? void 0 : Za.http_statuses) || []) : Bt, d.passiveHealthCheck.timeouts = ((Ga = (Ya = o.healthchecks.passive) == null ? void 0 : Ya.unhealthy) == null ? void 0 : Ga.timeouts) !== null && ((el = (Xa = o.healthchecks.passive) == null ? void 0 : Xa.unhealthy) == null ? void 0 : el.timeouts) !== void 0 ? (ll = (al = (tl = o.healthchecks.passive) == null ? void 0 : tl.unhealthy) == null ? void 0 : al.timeouts) == null ? void 0 : ll.toString() : "0", d.passiveHealthCheck.tcpFailures = ((il = (rl = o.healthchecks.passive) == null ? void 0 : rl.unhealthy) == null ? void 0 : il.tcp_failures) !== null && ((nl = (sl = o.healthchecks.passive) == null ? void 0 : sl.unhealthy) == null ? void 0 : nl.tcp_failures) !== void 0 ? (cl = (ul = (ol = o.healthchecks.passive) == null ? void 0 : ol.unhealthy) == null ? void 0 : ul.tcp_failures) == null ? void 0 : cl.toString() : "", d.passiveHealthCheck.unhealthyHttpStatuses = (hl = (dl = o.healthchecks.passive) == null ? void 0 : dl.unhealthy) != null && hl.http_statuses ? l(((fl = (pl = o.healthchecks.passive) == null ? void 0 : pl.unhealthy) == null ? void 0 : fl.http_statuses) || []) : Pt, d;
|
|
5336
5332
|
},
|
|
5337
5333
|
getDefaultUpstreamFields: r,
|
|
5338
5334
|
objectsAreEqual: (o, d) => {
|
|
@@ -5345,7 +5341,7 @@ function St() {
|
|
|
5345
5341
|
cloneDeep: (o) => JSON.parse(JSON.stringify(o))
|
|
5346
5342
|
};
|
|
5347
5343
|
}
|
|
5348
|
-
const
|
|
5344
|
+
const Fe = {
|
|
5349
5345
|
useI18n: gc,
|
|
5350
5346
|
useMultiselectCreation: it,
|
|
5351
5347
|
useHelpers: St
|
|
@@ -5417,7 +5413,7 @@ const Oe = {
|
|
|
5417
5413
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
5418
5414
|
setup(e, { emit: a }) {
|
|
5419
5415
|
var ue;
|
|
5420
|
-
const t = a, l = e, { i18n: { t: r } } =
|
|
5416
|
+
const t = a, l = e, { i18n: { t: r } } = Fe.useI18n(), s = Lt(), { axiosInstance: i } = wt((ue = l.config) == null ? void 0 : ue.axiosRequestConfig), c = B(1), o = A(() => l.config.app !== "kongManager" || !!l.config.disableSorting), d = {
|
|
5421
5417
|
// the Name column is non-hidable
|
|
5422
5418
|
name: { label: r("upstreams.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
|
|
5423
5419
|
slots: { label: r("upstreams.list.table_headers.slots"), searchable: !0, sortable: !0 },
|
|
@@ -5439,11 +5435,11 @@ const Oe = {
|
|
|
5439
5435
|
fields: { name: Y, slots: te },
|
|
5440
5436
|
schema: l.config.filterSchema
|
|
5441
5437
|
};
|
|
5442
|
-
}), { fetcher: H, fetcherState:
|
|
5438
|
+
}), { fetcher: H, fetcherState: O } = Jr(l.config, p.value), v = () => {
|
|
5443
5439
|
g.value = "";
|
|
5444
5440
|
}, T = () => {
|
|
5445
5441
|
c.value++;
|
|
5446
|
-
}, N = B(null),
|
|
5442
|
+
}, N = B(null), $ = (L, Y) => {
|
|
5447
5443
|
const te = L.id;
|
|
5448
5444
|
if (!Y(te)) {
|
|
5449
5445
|
t("copy:error", {
|
|
@@ -5458,7 +5454,7 @@ const Oe = {
|
|
|
5458
5454
|
field: "id",
|
|
5459
5455
|
message: r("upstreams.copy.success", { val: te })
|
|
5460
5456
|
});
|
|
5461
|
-
},
|
|
5457
|
+
}, U = (L, Y) => {
|
|
5462
5458
|
const te = JSON.stringify(L);
|
|
5463
5459
|
if (!Y(te)) {
|
|
5464
5460
|
t("copy:error", {
|
|
@@ -5480,16 +5476,16 @@ const Oe = {
|
|
|
5480
5476
|
}), _ = (L) => ({
|
|
5481
5477
|
label: r("upstreams.actions.edit"),
|
|
5482
5478
|
to: l.config.getEditRoute(L)
|
|
5483
|
-
}), q = B(void 0),
|
|
5484
|
-
q.value = L,
|
|
5479
|
+
}), q = B(void 0), F = B(!1), x = B(!1), V = B(""), E = Dr(l.config, p.value), Q = (L) => {
|
|
5480
|
+
q.value = L, F.value = !0;
|
|
5485
5481
|
}, Z = () => {
|
|
5486
|
-
|
|
5482
|
+
F.value = !1;
|
|
5487
5483
|
}, W = async () => {
|
|
5488
5484
|
var L, Y, te;
|
|
5489
5485
|
if ((L = q.value) != null && L.id) {
|
|
5490
5486
|
x.value = !0;
|
|
5491
5487
|
try {
|
|
5492
|
-
await i.delete(E(q.value.id)), x.value = !1,
|
|
5488
|
+
await i.delete(E(q.value.id)), x.value = !1, F.value = !1, c.value++, t("delete:success", q.value);
|
|
5493
5489
|
} catch (C) {
|
|
5494
5490
|
V.value = ((te = (Y = C.response) == null ? void 0 : Y.data) == null ? void 0 : te.message) || C.message || r("upstreams.errors.delete"), t("error", C);
|
|
5495
5491
|
} finally {
|
|
@@ -5497,7 +5493,7 @@ const Oe = {
|
|
|
5497
5493
|
}
|
|
5498
5494
|
}
|
|
5499
5495
|
}, z = B(!1);
|
|
5500
|
-
ke(
|
|
5496
|
+
ke(O, (L) => {
|
|
5501
5497
|
var Y, te, C, b;
|
|
5502
5498
|
if (Array.isArray((Y = L == null ? void 0 : L.response) == null ? void 0 : Y.data) && (z.value = L.response.data.length > 0), L.status === $e.Error) {
|
|
5503
5499
|
N.value = {
|
|
@@ -5595,7 +5591,7 @@ const Oe = {
|
|
|
5595
5591
|
default: f(({ copyToClipboard: se }) => [
|
|
5596
5592
|
y(w, {
|
|
5597
5593
|
"data-testid": "action-entity-copy-id",
|
|
5598
|
-
onClick: (he) =>
|
|
5594
|
+
onClick: (he) => $(G, se)
|
|
5599
5595
|
}, {
|
|
5600
5596
|
default: f(() => [
|
|
5601
5597
|
J(S(u(r)("upstreams.actions.copy_id")), 1)
|
|
@@ -5609,7 +5605,7 @@ const Oe = {
|
|
|
5609
5605
|
default: f(({ copyToClipboard: se }) => [
|
|
5610
5606
|
y(w, {
|
|
5611
5607
|
"data-testid": "action-entity-copy-json",
|
|
5612
|
-
onClick: (he) =>
|
|
5608
|
+
onClick: (he) => U(G, se)
|
|
5613
5609
|
}, {
|
|
5614
5610
|
default: f(() => [
|
|
5615
5611
|
J(S(u(r)("upstreams.actions.copy_json")), 1)
|
|
@@ -5670,7 +5666,7 @@ const Oe = {
|
|
|
5670
5666
|
"entity-type": u(Rt).Upstream,
|
|
5671
5667
|
error: V.value,
|
|
5672
5668
|
title: u(r)("upstreams.delete.title"),
|
|
5673
|
-
visible:
|
|
5669
|
+
visible: F.value,
|
|
5674
5670
|
onCancel: Z,
|
|
5675
5671
|
onProceed: W
|
|
5676
5672
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
@@ -5727,7 +5723,7 @@ const Oe = {
|
|
|
5727
5723
|
emits: ["update", "error", "loading", "cancel"],
|
|
5728
5724
|
setup(e, { emit: a }) {
|
|
5729
5725
|
var M;
|
|
5730
|
-
const t = a, l = e, { i18n: { t: r } } =
|
|
5726
|
+
const t = a, l = e, { i18n: { t: r } } = Fe.useI18n(), { getMessageFromError: s } = zr(), { axiosInstance: i } = wt((M = l.config) == null ? void 0 : M.axiosRequestConfig), c = A(() => {
|
|
5731
5727
|
var m;
|
|
5732
5728
|
return ht.form[l.config.app].edit.replace(/{upstreamId}/gi, ((m = l.config) == null ? void 0 : m.upstreamId) || "");
|
|
5733
5729
|
}), o = A(() => l.targetId ? Se.Edit : Se.Create), d = A(() => o.value === Se.Edit ? r("targets.form.edit.title") : r("targets.form.create.title")), h = pt({
|
|
@@ -5751,7 +5747,7 @@ const Oe = {
|
|
|
5751
5747
|
return m < 0 || m > 65535;
|
|
5752
5748
|
}), H = A(
|
|
5753
5749
|
() => JSON.stringify(h.fields) !== JSON.stringify(p) && !!h.fields.target && !!h.fields.weight && !n.value
|
|
5754
|
-
),
|
|
5750
|
+
), O = (m) => {
|
|
5755
5751
|
var _;
|
|
5756
5752
|
h.fields.target = (m == null ? void 0 : m.target) || "", h.fields.weight = (m == null ? void 0 : m.weight) ?? "", h.fields.tags = ((_ = m == null ? void 0 : m.tags) == null ? void 0 : _.join(", ")) || "", Object.assign(p, h.fields);
|
|
5757
5753
|
}, v = () => {
|
|
@@ -5761,25 +5757,25 @@ const Oe = {
|
|
|
5761
5757
|
let m = `${l.config.apiBaseUrl}${ht.form[l.config.app].validate}`;
|
|
5762
5758
|
return l.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((_ = l.config) == null ? void 0 : _.controlPlaneId) || "") : l.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (q = l.config) != null && q.workspace ? `/${l.config.workspace}` : "")), m = m.replace(/{id}/gi, l.targetId), m;
|
|
5763
5759
|
}), N = A(() => {
|
|
5764
|
-
var _, q,
|
|
5760
|
+
var _, q, F, x;
|
|
5765
5761
|
let m = `${l.config.apiBaseUrl}${ht.form[l.config.app][o.value]}`;
|
|
5766
|
-
return l.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((_ = l.config) == null ? void 0 : _.controlPlaneId) || "").replace(/{upstreamId}/gi, ((q = l.config) == null ? void 0 : q.upstreamId) || "") : l.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (
|
|
5767
|
-
}),
|
|
5762
|
+
return l.config.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, ((_ = l.config) == null ? void 0 : _.controlPlaneId) || "").replace(/{upstreamId}/gi, ((q = l.config) == null ? void 0 : q.upstreamId) || "") : l.config.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, (F = l.config) != null && F.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, ((x = l.config) == null ? void 0 : x.upstreamId) || "")), m = m.replace(/{id}/gi, l.targetId), m;
|
|
5763
|
+
}), $ = A(() => {
|
|
5768
5764
|
var m, _, q;
|
|
5769
5765
|
return {
|
|
5770
5766
|
target: h.fields.target,
|
|
5771
5767
|
weight: parseInt(h.fields.weight),
|
|
5772
|
-
tags: (q = (_ = (m = h.fields.tags) == null ? void 0 : m.split(",")) == null ? void 0 : _.map((
|
|
5768
|
+
tags: (q = (_ = (m = h.fields.tags) == null ? void 0 : m.split(",")) == null ? void 0 : _.map((F) => String(F || "").trim())) == null ? void 0 : q.filter((F) => F !== ""),
|
|
5773
5769
|
upstream: { id: l.config.upstreamId }
|
|
5774
5770
|
};
|
|
5775
|
-
}),
|
|
5771
|
+
}), U = async () => {
|
|
5776
5772
|
var m, _;
|
|
5777
5773
|
try {
|
|
5778
5774
|
h.isReadonly = !0, h.errorMessage = "";
|
|
5779
5775
|
let q;
|
|
5780
|
-
if (await i.post(T.value,
|
|
5781
|
-
const { data:
|
|
5782
|
-
h.fields.target = (
|
|
5776
|
+
if (await i.post(T.value, $.value), o.value === "create" ? q = await i.post(N.value, $.value) : o.value === "edit" && (q = ((m = l.config) == null ? void 0 : m.app) === "konnect" ? await i.put(N.value, $.value) : await i.patch(N.value, $.value)), q) {
|
|
5777
|
+
const { data: F } = q;
|
|
5778
|
+
h.fields.target = (F == null ? void 0 : F.name) || "", h.fields.weight = (F == null ? void 0 : F.weight) ?? 100, h.fields.tags = ((_ = F == null ? void 0 : F.tags) == null ? void 0 : _.join(", ")) || "", t("update", F), Object.assign(h.fields, g);
|
|
5783
5779
|
}
|
|
5784
5780
|
} catch (q) {
|
|
5785
5781
|
h.errorMessage = s(q), t("error", q);
|
|
@@ -5790,15 +5786,15 @@ const Oe = {
|
|
|
5790
5786
|
return ke(() => l.targetId, () => {
|
|
5791
5787
|
Object.assign(h.fields, g);
|
|
5792
5788
|
}), (m, _) => {
|
|
5793
|
-
const q = j("KInput"),
|
|
5794
|
-
return k(), P(
|
|
5789
|
+
const q = j("KInput"), F = j("KPrompt");
|
|
5790
|
+
return k(), P(F, {
|
|
5795
5791
|
"action-button-disabled": !H.value || h.isReadonly,
|
|
5796
5792
|
"action-button-text": u(r)("targets.form.buttons.save"),
|
|
5797
5793
|
"cancel-button-text": u(r)("targets.form.buttons.cancel"),
|
|
5798
5794
|
title: d.value,
|
|
5799
5795
|
visible: e.isVisible,
|
|
5800
5796
|
onCancel: v,
|
|
5801
|
-
onProceed:
|
|
5797
|
+
onProceed: U
|
|
5802
5798
|
}, {
|
|
5803
5799
|
default: f(() => [
|
|
5804
5800
|
I("div", Ic, [
|
|
@@ -5807,11 +5803,11 @@ const Oe = {
|
|
|
5807
5803
|
"edit-id": e.targetId,
|
|
5808
5804
|
"error-message": h.errorMessage,
|
|
5809
5805
|
"fetch-url": c.value,
|
|
5810
|
-
"form-fields":
|
|
5806
|
+
"form-fields": $.value,
|
|
5811
5807
|
"is-readonly": h.isReadonly,
|
|
5812
5808
|
onCancel: v,
|
|
5813
5809
|
"onFetch:error": _[3] || (_[3] = (x) => m.$emit("error", x)),
|
|
5814
|
-
"onFetch:success":
|
|
5810
|
+
"onFetch:success": O,
|
|
5815
5811
|
onLoading: _[4] || (_[4] = (x) => m.$emit("loading", x))
|
|
5816
5812
|
}, {
|
|
5817
5813
|
default: f(() => [
|
|
@@ -5872,7 +5868,7 @@ const Oe = {
|
|
|
5872
5868
|
}, 8, ["action-button-disabled", "action-button-text", "cancel-button-text", "title", "visible"]);
|
|
5873
5869
|
};
|
|
5874
5870
|
}
|
|
5875
|
-
}), qc = /* @__PURE__ */ Ue(Tc, [["__scopeId", "data-v-cfae2d2a"]]),
|
|
5871
|
+
}), qc = /* @__PURE__ */ Ue(Tc, [["__scopeId", "data-v-cfae2d2a"]]), Oc = { class: "kong-ui-entities-targets-list" }, Fc = { class: "target-address" }, Uc = /* @__PURE__ */ X({
|
|
5876
5872
|
__name: "TargetsList",
|
|
5877
5873
|
props: {
|
|
5878
5874
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5913,7 +5909,7 @@ const Oe = {
|
|
|
5913
5909
|
emits: ["error", "copy:success", "copy:error", "delete:success", "health-actions:healthy", "health-actions:unhealthy", "create:target", "update:target"],
|
|
5914
5910
|
setup(e, { emit: a }) {
|
|
5915
5911
|
var te;
|
|
5916
|
-
const t = a, l = e, { i18n: { t: r } } =
|
|
5912
|
+
const t = a, l = e, { i18n: { t: r } } = Fe.useI18n(), { axiosInstance: s } = wt((te = l.config) == null ? void 0 : te.axiosRequestConfig), i = B(1), c = A(() => l.config.app !== "kongManager" || !!l.config.disableSorting), d = {
|
|
5917
5913
|
// the Target Address column is non-hidable
|
|
5918
5914
|
target: { label: r("targets.list.table_headers.target_address"), sortable: !0, hidable: !1 },
|
|
5919
5915
|
weight: { label: r("targets.list.table_headers.weight"), sortable: !0 },
|
|
@@ -5924,7 +5920,7 @@ const Oe = {
|
|
|
5924
5920
|
return l.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((b = l.config) == null ? void 0 : b.controlPlaneId) || "").replace(/{upstreamId}/gi, ((w = l.config) == null ? void 0 : w.upstreamId) || "") : l.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (ie = l.config) != null && ie.workspace ? `/${l.config.workspace}` : "").replace(/{upstreamId}/gi, ((G = l.config) == null ? void 0 : G.upstreamId) || "")), C;
|
|
5925
5921
|
}), { fetcher: p, fetcherState: g } = Jr(l.config, h.value), n = () => {
|
|
5926
5922
|
i.value++;
|
|
5927
|
-
}, H = B(null),
|
|
5923
|
+
}, H = B(null), O = () => {
|
|
5928
5924
|
ee.value = !0;
|
|
5929
5925
|
}, v = (C, b) => {
|
|
5930
5926
|
const w = C.id;
|
|
@@ -5956,7 +5952,7 @@ const Oe = {
|
|
|
5956
5952
|
});
|
|
5957
5953
|
}, N = (C) => {
|
|
5958
5954
|
z.value = C, ee.value = !0;
|
|
5959
|
-
},
|
|
5955
|
+
}, $ = (C) => l.config.app === "konnect" ? !1 : l.config.canMarkHealthy(C), U = (C) => l.config.app === "konnect" ? !1 : l.config.canMarkUnhealthy(C), M = B(void 0), m = B(!1), _ = B(!1), q = B(""), F = Dr(l.config, h.value), x = (C) => {
|
|
5960
5956
|
M.value = C, m.value = !0;
|
|
5961
5957
|
}, V = () => {
|
|
5962
5958
|
m.value = !1;
|
|
@@ -5965,7 +5961,7 @@ const Oe = {
|
|
|
5965
5961
|
if ((C = M.value) != null && C.id) {
|
|
5966
5962
|
_.value = !0;
|
|
5967
5963
|
try {
|
|
5968
|
-
await s.delete(
|
|
5964
|
+
await s.delete(F(M.value.id)), _.value = !1, m.value = !1, i.value++, t("delete:success", M.value);
|
|
5969
5965
|
} catch (ie) {
|
|
5970
5966
|
q.value = ((w = (b = ie.response) == null ? void 0 : b.data) == null ? void 0 : w.message) || ie.message || r("targets.errors.delete"), t("error", ie);
|
|
5971
5967
|
} finally {
|
|
@@ -6017,7 +6013,7 @@ const Oe = {
|
|
|
6017
6013
|
};
|
|
6018
6014
|
return (C, b) => {
|
|
6019
6015
|
const w = j("KButton"), ie = j("KBadge"), G = j("KTruncate"), se = j("KDropdownItem"), he = j("KClipboardProvider");
|
|
6020
|
-
return k(), K("div",
|
|
6016
|
+
return k(), K("div", Oc, [
|
|
6021
6017
|
y(u(Lr), {
|
|
6022
6018
|
"cache-identifier": e.cacheIdentifier,
|
|
6023
6019
|
"disable-pagination-page-jump": "",
|
|
@@ -6031,7 +6027,7 @@ const Oe = {
|
|
|
6031
6027
|
"preferences-storage-key": "kong-ui-entities-targets-list",
|
|
6032
6028
|
"table-headers": u(d),
|
|
6033
6029
|
"use-action-outside": e.useActionOutside,
|
|
6034
|
-
onEmptyStateCtaClicked: b[1] || (b[1] = () => l.config.createRoute ? void 0 :
|
|
6030
|
+
onEmptyStateCtaClicked: b[1] || (b[1] = () => l.config.createRoute ? void 0 : O()),
|
|
6035
6031
|
onSort: n
|
|
6036
6032
|
}, {
|
|
6037
6033
|
"toolbar-button": f(() => [
|
|
@@ -6047,7 +6043,7 @@ const Oe = {
|
|
|
6047
6043
|
appearance: "primary",
|
|
6048
6044
|
"data-testid": "toolbar-new-target",
|
|
6049
6045
|
to: l.config.createRoute ? l.config.createRoute : void 0,
|
|
6050
|
-
onClick: b[0] || (b[0] = () => l.config.createRoute ? void 0 :
|
|
6046
|
+
onClick: b[0] || (b[0] = () => l.config.createRoute ? void 0 : O())
|
|
6051
6047
|
}, {
|
|
6052
6048
|
default: f(() => [
|
|
6053
6049
|
y(u(Gt)),
|
|
@@ -6063,7 +6059,7 @@ const Oe = {
|
|
|
6063
6059
|
], 8, ["disabled"]))
|
|
6064
6060
|
]),
|
|
6065
6061
|
target: f(({ rowValue: le }) => [
|
|
6066
|
-
I("span",
|
|
6062
|
+
I("span", Fc, S(le), 1)
|
|
6067
6063
|
]),
|
|
6068
6064
|
tags: f(({ rowValue: le }) => [
|
|
6069
6065
|
y(G, null, {
|
|
@@ -6128,7 +6124,7 @@ const Oe = {
|
|
|
6128
6124
|
_: 2
|
|
6129
6125
|
}, 1032, ["auth-function"]),
|
|
6130
6126
|
y(u(Te), {
|
|
6131
|
-
"auth-function": () =>
|
|
6127
|
+
"auth-function": () => $(le)
|
|
6132
6128
|
}, {
|
|
6133
6129
|
default: f(() => [
|
|
6134
6130
|
y(se, {
|
|
@@ -6144,7 +6140,7 @@ const Oe = {
|
|
|
6144
6140
|
_: 2
|
|
6145
6141
|
}, 1032, ["auth-function"]),
|
|
6146
6142
|
y(u(Te), {
|
|
6147
|
-
"auth-function": () =>
|
|
6143
|
+
"auth-function": () => U(le)
|
|
6148
6144
|
}, {
|
|
6149
6145
|
default: f(() => [
|
|
6150
6146
|
y(se, {
|
|
@@ -6241,7 +6237,7 @@ const Oe = {
|
|
|
6241
6237
|
emits: ["update:name", "update:host-header", "update:client-certificate", "update:tags"],
|
|
6242
6238
|
setup(e, { emit: a }) {
|
|
6243
6239
|
var V, E, Q, Z;
|
|
6244
|
-
const { i18nT: t, i18n: { t: l } } =
|
|
6240
|
+
const { i18nT: t, i18n: { t: l } } = Fe.useI18n(), r = e, s = a, {
|
|
6245
6241
|
debouncedQueryChange: i,
|
|
6246
6242
|
loading: c,
|
|
6247
6243
|
loadItems: o,
|
|
@@ -6255,34 +6251,34 @@ const Oe = {
|
|
|
6255
6251
|
loading: g,
|
|
6256
6252
|
loadItems: n,
|
|
6257
6253
|
results: H
|
|
6258
|
-
} = El(r.config, (Z = Xe.form[(Q = r.config) == null ? void 0 : Q.app]) == null ? void 0 : Z.getCertificates),
|
|
6254
|
+
} = El(r.config, (Z = Xe.form[(Q = r.config) == null ? void 0 : Q.app]) == null ? void 0 : Z.getCertificates), O = B(""), v = A(() => {
|
|
6259
6255
|
var W;
|
|
6260
6256
|
return !!r.name && !((W = h.value) != null && W.some((z) => z.host === r.name));
|
|
6261
6257
|
}), T = A(() => {
|
|
6262
6258
|
var z, ee, ue;
|
|
6263
|
-
const W = v.value && r.name.includes((z =
|
|
6259
|
+
const W = v.value && r.name.includes((z = O.value) == null ? void 0 : z.toLowerCase());
|
|
6264
6260
|
return (ue = d.value) == null ? void 0 : ue.map((L) => ({ label: L.host, value: L.id })).concat(
|
|
6265
|
-
W ? [{ label: r.name, value: ((ee =
|
|
6261
|
+
W ? [{ label: r.name, value: ((ee = U.value) == null ? void 0 : ee.value) || r.name }] : []
|
|
6266
6262
|
);
|
|
6267
6263
|
}), N = A(() => {
|
|
6268
6264
|
var W;
|
|
6269
6265
|
return (W = H.value) == null ? void 0 : W.map((z) => ({ label: z.id, value: z.id }));
|
|
6270
|
-
}),
|
|
6266
|
+
}), $ = B(""), U = B({ value: "", label: "" }), M = A(() => {
|
|
6271
6267
|
var W, z;
|
|
6272
|
-
return ((W = T.value.find((ee) => ee.value ===
|
|
6268
|
+
return ((W = T.value.find((ee) => ee.value === $.value)) == null ? void 0 : W.label) || ((z = U.value) == null ? void 0 : z.label);
|
|
6273
6269
|
}), m = (W) => {
|
|
6274
|
-
|
|
6270
|
+
O.value = W, i(W);
|
|
6275
6271
|
}, _ = (W) => {
|
|
6276
|
-
|
|
6272
|
+
U.value = W;
|
|
6277
6273
|
}, q = () => {
|
|
6278
|
-
|
|
6279
|
-
},
|
|
6280
|
-
|
|
6274
|
+
U.value = { value: "", label: "" };
|
|
6275
|
+
}, F = (W) => {
|
|
6276
|
+
$.value = W, s("update:name", M.value);
|
|
6281
6277
|
}, x = B(!1);
|
|
6282
6278
|
return st(async () => {
|
|
6283
6279
|
var W, z;
|
|
6284
6280
|
try {
|
|
6285
|
-
x.value = !0, await o(), r.name && (
|
|
6281
|
+
x.value = !0, await o(), r.name && ($.value = ((z = (W = T.value.find((ee) => ee.label === r.name)) == null ? void 0 : W.value) == null ? void 0 : z.toString()) || r.name), await n();
|
|
6286
6282
|
} finally {
|
|
6287
6283
|
x.value = !1;
|
|
6288
6284
|
}
|
|
@@ -6309,7 +6305,7 @@ const Oe = {
|
|
|
6309
6305
|
label: u(l)("upstreams.form.fields.name.label"),
|
|
6310
6306
|
"label-attributes": { tooltipAttributes: { "max-width": "250px" } },
|
|
6311
6307
|
loading: u(c),
|
|
6312
|
-
"model-value":
|
|
6308
|
+
"model-value": $.value,
|
|
6313
6309
|
placeholder: u(l)("upstreams.form.fields.name.placeholder"),
|
|
6314
6310
|
readonly: e.readonly,
|
|
6315
6311
|
required: "",
|
|
@@ -6317,7 +6313,7 @@ const Oe = {
|
|
|
6317
6313
|
onItemAdded: _,
|
|
6318
6314
|
onItemRemoved: q,
|
|
6319
6315
|
onQueryChange: m,
|
|
6320
|
-
"onUpdate:modelValue":
|
|
6316
|
+
"onUpdate:modelValue": F
|
|
6321
6317
|
}, {
|
|
6322
6318
|
"label-tooltip": f(() => [
|
|
6323
6319
|
y(u(t), {
|
|
@@ -6439,7 +6435,7 @@ const Oe = {
|
|
|
6439
6435
|
},
|
|
6440
6436
|
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"],
|
|
6441
6437
|
setup(e, { emit: a }) {
|
|
6442
|
-
const { i18nT: t, i18n: { t: l } } =
|
|
6438
|
+
const { i18nT: t, i18n: { t: l } } = Fe.useI18n(), { inRange: r } = St(), s = e, i = a, c = B([
|
|
6443
6439
|
{
|
|
6444
6440
|
label: l("upstreams.form.algorithms.round_robin_label"),
|
|
6445
6441
|
value: "round-robin",
|
|
@@ -6509,7 +6505,7 @@ const Oe = {
|
|
|
6509
6505
|
});
|
|
6510
6506
|
const d = A(() => s.hashOn === "cookie" || s.hashOn === "none"), h = A(() => s.slots ? r(s.slots, Mt, jt) ? "" : l("upstreams.form.errors.in_range") : "");
|
|
6511
6507
|
return (p, g) => {
|
|
6512
|
-
const n = j("KExternalLink"), H = j("KSelect"),
|
|
6508
|
+
const n = j("KExternalLink"), H = j("KSelect"), O = j("KInput"), v = j("KCard");
|
|
6513
6509
|
return k(), P(u(ot), {
|
|
6514
6510
|
class: "kong-ui-entities-upstreams-load-balancing",
|
|
6515
6511
|
title: u(l)("upstreams.form.load_balancing.title")
|
|
@@ -6538,7 +6534,7 @@ const Oe = {
|
|
|
6538
6534
|
width: "100%",
|
|
6539
6535
|
"onUpdate:modelValue": g[0] || (g[0] = (T) => i("update:algorithm", T))
|
|
6540
6536
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
6541
|
-
y(
|
|
6537
|
+
y(O, {
|
|
6542
6538
|
autocomplete: "off",
|
|
6543
6539
|
"data-testid": "upstreams-form-slots",
|
|
6544
6540
|
error: !!h.value,
|
|
@@ -6565,7 +6561,7 @@ const Oe = {
|
|
|
6565
6561
|
width: "100%",
|
|
6566
6562
|
"onUpdate:modelValue": g[2] || (g[2] = (T) => i("update:hash-on", T))
|
|
6567
6563
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
6568
|
-
e.hashOn === "header" ? (k(), P(
|
|
6564
|
+
e.hashOn === "header" ? (k(), P(O, {
|
|
6569
6565
|
key: 0,
|
|
6570
6566
|
autocomplete: "off",
|
|
6571
6567
|
class: "margin-top-6",
|
|
@@ -6578,7 +6574,7 @@ const Oe = {
|
|
|
6578
6574
|
"onUpdate:modelValue": g[3] || (g[3] = (T) => i("update:hash-on-header", T))
|
|
6579
6575
|
}, null, 8, ["label", "model-value", "readonly"])) : D("", !0),
|
|
6580
6576
|
e.hashOn === "cookie" ? (k(), K(ye, { key: 1 }, [
|
|
6581
|
-
y(
|
|
6577
|
+
y(O, {
|
|
6582
6578
|
autocomplete: "off",
|
|
6583
6579
|
class: "margin-top-6",
|
|
6584
6580
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
@@ -6589,7 +6585,7 @@ const Oe = {
|
|
|
6589
6585
|
type: "text",
|
|
6590
6586
|
"onUpdate:modelValue": g[4] || (g[4] = (T) => i("update:hash-on-cookie", T))
|
|
6591
6587
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
6592
|
-
y(
|
|
6588
|
+
y(O, {
|
|
6593
6589
|
autocomplete: "off",
|
|
6594
6590
|
class: "margin-top-6",
|
|
6595
6591
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
@@ -6601,7 +6597,7 @@ const Oe = {
|
|
|
6601
6597
|
"onUpdate:modelValue": g[5] || (g[5] = (T) => i("update:hash-on-cookie-path", T))
|
|
6602
6598
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
6603
6599
|
], 64)) : D("", !0),
|
|
6604
|
-
e.hashOn === "query_arg" ? (k(), P(
|
|
6600
|
+
e.hashOn === "query_arg" ? (k(), P(O, {
|
|
6605
6601
|
key: 2,
|
|
6606
6602
|
autocomplete: "off",
|
|
6607
6603
|
class: "margin-top-6",
|
|
@@ -6613,7 +6609,7 @@ const Oe = {
|
|
|
6613
6609
|
type: "text",
|
|
6614
6610
|
"onUpdate:modelValue": g[6] || (g[6] = (T) => i("update:hash-on-query-argument", T))
|
|
6615
6611
|
}, null, 8, ["label", "model-value", "readonly"])) : D("", !0),
|
|
6616
|
-
e.hashOn === "uri_capture" ? (k(), P(
|
|
6612
|
+
e.hashOn === "uri_capture" ? (k(), P(O, {
|
|
6617
6613
|
key: 3,
|
|
6618
6614
|
autocomplete: "off",
|
|
6619
6615
|
class: "margin-top-6",
|
|
@@ -6659,7 +6655,7 @@ const Oe = {
|
|
|
6659
6655
|
]),
|
|
6660
6656
|
_: 1
|
|
6661
6657
|
}, 8, ["disabled", "items", "label", "model-value", "readonly"]),
|
|
6662
|
-
e.hashFallback === "header" ? (k(), P(
|
|
6658
|
+
e.hashFallback === "header" ? (k(), P(O, {
|
|
6663
6659
|
key: 0,
|
|
6664
6660
|
autocomplete: "off",
|
|
6665
6661
|
class: "margin-top-6",
|
|
@@ -6672,7 +6668,7 @@ const Oe = {
|
|
|
6672
6668
|
"onUpdate:modelValue": g[9] || (g[9] = (T) => i("update:hash-fallback-header", T))
|
|
6673
6669
|
}, null, 8, ["label", "model-value", "readonly"])) : D("", !0),
|
|
6674
6670
|
e.hashFallback === "cookie" ? (k(), K(ye, { key: 1 }, [
|
|
6675
|
-
y(
|
|
6671
|
+
y(O, {
|
|
6676
6672
|
autocomplete: "off",
|
|
6677
6673
|
class: "margin-top-6",
|
|
6678
6674
|
"data-testid": "upstreams-form-hash-on-cookie",
|
|
@@ -6683,7 +6679,7 @@ const Oe = {
|
|
|
6683
6679
|
type: "text",
|
|
6684
6680
|
"onUpdate:modelValue": g[10] || (g[10] = (T) => i("update:hash-on-cookie", T))
|
|
6685
6681
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
6686
|
-
y(
|
|
6682
|
+
y(O, {
|
|
6687
6683
|
autocomplete: "off",
|
|
6688
6684
|
class: "margin-top-6",
|
|
6689
6685
|
"data-testid": "upstreams-form-hash-on-cookie-path",
|
|
@@ -6695,7 +6691,7 @@ const Oe = {
|
|
|
6695
6691
|
"onUpdate:modelValue": g[11] || (g[11] = (T) => i("update:hash-on-cookie-path", T))
|
|
6696
6692
|
}, null, 8, ["label", "model-value", "readonly"])
|
|
6697
6693
|
], 64)) : D("", !0),
|
|
6698
|
-
e.hashFallback === "query_arg" ? (k(), P(
|
|
6694
|
+
e.hashFallback === "query_arg" ? (k(), P(O, {
|
|
6699
6695
|
key: 2,
|
|
6700
6696
|
autocomplete: "off",
|
|
6701
6697
|
class: "margin-top-6",
|
|
@@ -6707,7 +6703,7 @@ const Oe = {
|
|
|
6707
6703
|
type: "text",
|
|
6708
6704
|
"onUpdate:modelValue": g[12] || (g[12] = (T) => i("update:hash-fallback-query-argument", T))
|
|
6709
6705
|
}, null, 8, ["label", "model-value", "readonly"])) : D("", !0),
|
|
6710
|
-
e.hashFallback === "uri_capture" ? (k(), P(
|
|
6706
|
+
e.hashFallback === "uri_capture" ? (k(), P(O, {
|
|
6711
6707
|
key: 3,
|
|
6712
6708
|
autocomplete: "off",
|
|
6713
6709
|
class: "margin-top-6",
|
|
@@ -6750,7 +6746,7 @@ const Oe = {
|
|
|
6750
6746
|
},
|
|
6751
6747
|
emits: ["update:active-health-switch", "update:passive-health-switch", "update:healthchecks-threshold"],
|
|
6752
6748
|
setup(e, { emit: a }) {
|
|
6753
|
-
const { i18n: { t } } =
|
|
6749
|
+
const { i18n: { t } } = Fe.useI18n(), l = a;
|
|
6754
6750
|
return (r, s) => {
|
|
6755
6751
|
const i = j("KExternalLink"), c = j("KInputSwitch"), o = j("KCard"), d = j("KInput");
|
|
6756
6752
|
return k(), P(u(ot), {
|
|
@@ -6891,7 +6887,7 @@ const Oe = {
|
|
|
6891
6887
|
},
|
|
6892
6888
|
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"],
|
|
6893
6889
|
setup(e, { emit: a }) {
|
|
6894
|
-
const { i18n: { t } } =
|
|
6890
|
+
const { i18n: { t } } = Fe.useI18n(), { objectsAreEqual: l } = St(), r = e, s = a, i = B([
|
|
6895
6891
|
{
|
|
6896
6892
|
label: t("upstreams.form.healthcheck_type_labels.http"),
|
|
6897
6893
|
value: "http",
|
|
@@ -6922,12 +6918,12 @@ const Oe = {
|
|
|
6922
6918
|
} = it({ replaceId: !0 }), {
|
|
6923
6919
|
trackNewItems: h
|
|
6924
6920
|
} = it({ replaceId: !0 });
|
|
6925
|
-
ke(() => r.type, (
|
|
6926
|
-
v === "tcp" &&
|
|
6921
|
+
ke(() => r.type, (O, v) => {
|
|
6922
|
+
v === "tcp" && O !== v && s("update:tcp-failures", "5"), (v === "https" || v === "grpcs") && O !== v && (s("update:https-sni", ""), s("update:verify-ssl", !1)), v !== "tcp" && O === "tcp" && (s("update:http-path", "/"), s("update:http-statuses", Kt), s("update:unhealthy-http-statuses", Et));
|
|
6927
6923
|
});
|
|
6928
6924
|
const p = B([{ key: "", values: "" }]);
|
|
6929
|
-
ke(() => r.headers, (
|
|
6930
|
-
l(p.value,
|
|
6925
|
+
ke(() => r.headers, (O) => {
|
|
6926
|
+
l(p.value, O) || (p.value = [...O]);
|
|
6931
6927
|
}, {
|
|
6932
6928
|
immediate: !0,
|
|
6933
6929
|
deep: !0
|
|
@@ -6936,11 +6932,11 @@ const Oe = {
|
|
|
6936
6932
|
s("update:headers", p.value);
|
|
6937
6933
|
}, n = () => {
|
|
6938
6934
|
p.value.push({ key: "", values: "" }), g();
|
|
6939
|
-
}, H = (
|
|
6940
|
-
|
|
6935
|
+
}, H = (O) => {
|
|
6936
|
+
O === 0 && p.value.length === 1 ? p.value[0] = { key: "", values: "" } : p.value.splice(O, 1), g();
|
|
6941
6937
|
};
|
|
6942
|
-
return (
|
|
6943
|
-
const T = j("KExternalLink"), N = j("KSelect"),
|
|
6938
|
+
return (O, v) => {
|
|
6939
|
+
const T = j("KExternalLink"), N = j("KSelect"), $ = j("KInput"), U = j("KCheckbox"), M = j("KLabel"), m = j("KButton"), _ = j("KMultiselect"), q = j("KCard");
|
|
6944
6940
|
return k(), P(u(ot), {
|
|
6945
6941
|
class: "kong-ui-entities-upstreams-active-healthcheck",
|
|
6946
6942
|
title: u(t)("upstreams.form.active_health_check.title")
|
|
@@ -6960,7 +6956,7 @@ const Oe = {
|
|
|
6960
6956
|
])
|
|
6961
6957
|
]),
|
|
6962
6958
|
default: f(() => {
|
|
6963
|
-
var
|
|
6959
|
+
var F;
|
|
6964
6960
|
return [
|
|
6965
6961
|
y(N, {
|
|
6966
6962
|
class: "active-healthcheck-type-select",
|
|
@@ -6971,7 +6967,7 @@ const Oe = {
|
|
|
6971
6967
|
width: "100%",
|
|
6972
6968
|
"onUpdate:modelValue": v[0] || (v[0] = (x) => s("update:type", x))
|
|
6973
6969
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
6974
|
-
o.value ? D("", !0) : (k(), P(
|
|
6970
|
+
o.value ? D("", !0) : (k(), P($, {
|
|
6975
6971
|
key: 0,
|
|
6976
6972
|
autocomplete: "off",
|
|
6977
6973
|
"data-testid": "active-healthcheck-http-path",
|
|
@@ -6981,7 +6977,7 @@ const Oe = {
|
|
|
6981
6977
|
type: "text",
|
|
6982
6978
|
"onUpdate:modelValue": v[1] || (v[1] = (x) => s("update:http-path", x))
|
|
6983
6979
|
}, null, 8, ["label", "model-value", "readonly"])),
|
|
6984
|
-
y(
|
|
6980
|
+
y($, {
|
|
6985
6981
|
autocomplete: "off",
|
|
6986
6982
|
"data-testid": "active-healthcheck-timeout",
|
|
6987
6983
|
label: u(t)("upstreams.form.fields.timeout.label"),
|
|
@@ -6992,7 +6988,7 @@ const Oe = {
|
|
|
6992
6988
|
type: "number",
|
|
6993
6989
|
"onUpdate:modelValue": v[2] || (v[2] = (x) => s("update:timeout", x))
|
|
6994
6990
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6995
|
-
y(
|
|
6991
|
+
y($, {
|
|
6996
6992
|
autocomplete: "off",
|
|
6997
6993
|
"data-testid": "active-healthcheck-concurrency",
|
|
6998
6994
|
label: u(t)("upstreams.form.fields.concurrency.label"),
|
|
@@ -7004,7 +7000,7 @@ const Oe = {
|
|
|
7004
7000
|
"onUpdate:modelValue": v[3] || (v[3] = (x) => s("update:concurrency", x))
|
|
7005
7001
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
7006
7002
|
c.value ? (k(), K(ye, { key: 1 }, [
|
|
7007
|
-
y(
|
|
7003
|
+
y($, {
|
|
7008
7004
|
autocomplete: "off",
|
|
7009
7005
|
class: "margin-bottom-6",
|
|
7010
7006
|
"data-testid": "active-healthcheck-https-sni",
|
|
@@ -7014,7 +7010,7 @@ const Oe = {
|
|
|
7014
7010
|
type: "text",
|
|
7015
7011
|
"onUpdate:modelValue": v[4] || (v[4] = (x) => s("update:https-sni", x))
|
|
7016
7012
|
}, null, 8, ["label", "model-value", "readonly"]),
|
|
7017
|
-
y(
|
|
7013
|
+
y(U, {
|
|
7018
7014
|
"data-testid": "active-healthcheck-verify-ssl",
|
|
7019
7015
|
disabled: e.readonly,
|
|
7020
7016
|
label: u(t)("upstreams.form.fields.verify_ssl.label"),
|
|
@@ -7022,7 +7018,7 @@ const Oe = {
|
|
|
7022
7018
|
"onUpdate:modelValue": v[5] || (v[5] = (x) => s("update:verify-ssl", x))
|
|
7023
7019
|
}, null, 8, ["disabled", "label", "model-value"])
|
|
7024
7020
|
], 64)) : D("", !0),
|
|
7025
|
-
((
|
|
7021
|
+
((F = e.config) == null ? void 0 : F.app) === "kongManager" ? (k(), K("div", Zc, [
|
|
7026
7022
|
y(M, {
|
|
7027
7023
|
info: u(t)("upstreams.form.fields.headers.tooltip_active"),
|
|
7028
7024
|
"tooltip-attributes": { maxWidth: "250px" }
|
|
@@ -7037,7 +7033,7 @@ const Oe = {
|
|
|
7037
7033
|
key: `${x.header}_${V}`,
|
|
7038
7034
|
class: qe(["headers-row", { "margin-top-6": V > 0 }])
|
|
7039
7035
|
}, [
|
|
7040
|
-
y(
|
|
7036
|
+
y($, {
|
|
7041
7037
|
modelValue: p.value[V].key,
|
|
7042
7038
|
"onUpdate:modelValue": (E) => p.value[V].key = E,
|
|
7043
7039
|
autocomplete: "off",
|
|
@@ -7046,7 +7042,7 @@ const Oe = {
|
|
|
7046
7042
|
type: "text",
|
|
7047
7043
|
onBlur: g
|
|
7048
7044
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "readonly"]),
|
|
7049
|
-
y(
|
|
7045
|
+
y($, {
|
|
7050
7046
|
modelValue: p.value[V].values,
|
|
7051
7047
|
"onUpdate:modelValue": (E) => p.value[V].values = E,
|
|
7052
7048
|
autocomplete: "off",
|
|
@@ -7091,7 +7087,7 @@ const Oe = {
|
|
|
7091
7087
|
default: f(() => [
|
|
7092
7088
|
I("h5", Yc, S(u(t)("upstreams.form.healthy.label")), 1),
|
|
7093
7089
|
I("p", Gc, S(u(t)("upstreams.form.healthy.help")), 1),
|
|
7094
|
-
y(
|
|
7090
|
+
y($, {
|
|
7095
7091
|
autocomplete: "off",
|
|
7096
7092
|
class: "margin-bottom-6",
|
|
7097
7093
|
"data-testid": "active-healthcheck-interval",
|
|
@@ -7104,7 +7100,7 @@ const Oe = {
|
|
|
7104
7100
|
type: "number",
|
|
7105
7101
|
"onUpdate:modelValue": v[6] || (v[6] = (x) => s("update:interval", x))
|
|
7106
7102
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
7107
|
-
y(
|
|
7103
|
+
y($, {
|
|
7108
7104
|
autocomplete: "off",
|
|
7109
7105
|
"data-testid": "active-healthcheck-successes",
|
|
7110
7106
|
label: u(t)("upstreams.form.fields.successes.label"),
|
|
@@ -7136,7 +7132,7 @@ const Oe = {
|
|
|
7136
7132
|
default: f(() => [
|
|
7137
7133
|
I("h5", Xc, S(u(t)("upstreams.form.unhealthy.label")), 1),
|
|
7138
7134
|
I("p", ed, S(u(t)("upstreams.form.unhealthy.help")), 1),
|
|
7139
|
-
y(
|
|
7135
|
+
y($, {
|
|
7140
7136
|
autocomplete: "off",
|
|
7141
7137
|
class: "margin-bottom-6",
|
|
7142
7138
|
"data-testid": "active-healthcheck-unhealthy-interval",
|
|
@@ -7149,7 +7145,7 @@ const Oe = {
|
|
|
7149
7145
|
type: "number",
|
|
7150
7146
|
"onUpdate:modelValue": v[11] || (v[11] = (x) => s("update:unhealthy-interval", x))
|
|
7151
7147
|
}, null, 8, ["help", "label", "max", "min", "model-value", "readonly"]),
|
|
7152
|
-
y(
|
|
7148
|
+
y($, {
|
|
7153
7149
|
autocomplete: "off",
|
|
7154
7150
|
class: "margin-bottom-6",
|
|
7155
7151
|
"data-testid": "active-healthcheck-tcp-failures",
|
|
@@ -7161,7 +7157,7 @@ const Oe = {
|
|
|
7161
7157
|
type: "number",
|
|
7162
7158
|
"onUpdate:modelValue": v[12] || (v[12] = (x) => s("update:tcp-failures", x))
|
|
7163
7159
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
7164
|
-
o.value ? D("", !0) : (k(), P(
|
|
7160
|
+
o.value ? D("", !0) : (k(), P($, {
|
|
7165
7161
|
key: 0,
|
|
7166
7162
|
autocomplete: "off",
|
|
7167
7163
|
class: "margin-bottom-6",
|
|
@@ -7188,7 +7184,7 @@ const Oe = {
|
|
|
7188
7184
|
onItemRemoved: v[15] || (v[15] = (x) => u(h)(x, !1)),
|
|
7189
7185
|
"onUpdate:modelValue": v[16] || (v[16] = (x) => s("update:unhealthy-http-statuses", x))
|
|
7190
7186
|
}, null, 8, ["items", "label", "model-value", "readonly"])),
|
|
7191
|
-
y(
|
|
7187
|
+
y($, {
|
|
7192
7188
|
autocomplete: "off",
|
|
7193
7189
|
"data-testid": "active-healthcheck-unhealthy-timeouts",
|
|
7194
7190
|
label: u(t)("upstreams.form.fields.timeouts.label"),
|
|
@@ -7247,7 +7243,7 @@ const Oe = {
|
|
|
7247
7243
|
},
|
|
7248
7244
|
emits: ["update:type", "update:successes", "update:http-statuses", "update:timeouts", "update:http-failures", "update:unhealthy-http-statuses", "update:tcp-failures"],
|
|
7249
7245
|
setup(e, { emit: a }) {
|
|
7250
|
-
const { i18n: { t } } =
|
|
7246
|
+
const { i18n: { t } } = Fe.useI18n(), l = e, r = a, s = B([
|
|
7251
7247
|
{
|
|
7252
7248
|
label: t("upstreams.form.healthcheck_type_labels.http"),
|
|
7253
7249
|
value: "http",
|
|
@@ -7281,7 +7277,7 @@ const Oe = {
|
|
|
7281
7277
|
return ke(() => l.type, (d, h) => {
|
|
7282
7278
|
h === "tcp" && d !== h && r("update:tcp-failures", "5"), h !== "tcp" && d === "tcp" && (r("update:http-statuses", Bt), r("update:unhealthy-http-statuses", Pt));
|
|
7283
7279
|
}), (d, h) => {
|
|
7284
|
-
const p = j("KExternalLink"), g = j("KSelect"), n = j("KInput"), H = j("KMultiselect"),
|
|
7280
|
+
const p = j("KExternalLink"), g = j("KSelect"), n = j("KInput"), H = j("KMultiselect"), O = j("KCard");
|
|
7285
7281
|
return k(), P(u(ot), {
|
|
7286
7282
|
class: "kong-ui-entities-upstreams-passive-healthcheck",
|
|
7287
7283
|
title: u(t)("upstreams.form.passive_health_check.title")
|
|
@@ -7310,7 +7306,7 @@ const Oe = {
|
|
|
7310
7306
|
width: "100%",
|
|
7311
7307
|
"onUpdate:modelValue": h[0] || (h[0] = (v) => r("update:type", v))
|
|
7312
7308
|
}, null, 8, ["items", "label", "model-value", "readonly"]),
|
|
7313
|
-
y(
|
|
7309
|
+
y(O, null, {
|
|
7314
7310
|
default: f(() => [
|
|
7315
7311
|
I("h5", ld, S(u(t)("upstreams.form.passive_healthy.label")), 1),
|
|
7316
7312
|
I("p", rd, S(u(t)("upstreams.form.passive_healthy.help")), 1),
|
|
@@ -7341,7 +7337,7 @@ const Oe = {
|
|
|
7341
7337
|
]),
|
|
7342
7338
|
_: 1
|
|
7343
7339
|
}),
|
|
7344
|
-
y(
|
|
7340
|
+
y(O, null, {
|
|
7345
7341
|
default: f(() => [
|
|
7346
7342
|
I("h5", id, S(u(t)("upstreams.form.passive_unhealthy.label")), 1),
|
|
7347
7343
|
I("p", sd, S(u(t)("upstreams.form.passive_unhealthy.help")), 1),
|
|
@@ -7426,11 +7422,11 @@ const Oe = {
|
|
|
7426
7422
|
fields: c(),
|
|
7427
7423
|
readonly: !1,
|
|
7428
7424
|
errorMessage: ""
|
|
7429
|
-
}), H = pt(c()),
|
|
7425
|
+
}), H = pt(c()), O = A(() => !o(n.fields, H)), v = (C) => {
|
|
7430
7426
|
n.fields.activeHealthCheck.interval = C ? "5" : "0", n.fields.activeHealthCheck.successes = C ? "5" : "0", n.fields.activeHealthCheck.httpFailures = C ? "5" : "0", n.fields.activeHealthCheck.unhealthyInterval = C ? "5" : "0", n.fields.activeHealthCheck.tcpFailures = C ? "5" : "0";
|
|
7431
7427
|
}, T = (C) => {
|
|
7432
7428
|
n.fields.passiveHealthCheck.timeouts = C ? "5" : "0", n.fields.passiveHealthCheck.successes = C ? "80" : "0", n.fields.passiveHealthCheck.tcpFailures = C ? "5" : "0", n.fields.passiveHealthCheck.httpFailures = C ? "5" : "0";
|
|
7433
|
-
}, N = A(() => n.fields.slots ? r(n.fields.slots, Mt, jt) : !0),
|
|
7429
|
+
}, N = A(() => n.fields.slots ? r(n.fields.slots, Mt, jt) : !0), $ = A(() => n.fields.hashOn === "header" ? !!n.fields.hashOnHeader : !0), U = A(() => n.fields.hashOn === "cookie" || n.fields.hashFallback === "cookie" ? !!n.fields.hashOnCookie : !0), M = A(() => n.fields.hashOn === "cookie" || n.fields.hashFallback === "cookie" ? !!n.fields.hashOnCookiePath : !0), m = A(() => n.fields.hashOn === "query_arg" ? !!n.fields.hashOnQueryArgument : !0), _ = A(() => n.fields.hashOn === "uri_capture" ? !!n.fields.hashOnUriCapture : !0), q = A(() => n.fields.hashFallback === "header" ? !!n.fields.hashFallbackHeader : !0), F = A(() => n.fields.hashFallback === "query_arg" ? !!n.fields.hashFallbackQueryArgument : !0), x = A(() => n.fields.hashFallback === "uri_capture" ? !!n.fields.hashFallbackUriCapture : !0), V = A(() => !!n.fields.name && N.value && $.value && U.value && M.value && m.value && _.value && q.value && F.value && x.value), E = A(() => t.upstreamId ? Se.Edit : Se.Create), Q = A(() => {
|
|
7434
7430
|
var C, b;
|
|
7435
7431
|
return (b = Xe.form[(C = t.config) == null ? void 0 : C.app]) == null ? void 0 : b.edit;
|
|
7436
7432
|
}), Z = (C) => {
|
|
@@ -7509,7 +7505,7 @@ const Oe = {
|
|
|
7509
7505
|
};
|
|
7510
7506
|
return (C, b) => (k(), K("div", ud, [
|
|
7511
7507
|
y(u(Vr), {
|
|
7512
|
-
"can-submit": V.value &&
|
|
7508
|
+
"can-submit": V.value && O.value,
|
|
7513
7509
|
config: e.config,
|
|
7514
7510
|
"edit-id": e.upstreamId,
|
|
7515
7511
|
"error-message": n.errorMessage,
|
|
@@ -7662,7 +7658,7 @@ const Oe = {
|
|
|
7662
7658
|
},
|
|
7663
7659
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
7664
7660
|
setup(e) {
|
|
7665
|
-
const a = e, { i18n: { t }, i18nT: l } =
|
|
7661
|
+
const a = e, { i18n: { t }, i18nT: l } = Fe.useI18n(), { getPropValue: r } = tc(), s = A(() => Xe.form[a.config.app].edit), i = B({
|
|
7666
7662
|
id: {},
|
|
7667
7663
|
name: {},
|
|
7668
7664
|
created_at: {},
|