@kong-ui-public/entities-consumer-groups 2.0.7-pr.891.513c4459.0 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as oe, ref as E, computed as T, watch as Ie, renderSlot as Z, createCommentVNode as H, unref as y, useSlots as lt, onBeforeMount as ut, resolveComponent as L, openBlock as m, createBlock as R, createSlots as
|
|
1
|
+
import { defineComponent as oe, ref as E, computed as T, watch as Ie, renderSlot as Z, createCommentVNode as H, unref as y, useSlots as lt, onBeforeMount as ut, resolveComponent as L, openBlock as m, createBlock as R, createSlots as Te, withCtx as v, createElementVNode as V, createTextVNode as Q, toDisplayString as O, createVNode as F, createElementBlock as $, renderList as he, Fragment as be, normalizeClass as Fe, withModifiers as nt, withDirectives as Xe, vShow as et, useCssVars as mr, resolveDynamicComponent as Ue, normalizeProps as gr, guardReactiveProps as yr, mergeProps as ht, onMounted as hr, onUnmounted as vr, normalizeStyle as pn, inject as br, pushScopeId as fn, popScopeId as mn, reactive as qt } from "vue";
|
|
2
2
|
import { useRouter as wt } from "vue-router";
|
|
3
3
|
import { createI18n as It, i18nTComponent as gn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Cr from "axios";
|
|
@@ -22,7 +22,7 @@ const _r = {
|
|
|
22
22
|
},
|
|
23
23
|
title: "Consumer Groups",
|
|
24
24
|
search: {
|
|
25
|
-
placeholder: "Filter by name"
|
|
25
|
+
placeholder: "Filter by exact name or ID"
|
|
26
26
|
},
|
|
27
27
|
actions: {
|
|
28
28
|
add_to_group: "Add to Consumer Group",
|
|
@@ -108,39 +108,39 @@ function Ir() {
|
|
|
108
108
|
}
|
|
109
109
|
const ct = {
|
|
110
110
|
useI18n: Ir
|
|
111
|
-
},
|
|
111
|
+
}, Ae = "/api/runtime_groups/{controlPlaneId}", xe = "/{workspace}", $e = {
|
|
112
112
|
list: {
|
|
113
113
|
konnect: {
|
|
114
|
-
all:
|
|
115
|
-
forConsumer: "/v2/control-planes/{controlPlaneId}/core-entities/consumers/{consumerId}/consumer_groups",
|
|
116
|
-
oneForConsumer: "/v2/control-planes/{controlPlaneId}/core-entities/consumers/{consumerId}/consumer_groups/{consumerGroupId}"
|
|
117
|
-
},
|
|
118
|
-
kongManager: {
|
|
119
|
-
all: `${Ae}/consumer_groups?counter=true`,
|
|
114
|
+
all: `${Ae}/consumer_groups`,
|
|
120
115
|
forConsumer: `${Ae}/consumers/{consumerId}/consumer_groups`,
|
|
121
116
|
oneForConsumer: `${Ae}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
117
|
+
},
|
|
118
|
+
kongManager: {
|
|
119
|
+
all: `${xe}/consumer_groups?counter=true`,
|
|
120
|
+
forConsumer: `${xe}/consumers/{consumerId}/consumer_groups`,
|
|
121
|
+
oneForConsumer: `${xe}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
form: {
|
|
125
125
|
konnect: {
|
|
126
|
-
consumersList: `${Be}/consumers`,
|
|
127
|
-
create: `${Be}/consumer_groups`,
|
|
128
|
-
edit: `${Be}/consumer_groups/{id}`,
|
|
129
|
-
addConsumer: `${Be}/consumer_groups/{id}/consumers`,
|
|
130
|
-
removeConsumer: `${Be}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
131
|
-
getConsumers: `${Be}/consumer_groups/{id}/consumers`
|
|
132
|
-
},
|
|
133
|
-
kongManager: {
|
|
134
126
|
consumersList: `${Ae}/consumers`,
|
|
135
127
|
create: `${Ae}/consumer_groups`,
|
|
136
128
|
edit: `${Ae}/consumer_groups/{id}`,
|
|
137
129
|
addConsumer: `${Ae}/consumer_groups/{id}/consumers`,
|
|
138
130
|
removeConsumer: `${Ae}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
131
|
getConsumers: `${Ae}/consumer_groups/{id}/consumers`
|
|
132
|
+
},
|
|
133
|
+
kongManager: {
|
|
134
|
+
consumersList: `${xe}/consumers`,
|
|
135
|
+
create: `${xe}/consumer_groups`,
|
|
136
|
+
edit: `${xe}/consumer_groups/{id}`,
|
|
137
|
+
addConsumer: `${xe}/consumer_groups/{id}/consumers`,
|
|
138
|
+
removeConsumer: `${xe}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
139
|
+
getConsumers: `${xe}/consumer_groups/{id}/consumers`
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
|
-
var yn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(yn || {}), tt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(tt || {}),
|
|
143
|
+
var yn = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(yn || {}), tt = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(tt || {}), Oe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Oe || {}), ne = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(ne || {}), Ce = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(Ce || {});
|
|
144
144
|
function At(e = {}) {
|
|
145
145
|
return {
|
|
146
146
|
axiosInstance: Cr.create({
|
|
@@ -162,12 +162,12 @@ function Ar() {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
const ft = "khcp-user-table-preferences",
|
|
165
|
+
const ft = "khcp-user-table-preferences", xr = {
|
|
166
166
|
pageSize: 30,
|
|
167
167
|
sortColumnKey: void 0,
|
|
168
168
|
sortColumnOrder: void 0
|
|
169
169
|
};
|
|
170
|
-
function
|
|
170
|
+
function Sr() {
|
|
171
171
|
const e = (t) => {
|
|
172
172
|
if (typeof t == "string")
|
|
173
173
|
try {
|
|
@@ -191,7 +191,7 @@ function xr() {
|
|
|
191
191
|
},
|
|
192
192
|
getTablePreferences: (t) => {
|
|
193
193
|
const r = n();
|
|
194
|
-
return (r == null ? void 0 : r.get(t)) || void 0 ||
|
|
194
|
+
return (r == null ? void 0 : r.get(t)) || void 0 || xr;
|
|
195
195
|
},
|
|
196
196
|
deleteAllTablePreferences: () => {
|
|
197
197
|
localStorage.removeItem(ft);
|
|
@@ -296,7 +296,7 @@ const Tr = {
|
|
|
296
296
|
errors: Fr,
|
|
297
297
|
toggleModal: Nr
|
|
298
298
|
};
|
|
299
|
-
function
|
|
299
|
+
function xt() {
|
|
300
300
|
const e = It("en-us", Br);
|
|
301
301
|
return {
|
|
302
302
|
i18n: e,
|
|
@@ -355,7 +355,7 @@ function qr(e, n, t, r = {
|
|
|
355
355
|
t || (t = "100");
|
|
356
356
|
const { axiosInstance: o } = At({
|
|
357
357
|
headers: e.requestHeaders
|
|
358
|
-
}), { i18n: { t: a } } =
|
|
358
|
+
}), { i18n: { t: a } } = xt(), { debounce: i } = Ar(), s = i(async (h) => {
|
|
359
359
|
await K(h);
|
|
360
360
|
}, 200), l = E(!1), c = E(""), d = E(""), u = E([]), g = E([]), f = E(void 0), I = y(n);
|
|
361
361
|
let b = `${e.apiBaseUrl}${I}`;
|
|
@@ -387,15 +387,15 @@ function qr(e, n, t, r = {
|
|
|
387
387
|
return [C[r.fetchedItemsKey] ?? C];
|
|
388
388
|
})()) : w.push(
|
|
389
389
|
...r.searchKeys.filter((C) => C !== "id").map(async (C) => {
|
|
390
|
-
const { data:
|
|
391
|
-
return
|
|
390
|
+
const { data: x } = await o.get(`${b}?${C}=${h}`);
|
|
391
|
+
return x[r.fetchedItemsKey];
|
|
392
392
|
})
|
|
393
393
|
);
|
|
394
394
|
const N = await Promise.all(w), U = /* @__PURE__ */ new Set();
|
|
395
395
|
u.value = [], (D = N == null ? void 0 : N.forEach) == null || D.call(N, (C) => {
|
|
396
|
-
var
|
|
397
|
-
(
|
|
398
|
-
U.has(
|
|
396
|
+
var x;
|
|
397
|
+
(x = C == null ? void 0 : C.forEach) == null || x.call(C, (S) => {
|
|
398
|
+
U.has(S.id) || (U.add(S.id), u.value.push(S));
|
|
399
399
|
});
|
|
400
400
|
});
|
|
401
401
|
} else
|
|
@@ -410,8 +410,8 @@ function qr(e, n, t, r = {
|
|
|
410
410
|
var N;
|
|
411
411
|
let U = !1;
|
|
412
412
|
for (const C of r.searchKeys) {
|
|
413
|
-
const
|
|
414
|
-
|
|
413
|
+
const x = typeof w[C] == "string" ? (N = w[C]) == null ? void 0 : N.toLowerCase() : w[C];
|
|
414
|
+
x != null && x.includes(h.toLowerCase()) && (U = !0);
|
|
415
415
|
}
|
|
416
416
|
return U;
|
|
417
417
|
}), (!u.value || !u.value.length) && (d.value = a("debouncedFilter.errors.invalid"))) : u.value = f.value, l.value = !1;
|
|
@@ -433,7 +433,7 @@ function Lr(e, n) {
|
|
|
433
433
|
return r.value.search = "", (o) => `${r.value.href}/${o}`;
|
|
434
434
|
}
|
|
435
435
|
function Pr() {
|
|
436
|
-
const { i18n: { t: e } } =
|
|
436
|
+
const { i18n: { t: e } } = xt();
|
|
437
437
|
return {
|
|
438
438
|
getMessageFromError: (n) => {
|
|
439
439
|
var t, r, o;
|
|
@@ -481,7 +481,7 @@ function vn(e, n) {
|
|
|
481
481
|
const { page: s, pageSize: l, offset: c, sortColumnKey: d, sortColumnOrder: u, query: g } = i;
|
|
482
482
|
try {
|
|
483
483
|
let f = new URL(a.value.href);
|
|
484
|
-
return o.value && g ? (f.search = "", f = new URL(`${f.href}
|
|
484
|
+
return o.value && g ? (f.search = "", f = new URL(`${f.href}/${g}/`)) : (o.value || new URLSearchParams(g).forEach((I, b) => {
|
|
485
485
|
f.searchParams.append(b, I);
|
|
486
486
|
}), d && f.searchParams.append("sort_by", d), u === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), c && s !== 1 && f.searchParams.append("offset", String(c)), f.href;
|
|
487
487
|
} catch (f) {
|
|
@@ -493,14 +493,14 @@ function Ur(e, n, t = "data") {
|
|
|
493
493
|
const r = y(n), { axiosInstance: o } = At({
|
|
494
494
|
headers: e.requestHeaders
|
|
495
495
|
}), a = vn(e, r), i = E({
|
|
496
|
-
status:
|
|
496
|
+
status: Oe.Idle
|
|
497
497
|
});
|
|
498
498
|
return { fetcher: async (s) => {
|
|
499
499
|
try {
|
|
500
|
-
i.value = { status:
|
|
500
|
+
i.value = { status: Oe.Loading };
|
|
501
501
|
const l = a(s), { data: c } = await o.get(l), d = t && t.replace(/[^\w-_]/gi, "");
|
|
502
502
|
let u;
|
|
503
|
-
c[d] && Array.isArray(c[d]) ? u = c[d] :
|
|
503
|
+
c[d] && Array.isArray(c[d]) ? u = c[d] : u = Object.keys(c).length ? [c] : [];
|
|
504
504
|
const g = {
|
|
505
505
|
data: u,
|
|
506
506
|
total: u.length,
|
|
@@ -511,7 +511,7 @@ function Ur(e, n, t = "data") {
|
|
|
511
511
|
} : null
|
|
512
512
|
};
|
|
513
513
|
return i.value = {
|
|
514
|
-
status:
|
|
514
|
+
status: Oe.Idle,
|
|
515
515
|
response: g
|
|
516
516
|
}, g;
|
|
517
517
|
} catch (l) {
|
|
@@ -520,11 +520,11 @@ function Ur(e, n, t = "data") {
|
|
|
520
520
|
total: 0
|
|
521
521
|
};
|
|
522
522
|
return s.query && l.response.status === 404 ? (i.value = {
|
|
523
|
-
status:
|
|
523
|
+
status: Oe.NoResults,
|
|
524
524
|
response: c,
|
|
525
525
|
error: l
|
|
526
526
|
}, c) : (i.value = {
|
|
527
|
-
status:
|
|
527
|
+
status: Oe.Error,
|
|
528
528
|
response: c,
|
|
529
529
|
error: l
|
|
530
530
|
}, c);
|
|
@@ -611,7 +611,7 @@ const ce = {
|
|
|
611
611
|
useFetchUrlBuilder: vn,
|
|
612
612
|
useHelpers: hn,
|
|
613
613
|
useStringHelpers: Rr,
|
|
614
|
-
useI18n:
|
|
614
|
+
useI18n: xt,
|
|
615
615
|
useGatewayFeatureSupported: Yr,
|
|
616
616
|
useTruncationDetector: Wr
|
|
617
617
|
}, Zr = {
|
|
@@ -811,7 +811,7 @@ const ce = {
|
|
|
811
811
|
e.format !== "hidden" ? (m(), R(Ue(e.idTooltip ? "KTooltip" : "div"), ht({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
812
812
|
default: v(() => [
|
|
813
813
|
V("div", {
|
|
814
|
-
class:
|
|
814
|
+
class: Fe([
|
|
815
815
|
"uuid-container",
|
|
816
816
|
e.truncated ? "truncated-uuid" : null,
|
|
817
817
|
e.useMono ? "mono" : null
|
|
@@ -880,13 +880,13 @@ const ce = {
|
|
|
880
880
|
return n.isArrayItem ? (l = a.value) != null && l.name ? r(a.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: n.index }) : "";
|
|
881
881
|
});
|
|
882
882
|
return (l, c) => (m(), R(Ue(e.isArrayItem ? "fieldset" : "div"), {
|
|
883
|
-
class:
|
|
883
|
+
class: Fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
884
884
|
}, {
|
|
885
885
|
default: v(() => [
|
|
886
886
|
e.isArrayItem ? (m(), $("legend", mo, [
|
|
887
887
|
V("b", null, O(s.value), 1)
|
|
888
888
|
])) : H("", !0),
|
|
889
|
-
(m(!0), $(be, null, he(Object.keys(i.value), (d, u) => (m(), R(
|
|
889
|
+
(m(!0), $(be, null, he(Object.keys(i.value), (d, u) => (m(), R(St, {
|
|
890
890
|
key: `${o.value}-property-${u}`,
|
|
891
891
|
item: {
|
|
892
892
|
key: d,
|
|
@@ -952,7 +952,7 @@ const ce = {
|
|
|
952
952
|
}, 8, ["appearance"]);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
}), bo = "#0044f4", Co = "#e0e4ea", ko = "#3a3f51", _o = "1px", wo = "20px", Io = { class: "config-card-details-row" }, Ao = ["data-testid"],
|
|
955
|
+
}), bo = "#0044f4", Co = "#e0e4ea", ko = "#3a3f51", _o = "1px", wo = "20px", Io = { class: "config-card-details-row" }, Ao = ["data-testid"], xo = ["data-testid"], So = ["data-testid"], To = ["data-testid"], $o = { key: 1 }, Mo = ["data-testid"], jo = ["data-testid"], Eo = ["data-testid"], Oo = ["data-testid"], Ko = {
|
|
956
956
|
name: "ConfigCardItem",
|
|
957
957
|
components: { CopyUuid: kn, JsonCardItem: _n, StatusBadge: vo, InternalLinkItem: ho }
|
|
958
958
|
}, Fo = /* @__PURE__ */ oe({
|
|
@@ -1117,7 +1117,7 @@ const ce = {
|
|
|
1117
1117
|
"data-testid": `${e.item.key}-label`
|
|
1118
1118
|
}, [
|
|
1119
1119
|
Z(f.$slots, "label", { item: e.item }, () => [
|
|
1120
|
-
F(b, { "tooltip-attributes": { maxWidth: "500px" } },
|
|
1120
|
+
F(b, { "tooltip-attributes": { maxWidth: "500px" } }, Te({
|
|
1121
1121
|
default: v(() => [
|
|
1122
1122
|
Q(O(e.item.label) + " ", 1)
|
|
1123
1123
|
]),
|
|
@@ -1132,7 +1132,7 @@ const ce = {
|
|
|
1132
1132
|
Z(f.$slots, "label-tooltip", {}, () => [
|
|
1133
1133
|
Q(O(e.item.tooltip), 1)
|
|
1134
1134
|
], !0)
|
|
1135
|
-
], 8,
|
|
1135
|
+
], 8, xo)
|
|
1136
1136
|
]),
|
|
1137
1137
|
key: "0"
|
|
1138
1138
|
} : void 0
|
|
@@ -1212,7 +1212,7 @@ const ce = {
|
|
|
1212
1212
|
V("span", {
|
|
1213
1213
|
ref_key: "textContent",
|
|
1214
1214
|
ref: u,
|
|
1215
|
-
class:
|
|
1215
|
+
class: Fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1216
1216
|
}, O(d.value.text), 3)
|
|
1217
1217
|
]),
|
|
1218
1218
|
_: 1
|
|
@@ -1225,11 +1225,11 @@ const ce = {
|
|
|
1225
1225
|
"data-testid": `${e.item.key}-no-value`
|
|
1226
1226
|
}, " – ", 8, To))
|
|
1227
1227
|
], !0)
|
|
1228
|
-
], 8,
|
|
1228
|
+
], 8, So)
|
|
1229
1229
|
]);
|
|
1230
1230
|
};
|
|
1231
1231
|
}
|
|
1232
|
-
}),
|
|
1232
|
+
}), St = /* @__PURE__ */ ke(Fo, [["__scopeId", "data-v-307ab96d"]]);
|
|
1233
1233
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1234
1234
|
function wn(e) {
|
|
1235
1235
|
return typeof e > "u" || e === null;
|
|
@@ -1412,12 +1412,12 @@ vt.prototype.extend = function(e) {
|
|
|
1412
1412
|
var r = Object.create(vt.prototype);
|
|
1413
1413
|
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = zt(r, "implicit"), r.compiledExplicit = zt(r, "explicit"), r.compiledTypeMap = Xo(r.compiledImplicit, r.compiledExplicit), r;
|
|
1414
1414
|
};
|
|
1415
|
-
var An = vt,
|
|
1415
|
+
var An = vt, xn = new pe("tag:yaml.org,2002:str", {
|
|
1416
1416
|
kind: "scalar",
|
|
1417
1417
|
construct: function(e) {
|
|
1418
1418
|
return e !== null ? e : "";
|
|
1419
1419
|
}
|
|
1420
|
-
}),
|
|
1420
|
+
}), Sn = new pe("tag:yaml.org,2002:seq", {
|
|
1421
1421
|
kind: "sequence",
|
|
1422
1422
|
construct: function(e) {
|
|
1423
1423
|
return e !== null ? e : [];
|
|
@@ -1429,8 +1429,8 @@ var An = vt, Sn = new pe("tag:yaml.org,2002:str", {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
}), $n = new An({
|
|
1431
1431
|
explicit: [
|
|
1432
|
-
Sn,
|
|
1433
1432
|
xn,
|
|
1433
|
+
Sn,
|
|
1434
1434
|
Tn
|
|
1435
1435
|
]
|
|
1436
1436
|
});
|
|
@@ -1736,16 +1736,16 @@ var Pn = new pe("tag:yaml.org,2002:binary", {
|
|
|
1736
1736
|
construct: wa,
|
|
1737
1737
|
predicate: Aa,
|
|
1738
1738
|
represent: Ia
|
|
1739
|
-
}),
|
|
1739
|
+
}), xa = Object.prototype.hasOwnProperty, Sa = Object.prototype.toString;
|
|
1740
1740
|
function Ta(e) {
|
|
1741
1741
|
if (e === null)
|
|
1742
1742
|
return !0;
|
|
1743
1743
|
var n = [], t, r, o, a, i, s = e;
|
|
1744
1744
|
for (t = 0, r = s.length; t < r; t += 1) {
|
|
1745
|
-
if (o = s[t], i = !1,
|
|
1745
|
+
if (o = s[t], i = !1, Sa.call(o) !== "[object Object]")
|
|
1746
1746
|
return !1;
|
|
1747
1747
|
for (a in o)
|
|
1748
|
-
if (
|
|
1748
|
+
if (xa.call(o, a))
|
|
1749
1749
|
if (!i)
|
|
1750
1750
|
i = !0;
|
|
1751
1751
|
else
|
|
@@ -1818,14 +1818,14 @@ var Rn = new pe("tag:yaml.org,2002:set", {
|
|
|
1818
1818
|
Un,
|
|
1819
1819
|
Rn
|
|
1820
1820
|
]
|
|
1821
|
-
}),
|
|
1821
|
+
}), je = Object.prototype.hasOwnProperty, rt = 1, Dn = 2, Gn = 3, ot = 4, yt = 1, Na = 2, Jt = 3, Ba = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, qa = /[\x85\u2028\u2029]/, La = /[,\[\]\{\}]/, Hn = /^(?:!|!!|![a-z\-]+!)$/i, zn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1822
1822
|
function Yt(e) {
|
|
1823
1823
|
return Object.prototype.toString.call(e);
|
|
1824
1824
|
}
|
|
1825
1825
|
function we(e) {
|
|
1826
1826
|
return e === 10 || e === 13;
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Ke(e) {
|
|
1829
1829
|
return e === 9 || e === 32;
|
|
1830
1830
|
}
|
|
1831
1831
|
function ve(e) {
|
|
@@ -1884,7 +1884,7 @@ var Zt = {
|
|
|
1884
1884
|
},
|
|
1885
1885
|
TAG: function(e, n, t) {
|
|
1886
1886
|
var r, o;
|
|
1887
|
-
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Hn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"),
|
|
1887
|
+
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], o = t[1], Hn.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), je.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), zn.test(o) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1888
1888
|
try {
|
|
1889
1889
|
o = decodeURIComponent(o);
|
|
1890
1890
|
} catch {
|
|
@@ -1893,7 +1893,7 @@ var Zt = {
|
|
|
1893
1893
|
e.tagMap[r] = o;
|
|
1894
1894
|
}
|
|
1895
1895
|
};
|
|
1896
|
-
function
|
|
1896
|
+
function Me(e, n, t, r) {
|
|
1897
1897
|
var o, a, i, s;
|
|
1898
1898
|
if (n < t) {
|
|
1899
1899
|
if (s = e.input.slice(n, t), r)
|
|
@@ -1907,7 +1907,7 @@ function $e(e, n, t, r) {
|
|
|
1907
1907
|
function Qt(e, n, t, r) {
|
|
1908
1908
|
var o, a, i, s;
|
|
1909
1909
|
for (ue.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"), o = Object.keys(t), i = 0, s = o.length; i < s; i += 1)
|
|
1910
|
-
a = o[i],
|
|
1910
|
+
a = o[i], je.call(n, a) || (n[a] = t[a], r[a] = !0);
|
|
1911
1911
|
}
|
|
1912
1912
|
function Ve(e, n, t, r, o, a, i, s, l) {
|
|
1913
1913
|
var c, d;
|
|
@@ -1921,7 +1921,7 @@ function Ve(e, n, t, r, o, a, i, s, l) {
|
|
|
1921
1921
|
else
|
|
1922
1922
|
Qt(e, n, a, t);
|
|
1923
1923
|
else
|
|
1924
|
-
!e.json && !
|
|
1924
|
+
!e.json && !je.call(t, o) && je.call(n, o) && (e.line = i || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, M(e, "duplicated mapping key")), o === "__proto__" ? Object.defineProperty(n, o, {
|
|
1925
1925
|
configurable: !0,
|
|
1926
1926
|
enumerable: !0,
|
|
1927
1927
|
writable: !0,
|
|
@@ -1935,7 +1935,7 @@ function Mt(e) {
|
|
|
1935
1935
|
}
|
|
1936
1936
|
function ie(e, n, t) {
|
|
1937
1937
|
for (var r = 0, o = e.input.charCodeAt(e.position); o !== 0; ) {
|
|
1938
|
-
for (;
|
|
1938
|
+
for (; Ke(o); )
|
|
1939
1939
|
o === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), o = e.input.charCodeAt(++e.position);
|
|
1940
1940
|
if (n && o === 35)
|
|
1941
1941
|
do
|
|
@@ -1980,9 +1980,9 @@ function Ga(e, n, t) {
|
|
|
1980
1980
|
break;
|
|
1981
1981
|
}
|
|
1982
1982
|
}
|
|
1983
|
-
s && (
|
|
1983
|
+
s && (Me(e, a, i, !1), jt(e, e.line - l), a = i = e.position, s = !1), Ke(f) || (i = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1984
1984
|
}
|
|
1985
|
-
return
|
|
1985
|
+
return Me(e, a, i, !1), e.result ? !0 : (e.kind = u, e.result = g, !1);
|
|
1986
1986
|
}
|
|
1987
1987
|
function Ha(e, n) {
|
|
1988
1988
|
var t, r, o;
|
|
@@ -1990,12 +1990,12 @@ function Ha(e, n) {
|
|
|
1990
1990
|
return !1;
|
|
1991
1991
|
for (e.kind = "scalar", e.result = "", e.position++, r = o = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
1992
1992
|
if (t === 39)
|
|
1993
|
-
if (
|
|
1993
|
+
if (Me(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
1994
1994
|
r = e.position, e.position++, o = e.position;
|
|
1995
1995
|
else
|
|
1996
1996
|
return !0;
|
|
1997
1997
|
else
|
|
1998
|
-
we(t) ? (
|
|
1998
|
+
we(t) ? (Me(e, r, o, !0), jt(e, ie(e, !1, n)), r = o = e.position) : e.position === e.lineStart && dt(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, o = e.position);
|
|
1999
1999
|
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
2000
2000
|
}
|
|
2001
2001
|
function za(e, n) {
|
|
@@ -2004,9 +2004,9 @@ function za(e, n) {
|
|
|
2004
2004
|
return !1;
|
|
2005
2005
|
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2006
2006
|
if (s === 34)
|
|
2007
|
-
return
|
|
2007
|
+
return Me(e, t, e.position, !0), e.position++, !0;
|
|
2008
2008
|
if (s === 92) {
|
|
2009
|
-
if (
|
|
2009
|
+
if (Me(e, t, e.position, !0), s = e.input.charCodeAt(++e.position), we(s))
|
|
2010
2010
|
ie(e, !1, n);
|
|
2011
2011
|
else if (s < 256 && Jn[s])
|
|
2012
2012
|
e.result += Yn[s], e.position++;
|
|
@@ -2018,7 +2018,7 @@ function za(e, n) {
|
|
|
2018
2018
|
M(e, "unknown escape sequence");
|
|
2019
2019
|
t = r = e.position;
|
|
2020
2020
|
} else
|
|
2021
|
-
we(s) ? (
|
|
2021
|
+
we(s) ? (Me(e, t, r, !0), jt(e, ie(e, !1, n)), t = r = e.position) : e.position === e.lineStart && dt(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2022
2022
|
}
|
|
2023
2023
|
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2024
2024
|
}
|
|
@@ -2052,10 +2052,10 @@ function Ya(e, n) {
|
|
|
2052
2052
|
d === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : i ? M(e, "repeat of an indentation width identifier") : (s = n + d - 1, i = !0);
|
|
2053
2053
|
else
|
|
2054
2054
|
break;
|
|
2055
|
-
if (
|
|
2055
|
+
if (Ke(u)) {
|
|
2056
2056
|
do
|
|
2057
2057
|
u = e.input.charCodeAt(++e.position);
|
|
2058
|
-
while (
|
|
2058
|
+
while (Ke(u));
|
|
2059
2059
|
if (u === 35)
|
|
2060
2060
|
do
|
|
2061
2061
|
u = e.input.charCodeAt(++e.position);
|
|
@@ -2074,13 +2074,13 @@ function Ya(e, n) {
|
|
|
2074
2074
|
`);
|
|
2075
2075
|
break;
|
|
2076
2076
|
}
|
|
2077
|
-
for (r ?
|
|
2077
|
+
for (r ? Ke(u) ? (c = !0, e.result += ue.repeat(`
|
|
2078
2078
|
`, a ? 1 + l : l)) : c ? (c = !1, e.result += ue.repeat(`
|
|
2079
2079
|
`, l + 1)) : l === 0 ? a && (e.result += " ") : e.result += ue.repeat(`
|
|
2080
2080
|
`, l) : e.result += ue.repeat(`
|
|
2081
2081
|
`, a ? 1 + l : l), a = !0, i = !0, l = 0, t = e.position; !we(u) && u !== 0; )
|
|
2082
2082
|
u = e.input.charCodeAt(++e.position);
|
|
2083
|
-
|
|
2083
|
+
Me(e, t, e.position, !1);
|
|
2084
2084
|
}
|
|
2085
2085
|
return !0;
|
|
2086
2086
|
}
|
|
@@ -2111,7 +2111,7 @@ function Wa(e, n, t) {
|
|
|
2111
2111
|
if (i = e.line, s = e.lineStart, l = e.position, !Re(e, t, Dn, !1, !0))
|
|
2112
2112
|
break;
|
|
2113
2113
|
if (e.line === a) {
|
|
2114
|
-
for (k = e.input.charCodeAt(e.position);
|
|
2114
|
+
for (k = e.input.charCodeAt(e.position); Ke(k); )
|
|
2115
2115
|
k = e.input.charCodeAt(++e.position);
|
|
2116
2116
|
if (k === 58)
|
|
2117
2117
|
k = e.input.charCodeAt(++e.position), ve(k) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), p && (Ve(e, u, g, f, I, null, i, s, l), f = I = b = null), A = !0, p = !1, o = !1, f = e.tag, I = e.result;
|
|
@@ -2151,7 +2151,7 @@ function Za(e) {
|
|
|
2151
2151
|
} catch {
|
|
2152
2152
|
M(e, "tag name is malformed: " + a);
|
|
2153
2153
|
}
|
|
2154
|
-
return t ? e.tag = a :
|
|
2154
|
+
return t ? e.tag = a : je.call(e.tagMap, o) ? e.tag = e.tagMap[o] + a : o === "!" ? e.tag = "!" + a : o === "!!" ? e.tag = "tag:yaml.org,2002:" + a : M(e, 'undeclared tag handle "' + o + '"'), !0;
|
|
2155
2155
|
}
|
|
2156
2156
|
function Qa(e) {
|
|
2157
2157
|
var n, t;
|
|
@@ -2167,7 +2167,7 @@ function Xa(e) {
|
|
|
2167
2167
|
return !1;
|
|
2168
2168
|
for (r = e.input.charCodeAt(++e.position), n = e.position; r !== 0 && !ve(r) && !Pe(r); )
|
|
2169
2169
|
r = e.input.charCodeAt(++e.position);
|
|
2170
|
-
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position),
|
|
2170
|
+
return e.position === n && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(n, e.position), je.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], ie(e, !0, -1), !0;
|
|
2171
2171
|
}
|
|
2172
2172
|
function Re(e, n, t, r, o) {
|
|
2173
2173
|
var a, i, s, l = 1, c = !1, d = !1, u, g, f, I, b, p;
|
|
@@ -2183,7 +2183,7 @@ function Re(e, n, t, r, o) {
|
|
|
2183
2183
|
break;
|
|
2184
2184
|
}
|
|
2185
2185
|
} else if (e.tag !== "!") {
|
|
2186
|
-
if (
|
|
2186
|
+
if (je.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2187
2187
|
I = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2188
2188
|
else
|
|
2189
2189
|
for (I = null, f = e.typeMap.multi[e.kind || "fallback"], u = 0, g = f.length; u < g; u += 1)
|
|
@@ -2201,7 +2201,7 @@ function ei(e) {
|
|
|
2201
2201
|
for (a = !0, i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !ve(i); )
|
|
2202
2202
|
i = e.input.charCodeAt(++e.position);
|
|
2203
2203
|
for (r = e.input.slice(t, e.position), o = [], r.length < 1 && M(e, "directive name must not be less than one character in length"); i !== 0; ) {
|
|
2204
|
-
for (;
|
|
2204
|
+
for (; Ke(i); )
|
|
2205
2205
|
i = e.input.charCodeAt(++e.position);
|
|
2206
2206
|
if (i === 35) {
|
|
2207
2207
|
do
|
|
@@ -2215,7 +2215,7 @@ function ei(e) {
|
|
|
2215
2215
|
i = e.input.charCodeAt(++e.position);
|
|
2216
2216
|
o.push(e.input.slice(t, e.position));
|
|
2217
2217
|
}
|
|
2218
|
-
i !== 0 && Mt(e),
|
|
2218
|
+
i !== 0 && Mt(e), je.call(Zt, r) ? Zt[r](e, r, o) : at(e, 'unknown document directive "' + r + '"');
|
|
2219
2219
|
}
|
|
2220
2220
|
if (ie(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, ie(e, !0, -1)) : a && M(e, "directives end mark is expected"), Re(e, e.lineIndent - 1, ot, !1, !0), ie(e, !0, -1), e.checkLineBreaks && qa.test(e.input.slice(n, e.position)) && at(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && dt(e)) {
|
|
2221
2221
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, ie(e, !0, -1));
|
|
@@ -2310,7 +2310,7 @@ function Ii(e) {
|
|
|
2310
2310
|
return "\\" + t + ue.repeat("0", r - n.length) + n;
|
|
2311
2311
|
}
|
|
2312
2312
|
var Ai = 1, We = 2;
|
|
2313
|
-
function
|
|
2313
|
+
function xi(e) {
|
|
2314
2314
|
this.schema = e.schema || $t, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ue.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = wi(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? We : Ai, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
2315
2315
|
}
|
|
2316
2316
|
function en(e, n) {
|
|
@@ -2324,7 +2324,7 @@ function Ct(e, n) {
|
|
|
2324
2324
|
return `
|
|
2325
2325
|
` + ue.repeat(" ", e.indent * n);
|
|
2326
2326
|
}
|
|
2327
|
-
function
|
|
2327
|
+
function Si(e, n) {
|
|
2328
2328
|
var t, r, o;
|
|
2329
2329
|
for (t = 0, r = e.implicitTypes.length; t < r; t += 1)
|
|
2330
2330
|
if (o = e.implicitTypes[t], o.resolve(n))
|
|
@@ -2394,7 +2394,7 @@ function ji(e, n, t, r, o) {
|
|
|
2394
2394
|
return e.quotingType === We ? '"' + n + '"' : "'" + n + "'";
|
|
2395
2395
|
var a = e.indent * Math.max(1, t), i = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - a), s = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2396
2396
|
function l(c) {
|
|
2397
|
-
return
|
|
2397
|
+
return Si(e, c);
|
|
2398
2398
|
}
|
|
2399
2399
|
switch (Mi(
|
|
2400
2400
|
n,
|
|
@@ -2553,7 +2553,7 @@ function _t(e, n, t) {
|
|
|
2553
2553
|
}
|
|
2554
2554
|
function qi(e, n) {
|
|
2555
2555
|
n = n || {};
|
|
2556
|
-
var t = new
|
|
2556
|
+
var t = new xi(n);
|
|
2557
2557
|
t.noRefs || Bi(e, t);
|
|
2558
2558
|
var r = e;
|
|
2559
2559
|
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), Se(t, 0, r, !0, !0) ? t.dump + `
|
|
@@ -2579,8 +2579,8 @@ var Vi = pe, Ui = An, Ri = $n, Di = Kn, Gi = Fn, Hi = $t, zi = Qn.load, Ji = Qn.
|
|
|
2579
2579
|
int: En,
|
|
2580
2580
|
merge: Ln,
|
|
2581
2581
|
omap: Vn,
|
|
2582
|
-
seq:
|
|
2583
|
-
str:
|
|
2582
|
+
seq: Sn,
|
|
2583
|
+
str: xn
|
|
2584
2584
|
}, Qi = Ot("safeLoad", "load"), Xi = Ot("safeLoadAll", "loadAll"), es = Ot("safeDump", "dump"), ts = {
|
|
2585
2585
|
Type: Vi,
|
|
2586
2586
|
Schema: Ui,
|
|
@@ -2644,14 +2644,14 @@ const ns = {
|
|
|
2644
2644
|
e.format === "structured" ? (m(), $("div", ns, [
|
|
2645
2645
|
(m(!0), $(be, null, he(e.propListTypes, (d) => (m(), $("div", {
|
|
2646
2646
|
key: `config-card-details-${d}-props`,
|
|
2647
|
-
class:
|
|
2647
|
+
class: Fe(`config-card-details-${d}-props`),
|
|
2648
2648
|
"data-testid": `config-card-details-${d}-props`
|
|
2649
2649
|
}, [
|
|
2650
2650
|
d !== "basic" ? (m(), $("div", os, O(d === "advanced" ? y(r)("baseConfigCard.sections.advanced") : y(r)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2651
|
-
(m(!0), $(be, null, he(e.propertyCollections[d], (u) => (m(), R(
|
|
2651
|
+
(m(!0), $(be, null, he(e.propertyCollections[d], (u) => (m(), R(St, {
|
|
2652
2652
|
key: u.key,
|
|
2653
2653
|
item: u
|
|
2654
|
-
},
|
|
2654
|
+
}, Te({
|
|
2655
2655
|
label: v(() => [
|
|
2656
2656
|
Z(s.$slots, `${u.key}-label`, { row: u }, void 0, !0)
|
|
2657
2657
|
]),
|
|
@@ -2936,17 +2936,17 @@ const ns = {
|
|
|
2936
2936
|
var w, N, U;
|
|
2937
2937
|
if (!p.value)
|
|
2938
2938
|
return [];
|
|
2939
|
-
const C = [],
|
|
2940
|
-
for (const
|
|
2941
|
-
const q = (N = (w = r.configSchema) == null ? void 0 : w[
|
|
2942
|
-
let X =
|
|
2943
|
-
(J || J === 0) && (X = J === -1 ?
|
|
2939
|
+
const C = [], x = Object.keys(p.value).length;
|
|
2940
|
+
for (const S in p.value) {
|
|
2941
|
+
const q = (N = (w = r.configSchema) == null ? void 0 : w[S]) == null ? void 0 : N.order, J = (U = g[S]) == null ? void 0 : U.order;
|
|
2942
|
+
let X = x;
|
|
2943
|
+
(J || J === 0) && (X = J === -1 ? x + 1 : J), q && (X = q === -1 ? x + 1 : q), C.push([S, X]);
|
|
2944
2944
|
}
|
|
2945
|
-
return C.sort(function(
|
|
2946
|
-
return
|
|
2947
|
-
}), C.map((
|
|
2945
|
+
return C.sort(function(S, q) {
|
|
2946
|
+
return S[1] - q[1];
|
|
2947
|
+
}), C.map((S) => {
|
|
2948
2948
|
var q, J;
|
|
2949
|
-
const X =
|
|
2949
|
+
const X = S[0], ee = (q = p.value) == null ? void 0 : q[X], te = ((J = r.configSchema) == null ? void 0 : J[X]) || {}, le = g[X];
|
|
2950
2950
|
return {
|
|
2951
2951
|
key: X,
|
|
2952
2952
|
value: ee,
|
|
@@ -2956,22 +2956,22 @@ const ns = {
|
|
|
2956
2956
|
tooltip: te.tooltip ?? ((le == null ? void 0 : le.tooltip) || void 0),
|
|
2957
2957
|
section: te.section ?? ((le == null ? void 0 : le.section) || Ce.Advanced)
|
|
2958
2958
|
};
|
|
2959
|
-
}).filter((
|
|
2959
|
+
}).filter((S) => !S.hidden && S.key !== r.pluginConfigKey);
|
|
2960
2960
|
}), k = T(() => {
|
|
2961
2961
|
var w, N;
|
|
2962
2962
|
if (!p.value || !r.pluginConfigKey)
|
|
2963
2963
|
return [];
|
|
2964
|
-
const U = p.value[r.pluginConfigKey] || {}, C = Object.keys(U).length,
|
|
2965
|
-
for (const
|
|
2966
|
-
const q = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[
|
|
2964
|
+
const U = p.value[r.pluginConfigKey] || {}, C = Object.keys(U).length, x = [];
|
|
2965
|
+
for (const S in U) {
|
|
2966
|
+
const q = (N = (w = r.pluginConfigSchema) == null ? void 0 : w[S]) == null ? void 0 : N.order, J = U[S];
|
|
2967
2967
|
let X = J != null && J !== "" ? C - 1 : C;
|
|
2968
|
-
q && (X = q === -1 ? C + 1 : q),
|
|
2968
|
+
q && (X = q === -1 ? C + 1 : q), x.push([S, X]);
|
|
2969
2969
|
}
|
|
2970
|
-
return
|
|
2971
|
-
return
|
|
2972
|
-
}),
|
|
2970
|
+
return x.sort(function(S, q) {
|
|
2971
|
+
return S[1] - q[1];
|
|
2972
|
+
}), x.map((S) => {
|
|
2973
2973
|
var q;
|
|
2974
|
-
const J =
|
|
2974
|
+
const J = S[0], X = U[J], ee = ((q = r.pluginConfigSchema) == null ? void 0 : q[J]) || {};
|
|
2975
2975
|
return {
|
|
2976
2976
|
key: J,
|
|
2977
2977
|
value: X,
|
|
@@ -2981,13 +2981,13 @@ const ns = {
|
|
|
2981
2981
|
tooltip: ee.tooltip ?? void 0,
|
|
2982
2982
|
section: Ce.Plugin
|
|
2983
2983
|
};
|
|
2984
|
-
}).filter((
|
|
2984
|
+
}).filter((S) => !S.hidden);
|
|
2985
2985
|
}), K = T(() => {
|
|
2986
2986
|
var w, N, U, C;
|
|
2987
2987
|
return {
|
|
2988
|
-
basic: (w = A.value) == null ? void 0 : w.filter((
|
|
2989
|
-
advanced: (N = A.value) == null ? void 0 : N.filter((
|
|
2990
|
-
plugin: (C = k.value) == null ? void 0 : C.concat((U = A.value) == null ? void 0 : U.filter((
|
|
2988
|
+
basic: (w = A.value) == null ? void 0 : w.filter((x) => x.section === Ce.Basic),
|
|
2989
|
+
advanced: (N = A.value) == null ? void 0 : N.filter((x) => x.section === Ce.Advanced),
|
|
2990
|
+
plugin: (C = k.value) == null ? void 0 : C.concat((U = A.value) == null ? void 0 : U.filter((x) => x.section === Ce.Plugin))
|
|
2991
2991
|
};
|
|
2992
2992
|
}), h = T(() => {
|
|
2993
2993
|
const w = [];
|
|
@@ -3022,8 +3022,8 @@ const ns = {
|
|
|
3022
3022
|
f.value = !1;
|
|
3023
3023
|
}
|
|
3024
3024
|
}), (w, N) => {
|
|
3025
|
-
const U = L("KLabel"), C = L("KSelect"),
|
|
3026
|
-
return m(), R(X, { class: "kong-ui-entity-base-config-card" },
|
|
3025
|
+
const U = L("KLabel"), C = L("KSelect"), x = L("KButton"), S = L("KClipboardProvider"), q = L("KSkeleton"), J = L("KEmptyState"), X = L("KCard");
|
|
3026
|
+
return m(), R(X, { class: "kong-ui-entity-base-config-card" }, Te({
|
|
3027
3027
|
actions: v(() => [
|
|
3028
3028
|
V("div", hs, [
|
|
3029
3029
|
Z(w.$slots, "actions", {}, void 0, !0),
|
|
@@ -3044,7 +3044,7 @@ const ns = {
|
|
|
3044
3044
|
items: c,
|
|
3045
3045
|
onChange: u
|
|
3046
3046
|
})) : H("", !0),
|
|
3047
|
-
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(
|
|
3047
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (m(), R(x, {
|
|
3048
3048
|
key: 2,
|
|
3049
3049
|
appearance: "tertiary",
|
|
3050
3050
|
class: "book-icon",
|
|
@@ -3061,9 +3061,9 @@ const ns = {
|
|
|
3061
3061
|
]),
|
|
3062
3062
|
_: 1
|
|
3063
3063
|
})) : H("", !0),
|
|
3064
|
-
e.config.jsonYamlEnabled ? H("", !0) : (m(), R(
|
|
3064
|
+
e.config.jsonYamlEnabled ? H("", !0) : (m(), R(S, { key: 3 }, {
|
|
3065
3065
|
default: v(({ copyToClipboard: ee }) => [
|
|
3066
|
-
!f.value && !I.value ? (m(), R(
|
|
3066
|
+
!f.value && !I.value ? (m(), R(x, {
|
|
3067
3067
|
key: 0,
|
|
3068
3068
|
appearance: "tertiary",
|
|
3069
3069
|
"data-testid": "json-copy-button",
|
|
@@ -3101,7 +3101,7 @@ const ns = {
|
|
|
3101
3101
|
"prop-list-types": h.value,
|
|
3102
3102
|
"property-collections": K.value,
|
|
3103
3103
|
record: p.value
|
|
3104
|
-
},
|
|
3104
|
+
}, Te({ _: 2 }, [
|
|
3105
3105
|
he(Object.keys(w.$slots), (ee) => ({
|
|
3106
3106
|
name: ee,
|
|
3107
3107
|
fn: v(({ row: te, rowValue: le }) => [
|
|
@@ -3115,14 +3115,14 @@ const ns = {
|
|
|
3115
3115
|
])) : (m(), $("div", Cs, [
|
|
3116
3116
|
(m(!0), $(be, null, he(h.value, (ee) => (m(), $("div", {
|
|
3117
3117
|
key: `config-card-details-${ee}-props`,
|
|
3118
|
-
class:
|
|
3118
|
+
class: Fe(`config-card-details-${ee}-props`),
|
|
3119
3119
|
"data-testid": `config-card-details-${ee}-props`
|
|
3120
3120
|
}, [
|
|
3121
3121
|
ee !== "basic" ? (m(), $("div", _s, O(ee === "advanced" ? y(a)("baseConfigCard.sections.advanced") : y(a)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
3122
|
-
(m(!0), $(be, null, he(K.value[ee], (te) => (m(), R(
|
|
3122
|
+
(m(!0), $(be, null, he(K.value[ee], (te) => (m(), R(St, {
|
|
3123
3123
|
key: te.key,
|
|
3124
3124
|
item: te
|
|
3125
|
-
},
|
|
3125
|
+
}, Te({
|
|
3126
3126
|
label: v(() => [
|
|
3127
3127
|
Z(w.$slots, `${te.key}-label`, { row: te }, void 0, !0)
|
|
3128
3128
|
]),
|
|
@@ -3161,10 +3161,10 @@ const ns = {
|
|
|
3161
3161
|
]), 1024);
|
|
3162
3162
|
};
|
|
3163
3163
|
}
|
|
3164
|
-
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-24515123"]]), As = ["onReset", "onSubmit"],
|
|
3164
|
+
}), Is = /* @__PURE__ */ ke(ws, [["__scopeId", "data-v-24515123"]]), As = ["onReset", "onSubmit"], xs = {
|
|
3165
3165
|
class: "form-actions",
|
|
3166
3166
|
"data-testid": "form-actions"
|
|
3167
|
-
},
|
|
3167
|
+
}, Ss = /* @__PURE__ */ oe({
|
|
3168
3168
|
__name: "EntityBaseForm",
|
|
3169
3169
|
props: {
|
|
3170
3170
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3274,7 +3274,7 @@ const ns = {
|
|
|
3274
3274
|
appearance: "danger",
|
|
3275
3275
|
"data-testid": "form-error"
|
|
3276
3276
|
}, null, 8, ["alert-message"])) : H("", !0),
|
|
3277
|
-
V("div",
|
|
3277
|
+
V("div", xs, [
|
|
3278
3278
|
Z(p.$slots, "form-actions", {}, () => [
|
|
3279
3279
|
F(D, {
|
|
3280
3280
|
appearance: "secondary",
|
|
@@ -3306,7 +3306,7 @@ const ns = {
|
|
|
3306
3306
|
});
|
|
3307
3307
|
};
|
|
3308
3308
|
}
|
|
3309
|
-
}), Ts = /* @__PURE__ */ ke(
|
|
3309
|
+
}), Ts = /* @__PURE__ */ ke(Ss, [["__scopeId", "data-v-81612aef"]]), $s = {
|
|
3310
3310
|
key: 0,
|
|
3311
3311
|
"data-testid": "first-col"
|
|
3312
3312
|
}, Ms = /* @__PURE__ */ oe({
|
|
@@ -3542,7 +3542,7 @@ const ns = {
|
|
|
3542
3542
|
n("click:row", D);
|
|
3543
3543
|
}), b = (h) => {
|
|
3544
3544
|
n("sort", h);
|
|
3545
|
-
}, { setTablePreferences: p, getTablePreferences: A } =
|
|
3545
|
+
}, { setTablePreferences: p, getTablePreferences: A } = Sr(), k = T(() => {
|
|
3546
3546
|
const h = A(t.preferencesStorageKey);
|
|
3547
3547
|
return {
|
|
3548
3548
|
...t.initialFetcherParams,
|
|
@@ -3589,7 +3589,7 @@ const ns = {
|
|
|
3589
3589
|
"onRow:click": I.value,
|
|
3590
3590
|
onSort: D[0] || (D[0] = (C) => b(C)),
|
|
3591
3591
|
"onUpdate:tablePreferences": K
|
|
3592
|
-
},
|
|
3592
|
+
}, Te({
|
|
3593
3593
|
toolbar: v(({ state: C }) => [
|
|
3594
3594
|
Xe(V("div", Es, [
|
|
3595
3595
|
Z(h.$slots, "toolbar-filter", {}, void 0, !0),
|
|
@@ -3600,7 +3600,7 @@ const ns = {
|
|
|
3600
3600
|
[et, i(C)]
|
|
3601
3601
|
])
|
|
3602
3602
|
]),
|
|
3603
|
-
actions: v(({ row: C, rowKey:
|
|
3603
|
+
actions: v(({ row: C, rowKey: x, rowValue: S }) => [
|
|
3604
3604
|
V("div", {
|
|
3605
3605
|
class: "actions-container",
|
|
3606
3606
|
"data-testid": C.name
|
|
@@ -3612,8 +3612,8 @@ const ns = {
|
|
|
3612
3612
|
items: v(() => [
|
|
3613
3613
|
Z(h.$slots, "actions", {
|
|
3614
3614
|
row: C,
|
|
3615
|
-
rowKey:
|
|
3616
|
-
rowValue:
|
|
3615
|
+
rowKey: x,
|
|
3616
|
+
rowValue: S
|
|
3617
3617
|
}, void 0, !0)
|
|
3618
3618
|
]),
|
|
3619
3619
|
default: v(() => [
|
|
@@ -3638,16 +3638,16 @@ const ns = {
|
|
|
3638
3638
|
]),
|
|
3639
3639
|
_: 2
|
|
3640
3640
|
}, [
|
|
3641
|
-
he(e.tableHeaders, (C,
|
|
3642
|
-
name:
|
|
3643
|
-
fn: v(({ row:
|
|
3641
|
+
he(e.tableHeaders, (C, x) => ({
|
|
3642
|
+
name: x,
|
|
3643
|
+
fn: v(({ row: S, rowKey: q, rowValue: J }) => [
|
|
3644
3644
|
F(js, {
|
|
3645
|
-
"key-name": String(
|
|
3646
|
-
"row-el": d(
|
|
3645
|
+
"key-name": String(x),
|
|
3646
|
+
"row-el": d(S)
|
|
3647
3647
|
}, {
|
|
3648
3648
|
default: v(() => [
|
|
3649
|
-
Z(h.$slots,
|
|
3650
|
-
row:
|
|
3649
|
+
Z(h.$slots, x, {
|
|
3650
|
+
row: S,
|
|
3651
3651
|
rowKey: q,
|
|
3652
3652
|
rowValue: J
|
|
3653
3653
|
}, () => [
|
|
@@ -3740,7 +3740,7 @@ const ns = {
|
|
|
3740
3740
|
class: "message",
|
|
3741
3741
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3742
3742
|
tag: "p"
|
|
3743
|
-
},
|
|
3743
|
+
}, Te({
|
|
3744
3744
|
entityType: v(() => [
|
|
3745
3745
|
Q(O(t.entityType), 1)
|
|
3746
3746
|
]),
|
|
@@ -4057,12 +4057,12 @@ const ns = {
|
|
|
4057
4057
|
setup(e) {
|
|
4058
4058
|
const n = lt();
|
|
4059
4059
|
return (t, r) => (m(), $("fieldset", {
|
|
4060
|
-
class:
|
|
4060
|
+
class: Fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4061
4061
|
}, [
|
|
4062
4062
|
V("div", tl, [
|
|
4063
4063
|
e.hideInfoHeader ? H("", !0) : (m(), $("div", {
|
|
4064
4064
|
key: 0,
|
|
4065
|
-
class:
|
|
4065
|
+
class: Fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4066
4066
|
}, [
|
|
4067
4067
|
e.title ? (m(), $("h4", nl, O(e.title), 1)) : H("", !0),
|
|
4068
4068
|
e.description || y(n).description ? (m(), $("div", rl, [
|
|
@@ -4113,7 +4113,7 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4113
4113
|
results: u
|
|
4114
4114
|
} = cr(
|
|
4115
4115
|
t.config,
|
|
4116
|
-
|
|
4116
|
+
$e.list[t.config.app].all,
|
|
4117
4117
|
"",
|
|
4118
4118
|
{
|
|
4119
4119
|
fetchedItemsKey: "data",
|
|
@@ -4126,9 +4126,9 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4126
4126
|
data: C
|
|
4127
4127
|
// we need this to determine whether or not to show the description text
|
|
4128
4128
|
}))), p = (C) => {
|
|
4129
|
-
var
|
|
4130
|
-
const
|
|
4131
|
-
return
|
|
4129
|
+
var S;
|
|
4130
|
+
const x = I.value ? u.value.find((q) => q.id === C) : (S = l.value) == null ? void 0 : S.find((q) => q.id === C);
|
|
4131
|
+
return x ? x.name : C;
|
|
4132
4132
|
}, A = () => {
|
|
4133
4133
|
h.value = "", k.value = [], w.value = [], n("cancel");
|
|
4134
4134
|
}, k = E([]), K = E(!1), h = E(""), D = async () => {
|
|
@@ -4138,43 +4138,43 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4138
4138
|
}
|
|
4139
4139
|
K.value = !0, h.value = "", k.value = [], w.value = [];
|
|
4140
4140
|
try {
|
|
4141
|
-
const C = a.value.map((q) => Y(q)),
|
|
4142
|
-
let
|
|
4143
|
-
|
|
4144
|
-
q.status !== "fulfilled" && (
|
|
4145
|
-
}),
|
|
4141
|
+
const C = a.value.map((q) => Y(q)), x = await Promise.allSettled(C);
|
|
4142
|
+
let S = !0;
|
|
4143
|
+
x.forEach((q) => {
|
|
4144
|
+
q.status !== "fulfilled" && (S = !1);
|
|
4145
|
+
}), S ? (k.value = [], w.value = [], n("add:success", a.value), a.value = []) : (k.value.length && n("add:partial-success", k.value), a.value = [], N(x));
|
|
4146
4146
|
} catch {
|
|
4147
4147
|
h.value = r("consumer_groups.errors.add"), n("error", h.value);
|
|
4148
4148
|
} finally {
|
|
4149
4149
|
K.value = !1;
|
|
4150
4150
|
}
|
|
4151
4151
|
}, se = T(() => {
|
|
4152
|
-
var
|
|
4153
|
-
let C = `${t.config.apiBaseUrl}${
|
|
4154
|
-
return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((
|
|
4152
|
+
var x, S, q, J;
|
|
4153
|
+
let C = `${t.config.apiBaseUrl}${$e.list[t.config.app].forConsumer}`;
|
|
4154
|
+
return t.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((x = t.config) == null ? void 0 : x.controlPlaneId) || "").replace(/{consumerId}/gi, ((S = t.config) == null ? void 0 : S.consumerId) || "") : t.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (q = t.config) != null && q.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((J = t.config) == null ? void 0 : J.consumerId) || "")), C;
|
|
4155
4155
|
}), Y = async (C) => {
|
|
4156
|
-
const
|
|
4156
|
+
const x = {
|
|
4157
4157
|
group: C
|
|
4158
4158
|
};
|
|
4159
4159
|
try {
|
|
4160
|
-
const
|
|
4161
|
-
return k.value.push(C),
|
|
4162
|
-
} catch (
|
|
4163
|
-
let q = `${p(C)} - ${
|
|
4164
|
-
return
|
|
4160
|
+
const S = await o.post(se.value, x);
|
|
4161
|
+
return k.value.push(C), S;
|
|
4162
|
+
} catch (S) {
|
|
4163
|
+
let q = `${p(C)} - ${S.message}`;
|
|
4164
|
+
return S.response.status === 409 && (q = `${p(C)} - ${r("consumer_groups.errors.already_added")}`), Promise.reject(Error(q));
|
|
4165
4165
|
}
|
|
4166
4166
|
}, w = E([]), N = (C) => {
|
|
4167
|
-
w.value = C.map((
|
|
4168
|
-
var
|
|
4169
|
-
return (
|
|
4167
|
+
w.value = C.map((x) => {
|
|
4168
|
+
var S;
|
|
4169
|
+
return (S = x.reason) == null ? void 0 : S.message;
|
|
4170
4170
|
}).filter(Boolean);
|
|
4171
4171
|
};
|
|
4172
4172
|
return Ie(b, () => {
|
|
4173
4173
|
f.value++;
|
|
4174
4174
|
}, { immediate: !0, deep: !0 }), Ie(() => t.visible, () => {
|
|
4175
4175
|
t.visible && d();
|
|
4176
|
-
}, { immediate: !0 }), (C,
|
|
4177
|
-
const
|
|
4176
|
+
}, { immediate: !0 }), (C, x) => {
|
|
4177
|
+
const S = L("KMultiselect"), q = L("KAlert"), J = L("KPrompt");
|
|
4178
4178
|
return m(), R(J, {
|
|
4179
4179
|
"action-pending": K.value,
|
|
4180
4180
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
@@ -4187,9 +4187,9 @@ const cl = { class: "add-to-group-form-container" }, dl = { class: "add-to-group
|
|
|
4187
4187
|
"body-content": v(() => [
|
|
4188
4188
|
V("div", cl, [
|
|
4189
4189
|
V("p", dl, O(y(r)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4190
|
-
F(
|
|
4190
|
+
F(S, {
|
|
4191
4191
|
modelValue: a.value,
|
|
4192
|
-
"onUpdate:modelValue":
|
|
4192
|
+
"onUpdate:modelValue": x[0] || (x[0] = (X) => a.value = X),
|
|
4193
4193
|
autosuggest: "",
|
|
4194
4194
|
"data-testid": "add-to-groups-multiselect",
|
|
4195
4195
|
"dropdown-footer-text": I.value ? y(r)("consumer_groups.consumers.add.footer") : void 0,
|
|
@@ -4277,9 +4277,9 @@ const Ft = (e, n) => {
|
|
|
4277
4277
|
const u = d, g = (j) => ({
|
|
4278
4278
|
"data-testid": j.username ?? j.custom_id ?? j.id
|
|
4279
4279
|
}), f = T(() => {
|
|
4280
|
-
var z, re, ye,
|
|
4281
|
-
let j = `${t.config.apiBaseUrl}${
|
|
4282
|
-
return t.config.app === "konnect" ? j = j.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (j = j.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((
|
|
4280
|
+
var z, re, ye, Ee;
|
|
4281
|
+
let j = `${t.config.apiBaseUrl}${$e.list[t.config.app][l.value ? "forConsumer" : "all"]}`;
|
|
4282
|
+
return t.config.app === "konnect" ? j = j.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (j = j.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), j;
|
|
4283
4283
|
}), I = E(""), b = T(() => {
|
|
4284
4284
|
const j = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4285
4285
|
return j ? {
|
|
@@ -4337,20 +4337,20 @@ const Ft = (e, n) => {
|
|
|
4337
4337
|
}), U = (j) => ({
|
|
4338
4338
|
label: o("consumer_groups.actions.edit"),
|
|
4339
4339
|
to: t.config.getEditRoute(j)
|
|
4340
|
-
}), C = E(void 0),
|
|
4341
|
-
C.value = j,
|
|
4340
|
+
}), C = E(void 0), x = E(!1), S = E(!1), q = E(""), J = sl(t.config, f.value), X = (j) => {
|
|
4341
|
+
C.value = j, x.value = !0;
|
|
4342
4342
|
}, ee = () => {
|
|
4343
|
-
|
|
4343
|
+
x.value = !1;
|
|
4344
4344
|
}, te = async () => {
|
|
4345
4345
|
var j, z, re;
|
|
4346
4346
|
if ((j = C.value) != null && j.id) {
|
|
4347
|
-
|
|
4347
|
+
S.value = !0;
|
|
4348
4348
|
try {
|
|
4349
|
-
await i.delete(J(C.value.id)),
|
|
4349
|
+
await i.delete(J(C.value.id)), S.value = !1, x.value = !1, s.value++, n("delete:success", C.value);
|
|
4350
4350
|
} catch (ye) {
|
|
4351
4351
|
q.value = ((re = (z = ye.response) == null ? void 0 : z.data) == null ? void 0 : re.message) || ye.message || o("consumer_groups.errors.delete"), n("error", ye);
|
|
4352
4352
|
} finally {
|
|
4353
|
-
|
|
4353
|
+
S.value = !1;
|
|
4354
4354
|
}
|
|
4355
4355
|
}
|
|
4356
4356
|
}, le = E(!1), De = () => {
|
|
@@ -4365,15 +4365,15 @@ const Ft = (e, n) => {
|
|
|
4365
4365
|
P.value = j, G.value = !0;
|
|
4366
4366
|
}, de = () => {
|
|
4367
4367
|
G.value = !1, P.value = void 0;
|
|
4368
|
-
},
|
|
4369
|
-
var z, re, ye,
|
|
4370
|
-
let j = `${t.config.apiBaseUrl}${
|
|
4371
|
-
return t.config.app === "konnect" ? j = j.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (j = j.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((
|
|
4368
|
+
}, Ne = T(() => {
|
|
4369
|
+
var z, re, ye, Ee;
|
|
4370
|
+
let j = `${t.config.apiBaseUrl}${$e.list[t.config.app].oneForConsumer}`;
|
|
4371
|
+
return t.config.app === "konnect" ? j = j.replace(/{controlPlaneId}/gi, ((z = t.config) == null ? void 0 : z.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = t.config) == null ? void 0 : re.consumerId) || "") : t.config.app === "kongManager" && (j = j.replace(/\/{workspace}/gi, (ye = t.config) != null && ye.workspace ? `/${t.config.workspace}` : "").replace(/{consumerId}/gi, ((Ee = t.config) == null ? void 0 : Ee.consumerId) || "")), j;
|
|
4372
4372
|
}), Ge = E(!1), dr = async () => {
|
|
4373
4373
|
if (P.value) {
|
|
4374
4374
|
Ge.value = !0;
|
|
4375
4375
|
try {
|
|
4376
|
-
const j =
|
|
4376
|
+
const j = Ne.value.replace(/{consumerGroupId}/gi, P.value.id);
|
|
4377
4377
|
await i.delete(j), n("remove:success", P.value), de(), s.value++;
|
|
4378
4378
|
} catch (j) {
|
|
4379
4379
|
ge.value = j.message || o("consumer_groups.errors.delete"), n("error", j);
|
|
@@ -4384,7 +4384,7 @@ const Ft = (e, n) => {
|
|
|
4384
4384
|
};
|
|
4385
4385
|
Ie(k, (j) => {
|
|
4386
4386
|
var z, re, ye;
|
|
4387
|
-
if (j.status ===
|
|
4387
|
+
if (j.status === Oe.Error) {
|
|
4388
4388
|
D.value = {
|
|
4389
4389
|
title: o("consumer_groups.errors.general")
|
|
4390
4390
|
}, (ye = (re = (z = j.error) == null ? void 0 : z.response) == null ? void 0 : re.data) != null && ye.message && (D.value.message = j.error.response.data.message), n("error", j.error);
|
|
@@ -4401,7 +4401,7 @@ const Ft = (e, n) => {
|
|
|
4401
4401
|
return ut(async () => {
|
|
4402
4402
|
await t.canCreate() && (pt.value.title = l.value ? o("consumer_groups.list.empty_state.title_for_consumer") : o("consumer_groups.list.empty_state.title"), pt.value.ctaText = l.value ? o("consumer_groups.actions.add_to_group") : o("consumer_groups.actions.create"));
|
|
4403
4403
|
}), (j, z) => {
|
|
4404
|
-
const re = L("KButton"), ye = L("KBadge"),
|
|
4404
|
+
const re = L("KButton"), ye = L("KBadge"), Ee = L("KTruncate"), He = L("KDropdownItem"), Bt = L("KClipboardProvider"), pr = L("KPrompt");
|
|
4405
4405
|
return m(), $("div", yl, [
|
|
4406
4406
|
F(y(Ns), {
|
|
4407
4407
|
"cache-identifier": e.cacheIdentifier,
|
|
@@ -4459,15 +4459,15 @@ const Ft = (e, n) => {
|
|
|
4459
4459
|
Q(O(W ?? "-"), 1)
|
|
4460
4460
|
]),
|
|
4461
4461
|
tags: v(({ rowValue: W }) => [
|
|
4462
|
-
(W == null ? void 0 : W.length) > 0 ? (m(), R(
|
|
4462
|
+
(W == null ? void 0 : W.length) > 0 ? (m(), R(Ee, { key: 0 }, {
|
|
4463
4463
|
default: v(() => [
|
|
4464
|
-
(m(!0), $(be, null, he(W, (
|
|
4465
|
-
key:
|
|
4464
|
+
(m(!0), $(be, null, he(W, (Be) => (m(), R(ye, {
|
|
4465
|
+
key: Be,
|
|
4466
4466
|
onClick: z[2] || (z[2] = nt(() => {
|
|
4467
4467
|
}, ["stop"]))
|
|
4468
4468
|
}, {
|
|
4469
4469
|
default: v(() => [
|
|
4470
|
-
Q(O(
|
|
4470
|
+
Q(O(Be), 1)
|
|
4471
4471
|
]),
|
|
4472
4472
|
_: 2
|
|
4473
4473
|
}, 1024))), 128))
|
|
@@ -4477,10 +4477,10 @@ const Ft = (e, n) => {
|
|
|
4477
4477
|
]),
|
|
4478
4478
|
actions: v(({ row: W }) => [
|
|
4479
4479
|
F(Bt, null, {
|
|
4480
|
-
default: v(({ copyToClipboard:
|
|
4480
|
+
default: v(({ copyToClipboard: Be }) => [
|
|
4481
4481
|
F(He, {
|
|
4482
4482
|
"data-testid": "action-entity-copy-id",
|
|
4483
|
-
onClick: (fr) => se(W,
|
|
4483
|
+
onClick: (fr) => se(W, Be)
|
|
4484
4484
|
}, {
|
|
4485
4485
|
default: v(() => [
|
|
4486
4486
|
Q(O(y(o)("consumer_groups.actions.copy_id")), 1)
|
|
@@ -4491,10 +4491,10 @@ const Ft = (e, n) => {
|
|
|
4491
4491
|
_: 2
|
|
4492
4492
|
}, 1024),
|
|
4493
4493
|
F(Bt, null, {
|
|
4494
|
-
default: v(({ copyToClipboard:
|
|
4494
|
+
default: v(({ copyToClipboard: Be }) => [
|
|
4495
4495
|
F(He, {
|
|
4496
4496
|
"data-testid": "action-entity-copy-json",
|
|
4497
|
-
onClick: (fr) => Y(W,
|
|
4497
|
+
onClick: (fr) => Y(W, Be)
|
|
4498
4498
|
}, {
|
|
4499
4499
|
default: v(() => [
|
|
4500
4500
|
Q(O(y(o)("consumer_groups.actions.copy_json")), 1)
|
|
@@ -4549,14 +4549,14 @@ const Ft = (e, n) => {
|
|
|
4549
4549
|
_: 1
|
|
4550
4550
|
}, 8, ["cache-identifier", "disable-pagination", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4551
4551
|
F(y(Ps), {
|
|
4552
|
-
"action-pending":
|
|
4552
|
+
"action-pending": S.value,
|
|
4553
4553
|
"data-testid": "delete-consumer-group-modal",
|
|
4554
4554
|
description: y(o)("consumer_groups.delete.description"),
|
|
4555
4555
|
"entity-name": C.value && (C.value.name || C.value.id),
|
|
4556
4556
|
"entity-type": y(yn).ConsumerGroup,
|
|
4557
4557
|
error: q.value,
|
|
4558
4558
|
title: y(o)("consumer_groups.delete.title"),
|
|
4559
|
-
visible:
|
|
4559
|
+
visible: x.value,
|
|
4560
4560
|
onCancel: ee,
|
|
4561
4561
|
onProceed: te
|
|
4562
4562
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
@@ -4583,7 +4583,7 @@ const Ft = (e, n) => {
|
|
|
4583
4583
|
class: "exit-modal-message",
|
|
4584
4584
|
keypath: e.config.consumerUsername ? "consumer_groups.consumers.exit.confirmation" : "consumer_groups.consumers.exit.confirmationNoUsername",
|
|
4585
4585
|
tag: "p"
|
|
4586
|
-
},
|
|
4586
|
+
}, Te({
|
|
4587
4587
|
consumerGroup: v(() => [
|
|
4588
4588
|
V("strong", null, O(P.value.name || P.value.id), 1)
|
|
4589
4589
|
]),
|
|
@@ -4645,7 +4645,7 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4645
4645
|
error: c,
|
|
4646
4646
|
loadItems: d,
|
|
4647
4647
|
results: u
|
|
4648
|
-
} = cr(t.config, (le =
|
|
4648
|
+
} = cr(t.config, (le = $e.form[(te = t.config) == null ? void 0 : te.app]) == null ? void 0 : le.consumersList, "", {
|
|
4649
4649
|
fetchedItemsKey: "data",
|
|
4650
4650
|
searchKeys: ["username", "custom_id", "id"]
|
|
4651
4651
|
}), { axiosInstance: g } = Kt({
|
|
@@ -4658,11 +4658,11 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4658
4658
|
// we need this to determine whether or not to show the description text
|
|
4659
4659
|
}))), b = T(() => {
|
|
4660
4660
|
var _, B;
|
|
4661
|
-
return (B =
|
|
4661
|
+
return (B = $e.form[(_ = t.config) == null ? void 0 : _.app]) == null ? void 0 : B.edit;
|
|
4662
4662
|
}), p = T(() => t.consumerGroupId ? tt.Edit : tt.Create), A = T(() => !!a.fields.name && !w.value), k = T(() => JSON.stringify(a.fields) !== JSON.stringify(i)), K = (_, B = "", ae = "") => {
|
|
4663
|
-
var G, ge, _e, de,
|
|
4664
|
-
let P = `${(G = t.config) == null ? void 0 : G.apiBaseUrl}${
|
|
4665
|
-
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((
|
|
4663
|
+
var G, ge, _e, de, Ne, Ge;
|
|
4664
|
+
let P = `${(G = t.config) == null ? void 0 : G.apiBaseUrl}${$e.form[(ge = t.config) == null ? void 0 : ge.app][_]}`;
|
|
4665
|
+
return ((_e = t.config) == null ? void 0 : _e.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((de = t.config) == null ? void 0 : de.controlPlaneId) || "") : ((Ne = t.config) == null ? void 0 : Ne.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (Ge = t.config) != null && Ge.workspace ? `/${t.config.workspace}` : "")), P = P.replace(/{id}/gi, B || t.consumerGroupId), (_ === "addConsumer" || _ === "removeConsumer") && (P = P.replace(/{consumerId}/gi, ae)), P;
|
|
4666
4666
|
}, h = () => {
|
|
4667
4667
|
var _;
|
|
4668
4668
|
o.push(((_ = t.config) == null ? void 0 : _.cancelRoute) || { name: "consumer-group-list" });
|
|
@@ -4679,9 +4679,9 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4679
4679
|
else
|
|
4680
4680
|
try {
|
|
4681
4681
|
const { data: de } = await g.get(K("getConsumers"));
|
|
4682
|
-
a.fields.consumers = "consumers" in de ? (_e = de == null ? void 0 : de.consumers) == null ? void 0 : _e.map((
|
|
4682
|
+
a.fields.consumers = "consumers" in de ? (_e = de == null ? void 0 : de.consumers) == null ? void 0 : _e.map((Ne) => Ne.id) : [];
|
|
4683
4683
|
} catch (de) {
|
|
4684
|
-
|
|
4684
|
+
x(de);
|
|
4685
4685
|
}
|
|
4686
4686
|
Object.assign(i, a.fields);
|
|
4687
4687
|
}, w = T(() => /^[0-9a-zA-Z.\-_~]*$/.test(a.fields.name) ? "" : r("consumer_groups.form.validation_errors.name")), N = () => {
|
|
@@ -4690,57 +4690,57 @@ const Fl = /* @__PURE__ */ Ft(vl, [["__scopeId", "data-v-69c5dd3a"]]), bl = { cl
|
|
|
4690
4690
|
name: a.fields.name,
|
|
4691
4691
|
tags: (B = (_ = a.fields.tags.split(",")) == null ? void 0 : _.map((ae) => String(ae || "").trim())) == null ? void 0 : B.filter((ae) => ae !== "")
|
|
4692
4692
|
};
|
|
4693
|
-
}, U = async (_, B = "") => await g.post(K("addConsumer", B, _), { consumer: _ }), C = async (_, B = "") => await g.delete(K("removeConsumer", B, _)),
|
|
4693
|
+
}, U = async (_, B = "") => await g.post(K("addConsumer", B, _), { consumer: _ }), C = async (_, B = "") => await g.delete(K("removeConsumer", B, _)), x = (_) => {
|
|
4694
4694
|
a.errorMessage = f(_), n("error", _);
|
|
4695
|
-
},
|
|
4695
|
+
}, S = (_ = t.consumerGroupId) => {
|
|
4696
4696
|
Object.assign(i, a.fields), n("update", { ...a.fields, id: _ });
|
|
4697
4697
|
}, q = (_, B, ae = t.consumerGroupId) => {
|
|
4698
4698
|
const P = _ == null ? void 0 : _.find((G) => G.status !== "fulfilled");
|
|
4699
|
-
P ?
|
|
4699
|
+
P ? x({
|
|
4700
4700
|
code: P.status,
|
|
4701
4701
|
message: B
|
|
4702
|
-
}) :
|
|
4702
|
+
}) : S(ae);
|
|
4703
4703
|
}, J = async () => {
|
|
4704
4704
|
let _ = "";
|
|
4705
4705
|
try {
|
|
4706
4706
|
const { data: B } = await g.post(K("create"), N());
|
|
4707
4707
|
_ = "item" in B ? B.item.id : B.id;
|
|
4708
4708
|
} catch (B) {
|
|
4709
|
-
|
|
4709
|
+
x(B);
|
|
4710
4710
|
}
|
|
4711
4711
|
if (a.fields.consumers.length > 0 && _)
|
|
4712
4712
|
try {
|
|
4713
4713
|
const B = a.fields.consumers.map((P) => U(P, _)), ae = await Promise.allSettled(B);
|
|
4714
4714
|
q(ae, r("consumer_groups.errors.add_consumer"), _);
|
|
4715
4715
|
} catch (B) {
|
|
4716
|
-
|
|
4716
|
+
x(B);
|
|
4717
4717
|
}
|
|
4718
4718
|
else
|
|
4719
|
-
a.fields.consumers.length === 0 && _ &&
|
|
4719
|
+
a.fields.consumers.length === 0 && _ && S(_);
|
|
4720
4720
|
}, X = async () => {
|
|
4721
4721
|
var ae;
|
|
4722
4722
|
try {
|
|
4723
4723
|
((ae = t.config) == null ? void 0 : ae.app) === "konnect" ? await g.put(K("edit"), N()) : await g.patch(K("edit"), N());
|
|
4724
4724
|
} catch (P) {
|
|
4725
|
-
|
|
4725
|
+
x(P);
|
|
4726
4726
|
}
|
|
4727
4727
|
const _ = a.fields.consumers.filter((P) => !i.consumers.includes(P)), B = i.consumers.filter((P) => !a.fields.consumers.includes(P));
|
|
4728
4728
|
if (B.length === 0 && _.length === 0)
|
|
4729
|
-
|
|
4729
|
+
S();
|
|
4730
4730
|
else {
|
|
4731
4731
|
if (B.length > 0)
|
|
4732
4732
|
try {
|
|
4733
4733
|
const P = B.map((ge) => C(ge)), G = await Promise.allSettled(P);
|
|
4734
4734
|
q(G, r("consumer_groups.errors.remove_consumer"));
|
|
4735
4735
|
} catch (P) {
|
|
4736
|
-
|
|
4736
|
+
x(P);
|
|
4737
4737
|
}
|
|
4738
4738
|
if (_.length > 0)
|
|
4739
4739
|
try {
|
|
4740
4740
|
const P = _.map((ge) => U(ge)), G = await Promise.allSettled(P);
|
|
4741
4741
|
q(G, r("consumer_groups.errors.add_consumer"));
|
|
4742
4742
|
} catch (P) {
|
|
4743
|
-
|
|
4743
|
+
x(P);
|
|
4744
4744
|
}
|
|
4745
4745
|
}
|
|
4746
4746
|
}, ee = async () => {
|
|
@@ -4868,7 +4868,7 @@ const Nl = /* @__PURE__ */ Ft(_l, [["__scopeId", "data-v-102d40d2"]]), wl = { cl
|
|
|
4868
4868
|
},
|
|
4869
4869
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
4870
4870
|
setup(e) {
|
|
4871
|
-
const n = e, { i18n: { t } } = ct.useI18n(), r = T(() =>
|
|
4871
|
+
const n = e, { i18n: { t } } = ct.useI18n(), r = T(() => $e.form[n.config.app].edit), o = E({
|
|
4872
4872
|
id: {},
|
|
4873
4873
|
name: {},
|
|
4874
4874
|
created_at: {},
|