@kong-ui-public/entities-consumer-groups 2.4.17 → 2.4.18
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.
|
@@ -2,8 +2,8 @@ import { defineComponent as ae, ref as F, computed as A, watch as Te, renderSlot
|
|
|
2
2
|
import { useRouter as It } from "vue-router";
|
|
3
3
|
import { createI18n as At, i18nTComponent as Cn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Ar from "axios";
|
|
5
|
-
import { BadgeMethodAppearances as
|
|
6
|
-
const
|
|
5
|
+
import { BadgeMethodAppearances as xr } from "@kong/kongponents";
|
|
6
|
+
const Sr = {
|
|
7
7
|
list: {
|
|
8
8
|
table_headers: {
|
|
9
9
|
name: "Name",
|
|
@@ -96,7 +96,7 @@ const xr = {
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
}, Tr = {
|
|
99
|
-
consumer_groups:
|
|
99
|
+
consumer_groups: Sr
|
|
100
100
|
};
|
|
101
101
|
function $r() {
|
|
102
102
|
const e = At("en-us", Tr);
|
|
@@ -108,35 +108,35 @@ function $r() {
|
|
|
108
108
|
}
|
|
109
109
|
const dt = {
|
|
110
110
|
useI18n: $r
|
|
111
|
-
},
|
|
111
|
+
}, xe = "/api/runtime_groups/{controlPlaneId}", Se = "/{workspace}", Me = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
|
-
all: `${
|
|
115
|
-
forConsumer: `${Se}/consumers/{consumerId}/consumer_groups`,
|
|
116
|
-
oneForConsumer: `${Se}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
|
-
},
|
|
118
|
-
kongManager: {
|
|
119
|
-
all: `${xe}/consumer_groups?counter=true`,
|
|
114
|
+
all: `${xe}/consumer_groups`,
|
|
120
115
|
forConsumer: `${xe}/consumers/{consumerId}/consumer_groups`,
|
|
121
116
|
oneForConsumer: `${xe}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
|
+
},
|
|
118
|
+
kongManager: {
|
|
119
|
+
all: `${Se}/consumer_groups?counter=true`,
|
|
120
|
+
forConsumer: `${Se}/consumers/{consumerId}/consumer_groups`,
|
|
121
|
+
oneForConsumer: `${Se}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
form: {
|
|
125
125
|
konnect: {
|
|
126
|
-
consumersList: `${Se}/consumers`,
|
|
127
|
-
create: `${Se}/consumer_groups`,
|
|
128
|
-
edit: `${Se}/consumer_groups/{id}`,
|
|
129
|
-
addConsumer: `${Se}/consumer_groups/{id}/consumers`,
|
|
130
|
-
removeConsumer: `${Se}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
131
|
-
getConsumers: `${Se}/consumer_groups/{id}/consumers`
|
|
132
|
-
},
|
|
133
|
-
kongManager: {
|
|
134
126
|
consumersList: `${xe}/consumers`,
|
|
135
127
|
create: `${xe}/consumer_groups`,
|
|
136
128
|
edit: `${xe}/consumer_groups/{id}`,
|
|
137
129
|
addConsumer: `${xe}/consumer_groups/{id}/consumers`,
|
|
138
130
|
removeConsumer: `${xe}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
131
|
getConsumers: `${xe}/consumer_groups/{id}/consumers`
|
|
132
|
+
},
|
|
133
|
+
kongManager: {
|
|
134
|
+
consumersList: `${Se}/consumers`,
|
|
135
|
+
create: `${Se}/consumer_groups`,
|
|
136
|
+
edit: `${Se}/consumer_groups/{id}`,
|
|
137
|
+
addConsumer: `${Se}/consumer_groups/{id}/consumers`,
|
|
138
|
+
removeConsumer: `${Se}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
|
+
getConsumers: `${Se}/consumer_groups/{id}/consumers`
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
@@ -202,7 +202,7 @@ function Er() {
|
|
|
202
202
|
}
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function xt(e = {}) {
|
|
206
206
|
const { getAxiosInstance: n } = jr();
|
|
207
207
|
return {
|
|
208
208
|
axiosInstance: n(e)
|
|
@@ -313,7 +313,7 @@ const Fr = {
|
|
|
313
313
|
errors: Pr,
|
|
314
314
|
toggleModal: Dr
|
|
315
315
|
};
|
|
316
|
-
function
|
|
316
|
+
function St() {
|
|
317
317
|
const e = At("en-us", Vr);
|
|
318
318
|
return {
|
|
319
319
|
i18n: e,
|
|
@@ -370,14 +370,14 @@ function Rr(e, n, t, r = {
|
|
|
370
370
|
searchKeys: ["id"]
|
|
371
371
|
}) {
|
|
372
372
|
t || (t = "100");
|
|
373
|
-
const { axiosInstance: o } =
|
|
373
|
+
const { axiosInstance: o } = xt({
|
|
374
374
|
headers: e.requestHeaders
|
|
375
|
-
}), { i18n: { t: i } } =
|
|
375
|
+
}), { i18n: { t: i } } = St(), { debounce: a } = Mr(), s = a(async (v) => {
|
|
376
376
|
await L(v);
|
|
377
377
|
}, 200), l = F(!1), u = F(""), p = F(""), c = F([]), y = F([]), f = F(void 0), _ = m(n);
|
|
378
378
|
let h = `${e.apiBaseUrl}${_}`;
|
|
379
379
|
e.app === "konnect" ? h = h.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (h = h.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
380
|
-
const { isValidUuid:
|
|
380
|
+
const { isValidUuid: x } = wn(), b = async () => {
|
|
381
381
|
try {
|
|
382
382
|
l.value = !0;
|
|
383
383
|
const { data: v } = await o.get(`${h}?size=${t}`);
|
|
@@ -388,7 +388,7 @@ function Rr(e, n, t, r = {
|
|
|
388
388
|
l.value = !1;
|
|
389
389
|
}
|
|
390
390
|
}, w = F(""), L = async (v) => {
|
|
391
|
-
var
|
|
391
|
+
var S, V, re;
|
|
392
392
|
if (w.value !== v)
|
|
393
393
|
if (w.value = v || "", f.value === void 0)
|
|
394
394
|
try {
|
|
@@ -399,7 +399,7 @@ function Rr(e, n, t, r = {
|
|
|
399
399
|
r.fetchedItemsKey in C ? c.value = C[r.fetchedItemsKey] : C != null && C.id ? c.value = [C] : c.value = [];
|
|
400
400
|
} else if (v) {
|
|
401
401
|
const G = [];
|
|
402
|
-
|
|
402
|
+
x(v) && r.searchKeys.includes("id") ? G.push((async () => {
|
|
403
403
|
const { data: N } = await o.get(`${h}/${v}`);
|
|
404
404
|
return [N[r.fetchedItemsKey] ?? N];
|
|
405
405
|
})()) : G.push(
|
|
@@ -409,7 +409,7 @@ function Rr(e, n, t, r = {
|
|
|
409
409
|
})
|
|
410
410
|
);
|
|
411
411
|
const C = await Promise.all(G), R = /* @__PURE__ */ new Set();
|
|
412
|
-
c.value = [], (
|
|
412
|
+
c.value = [], (S = C == null ? void 0 : C.forEach) == null || S.call(C, (N) => {
|
|
413
413
|
var I;
|
|
414
414
|
(I = N == null ? void 0 : N.forEach) == null || I.call(N, (T) => {
|
|
415
415
|
R.has(T.id) || (R.add(T.id), c.value.push(T));
|
|
@@ -450,7 +450,7 @@ function Gr(e, n) {
|
|
|
450
450
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
451
451
|
}
|
|
452
452
|
function Hr() {
|
|
453
|
-
const { i18n: { t: e } } =
|
|
453
|
+
const { i18n: { t: e } } = St();
|
|
454
454
|
return {
|
|
455
455
|
getMessageFromError: (n) => {
|
|
456
456
|
var t, r, o, i;
|
|
@@ -509,7 +509,7 @@ function _n(e, n) {
|
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
511
|
function Jr(e, n, t = "data") {
|
|
512
|
-
const r = m(n), { axiosInstance: o } =
|
|
512
|
+
const r = m(n), { axiosInstance: o } = xt({
|
|
513
513
|
headers: e.requestHeaders
|
|
514
514
|
}), i = _n(e, r), a = F({
|
|
515
515
|
status: Ne.Idle
|
|
@@ -623,7 +623,7 @@ function no(e) {
|
|
|
623
623
|
};
|
|
624
624
|
}
|
|
625
625
|
const ce = {
|
|
626
|
-
useAxios:
|
|
626
|
+
useAxios: xt,
|
|
627
627
|
useDebouncedFilter: Rr,
|
|
628
628
|
useDeleteUrlBuilder: Gr,
|
|
629
629
|
useErrors: Hr,
|
|
@@ -632,7 +632,7 @@ const ce = {
|
|
|
632
632
|
useFetchUrlBuilder: _n,
|
|
633
633
|
useHelpers: wn,
|
|
634
634
|
useStringHelpers: Yr,
|
|
635
|
-
useI18n:
|
|
635
|
+
useI18n: St,
|
|
636
636
|
useGatewayFeatureSupported: to,
|
|
637
637
|
useTruncationDetector: no
|
|
638
638
|
}, ro = {
|
|
@@ -820,7 +820,7 @@ const ce = {
|
|
|
820
820
|
}), s.value ? c(t("message.fail")) : o("error", r.uuid);
|
|
821
821
|
return;
|
|
822
822
|
}
|
|
823
|
-
const
|
|
823
|
+
const x = ((_ = r.uuid) == null ? void 0 : _.length) > Yt, b = r.format === "hidden" || r.format === "redacted" ? t("message.success.prefix") : `"${((h = r.uuid) == null ? void 0 : h.substring(0, Yt)) + (x ? "..." : "")}"`;
|
|
824
824
|
typeof i == "function" && i({
|
|
825
825
|
type: "success",
|
|
826
826
|
message: `${b}${t("message.success.content")}`
|
|
@@ -844,12 +844,12 @@ const ce = {
|
|
|
844
844
|
(d(), P(Be(e.tooltip ? "KTooltip" : "div"), vt(u.value, { class: "uuid-icon-wrapper" }), {
|
|
845
845
|
default: g(() => [
|
|
846
846
|
E(h, null, {
|
|
847
|
-
default: g(({ copyToClipboard:
|
|
847
|
+
default: g(({ copyToClipboard: x }) => [
|
|
848
848
|
D("span", {
|
|
849
849
|
"data-testid": "copy-to-clipboard",
|
|
850
850
|
role: "button",
|
|
851
851
|
tabindex: "0",
|
|
852
|
-
onClick: rt((b) => y(
|
|
852
|
+
onClick: rt((b) => y(x), ["stop"])
|
|
853
853
|
}, [
|
|
854
854
|
E(m(mo), {
|
|
855
855
|
class: "uuid-icon",
|
|
@@ -873,7 +873,7 @@ const ce = {
|
|
|
873
873
|
for (const [r, o] of n)
|
|
874
874
|
t[r] = o;
|
|
875
875
|
return t;
|
|
876
|
-
},
|
|
876
|
+
}, xn = /* @__PURE__ */ bo(vo, [["__scopeId", "data-v-0c07874b"]]), Co = {
|
|
877
877
|
key: 0,
|
|
878
878
|
class: "config-card-fieldset-title"
|
|
879
879
|
}, ko = /* @__PURE__ */ ae({
|
|
@@ -924,7 +924,7 @@ const ce = {
|
|
|
924
924
|
for (const [r, o] of n)
|
|
925
925
|
t[r] = o;
|
|
926
926
|
return t;
|
|
927
|
-
},
|
|
927
|
+
}, Sn = /* @__PURE__ */ we(ko, [["__scopeId", "data-v-68ca83ec"]]), wo = /* @__PURE__ */ ae({
|
|
928
928
|
__name: "InternalLinkItem",
|
|
929
929
|
props: {
|
|
930
930
|
item: {
|
|
@@ -973,9 +973,9 @@ const ce = {
|
|
|
973
973
|
}, 8, ["appearance"]);
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
|
-
}), Ao = "#0044f4",
|
|
976
|
+
}), Ao = "#0044f4", xo = "#e0e4ea", So = "#3a3f51", To = "1px", $o = "20px", jo = { class: "config-card-details-row" }, Mo = ["data-testid"], Oo = ["data-testid"], Eo = ["data-testid"], Fo = ["data-testid"], Ko = { key: 1 }, No = ["data-testid"], qo = ["data-testid"], Bo = ["data-testid"], Lo = ["data-testid"], Uo = {
|
|
977
977
|
name: "ConfigCardItem",
|
|
978
|
-
components: { CopyUuid:
|
|
978
|
+
components: { CopyUuid: xn, JsonCardItem: Sn, StatusBadge: Io, InternalLinkItem: _o }
|
|
979
979
|
}, Po = /* @__PURE__ */ ae({
|
|
980
980
|
...Uo,
|
|
981
981
|
props: {
|
|
@@ -997,10 +997,10 @@ const ce = {
|
|
|
997
997
|
emits: ["navigation-click"],
|
|
998
998
|
setup(e, { emit: n }) {
|
|
999
999
|
yn((_) => ({
|
|
1000
|
-
"
|
|
1001
|
-
"
|
|
1002
|
-
"
|
|
1003
|
-
"
|
|
1000
|
+
"5ae2770e": p.value ? "none" : `solid ${m(To)} ${m(xo)}`,
|
|
1001
|
+
"4db3977e": u.value && s.value ? "block" : "flex",
|
|
1002
|
+
"1a7c5e02": u.value && s.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1003
|
+
"1a77d24c": u.value && s.value ? "100%" : t.slim ? "50%" : "75%"
|
|
1004
1004
|
}));
|
|
1005
1005
|
const t = e, r = n, o = ut(), { i18n: { t: i, formatUnixTimeStamp: a } } = ce.useI18n(), s = A(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), l = A(() => !!(t.item.tooltip || o["label-tooltip"])), u = A(() => t.item.type === oe.Json || t.item.type === oe.JsonArray), p = A(() => t.item.type === oe.JsonArray), c = A(() => {
|
|
1006
1006
|
switch (t.item.type) {
|
|
@@ -1130,14 +1130,14 @@ const ce = {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
}), y = F(), { isTruncated: f } = ce.useTruncationDetector(y);
|
|
1132
1132
|
return (_, h) => {
|
|
1133
|
-
const
|
|
1133
|
+
const x = q("KLabel"), b = q("KBadge"), w = q("KTooltip");
|
|
1134
1134
|
return d(), j("div", jo, [
|
|
1135
1135
|
D("div", {
|
|
1136
1136
|
class: "config-card-details-label",
|
|
1137
1137
|
"data-testid": `${e.item.key}-label`
|
|
1138
1138
|
}, [
|
|
1139
1139
|
X(_.$slots, "label", { item: e.item }, () => [
|
|
1140
|
-
E(
|
|
1140
|
+
E(x, { "tooltip-attributes": { maxWidth: "500px" } }, je({
|
|
1141
1141
|
default: g(() => [
|
|
1142
1142
|
Z(K(e.item.label) + " ", 1)
|
|
1143
1143
|
]),
|
|
@@ -1191,7 +1191,7 @@ const ce = {
|
|
|
1191
1191
|
class: "copy-uuid-array",
|
|
1192
1192
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1193
1193
|
}, [
|
|
1194
|
-
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(m(
|
|
1194
|
+
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(m(xn), vt(c.value.childAttrs, {
|
|
1195
1195
|
key: `${e.item.key}-copy-uuid-${v}`,
|
|
1196
1196
|
"data-testid": `${e.item.key}-copy-uuid-${v}`,
|
|
1197
1197
|
uuid: L
|
|
@@ -1203,7 +1203,7 @@ const ce = {
|
|
|
1203
1203
|
}, [
|
|
1204
1204
|
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(b, {
|
|
1205
1205
|
key: `${e.item.key}-badge-method-${v}`,
|
|
1206
|
-
appearance: Object.values(m(
|
|
1206
|
+
appearance: Object.values(m(xr)).includes(L.toLowerCase()) ? L.toLowerCase() : "custom",
|
|
1207
1207
|
class: "config-badge",
|
|
1208
1208
|
"data-testid": `${e.item.key}-badge-method-${v}`
|
|
1209
1209
|
}, {
|
|
@@ -1217,7 +1217,7 @@ const ce = {
|
|
|
1217
1217
|
key: 3,
|
|
1218
1218
|
"data-testid": `${t.item.key}-json-array-content`
|
|
1219
1219
|
}, [
|
|
1220
|
-
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(
|
|
1220
|
+
(d(!0), j(Ce, null, ve(e.item.value, (L, v) => (d(), P(Sn, {
|
|
1221
1221
|
key: `json-array-item-${v}`,
|
|
1222
1222
|
index: v,
|
|
1223
1223
|
"is-array-item": "",
|
|
@@ -1225,7 +1225,7 @@ const ce = {
|
|
|
1225
1225
|
}, null, 8, ["index", "item"]))), 128))
|
|
1226
1226
|
], 8, Lo)) : (d(), P(w, {
|
|
1227
1227
|
key: 4,
|
|
1228
|
-
|
|
1228
|
+
text: m(f) ? e.item.value : ""
|
|
1229
1229
|
}, {
|
|
1230
1230
|
default: g(() => [
|
|
1231
1231
|
D("span", {
|
|
@@ -1235,7 +1235,7 @@ const ce = {
|
|
|
1235
1235
|
}, K(c.value.text), 3)
|
|
1236
1236
|
]),
|
|
1237
1237
|
_: 1
|
|
1238
|
-
}, 8, ["
|
|
1238
|
+
}, 8, ["text"]))
|
|
1239
1239
|
]),
|
|
1240
1240
|
_: 1
|
|
1241
1241
|
}, 16))
|
|
@@ -1248,7 +1248,7 @@ const ce = {
|
|
|
1248
1248
|
]);
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
|
-
}), Tt = /* @__PURE__ */ we(Po, [["__scopeId", "data-v-
|
|
1251
|
+
}), Tt = /* @__PURE__ */ we(Po, [["__scopeId", "data-v-f65fc52c"]]), Do = { class: "json-config" }, Vo = {
|
|
1252
1252
|
key: 0,
|
|
1253
1253
|
class: "json-endpoint"
|
|
1254
1254
|
}, Tn = /* @__PURE__ */ ae({
|
|
@@ -1761,10 +1761,10 @@ var Ln = new pe("tag:yaml.org,2002:float", {
|
|
|
1761
1761
|
), Vn = new RegExp(
|
|
1762
1762
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1763
1763
|
);
|
|
1764
|
-
function
|
|
1764
|
+
function xa(e) {
|
|
1765
1765
|
return e === null ? !1 : Dn.exec(e) !== null || Vn.exec(e) !== null;
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function Sa(e) {
|
|
1768
1768
|
var n, t, r, o, i, a, s, l = 0, u = null, p, c, y;
|
|
1769
1769
|
if (n = Dn.exec(e), n === null && (n = Vn.exec(e)), n === null)
|
|
1770
1770
|
throw new Error("Date resolve error");
|
|
@@ -1782,8 +1782,8 @@ function Ta(e) {
|
|
|
1782
1782
|
}
|
|
1783
1783
|
var Rn = new pe("tag:yaml.org,2002:timestamp", {
|
|
1784
1784
|
kind: "scalar",
|
|
1785
|
-
resolve:
|
|
1786
|
-
construct:
|
|
1785
|
+
resolve: xa,
|
|
1786
|
+
construct: Sa,
|
|
1787
1787
|
instanceOf: Date,
|
|
1788
1788
|
represent: Ta
|
|
1789
1789
|
});
|
|
@@ -2115,7 +2115,7 @@ function ti(e, n) {
|
|
|
2115
2115
|
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2116
2116
|
}
|
|
2117
2117
|
function ni(e, n) {
|
|
2118
|
-
var t = !0, r, o, i, a = e.tag, s, l = e.anchor, u, p, c, y, f, _ = /* @__PURE__ */ Object.create(null), h,
|
|
2118
|
+
var t = !0, r, o, i, a = e.tag, s, l = e.anchor, u, p, c, y, f, _ = /* @__PURE__ */ Object.create(null), h, x, b, w;
|
|
2119
2119
|
if (w = e.input.charCodeAt(e.position), w === 91)
|
|
2120
2120
|
p = 93, f = !1, s = [];
|
|
2121
2121
|
else if (w === 123)
|
|
@@ -2125,7 +2125,7 @@ function ni(e, n) {
|
|
|
2125
2125
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), w = e.input.charCodeAt(++e.position); w !== 0; ) {
|
|
2126
2126
|
if (le(e, !0, n), w = e.input.charCodeAt(e.position), w === p)
|
|
2127
2127
|
return e.position++, e.tag = a, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
2128
|
-
t ? w === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"),
|
|
2128
|
+
t ? w === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), x = h = b = null, c = y = !1, w === 63 && (u = e.input.charCodeAt(e.position + 1), be(u) && (c = y = !0, e.position++, le(e, !0, n))), r = e.line, o = e.lineStart, i = e.position, Ge(e, n, ot, !1, !0), x = e.tag, h = e.result, le(e, !0, n), w = e.input.charCodeAt(e.position), (y || e.line === r) && w === 58 && (c = !0, w = e.input.charCodeAt(++e.position), le(e, !0, n), Ge(e, n, ot, !1, !0), b = e.result), f ? Re(e, s, _, x, h, b, r, o, i) : c ? s.push(Re(e, null, _, x, h, b, r, o, i)) : s.push(h), le(e, !0, n), w = e.input.charCodeAt(e.position), w === 44 ? (t = !0, w = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2129
2129
|
}
|
|
2130
2130
|
M(e, "unexpected end of the stream within a flow collection");
|
|
2131
2131
|
}
|
|
@@ -2193,12 +2193,12 @@ function nn(e, n) {
|
|
|
2193
2193
|
return s ? (e.tag = r, e.anchor = o, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2194
2194
|
}
|
|
2195
2195
|
function oi(e, n, t) {
|
|
2196
|
-
var r, o, i, a, s, l, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null, _ = null, h = null,
|
|
2196
|
+
var r, o, i, a, s, l, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null, _ = null, h = null, x = !1, b = !1, w;
|
|
2197
2197
|
if (e.firstTabInLine !== -1)
|
|
2198
2198
|
return !1;
|
|
2199
2199
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), w = e.input.charCodeAt(e.position); w !== 0; ) {
|
|
2200
|
-
if (!
|
|
2201
|
-
w === 63 ? (
|
|
2200
|
+
if (!x && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (w === 63 || w === 58) && be(r))
|
|
2201
|
+
w === 63 ? (x && (Re(e, c, y, f, _, null, a, s, l), f = _ = h = null), b = !0, x = !0, o = !0) : x ? (x = !1, o = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, w = r;
|
|
2202
2202
|
else {
|
|
2203
2203
|
if (a = e.line, s = e.lineStart, l = e.position, !Ge(e, t, Wn, !1, !0))
|
|
2204
2204
|
break;
|
|
@@ -2206,7 +2206,7 @@ function oi(e, n, t) {
|
|
|
2206
2206
|
for (w = e.input.charCodeAt(e.position); qe(w); )
|
|
2207
2207
|
w = e.input.charCodeAt(++e.position);
|
|
2208
2208
|
if (w === 58)
|
|
2209
|
-
w = e.input.charCodeAt(++e.position), be(w) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"),
|
|
2209
|
+
w = e.input.charCodeAt(++e.position), be(w) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), x && (Re(e, c, y, f, _, null, a, s, l), f = _ = h = null), b = !0, x = !1, o = !1, f = e.tag, _ = e.result;
|
|
2210
2210
|
else if (b)
|
|
2211
2211
|
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2212
2212
|
else
|
|
@@ -2216,12 +2216,12 @@ function oi(e, n, t) {
|
|
|
2216
2216
|
else
|
|
2217
2217
|
return e.tag = u, e.anchor = p, !0;
|
|
2218
2218
|
}
|
|
2219
|
-
if ((e.line === i || e.lineIndent > n) && (
|
|
2219
|
+
if ((e.line === i || e.lineIndent > n) && (x && (a = e.line, s = e.lineStart, l = e.position), Ge(e, n, at, !0, o) && (x ? _ = e.result : h = e.result), x || (Re(e, c, y, f, _, h, a, s, l), f = _ = h = null), le(e, !0, -1), w = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > n) && w !== 0)
|
|
2220
2220
|
M(e, "bad indentation of a mapping entry");
|
|
2221
2221
|
else if (e.lineIndent < n)
|
|
2222
2222
|
break;
|
|
2223
2223
|
}
|
|
2224
|
-
return
|
|
2224
|
+
return x && Re(e, c, y, f, _, null, a, s, l), b && (e.tag = u, e.anchor = p, e.kind = "mapping", e.result = c), b;
|
|
2225
2225
|
}
|
|
2226
2226
|
function ai(e) {
|
|
2227
2227
|
var n, t = !1, r = !1, o, i, a;
|
|
@@ -2262,11 +2262,11 @@ function si(e) {
|
|
|
2262
2262
|
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), Fe.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], le(e, !0, -1), !0;
|
|
2263
2263
|
}
|
|
2264
2264
|
function Ge(e, n, t, r, o) {
|
|
2265
|
-
var i, a, s, l = 1, u = !1, p = !1, c, y, f, _, h,
|
|
2265
|
+
var i, a, s, l = 1, u = !1, p = !1, c, y, f, _, h, x;
|
|
2266
2266
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = a = s = at === t || Zn === t, r && le(e, !0, -1) && (u = !0, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)), l === 1)
|
|
2267
2267
|
for (; ai(e) || ii(e); )
|
|
2268
2268
|
le(e, !0, -1) ? (u = !0, s = i, e.lineIndent > n ? l = 1 : e.lineIndent === n ? l = 0 : e.lineIndent < n && (l = -1)) : s = !1;
|
|
2269
|
-
if (s && (s = u || o), (l === 1 || at === t) && (ot === t || Wn === t ? h = n : h = n + 1,
|
|
2269
|
+
if (s && (s = u || o), (l === 1 || at === t) && (ot === t || Wn === t ? h = n : h = n + 1, x = e.position - e.lineStart, l === 1 ? s && (nn(e, x) || oi(e, x, h)) || ni(e, h) ? p = !0 : (a && ri(e, h) || ei(e, h) || ti(e, h) ? p = !0 : si(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : Xa(e, h, ot === t) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (p = s && nn(e, x))), e.tag === null)
|
|
2270
2270
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2271
2271
|
else if (e.tag === "?") {
|
|
2272
2272
|
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, y = e.implicitTypes.length; c < y; c += 1)
|
|
@@ -2347,7 +2347,7 @@ function ci(e, n) {
|
|
|
2347
2347
|
var di = ui, pi = ci, or = {
|
|
2348
2348
|
loadAll: di,
|
|
2349
2349
|
load: pi
|
|
2350
|
-
}, ar = Object.prototype.toString, ir = Object.prototype.hasOwnProperty, Et = 65279, fi = 9, Ze = 10, mi = 13, gi = 32, yi = 33, hi = 34, Ct = 35, vi = 37, bi = 38, Ci = 39, ki = 42, sr = 44, wi = 45, st = 58, _i = 61, Ii = 62, Ai = 63,
|
|
2350
|
+
}, ar = Object.prototype.toString, ir = Object.prototype.hasOwnProperty, Et = 65279, fi = 9, Ze = 10, mi = 13, gi = 32, yi = 33, hi = 34, Ct = 35, vi = 37, bi = 38, Ci = 39, ki = 42, sr = 44, wi = 45, st = 58, _i = 61, Ii = 62, Ai = 63, xi = 64, lr = 91, ur = 93, Si = 96, cr = 123, Ti = 124, dr = 125, ge = {};
|
|
2351
2351
|
ge[0] = "\\0";
|
|
2352
2352
|
ge[7] = "\\a";
|
|
2353
2353
|
ge[8] = "\\b";
|
|
@@ -2443,7 +2443,7 @@ function an(e, n, t) {
|
|
|
2443
2443
|
);
|
|
2444
2444
|
}
|
|
2445
2445
|
function Ni(e) {
|
|
2446
|
-
return Xe(e) && e !== Et && !lt(e) && e !== wi && e !== Ai && e !== st && e !== sr && e !== lr && e !== ur && e !== cr && e !== dr && e !== Ct && e !== bi && e !== ki && e !== yi && e !== Ti && e !== _i && e !== Ii && e !== Ci && e !== hi && e !== vi && e !==
|
|
2446
|
+
return Xe(e) && e !== Et && !lt(e) && e !== wi && e !== Ai && e !== st && e !== sr && e !== lr && e !== ur && e !== cr && e !== dr && e !== Ct && e !== bi && e !== ki && e !== yi && e !== Ti && e !== _i && e !== Ii && e !== Ci && e !== hi && e !== vi && e !== xi && e !== Si;
|
|
2447
2447
|
}
|
|
2448
2448
|
function qi(e) {
|
|
2449
2449
|
return !lt(e) && e !== st;
|
|
@@ -2914,10 +2914,10 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
2914
2914
|
_: 1
|
|
2915
2915
|
}, 8, ["aria-hidden", "style"]));
|
|
2916
2916
|
}
|
|
2917
|
-
}), ws = /* @__PURE__ */ ys(ks, [["__scopeId", "data-v-40a7f387"]]), _s = { "data-testid": "config-card-title" }, Is = { class: "config-card-actions" }, As = ["href"],
|
|
2917
|
+
}), ws = /* @__PURE__ */ ys(ks, [["__scopeId", "data-v-40a7f387"]]), _s = { "data-testid": "config-card-title" }, Is = { class: "config-card-actions" }, As = ["href"], xs = {
|
|
2918
2918
|
key: 2,
|
|
2919
2919
|
class: "config-card-details-section"
|
|
2920
|
-
},
|
|
2920
|
+
}, Ss = {
|
|
2921
2921
|
key: 3,
|
|
2922
2922
|
class: "config-card-details-section"
|
|
2923
2923
|
}, Ts = ["data-testid"], $s = {
|
|
@@ -3050,7 +3050,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3050
3050
|
// the last property displayed
|
|
3051
3051
|
section: ke.Basic
|
|
3052
3052
|
}
|
|
3053
|
-
}, _ = F(!1), h = F(!1),
|
|
3053
|
+
}, _ = F(!1), h = F(!1), x = F(""), b = F({}), w = A(() => {
|
|
3054
3054
|
var C, R, N;
|
|
3055
3055
|
if (!b.value)
|
|
3056
3056
|
return [];
|
|
@@ -3107,7 +3107,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3107
3107
|
advanced: (R = w.value) == null ? void 0 : R.filter((T) => T.section === ke.Advanced),
|
|
3108
3108
|
plugin: (I = L.value) == null ? void 0 : I.concat((N = w.value) == null ? void 0 : N.filter((T) => T.section === ke.Plugin))
|
|
3109
3109
|
};
|
|
3110
|
-
}),
|
|
3110
|
+
}), S = A(() => {
|
|
3111
3111
|
const C = [];
|
|
3112
3112
|
return v.value.basic.length && C.push("basic"), v.value.advanced.length && C.push("advanced"), v.value.plugin.length && C.push("plugin"), C;
|
|
3113
3113
|
}), V = (C) => !!(C.tooltip || i[`${C.key}-label-tooltip`]), re = A(() => {
|
|
@@ -3135,7 +3135,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3135
3135
|
}), r("fetch:success", C);
|
|
3136
3136
|
} catch (C) {
|
|
3137
3137
|
const R = s(C);
|
|
3138
|
-
|
|
3138
|
+
x.value = R.startsWith("code") ? a("baseConfigCard.errors.load") : R, h.value = !0, r("fetch:error", C);
|
|
3139
3139
|
} finally {
|
|
3140
3140
|
_.value = !1;
|
|
3141
3141
|
}
|
|
@@ -3208,16 +3208,16 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3208
3208
|
"is-error": ""
|
|
3209
3209
|
}, {
|
|
3210
3210
|
message: g(() => [
|
|
3211
|
-
D("h3", null, K(
|
|
3211
|
+
D("h3", null, K(x.value), 1)
|
|
3212
3212
|
]),
|
|
3213
3213
|
_: 1
|
|
3214
3214
|
})) : z("", !0),
|
|
3215
|
-
e.config.jsonYamlEnabled ? (d(), j("div",
|
|
3215
|
+
e.config.jsonYamlEnabled ? (d(), j("div", xs, [
|
|
3216
3216
|
E(gs, {
|
|
3217
3217
|
config: e.config,
|
|
3218
3218
|
"fetcher-url": re.value,
|
|
3219
3219
|
format: c.value,
|
|
3220
|
-
"prop-list-types":
|
|
3220
|
+
"prop-list-types": S.value,
|
|
3221
3221
|
"property-collections": v.value,
|
|
3222
3222
|
record: b.value
|
|
3223
3223
|
}, je({ _: 2 }, [
|
|
@@ -3231,8 +3231,8 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3231
3231
|
])
|
|
3232
3232
|
}))
|
|
3233
3233
|
]), 1032, ["config", "fetcher-url", "format", "prop-list-types", "property-collections", "record"])
|
|
3234
|
-
])) : (d(), j("div",
|
|
3235
|
-
(d(!0), j(Ce, null, ve(
|
|
3234
|
+
])) : (d(), j("div", Ss, [
|
|
3235
|
+
(d(!0), j(Ce, null, ve(S.value, (te) => (d(), j("div", {
|
|
3236
3236
|
key: `config-card-details-${te}-props`,
|
|
3237
3237
|
class: Ee(`config-card-details-${te}-props`),
|
|
3238
3238
|
"data-testid": `config-card-details-${te}-props`
|
|
@@ -3341,12 +3341,12 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3341
3341
|
const r = n, o = e, i = It(), { i18n: { t: a } } = ce.useI18n(), { getMessageFromError: s } = ce.useErrors(), { axiosInstance: l } = ce.useAxios({
|
|
3342
3342
|
headers: (t = o.config) == null ? void 0 : t.requestHeaders
|
|
3343
3343
|
}), u = F(!1), p = F(!1), c = F(""), y = A(() => o.canSubmit === !1 || o.isReadonly), f = F(!1), _ = A(() => {
|
|
3344
|
-
var v,
|
|
3344
|
+
var v, S;
|
|
3345
3345
|
let V = `${o.config.apiBaseUrl}${o.fetchUrl}`;
|
|
3346
|
-
return o.config.app === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((v = o.config) == null ? void 0 : v.controlPlaneId) || "") : o.config.app === "kongManager" && (V = V.replace(/\/{workspace}/gi, (
|
|
3346
|
+
return o.config.app === "konnect" ? V = V.replace(/{controlPlaneId}/gi, ((v = o.config) == null ? void 0 : v.controlPlaneId) || "") : o.config.app === "kongManager" && (V = V.replace(/\/{workspace}/gi, (S = o.config) != null && S.workspace ? `/${o.config.workspace}` : "")), o.editId ? (V = V.replace(/{id}/gi, o.editId), V) : (V = V.replace(/\/{id}/gi, ""), V);
|
|
3347
3347
|
}), h = () => {
|
|
3348
3348
|
f.value = !f.value;
|
|
3349
|
-
},
|
|
3349
|
+
}, x = () => {
|
|
3350
3350
|
o.config.cancelRoute ? i.push(o.config.cancelRoute) : b();
|
|
3351
3351
|
}, b = () => {
|
|
3352
3352
|
r("cancel");
|
|
@@ -3371,12 +3371,12 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3371
3371
|
const { data: v } = await l.get(_.value);
|
|
3372
3372
|
r("fetch:success", v);
|
|
3373
3373
|
} catch (v) {
|
|
3374
|
-
const
|
|
3375
|
-
c.value =
|
|
3374
|
+
const S = s(v);
|
|
3375
|
+
c.value = S.startsWith("code") ? a("baseForm.errors.edit") : S, p.value = !0, r("fetch:error", v);
|
|
3376
3376
|
} finally {
|
|
3377
3377
|
u.value = !1;
|
|
3378
3378
|
}
|
|
3379
|
-
}), (v,
|
|
3379
|
+
}), (v, S) => {
|
|
3380
3380
|
const V = q("KSkeleton"), re = q("KEmptyState"), G = q("KAlert"), C = q("KButton"), R = q("KTabs"), N = q("KSlideout"), I = q("KCard");
|
|
3381
3381
|
return d(), P(I, { class: "kong-ui-entity-base-form" }, {
|
|
3382
3382
|
default: g(() => [
|
|
@@ -3387,7 +3387,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3387
3387
|
key: 1,
|
|
3388
3388
|
"cta-text": m(a)("baseForm.actions.back"),
|
|
3389
3389
|
"data-testid": "form-fetch-error",
|
|
3390
|
-
"handle-click":
|
|
3390
|
+
"handle-click": x,
|
|
3391
3391
|
"is-error": !0
|
|
3392
3392
|
}, {
|
|
3393
3393
|
message: g(() => [
|
|
@@ -3413,7 +3413,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3413
3413
|
E(C, {
|
|
3414
3414
|
appearance: "tertiary",
|
|
3415
3415
|
"data-testid": "form-view-configuration",
|
|
3416
|
-
onClick:
|
|
3416
|
+
onClick: S[0] || (S[0] = (T) => h())
|
|
3417
3417
|
}, {
|
|
3418
3418
|
default: g(() => [
|
|
3419
3419
|
Z(K(m(a)("baseForm.actions.viewConfiguration")), 1)
|
|
@@ -3453,7 +3453,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3453
3453
|
"is-visible": f.value,
|
|
3454
3454
|
"prevent-close-on-blur": "",
|
|
3455
3455
|
title: m(a)("baseForm.configuration.title"),
|
|
3456
|
-
onClose:
|
|
3456
|
+
onClose: S[1] || (S[1] = (T) => h())
|
|
3457
3457
|
}, {
|
|
3458
3458
|
default: g(() => [
|
|
3459
3459
|
D("div", null, K(m(a)("baseForm.configuration.message")), 1),
|
|
@@ -3507,27 +3507,27 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3507
3507
|
var h;
|
|
3508
3508
|
return ((h = t.value) == null ? void 0 : h.querySelector('[data-testid="first-col"]')) || null;
|
|
3509
3509
|
}), o = A(() => {
|
|
3510
|
-
var h,
|
|
3510
|
+
var h, x;
|
|
3511
3511
|
const b = (h = n.rowEl) == null ? void 0 : h.querySelectorAll("td");
|
|
3512
|
-
return b ? ((
|
|
3512
|
+
return b ? ((x = b[0]) == null ? void 0 : x.getAttribute("data-testid")) === n.keyName : !1;
|
|
3513
3513
|
});
|
|
3514
3514
|
let i;
|
|
3515
3515
|
const a = () => {
|
|
3516
3516
|
i && (i.disconnect(), i = void 0);
|
|
3517
3517
|
}, s = () => {
|
|
3518
|
-
var h,
|
|
3519
|
-
u.value = ((h = r.value) == null ? void 0 : h.getBoundingClientRect().width) || 0, p.value = ((
|
|
3518
|
+
var h, x, b;
|
|
3519
|
+
u.value = ((h = r.value) == null ? void 0 : h.getBoundingClientRect().width) || 0, p.value = ((x = t.value) == null ? void 0 : x.clientWidth) || 0, c.value = ((b = l.value) == null ? void 0 : b.innerText) || "";
|
|
3520
3520
|
}, l = F({}), u = F(0), p = F(0), c = F(""), y = A(() => [r.value, t.value]), f = Te(
|
|
3521
3521
|
y,
|
|
3522
3522
|
(h) => {
|
|
3523
3523
|
if (o.value && (a(), "ResizeObserver" in window && window)) {
|
|
3524
|
-
i = new ResizeObserver((
|
|
3524
|
+
i = new ResizeObserver((x) => {
|
|
3525
3525
|
window.requestAnimationFrame(() => {
|
|
3526
|
-
!Array.isArray(
|
|
3526
|
+
!Array.isArray(x) || !x.length || s();
|
|
3527
3527
|
});
|
|
3528
3528
|
});
|
|
3529
|
-
for (const
|
|
3530
|
-
|
|
3529
|
+
for (const x of h)
|
|
3530
|
+
x && i.observe(x);
|
|
3531
3531
|
}
|
|
3532
3532
|
},
|
|
3533
3533
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
@@ -3536,7 +3536,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3536
3536
|
s();
|
|
3537
3537
|
}), Ir(() => {
|
|
3538
3538
|
f();
|
|
3539
|
-
}), (h,
|
|
3539
|
+
}), (h, x) => {
|
|
3540
3540
|
const b = q("KTooltip");
|
|
3541
3541
|
return d(), j("span", {
|
|
3542
3542
|
ref_key: "contentRef",
|
|
@@ -3545,20 +3545,20 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3545
3545
|
}, [
|
|
3546
3546
|
o.value ? (d(), j("span", Ns, [
|
|
3547
3547
|
E(b, {
|
|
3548
|
-
label: _.value ? c.value : "",
|
|
3549
3548
|
"max-width": "300",
|
|
3550
|
-
placement: "bottomStart"
|
|
3549
|
+
placement: "bottomStart",
|
|
3550
|
+
text: _.value ? c.value : ""
|
|
3551
3551
|
}, {
|
|
3552
3552
|
default: g(() => [
|
|
3553
3553
|
X(h.$slots, "default", {}, void 0, !0)
|
|
3554
3554
|
]),
|
|
3555
3555
|
_: 3
|
|
3556
|
-
}, 8, ["
|
|
3556
|
+
}, 8, ["text"])
|
|
3557
3557
|
])) : X(h.$slots, "default", { key: 1 }, void 0, !0)
|
|
3558
3558
|
], 512);
|
|
3559
3559
|
};
|
|
3560
3560
|
}
|
|
3561
|
-
}), Bs = /* @__PURE__ */ we(qs, [["__scopeId", "data-v-
|
|
3561
|
+
}), Bs = /* @__PURE__ */ we(qs, [["__scopeId", "data-v-c4379fd4"]]), Ls = { class: "toolbar-container" }, Us = {
|
|
3562
3562
|
key: 0,
|
|
3563
3563
|
class: "toolbar-button-container"
|
|
3564
3564
|
}, Ps = ["data-testid"], Ds = /* @__PURE__ */ ae({
|
|
@@ -3672,42 +3672,42 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3672
3672
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3673
3673
|
setup(e, { emit: n }) {
|
|
3674
3674
|
const t = e, r = n, { i18n: { t: o } } = ce.useI18n(), i = A(() => {
|
|
3675
|
-
var
|
|
3675
|
+
var S, V;
|
|
3676
3676
|
return typeof t.errorMessage == "string" ? {
|
|
3677
3677
|
hasError: !!t.errorMessage,
|
|
3678
3678
|
title: t.errorMessage,
|
|
3679
3679
|
message: void 0
|
|
3680
3680
|
} : {
|
|
3681
3681
|
hasError: !!t.errorMessage,
|
|
3682
|
-
title: (
|
|
3682
|
+
title: (S = t.errorMessage) == null ? void 0 : S.title,
|
|
3683
3683
|
message: (V = t.errorMessage) == null ? void 0 : V.message
|
|
3684
3684
|
};
|
|
3685
|
-
}), a = A(() => t.cacheIdentifier || t.preferencesStorageKey), s = (
|
|
3686
|
-
const
|
|
3685
|
+
}), a = A(() => t.cacheIdentifier || t.preferencesStorageKey), s = (S) => S.hasData || !!t.query, l = A(() => {
|
|
3686
|
+
const S = [];
|
|
3687
3687
|
return Object.keys(t.tableHeaders).forEach((V) => {
|
|
3688
3688
|
const re = t.tableHeaders[V];
|
|
3689
|
-
|
|
3689
|
+
S.push({
|
|
3690
3690
|
label: re.label ?? V,
|
|
3691
3691
|
key: V,
|
|
3692
3692
|
sortable: re.sortable ?? !1
|
|
3693
3693
|
});
|
|
3694
|
-
}), t.enableEntityActions &&
|
|
3694
|
+
}), t.enableEntityActions && S.push({
|
|
3695
3695
|
key: "actions",
|
|
3696
3696
|
hideLabel: !0
|
|
3697
|
-
}),
|
|
3698
|
-
}), u = (
|
|
3699
|
-
"data-rowid":
|
|
3700
|
-
"data-testid":
|
|
3701
|
-
...t.rowAttributes(
|
|
3702
|
-
}), p = F({}), c = (
|
|
3697
|
+
}), S;
|
|
3698
|
+
}), u = (S) => ({
|
|
3699
|
+
"data-rowid": S.id,
|
|
3700
|
+
"data-testid": S.name,
|
|
3701
|
+
...t.rowAttributes(S)
|
|
3702
|
+
}), p = F({}), c = (S) => {
|
|
3703
3703
|
var V;
|
|
3704
|
-
return (V = p.value) == null ? void 0 : V.$el.querySelector(`[data-rowid="${
|
|
3705
|
-
}, y = (
|
|
3704
|
+
return (V = p.value) == null ? void 0 : V.$el.querySelector(`[data-rowid="${S.id}"]`);
|
|
3705
|
+
}, y = (S) => {
|
|
3706
3706
|
const V = {
|
|
3707
|
-
"data-testid":
|
|
3708
|
-
...t.cellAttributes(
|
|
3707
|
+
"data-testid": S.headerKey,
|
|
3708
|
+
...t.cellAttributes(S)
|
|
3709
3709
|
};
|
|
3710
|
-
return
|
|
3710
|
+
return S.colIndex === 0 && (V.style = {
|
|
3711
3711
|
maxWidth: "250px",
|
|
3712
3712
|
overflowX: "hidden",
|
|
3713
3713
|
textOverflow: "ellipsis"
|
|
@@ -3716,20 +3716,20 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3716
3716
|
r("empty-state-cta-clicked"), _();
|
|
3717
3717
|
}, _ = () => {
|
|
3718
3718
|
r("clear-search-input");
|
|
3719
|
-
}, h = A(() => t.disableRowClick ? void 0 : (
|
|
3719
|
+
}, h = A(() => t.disableRowClick ? void 0 : (S, V) => {
|
|
3720
3720
|
r("click:row", V);
|
|
3721
|
-
}),
|
|
3722
|
-
r("sort",
|
|
3721
|
+
}), x = (S) => {
|
|
3722
|
+
r("sort", S);
|
|
3723
3723
|
}, { setTablePreferences: b, getTablePreferences: w } = Er(), L = A(() => {
|
|
3724
|
-
const
|
|
3724
|
+
const S = w(t.preferencesStorageKey);
|
|
3725
3725
|
return {
|
|
3726
3726
|
...t.initialFetcherParams,
|
|
3727
|
-
...
|
|
3727
|
+
...S
|
|
3728
3728
|
};
|
|
3729
|
-
}), v = (
|
|
3730
|
-
t.preferencesStorageKey && b(t.preferencesStorageKey,
|
|
3729
|
+
}), v = (S) => {
|
|
3730
|
+
t.preferencesStorageKey && b(t.preferencesStorageKey, S);
|
|
3731
3731
|
};
|
|
3732
|
-
return (
|
|
3732
|
+
return (S, V) => {
|
|
3733
3733
|
const re = q("KIcon"), G = q("KButton"), C = q("KDropdown"), R = q("KTable"), N = q("KCard");
|
|
3734
3734
|
return d(), P(N, {
|
|
3735
3735
|
class: "kong-ui-entity-base-table",
|
|
@@ -3765,14 +3765,14 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3765
3765
|
"search-input": e.query,
|
|
3766
3766
|
onKtableEmptyStateCtaClicked: f,
|
|
3767
3767
|
"onRow:click": h.value,
|
|
3768
|
-
onSort: V[0] || (V[0] = (I) =>
|
|
3768
|
+
onSort: V[0] || (V[0] = (I) => x(I)),
|
|
3769
3769
|
"onUpdate:tablePreferences": v
|
|
3770
3770
|
}, je({
|
|
3771
3771
|
toolbar: g(({ state: I }) => [
|
|
3772
3772
|
Je(D("div", Ls, [
|
|
3773
|
-
X(
|
|
3774
|
-
|
|
3775
|
-
X(
|
|
3773
|
+
X(S.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3774
|
+
S.$slots["toolbar-button"] ? (d(), j("div", Us, [
|
|
3775
|
+
X(S.$slots, "toolbar-button", {}, void 0, !0)
|
|
3776
3776
|
])) : z("", !0)
|
|
3777
3777
|
], 512), [
|
|
3778
3778
|
[Ye, s(I)]
|
|
@@ -3788,7 +3788,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3788
3788
|
width: e.dropdownMenuWidth
|
|
3789
3789
|
}, {
|
|
3790
3790
|
items: g(() => [
|
|
3791
|
-
X(
|
|
3791
|
+
X(S.$slots, "actions", {
|
|
3792
3792
|
row: I,
|
|
3793
3793
|
rowKey: T,
|
|
3794
3794
|
rowValue: O
|
|
@@ -3802,7 +3802,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3802
3802
|
}, {
|
|
3803
3803
|
icon: g(() => [
|
|
3804
3804
|
E(re, {
|
|
3805
|
-
color: m(
|
|
3805
|
+
color: m(So),
|
|
3806
3806
|
icon: "more",
|
|
3807
3807
|
size: "16"
|
|
3808
3808
|
}, null, 8, ["color"])
|
|
@@ -3824,7 +3824,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
3824
3824
|
"row-el": c(O)
|
|
3825
3825
|
}, {
|
|
3826
3826
|
default: g(() => [
|
|
3827
|
-
X(
|
|
3827
|
+
X(S.$slots, T, {
|
|
3828
3828
|
row: O,
|
|
3829
3829
|
rowKey: B,
|
|
3830
3830
|
rowValue: W
|
|
@@ -4038,15 +4038,15 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4038
4038
|
a.value = {
|
|
4039
4039
|
...a.value,
|
|
4040
4040
|
[b]: ""
|
|
4041
|
-
},
|
|
4041
|
+
}, x();
|
|
4042
4042
|
}, h = () => {
|
|
4043
|
-
a.value = {},
|
|
4044
|
-
},
|
|
4043
|
+
a.value = {}, x(!0);
|
|
4044
|
+
}, x = (b = !1) => {
|
|
4045
4045
|
const w = Object.keys(a.value).reduce((L, v) => (a.value[v] && (L[v] = `${a.value[v]}`), L), {});
|
|
4046
4046
|
b && (i.value = !1), o("update:modelValue", new URLSearchParams(w).toString());
|
|
4047
4047
|
};
|
|
4048
4048
|
return (b, w) => {
|
|
4049
|
-
const L = q("KInput"), v = q("KButton"),
|
|
4049
|
+
const L = q("KInput"), v = q("KButton"), S = q("KSelect"), V = q("KMenuItem"), re = q("KMenu");
|
|
4050
4050
|
return e.config.isExactMatch ? (d(), P(L, {
|
|
4051
4051
|
key: 0,
|
|
4052
4052
|
autocomplete: "off",
|
|
@@ -4102,7 +4102,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4102
4102
|
class: "menu-item-label",
|
|
4103
4103
|
for: c(G.value)
|
|
4104
4104
|
}, K(m(t)("filter.fieldLabel")), 9, rl),
|
|
4105
|
-
((N = (R = e.config.schema) == null ? void 0 : R[G.value]) == null ? void 0 : N.type) === "select" ? (d(), P(
|
|
4105
|
+
((N = (R = e.config.schema) == null ? void 0 : R[G.value]) == null ? void 0 : N.type) === "select" ? (d(), P(S, {
|
|
4106
4106
|
key: 0,
|
|
4107
4107
|
id: c(G.value),
|
|
4108
4108
|
modelValue: a.value[G.value],
|
|
@@ -4124,7 +4124,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4124
4124
|
appearance: "tertiary",
|
|
4125
4125
|
"data-testid": "apply-filter",
|
|
4126
4126
|
size: "small",
|
|
4127
|
-
onClick: w[0] || (w[0] = (I) =>
|
|
4127
|
+
onClick: w[0] || (w[0] = (I) => x(!0))
|
|
4128
4128
|
}, {
|
|
4129
4129
|
default: g(() => [
|
|
4130
4130
|
Z(K(m(t)("filter.applyButtonText")), 1)
|
|
@@ -4296,7 +4296,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4296
4296
|
fetchedItemsKey: "data",
|
|
4297
4297
|
searchKeys: ["name", "id"]
|
|
4298
4298
|
}
|
|
4299
|
-
), f = A(() => p.value ? t("consumer_groups.errors.general") : ""), _ = F(0), h = A(() => u.value === void 0),
|
|
4299
|
+
), f = A(() => p.value ? t("consumer_groups.errors.general") : ""), _ = F(0), h = A(() => u.value === void 0), x = A(() => y.value.map((I) => ({
|
|
4300
4300
|
label: I.name,
|
|
4301
4301
|
value: I.id,
|
|
4302
4302
|
selected: a.value.includes(I.id),
|
|
@@ -4307,13 +4307,13 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4307
4307
|
const T = h.value ? y.value.find((B) => B.id === I) : (O = u.value) == null ? void 0 : O.find((B) => B.id === I);
|
|
4308
4308
|
return T ? T.name : I;
|
|
4309
4309
|
}, w = () => {
|
|
4310
|
-
|
|
4311
|
-
}, L = F([]), v = F(!1),
|
|
4310
|
+
S.value = "", L.value = [], C.value = [], o("cancel");
|
|
4311
|
+
}, L = F([]), v = F(!1), S = F(""), V = async () => {
|
|
4312
4312
|
if (!a.value.length) {
|
|
4313
|
-
|
|
4313
|
+
S.value = "", C.value = [], o("cancel");
|
|
4314
4314
|
return;
|
|
4315
4315
|
}
|
|
4316
|
-
v.value = !0,
|
|
4316
|
+
v.value = !0, S.value = "", L.value = [], C.value = [];
|
|
4317
4317
|
try {
|
|
4318
4318
|
const I = a.value.map((B) => G(B)), T = await Promise.allSettled(I);
|
|
4319
4319
|
let O = !0;
|
|
@@ -4321,7 +4321,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4321
4321
|
B.status !== "fulfilled" && (O = !1);
|
|
4322
4322
|
}), O ? (L.value = [], C.value = [], o("add:success", a.value), a.value = []) : (L.value.length && o("add:partial-success", L.value), a.value = [], R(T));
|
|
4323
4323
|
} catch {
|
|
4324
|
-
|
|
4324
|
+
S.value = t("consumer_groups.errors.add"), o("error", S.value);
|
|
4325
4325
|
} finally {
|
|
4326
4326
|
v.value = !1;
|
|
4327
4327
|
}
|
|
@@ -4346,7 +4346,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4346
4346
|
return (O = T.reason) == null ? void 0 : O.message;
|
|
4347
4347
|
}).filter(Boolean);
|
|
4348
4348
|
};
|
|
4349
|
-
return Te(
|
|
4349
|
+
return Te(x, () => {
|
|
4350
4350
|
_.value++;
|
|
4351
4351
|
}, { immediate: !0, deep: !0 }), Te(() => r.visible, () => {
|
|
4352
4352
|
r.visible && c();
|
|
@@ -4370,7 +4370,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4370
4370
|
autosuggest: "",
|
|
4371
4371
|
"data-testid": "add-to-groups-multiselect",
|
|
4372
4372
|
"dropdown-footer-text": h.value ? m(t)("consumer_groups.consumers.add.footer") : void 0,
|
|
4373
|
-
items:
|
|
4373
|
+
items: x.value,
|
|
4374
4374
|
label: m(t)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4375
4375
|
loading: m(l),
|
|
4376
4376
|
placeholder: m(t)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
@@ -4379,14 +4379,14 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4379
4379
|
width: "100%",
|
|
4380
4380
|
onQueryChange: m(s)
|
|
4381
4381
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4382
|
-
|
|
4382
|
+
S.value || f.value || C.value.length ? (d(), j("div", bl, [
|
|
4383
4383
|
E(B, { appearance: "danger" }, {
|
|
4384
4384
|
alertMessage: g(() => [
|
|
4385
4385
|
D("p", null, K(m(t)("consumer_groups.errors.add")), 1),
|
|
4386
4386
|
C.value.length ? (d(), j("ul", Cl, [
|
|
4387
4387
|
(d(!0), j(Ce, null, ve(C.value, (ee, te) => (d(), j("li", { key: te }, K(ee), 1))), 128))
|
|
4388
4388
|
])) : z("", !0),
|
|
4389
|
-
D("div", null, K(
|
|
4389
|
+
D("div", null, K(S.value || f.value), 1)
|
|
4390
4390
|
]),
|
|
4391
4391
|
_: 1
|
|
4392
4392
|
})
|
|
@@ -4463,7 +4463,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4463
4463
|
var Y, se, he, Ie;
|
|
4464
4464
|
let $ = `${r.config.apiBaseUrl}${Me.list[r.config.app][u.value ? "forConsumer" : "all"]}`;
|
|
4465
4465
|
return r.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((Y = r.config) == null ? void 0 : Y.controlPlaneId) || "").replace(/{consumerId}/gi, ((se = r.config) == null ? void 0 : se.consumerId) || "") : r.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (he = r.config) != null && he.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((Ie = r.config) == null ? void 0 : Ie.consumerId) || "")), $;
|
|
4466
|
-
}),
|
|
4466
|
+
}), x = F(""), b = A(() => {
|
|
4467
4467
|
const $ = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4468
4468
|
return $ ? {
|
|
4469
4469
|
isExactMatch: $,
|
|
@@ -4479,8 +4479,8 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4479
4479
|
},
|
|
4480
4480
|
schema: r.config.filterSchema
|
|
4481
4481
|
};
|
|
4482
|
-
}), w = A(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: L, fetcherState: v } = yl(r.config, h.value, w.value),
|
|
4483
|
-
|
|
4482
|
+
}), w = A(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: L, fetcherState: v } = yl(r.config, h.value, w.value), S = () => {
|
|
4483
|
+
x.value = "";
|
|
4484
4484
|
}, V = () => {
|
|
4485
4485
|
l.value++;
|
|
4486
4486
|
}, re = F(null), G = ($, Y) => {
|
|
@@ -4598,11 +4598,11 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4598
4598
|
"fetcher-cache-key": l.value,
|
|
4599
4599
|
"pagination-type": "offset",
|
|
4600
4600
|
"preferences-storage-key": p.value,
|
|
4601
|
-
query:
|
|
4601
|
+
query: x.value,
|
|
4602
4602
|
"row-attributes": _,
|
|
4603
4603
|
"table-headers": m(f),
|
|
4604
4604
|
"use-action-outside": e.useActionOutside,
|
|
4605
|
-
onClearSearchInput:
|
|
4605
|
+
onClearSearchInput: S,
|
|
4606
4606
|
"onClick:row": Y[3] || (Y[3] = (Q) => R(Q)),
|
|
4607
4607
|
onEmptyStateCtaClicked: J,
|
|
4608
4608
|
onSort: V
|
|
@@ -4610,8 +4610,8 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4610
4610
|
"toolbar-filter": g(() => [
|
|
4611
4611
|
u.value ? z("", !0) : (d(), P(m(sl), {
|
|
4612
4612
|
key: 0,
|
|
4613
|
-
modelValue:
|
|
4614
|
-
"onUpdate:modelValue": Y[0] || (Y[0] = (Q) =>
|
|
4613
|
+
modelValue: x.value,
|
|
4614
|
+
"onUpdate:modelValue": Y[0] || (Y[0] = (Q) => x.value = Q),
|
|
4615
4615
|
config: b.value
|
|
4616
4616
|
}, null, 8, ["modelValue", "config"]))
|
|
4617
4617
|
]),
|
|
@@ -4797,7 +4797,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4797
4797
|
]);
|
|
4798
4798
|
};
|
|
4799
4799
|
}
|
|
4800
|
-
}), Vl = /* @__PURE__ */ Nt(Al, [["__scopeId", "data-v-3624929d"]]),
|
|
4800
|
+
}), Vl = /* @__PURE__ */ Nt(Al, [["__scopeId", "data-v-3624929d"]]), xl = { class: "kong-ui-entities-consumer-group-form" }, Sl = { class: "select-item-container" }, Tl = { class: "select-item-label" }, $l = {
|
|
4801
4801
|
key: 0,
|
|
4802
4802
|
class: "select-item-description"
|
|
4803
4803
|
}, jl = /* @__PURE__ */ ae({
|
|
@@ -4848,14 +4848,14 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4848
4848
|
selected: a.fields.consumers.includes(k.id),
|
|
4849
4849
|
data: k
|
|
4850
4850
|
// we need this to determine whether or not to show the description text
|
|
4851
|
-
}))),
|
|
4851
|
+
}))), x = A(() => {
|
|
4852
4852
|
var k, U;
|
|
4853
4853
|
return (U = Me.form[(k = t.config) == null ? void 0 : k.app]) == null ? void 0 : U.edit;
|
|
4854
4854
|
}), b = A(() => t.consumerGroupId ? nt.Edit : nt.Create), w = A(() => !!a.fields.name && !C.value), L = A(() => JSON.stringify(a.fields) !== JSON.stringify(s)), v = (k, U = "", ie = "") => {
|
|
4855
4855
|
var H, fe, _e, me, Ke, et;
|
|
4856
4856
|
let J = `${(H = t.config) == null ? void 0 : H.apiBaseUrl}${Me.form[(fe = t.config) == null ? void 0 : fe.app][k]}`;
|
|
4857
4857
|
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? J = J.replace(/{controlPlaneId}/gi, ((me = t.config) == null ? void 0 : me.controlPlaneId) || "") : ((Ke = t.config) == null ? void 0 : Ke.app) === "kongManager" && (J = J.replace(/\/{workspace}/gi, (et = t.config) != null && et.workspace ? `/${t.config.workspace}` : "")), J = J.replace(/{id}/gi, U || t.consumerGroupId), (k === "addConsumer" || k === "removeConsumer") && (J = J.replace(/{consumerId}/gi, ie)), J;
|
|
4858
|
-
},
|
|
4858
|
+
}, S = () => {
|
|
4859
4859
|
var k;
|
|
4860
4860
|
i.push(((k = t.config) == null ? void 0 : k.cancelRoute) || { name: "consumer-group-list" });
|
|
4861
4861
|
}, V = (k) => {
|
|
@@ -4946,16 +4946,16 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
4946
4946
|
await c();
|
|
4947
4947
|
}), (k, U) => {
|
|
4948
4948
|
const ie = q("KInput"), J = q("KMultiselect");
|
|
4949
|
-
return d(), j("div",
|
|
4949
|
+
return d(), j("div", xl, [
|
|
4950
4950
|
E(m(Ks), {
|
|
4951
4951
|
"can-submit": w.value && L.value,
|
|
4952
4952
|
config: e.config,
|
|
4953
4953
|
"edit-id": e.consumerGroupId,
|
|
4954
4954
|
"error-message": a.errorMessage || m(p) || C.value,
|
|
4955
|
-
"fetch-url":
|
|
4955
|
+
"fetch-url": x.value,
|
|
4956
4956
|
"form-fields": R.value,
|
|
4957
4957
|
"is-readonly": a.readonly,
|
|
4958
|
-
onCancel:
|
|
4958
|
+
onCancel: S,
|
|
4959
4959
|
"onFetch:error": U[3] || (U[3] = (H) => V(H)),
|
|
4960
4960
|
"onFetch:success": G,
|
|
4961
4961
|
onLoading: U[4] || (U[4] = (H) => re(H)),
|
|
@@ -5017,7 +5017,7 @@ const cs = { class: "yaml-config" }, yr = /* @__PURE__ */ ae({
|
|
|
5017
5017
|
"item-template": g(({ item: H }) => {
|
|
5018
5018
|
var fe, _e, me;
|
|
5019
5019
|
return [
|
|
5020
|
-
D("div",
|
|
5020
|
+
D("div", Sl, [
|
|
5021
5021
|
D("div", Tl, K(H.label), 1),
|
|
5022
5022
|
(fe = H == null ? void 0 : H.data) != null && fe.username && ((_e = H == null ? void 0 : H.data) != null && _e.custom_id) ? (d(), j("div", $l, K((me = H == null ? void 0 : H.data) == null ? void 0 : me.custom_id), 1)) : z("", !0)
|
|
5023
5023
|
])
|