@kong-ui-public/entities-data-plane-nodes 0.2.2 → 0.2.4
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,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { ref as b, unref as g, computed as v, watch as ke, inject as Be, toValue as Z, defineComponent as V, openBlock as h, createBlock as
|
|
1
|
+
var Me = Object.defineProperty;
|
|
2
|
+
var Ue = (e, t, r) => t in e ? Me(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var P = (e, t, r) => (Ue(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { ref as b, unref as g, computed as v, watch as ke, inject as Be, toValue as Z, defineComponent as V, openBlock as h, createBlock as $, resolveDynamicComponent as R, normalizeStyle as ee, withCtx as E, createElementBlock as I, toDisplayString as _, createCommentVNode as U, pushScopeId as te, popScopeId as re, createElementVNode as y, resolveComponent as M, Fragment as xe, createTextVNode as Y, createVNode as J, mergeModels as Pe, useModel as De, renderList as Ke } from "vue";
|
|
5
5
|
import { createI18n as Ce, i18nTComponent as Le } from "@kong-ui-public/i18n";
|
|
6
6
|
import fe from "axios";
|
|
7
7
|
import "@kong/kongponents";
|
|
@@ -574,29 +574,29 @@ function Ct(e, t) {
|
|
|
574
574
|
function Lt(e) {
|
|
575
575
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
576
576
|
}
|
|
577
|
-
var St = Ae, Nt = _t, It = kt, Tt = Ct, At = Lt,
|
|
577
|
+
var St = Ae, Nt = _t, It = kt, Tt = Ct, At = Lt, $t = xt, ce = {
|
|
578
578
|
isNothing: St,
|
|
579
579
|
isObject: Nt,
|
|
580
580
|
toArray: It,
|
|
581
581
|
repeat: Tt,
|
|
582
582
|
isNegativeZero: At,
|
|
583
|
-
extend:
|
|
583
|
+
extend: $t
|
|
584
584
|
};
|
|
585
|
-
function
|
|
585
|
+
function $e(e, t) {
|
|
586
586
|
var r = "", n = e.reason || "(unknown reason)";
|
|
587
587
|
return e.mark ? (e.mark.name && (r += 'in "' + e.mark.name + '" '), r += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (r += `
|
|
588
588
|
|
|
589
589
|
` + e.mark.snippet), n + " " + r) : n;
|
|
590
590
|
}
|
|
591
591
|
function W(e, t) {
|
|
592
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
592
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = $e(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
593
593
|
}
|
|
594
594
|
W.prototype = Object.create(Error.prototype);
|
|
595
595
|
W.prototype.constructor = W;
|
|
596
596
|
W.prototype.toString = function(e) {
|
|
597
|
-
return this.name + ": " +
|
|
597
|
+
return this.name + ": " + $e(this, e);
|
|
598
598
|
};
|
|
599
|
-
var
|
|
599
|
+
var F = W, Et = [
|
|
600
600
|
"kind",
|
|
601
601
|
"multi",
|
|
602
602
|
"resolve",
|
|
@@ -622,14 +622,14 @@ function jt(e) {
|
|
|
622
622
|
}
|
|
623
623
|
function qt(e, t) {
|
|
624
624
|
if (t = t || {}, Object.keys(t).forEach(function(r) {
|
|
625
|
-
if (
|
|
626
|
-
throw new
|
|
625
|
+
if (Et.indexOf(r) === -1)
|
|
626
|
+
throw new F('Unknown option "' + r + '" is met in definition of "' + e + '" YAML type.');
|
|
627
627
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
628
628
|
return !0;
|
|
629
629
|
}, this.construct = t.construct || function(r) {
|
|
630
630
|
return r;
|
|
631
631
|
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = jt(t.styleAliases || null), Ot.indexOf(this.kind) === -1)
|
|
632
|
-
throw new
|
|
632
|
+
throw new F('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
633
633
|
}
|
|
634
634
|
var x = qt;
|
|
635
635
|
function we(e, t) {
|
|
@@ -673,27 +673,27 @@ le.prototype.extend = function(e) {
|
|
|
673
673
|
else if (e && (Array.isArray(e.implicit) || Array.isArray(e.explicit)))
|
|
674
674
|
e.implicit && (t = t.concat(e.implicit)), e.explicit && (r = r.concat(e.explicit));
|
|
675
675
|
else
|
|
676
|
-
throw new
|
|
676
|
+
throw new F("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
677
677
|
t.forEach(function(a) {
|
|
678
678
|
if (!(a instanceof x))
|
|
679
|
-
throw new
|
|
679
|
+
throw new F("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
680
680
|
if (a.loadKind && a.loadKind !== "scalar")
|
|
681
|
-
throw new
|
|
681
|
+
throw new F("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
682
682
|
if (a.multi)
|
|
683
|
-
throw new
|
|
683
|
+
throw new F("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
684
684
|
}), r.forEach(function(a) {
|
|
685
685
|
if (!(a instanceof x))
|
|
686
|
-
throw new
|
|
686
|
+
throw new F("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
687
687
|
});
|
|
688
688
|
var n = Object.create(le.prototype);
|
|
689
689
|
return n.implicit = (this.implicit || []).concat(t), n.explicit = (this.explicit || []).concat(r), n.compiledImplicit = we(n, "implicit"), n.compiledExplicit = we(n, "explicit"), n.compiledTypeMap = zt(n.compiledImplicit, n.compiledExplicit), n;
|
|
690
690
|
};
|
|
691
|
-
var
|
|
691
|
+
var Ft = le, Mt = new x("tag:yaml.org,2002:str", {
|
|
692
692
|
kind: "scalar",
|
|
693
693
|
construct: function(e) {
|
|
694
694
|
return e !== null ? e : "";
|
|
695
695
|
}
|
|
696
|
-
}),
|
|
696
|
+
}), Ut = new x("tag:yaml.org,2002:seq", {
|
|
697
697
|
kind: "sequence",
|
|
698
698
|
construct: function(e) {
|
|
699
699
|
return e !== null ? e : [];
|
|
@@ -703,14 +703,14 @@ var Mt = le, Ut = new x("tag:yaml.org,2002:str", {
|
|
|
703
703
|
construct: function(e) {
|
|
704
704
|
return e !== null ? e : {};
|
|
705
705
|
}
|
|
706
|
-
}),
|
|
706
|
+
}), Pt = new Ft({
|
|
707
707
|
explicit: [
|
|
708
|
+
Mt,
|
|
708
709
|
Ut,
|
|
709
|
-
Ft,
|
|
710
710
|
Bt
|
|
711
711
|
]
|
|
712
712
|
});
|
|
713
|
-
function
|
|
713
|
+
function Dt(e) {
|
|
714
714
|
if (e === null)
|
|
715
715
|
return !0;
|
|
716
716
|
var t = e.length;
|
|
@@ -724,7 +724,7 @@ function Rt(e) {
|
|
|
724
724
|
}
|
|
725
725
|
var Vt = new x("tag:yaml.org,2002:null", {
|
|
726
726
|
kind: "scalar",
|
|
727
|
-
resolve:
|
|
727
|
+
resolve: Dt,
|
|
728
728
|
construct: Kt,
|
|
729
729
|
predicate: Rt,
|
|
730
730
|
represent: {
|
|
@@ -933,24 +933,24 @@ var ur = new x("tag:yaml.org,2002:float", {
|
|
|
933
933
|
predicate: lr,
|
|
934
934
|
represent: sr,
|
|
935
935
|
defaultStyle: "lowercase"
|
|
936
|
-
}), cr =
|
|
936
|
+
}), cr = Pt.extend({
|
|
937
937
|
implicit: [
|
|
938
938
|
Vt,
|
|
939
939
|
Wt,
|
|
940
940
|
rr,
|
|
941
941
|
ur
|
|
942
942
|
]
|
|
943
|
-
}), dr = cr,
|
|
943
|
+
}), dr = cr, Ee = new RegExp(
|
|
944
944
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
945
945
|
), Oe = new RegExp(
|
|
946
946
|
"^([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]))?))?$"
|
|
947
947
|
);
|
|
948
948
|
function pr(e) {
|
|
949
|
-
return e === null ? !1 :
|
|
949
|
+
return e === null ? !1 : Ee.exec(e) !== null || Oe.exec(e) !== null;
|
|
950
950
|
}
|
|
951
951
|
function fr(e) {
|
|
952
952
|
var t, r, n, a, i, o, s, u = 0, l = null, p, c, f;
|
|
953
|
-
if (t =
|
|
953
|
+
if (t = Ee.exec(e), t === null && (t = Oe.exec(e)), t === null)
|
|
954
954
|
throw new Error("Date resolve error");
|
|
955
955
|
if (r = +t[1], n = +t[2] - 1, a = +t[3], !t[4])
|
|
956
956
|
return new Date(Date.UTC(r, n, a));
|
|
@@ -1062,17 +1062,17 @@ function Ar(e) {
|
|
|
1062
1062
|
n = o[t], a = Object.keys(n), i[t] = [a[0], n[a[0]]];
|
|
1063
1063
|
return i;
|
|
1064
1064
|
}
|
|
1065
|
-
var
|
|
1065
|
+
var $r = new x("tag:yaml.org,2002:pairs", {
|
|
1066
1066
|
kind: "sequence",
|
|
1067
1067
|
resolve: Tr,
|
|
1068
1068
|
construct: Ar
|
|
1069
|
-
}),
|
|
1069
|
+
}), Er = Object.prototype.hasOwnProperty;
|
|
1070
1070
|
function Or(e) {
|
|
1071
1071
|
if (e === null)
|
|
1072
1072
|
return !0;
|
|
1073
1073
|
var t, r = e;
|
|
1074
1074
|
for (t in r)
|
|
1075
|
-
if (
|
|
1075
|
+
if (Er.call(r, t) && r[t] !== null)
|
|
1076
1076
|
return !1;
|
|
1077
1077
|
return !0;
|
|
1078
1078
|
}
|
|
@@ -1092,7 +1092,7 @@ dr.extend({
|
|
|
1092
1092
|
explicit: [
|
|
1093
1093
|
kr,
|
|
1094
1094
|
Nr,
|
|
1095
|
-
|
|
1095
|
+
$r,
|
|
1096
1096
|
qr
|
|
1097
1097
|
]
|
|
1098
1098
|
});
|
|
@@ -1100,19 +1100,19 @@ function _e(e) {
|
|
|
1100
1100
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1101
1101
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1102
1102
|
}
|
|
1103
|
-
var zr = new Array(256),
|
|
1104
|
-
for (var
|
|
1105
|
-
zr[
|
|
1106
|
-
const
|
|
1103
|
+
var zr = new Array(256), Fr = new Array(256);
|
|
1104
|
+
for (var D = 0; D < 256; D++)
|
|
1105
|
+
zr[D] = _e(D) ? 1 : 0, Fr[D] = _e(D);
|
|
1106
|
+
const Mr = [];
|
|
1107
1107
|
for (let e = 0; e < 256; ++e)
|
|
1108
|
-
|
|
1108
|
+
Mr.push((e + 256).toString(16).slice(1));
|
|
1109
1109
|
typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1110
|
-
const { useAxios: Kn, useDeleteUrlBuilder: Rn, useErrors:
|
|
1110
|
+
const { useAxios: Kn, useDeleteUrlBuilder: Rn, useErrors: Ur, useExternalLinkCreator: Vn, useFetchUrlBuilder: Hn, useFetcher: Yn, useDebouncedFilter: Zn, useStringHelpers: Wn, useHelpers: Qn, useGatewayFeatureSupported: Gn, useTruncationDetector: Jn, useValidators: Xn } = wt;
|
|
1111
1111
|
var O = /* @__PURE__ */ ((e) => (e.Debug = "debug", e.Info = "info", e.Notice = "notice", e.Warn = "warn", e.Error = "error", e.Critical = "crit", e))(O || {});
|
|
1112
1112
|
class Br {
|
|
1113
1113
|
constructor(t) {
|
|
1114
|
-
|
|
1115
|
-
|
|
1114
|
+
P(this, "concurrentTokenSet", /* @__PURE__ */ new Set());
|
|
1115
|
+
P(this, "concurrentTokenBorrowQueue", []);
|
|
1116
1116
|
for (let r = 0; r < t; ++r)
|
|
1117
1117
|
this.concurrentTokenSet.add(Symbol(`token-${r}`));
|
|
1118
1118
|
}
|
|
@@ -1153,8 +1153,8 @@ class pe extends Error {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
class X {
|
|
1155
1155
|
constructor(t) {
|
|
1156
|
-
|
|
1157
|
-
|
|
1156
|
+
P(this, "tokenBucket", null);
|
|
1157
|
+
P(this, "schedule", async (t) => {
|
|
1158
1158
|
let r;
|
|
1159
1159
|
this.tokenBucket && (r = await this.tokenBucket.borrowToken());
|
|
1160
1160
|
try {
|
|
@@ -1164,18 +1164,18 @@ class X {
|
|
|
1164
1164
|
throw r == null || r(), n;
|
|
1165
1165
|
}
|
|
1166
1166
|
});
|
|
1167
|
-
|
|
1167
|
+
P(this, "cancelAll", (t, r) => {
|
|
1168
1168
|
var n;
|
|
1169
1169
|
(n = this.tokenBucket) == null || n.clearWaitingQueue(new pe(t, r));
|
|
1170
1170
|
});
|
|
1171
1171
|
t.maxConcurrentAsyncs > 0 && (this.tokenBucket = new Br(t.maxConcurrentAsyncs));
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1174
|
+
const Pr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs: 0 }) : new X(e), Dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1175
1175
|
__proto__: null,
|
|
1176
1176
|
AsyncAbortException: pe,
|
|
1177
1177
|
AsyncScheduler: X,
|
|
1178
|
-
useAsyncScheduler:
|
|
1178
|
+
useAsyncScheduler: Pr
|
|
1179
1179
|
}, Symbol.toStringTag, { value: "Module" })), je = [
|
|
1180
1180
|
O.Debug,
|
|
1181
1181
|
O.Info,
|
|
@@ -1218,7 +1218,7 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1218
1218
|
return o !== 0 && (n = `${o} ${t.t("modal.revert_to_default_after.hours")} ${n}`), n;
|
|
1219
1219
|
});
|
|
1220
1220
|
}, Hr = (e) => {
|
|
1221
|
-
const t = e.requestExecutor ?? ((o) => o()), { getDataPlaneLogLevel: r, setDataPlaneLogLevel: n } = e, { getMessageFromError: a } =
|
|
1221
|
+
const t = e.requestExecutor ?? ((o) => o()), { getDataPlaneLogLevel: r, setDataPlaneLogLevel: n } = e, { getMessageFromError: a } = Ur();
|
|
1222
1222
|
return { checkDataPlaneLogLevel: (o, s) => {
|
|
1223
1223
|
const u = b(Z(s == null ? void 0 : s.currentLogLevelHint) ?? null);
|
|
1224
1224
|
u.value === null && t(async () => {
|
|
@@ -1253,13 +1253,13 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1253
1253
|
}, Symbol.toStringTag, { value: "Module" })), z = {
|
|
1254
1254
|
useI18n: ne,
|
|
1255
1255
|
...Yr,
|
|
1256
|
-
...
|
|
1256
|
+
...Dr
|
|
1257
1257
|
}, j = "24px", ie = (e, t) => {
|
|
1258
1258
|
const r = e.__vccOpts || e;
|
|
1259
1259
|
for (const [n, a] of t)
|
|
1260
1260
|
r[n] = a;
|
|
1261
1261
|
return r;
|
|
1262
|
-
}, Zr = (e) => (te("data-v-
|
|
1262
|
+
}, Zr = (e) => (te("data-v-81eeb177"), e = e(), re(), e), Wr = ["aria-hidden"], Qr = {
|
|
1263
1263
|
key: 0,
|
|
1264
1264
|
"data-testid": "kui-icon-svg-title"
|
|
1265
1265
|
}, Gr = /* @__PURE__ */ Zr(() => /* @__PURE__ */ y("path", {
|
|
@@ -1334,13 +1334,13 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1334
1334
|
lineHeight: "0",
|
|
1335
1335
|
width: r.value
|
|
1336
1336
|
}));
|
|
1337
|
-
return (a, i) => (h(),
|
|
1337
|
+
return (a, i) => (h(), $(R(e.as), {
|
|
1338
1338
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1339
1339
|
class: "kui-icon check-circle-icon",
|
|
1340
1340
|
"data-testid": "kui-icon-wrapper-check-circle-icon",
|
|
1341
1341
|
style: ee(n.value)
|
|
1342
1342
|
}, {
|
|
1343
|
-
default:
|
|
1343
|
+
default: E(() => [
|
|
1344
1344
|
(h(), I("svg", {
|
|
1345
1345
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1346
1346
|
"data-testid": "kui-icon-svg-check-circle-icon",
|
|
@@ -1351,14 +1351,14 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1351
1351
|
width: "100%",
|
|
1352
1352
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1353
1353
|
}, [
|
|
1354
|
-
e.title ? (h(), I("title", Qr, _(e.title), 1)) :
|
|
1354
|
+
e.title ? (h(), I("title", Qr, _(e.title), 1)) : U("", !0),
|
|
1355
1355
|
Gr
|
|
1356
1356
|
], 8, Wr))
|
|
1357
1357
|
]),
|
|
1358
1358
|
_: 1
|
|
1359
1359
|
}, 8, ["aria-hidden", "style"]));
|
|
1360
1360
|
}
|
|
1361
|
-
}), Xr = /* @__PURE__ */ ie(Jr, [["__scopeId", "data-v-
|
|
1361
|
+
}), Xr = /* @__PURE__ */ ie(Jr, [["__scopeId", "data-v-81eeb177"]]), en = (e) => (te("data-v-20ae6e1c"), e = e(), re(), e), tn = ["aria-hidden"], rn = {
|
|
1362
1362
|
key: 0,
|
|
1363
1363
|
"data-testid": "kui-icon-svg-title"
|
|
1364
1364
|
}, nn = /* @__PURE__ */ en(() => /* @__PURE__ */ y("path", {
|
|
@@ -1433,13 +1433,13 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1433
1433
|
lineHeight: "0",
|
|
1434
1434
|
width: r.value
|
|
1435
1435
|
}));
|
|
1436
|
-
return (a, i) => (h(),
|
|
1436
|
+
return (a, i) => (h(), $(R(e.as), {
|
|
1437
1437
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1438
1438
|
class: "kui-icon clear-icon",
|
|
1439
1439
|
"data-testid": "kui-icon-wrapper-clear-icon",
|
|
1440
1440
|
style: ee(n.value)
|
|
1441
1441
|
}, {
|
|
1442
|
-
default:
|
|
1442
|
+
default: E(() => [
|
|
1443
1443
|
(h(), I("svg", {
|
|
1444
1444
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1445
1445
|
"data-testid": "kui-icon-svg-clear-icon",
|
|
@@ -1450,14 +1450,14 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1450
1450
|
width: "100%",
|
|
1451
1451
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1452
1452
|
}, [
|
|
1453
|
-
e.title ? (h(), I("title", rn, _(e.title), 1)) :
|
|
1453
|
+
e.title ? (h(), I("title", rn, _(e.title), 1)) : U("", !0),
|
|
1454
1454
|
nn
|
|
1455
1455
|
], 8, tn))
|
|
1456
1456
|
]),
|
|
1457
1457
|
_: 1
|
|
1458
1458
|
}, 8, ["aria-hidden", "style"]));
|
|
1459
1459
|
}
|
|
1460
|
-
}), on = /* @__PURE__ */ ie(an, [["__scopeId", "data-v-
|
|
1460
|
+
}), on = /* @__PURE__ */ ie(an, [["__scopeId", "data-v-20ae6e1c"]]), sn = (e) => (te("data-v-c5e89abd"), e = e(), re(), e), ln = ["aria-hidden"], un = {
|
|
1461
1461
|
key: 0,
|
|
1462
1462
|
"data-testid": "kui-icon-svg-title"
|
|
1463
1463
|
}, cn = /* @__PURE__ */ sn(() => /* @__PURE__ */ y("path", {
|
|
@@ -1532,13 +1532,13 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1532
1532
|
lineHeight: "0",
|
|
1533
1533
|
width: r.value
|
|
1534
1534
|
}));
|
|
1535
|
-
return (a, i) => (h(),
|
|
1535
|
+
return (a, i) => (h(), $(R(e.as), {
|
|
1536
1536
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1537
1537
|
class: "kui-icon equal-icon",
|
|
1538
1538
|
"data-testid": "kui-icon-wrapper-equal-icon",
|
|
1539
1539
|
style: ee(n.value)
|
|
1540
1540
|
}, {
|
|
1541
|
-
default:
|
|
1541
|
+
default: E(() => [
|
|
1542
1542
|
(h(), I("svg", {
|
|
1543
1543
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1544
1544
|
"data-testid": "kui-icon-svg-equal-icon",
|
|
@@ -1549,14 +1549,14 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1549
1549
|
width: "100%",
|
|
1550
1550
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1551
1551
|
}, [
|
|
1552
|
-
e.title ? (h(), I("title", un, _(e.title), 1)) :
|
|
1552
|
+
e.title ? (h(), I("title", un, _(e.title), 1)) : U("", !0),
|
|
1553
1553
|
cn
|
|
1554
1554
|
], 8, ln))
|
|
1555
1555
|
]),
|
|
1556
1556
|
_: 1
|
|
1557
1557
|
}, 8, ["aria-hidden", "style"]));
|
|
1558
1558
|
}
|
|
1559
|
-
}), pn = /* @__PURE__ */ ie(dn, [["__scopeId", "data-v-
|
|
1559
|
+
}), pn = /* @__PURE__ */ ie(dn, [["__scopeId", "data-v-c5e89abd"]]), qe = (e) => (te("data-v-50d7a43a"), e = e(), re(), e), fn = ["aria-hidden"], gn = {
|
|
1560
1560
|
key: 0,
|
|
1561
1561
|
"data-testid": "kui-icon-svg-title"
|
|
1562
1562
|
}, hn = /* @__PURE__ */ qe(() => /* @__PURE__ */ y("path", {
|
|
@@ -1640,13 +1640,13 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1640
1640
|
lineHeight: "0",
|
|
1641
1641
|
width: r.value
|
|
1642
1642
|
}));
|
|
1643
|
-
return (a, i) => (h(),
|
|
1643
|
+
return (a, i) => (h(), $(R(e.as), {
|
|
1644
1644
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1645
1645
|
class: "kui-icon progress-icon",
|
|
1646
1646
|
"data-testid": "kui-icon-wrapper-progress-icon",
|
|
1647
1647
|
style: ee(n.value)
|
|
1648
1648
|
}, {
|
|
1649
|
-
default:
|
|
1649
|
+
default: E(() => [
|
|
1650
1650
|
(h(), I("svg", {
|
|
1651
1651
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1652
1652
|
"data-testid": "kui-icon-svg-progress-icon",
|
|
@@ -1657,7 +1657,7 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1657
1657
|
width: "100%",
|
|
1658
1658
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1659
1659
|
}, [
|
|
1660
|
-
e.title ? (h(), I("title", gn, _(e.title), 1)) :
|
|
1660
|
+
e.title ? (h(), I("title", gn, _(e.title), 1)) : U("", !0),
|
|
1661
1661
|
hn,
|
|
1662
1662
|
vn
|
|
1663
1663
|
], 8, fn))
|
|
@@ -1665,7 +1665,7 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1665
1665
|
_: 1
|
|
1666
1666
|
}, 8, ["aria-hidden", "style"]));
|
|
1667
1667
|
}
|
|
1668
|
-
}), yn = /* @__PURE__ */ ie(mn, [["__scopeId", "data-v-
|
|
1668
|
+
}), yn = /* @__PURE__ */ ie(mn, [["__scopeId", "data-v-50d7a43a"]]), bn = { "data-testid": "log-change-action" }, wn = { key: 0 }, _n = { "data-testid": "log-change-action-current-level" }, kn = { key: 0 }, xn = { "data-testid": "log-change-action-target-level" }, Cn = { "data-testid": "log-change-status" }, Ln = /* @__PURE__ */ V({
|
|
1669
1669
|
__name: "CLLModalNodeRow",
|
|
1670
1670
|
props: {
|
|
1671
1671
|
dataPlaneId: {},
|
|
@@ -1728,7 +1728,7 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1728
1728
|
}
|
|
1729
1729
|
});
|
|
1730
1730
|
return (c, f) => {
|
|
1731
|
-
const d =
|
|
1731
|
+
const d = M("KSkeleton"), T = M("KBadge"), S = M("KTooltip");
|
|
1732
1732
|
return h(), I("tr", null, [
|
|
1733
1733
|
y("td", null, _(c.hostname), 1),
|
|
1734
1734
|
y("td", bn, [
|
|
@@ -1737,41 +1737,41 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1737
1737
|
g(a) !== c.targetLogLevel ? (h(), I("span", kn, [
|
|
1738
1738
|
Y(" → "),
|
|
1739
1739
|
y("span", xn, _(g(n).t(`log_level.${c.targetLogLevel}`)), 1)
|
|
1740
|
-
])) :
|
|
1741
|
-
], 64)) : (h(),
|
|
1740
|
+
])) : U("", !0)
|
|
1741
|
+
], 64)) : (h(), $(d, {
|
|
1742
1742
|
key: 1,
|
|
1743
1743
|
type: "spinner"
|
|
1744
1744
|
}))
|
|
1745
1745
|
]),
|
|
1746
1746
|
y("td", Cn, [
|
|
1747
|
-
g(o) ? (h(),
|
|
1747
|
+
g(o) ? (h(), $(S, {
|
|
1748
1748
|
key: 0,
|
|
1749
1749
|
text: g(o)
|
|
1750
1750
|
}, {
|
|
1751
|
-
default:
|
|
1751
|
+
default: E(() => [
|
|
1752
1752
|
J(T, {
|
|
1753
1753
|
appearance: u.value,
|
|
1754
1754
|
class: "badge-cell"
|
|
1755
1755
|
}, {
|
|
1756
|
-
icon:
|
|
1757
|
-
(h(),
|
|
1756
|
+
icon: E(() => [
|
|
1757
|
+
(h(), $(R(p.value)))
|
|
1758
1758
|
]),
|
|
1759
|
-
default:
|
|
1759
|
+
default: E(() => [
|
|
1760
1760
|
Y(" " + _(l.value), 1)
|
|
1761
1761
|
]),
|
|
1762
1762
|
_: 1
|
|
1763
1763
|
}, 8, ["appearance"])
|
|
1764
1764
|
]),
|
|
1765
1765
|
_: 1
|
|
1766
|
-
}, 8, ["text"])) : (h(),
|
|
1766
|
+
}, 8, ["text"])) : (h(), $(T, {
|
|
1767
1767
|
key: 1,
|
|
1768
1768
|
appearance: u.value,
|
|
1769
1769
|
class: "badge-cell"
|
|
1770
1770
|
}, {
|
|
1771
|
-
icon:
|
|
1772
|
-
(h(),
|
|
1771
|
+
icon: E(() => [
|
|
1772
|
+
(h(), $(R(p.value)))
|
|
1773
1773
|
]),
|
|
1774
|
-
default:
|
|
1774
|
+
default: E(() => [
|
|
1775
1775
|
Y(" " + _(l.value), 1)
|
|
1776
1776
|
]),
|
|
1777
1777
|
_: 1
|
|
@@ -1789,7 +1789,7 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1789
1789
|
key: 0,
|
|
1790
1790
|
class: "warning-message",
|
|
1791
1791
|
"data-testid": "log-level-warning-message"
|
|
1792
|
-
}, Tn = { class: "revert-after-wrapper" }, An = { class: "time" },
|
|
1792
|
+
}, Tn = { class: "revert-after-wrapper" }, An = { class: "time" }, $n = { class: "seconds" }, En = {
|
|
1793
1793
|
class: "formatted-time",
|
|
1794
1794
|
"data-testid": "log-level-timeout-formatted"
|
|
1795
1795
|
}, On = {
|
|
@@ -1798,7 +1798,7 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1798
1798
|
}, jn = { style: { width: "40%" } }, qn = { style: { width: "40%" } }, zn = /* @__PURE__ */ V({
|
|
1799
1799
|
name: "ChangeLogLevelModal",
|
|
1800
1800
|
__name: "ChangeLogLevelModal",
|
|
1801
|
-
props: /* @__PURE__ */
|
|
1801
|
+
props: /* @__PURE__ */ Pe({
|
|
1802
1802
|
instanceList: {},
|
|
1803
1803
|
instanceLogLevel: {},
|
|
1804
1804
|
requests: {}
|
|
@@ -1808,7 +1808,7 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1808
1808
|
}),
|
|
1809
1809
|
emits: ["update:visible"],
|
|
1810
1810
|
setup(e) {
|
|
1811
|
-
const t = e, r =
|
|
1811
|
+
const t = e, r = De(e, "visible"), n = O.Notice, { i18n: a } = z.useI18n(), i = b("edit"), o = b(n), s = b("60"), u = v(() => Math.floor(Number(s.value))), l = v(() => t.instanceList.filter((A) => A.hasDLLCapability !== !1)), p = v(() => {
|
|
1812
1812
|
const A = l.value.length === 1 ? a.t("modal.change_log_level.summary_with_name", { name: l.value[0].hostname }) : a.t("modal.change_log_level.summary_with_number", { number: `${l.value.length}` });
|
|
1813
1813
|
return a.t("modal.change_log_level.title", { summary: A });
|
|
1814
1814
|
}), c = v(() => i.value === "submitting" || isNaN(u.value) || u.value <= 0 || l.value.length === 0), f = z.useLogLevelCandidateSelectItems({
|
|
@@ -1848,8 +1848,8 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1848
1848
|
}
|
|
1849
1849
|
});
|
|
1850
1850
|
return (A, N) => {
|
|
1851
|
-
const C =
|
|
1852
|
-
return h(),
|
|
1851
|
+
const C = M("KSelect"), L = M("KLabel"), q = M("KInput"), k = M("KModal");
|
|
1852
|
+
return h(), $(k, {
|
|
1853
1853
|
"action-button-disabled": c.value,
|
|
1854
1854
|
"action-button-text": G.value,
|
|
1855
1855
|
"data-testid": "change-log-level-modal",
|
|
@@ -1861,8 +1861,8 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1861
1861
|
onCancel: m,
|
|
1862
1862
|
onProceed: se
|
|
1863
1863
|
}, {
|
|
1864
|
-
default:
|
|
1865
|
-
i.value === "edit" ? (h(),
|
|
1864
|
+
default: E(() => [
|
|
1865
|
+
i.value === "edit" ? (h(), $(C, {
|
|
1866
1866
|
key: 0,
|
|
1867
1867
|
modelValue: o.value,
|
|
1868
1868
|
"onUpdate:modelValue": N[0] || (N[0] = (w) => o.value = w),
|
|
@@ -1870,20 +1870,20 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1870
1870
|
"data-testid": "log-level-select",
|
|
1871
1871
|
items: g(f),
|
|
1872
1872
|
label: g(a).t("modal.select_log_level_title")
|
|
1873
|
-
}, null, 8, ["modelValue", "items", "label"])) :
|
|
1873
|
+
}, null, 8, ["modelValue", "items", "label"])) : U("", !0),
|
|
1874
1874
|
y("div", Nn, [
|
|
1875
1875
|
J(L, null, {
|
|
1876
|
-
default:
|
|
1876
|
+
default: E(() => [
|
|
1877
1877
|
Y(_(g(a).t(`log_level.${o.value}`)), 1)
|
|
1878
1878
|
]),
|
|
1879
1879
|
_: 1
|
|
1880
1880
|
}),
|
|
1881
1881
|
y("div", null, _(g(d).explanation), 1),
|
|
1882
|
-
g(d).warning ? (h(), I("div", In, _(g(d).warning), 1)) :
|
|
1882
|
+
g(d).warning ? (h(), I("div", In, _(g(d).warning), 1)) : U("", !0)
|
|
1883
1883
|
]),
|
|
1884
1884
|
y("div", Tn, [
|
|
1885
1885
|
J(L, null, {
|
|
1886
|
-
default:
|
|
1886
|
+
default: E(() => [
|
|
1887
1887
|
Y(_(g(a).t("modal.revert_to_default_after.label")), 1)
|
|
1888
1888
|
]),
|
|
1889
1889
|
_: 1
|
|
@@ -1899,8 +1899,8 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1899
1899
|
min: "1",
|
|
1900
1900
|
type: "number"
|
|
1901
1901
|
}, null, 8, ["modelValue", "disabled", "error"]),
|
|
1902
|
-
y("span",
|
|
1903
|
-
y("span",
|
|
1902
|
+
y("span", $n, _(g(a).t("modal.revert_to_default_after.seconds")), 1),
|
|
1903
|
+
y("span", En, _(g(T)), 1)
|
|
1904
1904
|
])
|
|
1905
1905
|
]),
|
|
1906
1906
|
y("table", On, [
|
|
@@ -1912,10 +1912,10 @@ const Dr = (e) => e instanceof X ? e : e === null ? new X({ maxConcurrentAsyncs:
|
|
|
1912
1912
|
y("tbody", null, [
|
|
1913
1913
|
(h(!0), I(xe, null, Ke(t.instanceList, (w) => {
|
|
1914
1914
|
var B;
|
|
1915
|
-
return h(),
|
|
1915
|
+
return h(), $(Sn, {
|
|
1916
1916
|
key: w.id,
|
|
1917
1917
|
ref_for: !0,
|
|
1918
|
-
ref: (
|
|
1918
|
+
ref: (Fe) => Q(w.id, Fe),
|
|
1919
1919
|
"check-log-level": g(oe),
|
|
1920
1920
|
"data-plane-id": w.id,
|
|
1921
1921
|
"data-testid": `data-plane-node-list-row-${w.id}`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(y,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","axios","@kong/kongponents","vue-router"],n):(y=typeof globalThis<"u"?globalThis:y||self,n(y["kong-ui-public-entities-data-plane-nodes"]={},y.Vue,y["kong-ui-public-i18n"],y.axios))})(this,function(y,n,N,G){"use strict";var rn=Object.defineProperty;var nn=(y,n,N)=>n in y?rn(y,n,{enumerable:!0,configurable:!0,writable:!0,value:N}):y[n]=N;var D=(y,n,N)=>(nn(y,typeof n!="symbol"?n+"":n,N),N);const ye={modal:{action_button:{confirm:"Confirm",submitting:"Submitting...",ok:"OK"},change_log_level:{title:"Change Log Level ({summary})",summary_with_name:"Node {name}",summary_with_number:"{number} Nodes"},dp_list:{header:{host:"Host",action:"Action",status:"Status"},status:{failed:"Failure",loading:"Loading",pending:"Pending",succeed:"Succeed",not_supported:"Not Supported"}},log_level_disk_space_warning:"If left on for extended periods of time, can result in excess disk space consumption.",log_level_explanation:{debug:"Provides debug information about the plugin’s run loop and each individual plugin or other components.",info:"Provides messages that provide a record of the normal operation of the system.",notice:"Provides messages that provide a record of the normal operation of the system, but also alerts conditions that may require monitoring. Kong does not make a large difference between info and notice.",warn:"Is used to log any abnormal behavior that doesn’t result in dropped transactions but requires further investigation.",error:"Is used for logging errors that result in a request being dropped.",crit:"Is used when Kong is working under critical conditions and not working properly, thus affecting several clients."},revert_to_default_after:{label:"Revert to default after",hours:"hour",minutes:"min",seconds:"seconds"},select_log_level_title:"Select Log Level"},log_level:{debug:"Debug",info:"Info",notice:"Notice",warn:"Warn",error:"Error",crit:"Critical",not_applicable:"N/A"}};function q(){const e=N.createI18n("en-us",ye);return{i18n:e,i18nT:N.i18nTComponent(e)}}var B=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))(B||{});function be(){return{getAxiosInstance:(e={})=>{try{const t=n.inject("get-axios-instance",void 0);return typeof t=="function"?t(e):G.create({withCredentials:!0,timeout:3e4,...e})}catch(t){return console.warn("getAxiosInstance:",t.message||t),G.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var t;return((t=e==null?void 0:e.response)==null?void 0:t.headers["x-datadog-trace-id"])||""}}}function we(){return{debounce:(e,t)=>{let r;return(...o)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...o)},t)}}}}function K(e={}){const{getAxiosInstance:t}=be();return{axiosInstance:t(e)}}const ke={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},_e={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ve={actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON"},errors:{edit:"The entity could not be edited at this time."}},Ce={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},xe={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},Se={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Ne={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Le={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ee={utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},Ie={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},Te={global:ke,deleteModal:_e,baseForm:ve,baseTable:Ce,baseConfigCard:xe,filter:Se,debouncedFilter:Ne,errors:Le,validationErrors:Ee,toggleModal:Ie};function z(){const e=N.createI18n("en-us",Te);return{i18n:e,i18nT:N.i18nTComponent(e)}}function J(){const e=(r,o)=>(o==null?void 0:o[r])??void 0,t=(r,o)=>{if(r.length!==o.length)return!1;const a=new Set([...r,...o]);for(const i of a){const l=r.filter(u=>u===i).length,s=o.filter(u=>u===i).length;if(l!==s)return!1}return!0};return{getPropValue:e,objectsAreEqual:(r,o,a)=>{if(a){if(Object.keys(r).length===Object.keys(o).length)for(const i in r)if(Array.isArray(r[i])&&Array.isArray(o[i])){if(t(r[i],o[i]))continue;return!1}else{if(r[i]===o[i])continue;return!1}else return!1;return!0}try{return JSON.stringify(r)===JSON.stringify(o)}catch{return!1}},sortAlpha:r=>(o,a)=>{let i=o[r]===void 0||o[r]===null?"":o[r],l=a[r]===void 0||a[r]===null?"":a[r];return Array.isArray(o[r])&&(i=o[r][0]),Array.isArray(a[r])&&(l=a[r][0]),i.localeCompare(l)},isValidUuid:r=>r?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(r):!1}}function Ae(e,t,r,o={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:a}=K(e.axiosRequestConfig),{i18n:{t:i}}=z(),{debounce:l}=we(),s=l(async m=>{await Q(m)},200),u=n.ref(!1),c=n.ref(""),f=n.ref(""),d=n.ref([]),g=n.ref([]),p=n.ref(void 0),x=n.unref(t);let v=`${e.apiBaseUrl}${x}`;e.app==="konnect"?v=v.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(v=v.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:W}=J(),j=async()=>{try{u.value=!0;const{data:m}=await a.get(`${v}?size=${r}`);m!=null&&m.next||(p.value=o.fetchedItemsKey in m?m[o.fetchedItemsKey]:[]),g.value=o.fetchedItemsKey in m?m[o.fetchedItemsKey]:[],d.value=g.value}catch{d.value=[],c.value=i("debouncedFilter.errors.fetch")}finally{u.value=!1}},U=n.ref(""),Q=async m=>{var P,S,C;if(U.value!==m)if(U.value=m||"",p.value===void 0)try{if(u.value=!0,c.value="",f.value="",e.app==="konnect"){let k=v+"";m&&(k+=`/${m}`);const{data:_}=await a.get(`${k}?size=${r}`);o.fetchedItemsKey in _?d.value=_[o.fetchedItemsKey]:_!=null&&_.id?d.value=[_]:d.value=[]}else if(m){const k=[];W(m)&&o.searchKeys.includes("id")?k.push((async()=>{const{data:w}=await a.get(`${v}/${m}`);return[w[o.fetchedItemsKey]??w]})()):k.push(...o.searchKeys.filter(w=>w!=="id").map(async w=>{const{data:h}=await a.get(`${v}?${w}=${m}`);return h[o.fetchedItemsKey]}));const _=await Promise.all(k),A=new Set;d.value=[],(P=_==null?void 0:_.forEach)==null||P.call(_,w=>{var h;(h=w==null?void 0:w.forEach)==null||h.call(w,V=>{A.has(V.id)||(A.add(V.id),d.value.push(V))})})}else d.value=g.value}catch(k){((S=k==null?void 0:k.response)==null?void 0:S.status)===404?f.value=i("debouncedFilter.errors.invalid"):(d.value=[],c.value=i("debouncedFilter.errors.fetch"))}finally{u.value=!1}else u.value=!0,f.value="",m?(d.value=(C=p.value)==null?void 0:C.filter(k=>{var _;let A=!1;for(const w of o.searchKeys){const h=typeof k[w]=="string"?(_=k[w])==null?void 0:_.toLowerCase():k[w];h!=null&&h.includes(m.toLowerCase())&&(A=!0)}return A}),(!d.value||!d.value.length)&&(f.value=i("debouncedFilter.errors.invalid"))):d.value=p.value,u.value=!1};return{loading:u,error:c,validationError:f,results:d,allRecords:p,loadItems:j,debouncedQueryChange:s}}function Be(e,t){const r=n.unref(t),o=n.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return o.value.search="",a=>`${o.value.href}/${a}`}function $e(){const{i18n:{t:e}}=z();return{getMessageFromError:t=>{var r,o,a,i;if(!t)return e("errors.unexpected");if(((r=t==null?void 0:t.response)==null?void 0:r.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((o=t==null?void 0:t.response)!=null&&o.data){if(t.response.data.detail)return t.response.data.detail;if((a=t.response.data.details)!=null&&a.length)return t.response.data.details.map(l=>{let s=e("errors.unexpected");return l.messages&&typeof l.messages=="object"&&l.messages.length&&(s=l.messages.join(", ")),l.field?`${l.field} - ${s}`:s}).join("; ");if(t.response.data.message){const{message:l}=t.response.data;return Array.isArray(l)?(i=l[0])!=null&&i.constraints?Object.values(l[0].constraints)[0]:l[0]:l}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(l=>`${l} ${t.response.data[l]}`).join(", ")}return t.message||e("errors.unexpected")}}}function Ve(e){const t=window.location.origin,r=t.endsWith("/")?t:`${t}/`;try{const o=e.join("/"),a=`${r}${o}`,i=e.some(l=>l.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!i&&new URL(a))return`${r}${o}`;throw new Error("Invalid url")}catch(o){return console.warn("Failed to build valid URL:",o),""}}function X(e,t){const r=n.ref(n.unref(e)),o=n.ref(n.unref(t)),a=n.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),i=n.computed(()=>o.value.startsWith("/")?new URL(`${window.location.origin}${o.value}`):new URL(o.value));return l=>{const{page:s,pageSize:u,offset:c,sortColumnKey:f,sortColumnOrder:d,query:g}=l;try{let p=new URL(i.value.href);return a.value&&g?(p.search="",p=r.value.isExactMatch?new URL(`${p.href}/${g}/`):new URL(`${p.href}?filter[name][contains]=${g}`)):(a.value||new URLSearchParams(g).forEach((x,v)=>{p.searchParams.append(v,x)}),f&&p.searchParams.append("sort_by",f),d==="desc"&&p.searchParams.append("sort_desc","1"),p.searchParams.append("size",String(u))),c&&s!==1&&p.searchParams.append("offset",String(c)),p.href}catch(p){return console.error("RouteList(fetcher)",p),o.value}}}function De(e,t,r="data"){const o=n.unref(t),{axiosInstance:a}=K(e.axiosRequestConfig),i=X(e,o),l=n.ref({status:B.Idle});return{fetcher:async s=>{var u;try{l.value={status:B.Loading};let c=i(s);c.includes("filter[name]")&&(c=`${c}&page[size]=${s.pageSize}&page[number]=${s.page}`);const f=await a.get(c);if(f.status>=400)throw f;const d=f.data,g=r&&r.replace(/[^\w-_]/gi,"");let p;d[g]&&Array.isArray(d[g])?p=d[g]:Array.isArray(d)?p=d:p=Object.keys(d).length?[d]:[];const x={data:p,total:p.length,...d.offset?{pagination:{offset:d.offset}}:null};return l.value={status:B.Idle,response:x},x}catch(c){const f={data:[],total:0};return s.query&&(((u=c.response)==null?void 0:u.status)===404||c.status===404)?(l.value={status:B.NoResults,response:f,error:c.response?c:{response:c}},f):(l.value={status:B.Error,response:f,error:c.response?c:{response:c}},f)}},fetcherState:l}}function Oe(){const e=(r,o="_")=>r?r.split(o).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",t=/(?:^|[\s-:'"])\w/g;return{capitalize:r=>r?r.replace(t,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const ee=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,te=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(ee);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},re=e=>e==="*"||e==="x"||e==="X",ne=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},je=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],qe=(e,t)=>{if(re(e)||re(t))return 0;const[r,o]=je(ne(e),ne(t));return r>o?1:r<o?-1:0},oe=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const o=qe(e[r]||"0",t[r]||"0");if(o!==0)return o}return 0},ze=(e,t)=>{const r=te(e),o=te(t),a=r.pop(),i=o.pop(),l=oe(r,o);return l!==0?l:a&&i?oe(a.split("."),i.split(".")):a||i?a?-1:1:0},ae=(e,t,r)=>{Me(r);const o=ze(e,t);return ie[r].includes(o)},ie={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},le=Object.keys(ie),Me=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(le.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${le.join("|")}`)},Fe=e=>typeof e=="string"&&/^[v\d]/.test(e)&&ee.test(e);function Ue(e){const{gatewayInfo:t,supportedRange:r}=e;if(!t)return!0;const{edition:o,version:a}=t;if(!Fe(a))return console.error("Invalid version"),!1;const i=r[o];if(!i)return!1;const[l,s]=i;return!(l&&ae(a,l,"<")||s&&ae(a,s,">"))}function Pe(e){const t=n.ref(0),r=n.ref(0),o=n.ref(!1);return n.watch(e,a=>{a&&!o.value&&(t.value=a.offsetWidth,r.value=a.scrollWidth,o.value=!0)}),{isTruncated:n.computed(()=>t.value<r.value)}}function Ke(){const{i18n:{t:e}}=z();return{utf8Name:t=>/^[\p{N}\p{L}.\-_~]*$/u.test(t)?"":e("validationErrors.utf8Name")}}const Re={useAxios:K,useDebouncedFilter:Ae,useDeleteUrlBuilder:Be,useErrors:$e,useExternalLinkCreator:Ve,useFetcher:De,useFetchUrlBuilder:X,useHelpers:J,useStringHelpers:Oe,useI18n:z,useGatewayFeatureSupported:Ue,useTruncationDetector:Pe,useValidators:Ke};/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function se(e){return typeof e>"u"||e===null}function He(e){return typeof e=="object"&&e!==null}function Ye(e){return Array.isArray(e)?e:se(e)?[]:[e]}function Ze(e,t){var r,o,a,i;if(t)for(i=Object.keys(t),r=0,o=i.length;r<o;r+=1)a=i[r],e[a]=t[a];return e}function We(e,t){var r="",o;for(o=0;o<t;o+=1)r+=e;return r}function Qe(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Ge=se,Je=He,Xe=Ye,et=We,tt=Qe,rt=Ze,R={isNothing:Ge,isObject:Je,toArray:Xe,repeat:et,isNegativeZero:tt,extend:rt};function ce(e,t){var r="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
1
|
+
(function(y,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@kong-ui-public/i18n"),require("axios"),require("@kong/kongponents"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/i18n","axios","@kong/kongponents","vue-router"],n):(y=typeof globalThis<"u"?globalThis:y||self,n(y["kong-ui-public-entities-data-plane-nodes"]={},y.Vue,y["kong-ui-public-i18n"],y.axios))})(this,function(y,n,S,G){"use strict";var Jr=Object.defineProperty;var Xr=(y,n,S)=>n in y?Jr(y,n,{enumerable:!0,configurable:!0,writable:!0,value:S}):y[n]=S;var D=(y,n,S)=>(Xr(y,typeof n!="symbol"?n+"":n,S),S);const ye={modal:{action_button:{confirm:"Confirm",submitting:"Submitting...",ok:"OK"},change_log_level:{title:"Change Log Level ({summary})",summary_with_name:"Node {name}",summary_with_number:"{number} Nodes"},dp_list:{header:{host:"Host",action:"Action",status:"Status"},status:{failed:"Failure",loading:"Loading",pending:"Pending",succeed:"Succeed",not_supported:"Not Supported"}},log_level_disk_space_warning:"If left on for extended periods of time, can result in excess disk space consumption.",log_level_explanation:{debug:"Provides debug information about the plugin’s run loop and each individual plugin or other components.",info:"Provides messages that provide a record of the normal operation of the system.",notice:"Provides messages that provide a record of the normal operation of the system, but also alerts conditions that may require monitoring. Kong does not make a large difference between info and notice.",warn:"Is used to log any abnormal behavior that doesn’t result in dropped transactions but requires further investigation.",error:"Is used for logging errors that result in a request being dropped.",crit:"Is used when Kong is working under critical conditions and not working properly, thus affecting several clients."},revert_to_default_after:{label:"Revert to default after",hours:"hour",minutes:"min",seconds:"seconds"},select_log_level_title:"Select Log Level"},log_level:{debug:"Debug",info:"Info",notice:"Notice",warn:"Warn",error:"Error",crit:"Critical",not_applicable:"N/A"}};function q(){const e=S.createI18n("en-us",ye);return{i18n:e,i18nT:S.i18nTComponent(e)}}var $=(e=>(e[e.Loading=0]="Loading",e[e.Idle=1]="Idle",e[e.NoResults=2]="NoResults",e[e.Error=3]="Error",e))($||{});function be(){return{getAxiosInstance:(e={})=>{try{const t=n.inject("get-axios-instance",void 0);return typeof t=="function"?t(e):G.create({withCredentials:!0,timeout:3e4,...e})}catch(t){return console.warn("getAxiosInstance:",t.message||t),G.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var t;return((t=e==null?void 0:e.response)==null?void 0:t.headers["x-datadog-trace-id"])||""}}}function we(){return{debounce:(e,t)=>{let r;return(...o)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...o)},t)}}}}function K(e={}){const{getAxiosInstance:t}=be();return{axiosInstance:t(e)}}const ke={actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},_e={message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},ve={actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON"},errors:{edit:"The entity could not be edited at this time."}},Ce={emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},xe={title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},Ne={filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},Se={errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},Le={unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},Ie={utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},Ee={enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}},Te={global:ke,deleteModal:_e,baseForm:ve,baseTable:Ce,baseConfigCard:xe,filter:Ne,debouncedFilter:Se,errors:Le,validationErrors:Ie,toggleModal:Ee};function z(){const e=S.createI18n("en-us",Te);return{i18n:e,i18nT:S.i18nTComponent(e)}}function J(){const e=(r,o)=>(o==null?void 0:o[r])??void 0,t=(r,o)=>{if(r.length!==o.length)return!1;const a=new Set([...r,...o]);for(const i of a){const l=r.filter(u=>u===i).length,s=o.filter(u=>u===i).length;if(l!==s)return!1}return!0};return{getPropValue:e,objectsAreEqual:(r,o,a)=>{if(a){if(Object.keys(r).length===Object.keys(o).length)for(const i in r)if(Array.isArray(r[i])&&Array.isArray(o[i])){if(t(r[i],o[i]))continue;return!1}else{if(r[i]===o[i])continue;return!1}else return!1;return!0}try{return JSON.stringify(r)===JSON.stringify(o)}catch{return!1}},sortAlpha:r=>(o,a)=>{let i=o[r]===void 0||o[r]===null?"":o[r],l=a[r]===void 0||a[r]===null?"":a[r];return Array.isArray(o[r])&&(i=o[r][0]),Array.isArray(a[r])&&(l=a[r][0]),i.localeCompare(l)},isValidUuid:r=>r?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(r):!1}}function Ae(e,t,r,o={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:a}=K(e.axiosRequestConfig),{i18n:{t:i}}=z(),{debounce:l}=we(),s=l(async m=>{await Q(m)},200),u=n.ref(!1),c=n.ref(""),f=n.ref(""),d=n.ref([]),g=n.ref([]),p=n.ref(void 0),x=n.unref(t);let v=`${e.apiBaseUrl}${x}`;e.app==="konnect"?v=v.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"&&(v=v.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""));const{isValidUuid:W}=J(),O=async()=>{try{u.value=!0;const{data:m}=await a.get(`${v}?size=${r}`);m!=null&&m.next||(p.value=o.fetchedItemsKey in m?m[o.fetchedItemsKey]:[]),g.value=o.fetchedItemsKey in m?m[o.fetchedItemsKey]:[],d.value=g.value}catch{d.value=[],c.value=i("debouncedFilter.errors.fetch")}finally{u.value=!1}},U=n.ref(""),Q=async m=>{var P,N,C;if(U.value!==m)if(U.value=m||"",p.value===void 0)try{if(u.value=!0,c.value="",f.value="",e.app==="konnect"){let k=v+"";m&&(k+=`/${m}`);const{data:_}=await a.get(`${k}?size=${r}`);o.fetchedItemsKey in _?d.value=_[o.fetchedItemsKey]:_!=null&&_.id?d.value=[_]:d.value=[]}else if(m){const k=[];W(m)&&o.searchKeys.includes("id")?k.push((async()=>{const{data:w}=await a.get(`${v}/${m}`);return[w[o.fetchedItemsKey]??w]})()):k.push(...o.searchKeys.filter(w=>w!=="id").map(async w=>{const{data:h}=await a.get(`${v}?${w}=${m}`);return h[o.fetchedItemsKey]}));const _=await Promise.all(k),A=new Set;d.value=[],(P=_==null?void 0:_.forEach)==null||P.call(_,w=>{var h;(h=w==null?void 0:w.forEach)==null||h.call(w,V=>{A.has(V.id)||(A.add(V.id),d.value.push(V))})})}else d.value=g.value}catch(k){((N=k==null?void 0:k.response)==null?void 0:N.status)===404?f.value=i("debouncedFilter.errors.invalid"):(d.value=[],c.value=i("debouncedFilter.errors.fetch"))}finally{u.value=!1}else u.value=!0,f.value="",m?(d.value=(C=p.value)==null?void 0:C.filter(k=>{var _;let A=!1;for(const w of o.searchKeys){const h=typeof k[w]=="string"?(_=k[w])==null?void 0:_.toLowerCase():k[w];h!=null&&h.includes(m.toLowerCase())&&(A=!0)}return A}),(!d.value||!d.value.length)&&(f.value=i("debouncedFilter.errors.invalid"))):d.value=p.value,u.value=!1};return{loading:u,error:c,validationError:f,results:d,allRecords:p,loadItems:O,debouncedQueryChange:s}}function $e(e,t){const r=n.unref(t),o=n.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return o.value.search="",a=>`${o.value.href}/${a}`}function Be(){const{i18n:{t:e}}=z();return{getMessageFromError:t=>{var r,o,a,i;if(!t)return e("errors.unexpected");if(((r=t==null?void 0:t.response)==null?void 0:r.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((o=t==null?void 0:t.response)!=null&&o.data){if(t.response.data.detail)return t.response.data.detail;if((a=t.response.data.details)!=null&&a.length)return t.response.data.details.map(l=>{let s=e("errors.unexpected");return l.messages&&typeof l.messages=="object"&&l.messages.length&&(s=l.messages.join(", ")),l.field?`${l.field} - ${s}`:s}).join("; ");if(t.response.data.message){const{message:l}=t.response.data;return Array.isArray(l)?(i=l[0])!=null&&i.constraints?Object.values(l[0].constraints)[0]:l[0]:l}if(typeof t.response.data=="string")return t.response.data;if(typeof t.response.data=="object")return Object.keys(t.response.data).map(l=>`${l} ${t.response.data[l]}`).join(", ")}return t.message||e("errors.unexpected")}}}function Ve(e){const t=window.location.origin,r=t.endsWith("/")?t:`${t}/`;try{const o=e.join("/"),a=`${r}${o}`,i=e.some(l=>l.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a)&&!i&&new URL(a))return`${r}${o}`;throw new Error("Invalid url")}catch(o){return console.warn("Failed to build valid URL:",o),""}}function X(e,t){const r=n.ref(n.unref(e)),o=n.ref(n.unref(t)),a=n.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),i=n.computed(()=>o.value.startsWith("/")?new URL(`${window.location.origin}${o.value}`):new URL(o.value));return l=>{const{page:s,pageSize:u,offset:c,sortColumnKey:f,sortColumnOrder:d,query:g}=l;try{let p=new URL(i.value.href);return a.value&&g?(p.search="",p=r.value.isExactMatch?new URL(`${p.href}/${g}/`):new URL(`${p.href}?filter[name][contains]=${g}`)):(a.value||new URLSearchParams(g).forEach((x,v)=>{p.searchParams.append(v,x)}),f&&p.searchParams.append("sort_by",f),d==="desc"&&p.searchParams.append("sort_desc","1"),p.searchParams.append("size",String(u))),c&&s!==1&&p.searchParams.append("offset",String(c)),p.href}catch(p){return console.error("RouteList(fetcher)",p),o.value}}}function De(e,t,r="data"){const o=n.unref(t),{axiosInstance:a}=K(e.axiosRequestConfig),i=X(e,o),l=n.ref({status:$.Idle});return{fetcher:async s=>{var u;try{l.value={status:$.Loading};let c=i(s);c.includes("filter[name]")&&(c=`${c}&page[size]=${s.pageSize}&page[number]=${s.page}`);const f=await a.get(c);if(f.status>=400)throw f;const d=f.data,g=r&&r.replace(/[^\w-_]/gi,"");let p;d[g]&&Array.isArray(d[g])?p=d[g]:Array.isArray(d)?p=d:p=Object.keys(d).length?[d]:[];const x={data:p,total:p.length,...d.offset?{pagination:{offset:d.offset}}:null};return l.value={status:$.Idle,response:x},x}catch(c){const f={data:[],total:0};return s.query&&(((u=c.response)==null?void 0:u.status)===404||c.status===404)?(l.value={status:$.NoResults,response:f,error:c.response?c:{response:c}},f):(l.value={status:$.Error,response:f,error:c.response?c:{response:c}},f)}},fetcherState:l}}function je(){const e=(r,o="_")=>r?r.split(o).map(a=>a.toLowerCase()==="id"?a.toUpperCase():a.charAt(0).toUpperCase()+a.substring(1)).join(" "):"",t=/(?:^|[\s-:'"])\w/g;return{capitalize:r=>r?r.replace(t,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const ee=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,te=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(ee);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},re=e=>e==="*"||e==="x"||e==="X",ne=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},Oe=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],qe=(e,t)=>{if(re(e)||re(t))return 0;const[r,o]=Oe(ne(e),ne(t));return r>o?1:r<o?-1:0},oe=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){const o=qe(e[r]||"0",t[r]||"0");if(o!==0)return o}return 0},ze=(e,t)=>{const r=te(e),o=te(t),a=r.pop(),i=o.pop(),l=oe(r,o);return l!==0?l:a&&i?oe(a.split("."),i.split(".")):a||i?a?-1:1:0},ae=(e,t,r)=>{Fe(r);const o=ze(e,t);return ie[r].includes(o)},ie={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},le=Object.keys(ie),Fe=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(le.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${le.join("|")}`)},Me=e=>typeof e=="string"&&/^[v\d]/.test(e)&&ee.test(e);function Ue(e){const{gatewayInfo:t,supportedRange:r}=e;if(!t)return!0;const{edition:o,version:a}=t;if(!Me(a))return console.error("Invalid version"),!1;const i=r[o];if(!i)return!1;const[l,s]=i;return!(l&&ae(a,l,"<")||s&&ae(a,s,">"))}function Pe(e){const t=n.ref(0),r=n.ref(0),o=n.ref(!1);return n.watch(e,a=>{a&&!o.value&&(t.value=a.offsetWidth,r.value=a.scrollWidth,o.value=!0)}),{isTruncated:n.computed(()=>t.value<r.value)}}function Ke(){const{i18n:{t:e}}=z();return{utf8Name:t=>/^[\p{N}\p{L}.\-_~]*$/u.test(t)?"":e("validationErrors.utf8Name")}}const Re={useAxios:K,useDebouncedFilter:Ae,useDeleteUrlBuilder:$e,useErrors:Be,useExternalLinkCreator:Ve,useFetcher:De,useFetchUrlBuilder:X,useHelpers:J,useStringHelpers:je,useI18n:z,useGatewayFeatureSupported:Ue,useTruncationDetector:Pe,useValidators:Ke};/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function se(e){return typeof e>"u"||e===null}function He(e){return typeof e=="object"&&e!==null}function Ye(e){return Array.isArray(e)?e:se(e)?[]:[e]}function Ze(e,t){var r,o,a,i;if(t)for(i=Object.keys(t),r=0,o=i.length;r<o;r+=1)a=i[r],e[a]=t[a];return e}function We(e,t){var r="",o;for(o=0;o<t;o+=1)r+=e;return r}function Qe(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Ge=se,Je=He,Xe=Ye,et=We,tt=Qe,rt=Ze,R={isNothing:Ge,isObject:Je,toArray:Xe,repeat:et,isNegativeZero:tt,extend:rt};function ce(e,t){var r="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
2
2
|
|
|
3
|
-
`+e.mark.snippet),o+" "+r):o}function
|
|
4
|
-
\r`;function Pt(e){if(e===null)return!1;var t,r,o=0,a=e.length,i=Y;for(r=0;r<a;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function Kt(e){var t,r,o=e.replace(/[\r\n=]/g,""),a=o.length,i=Y,l=0,s=[];for(t=0;t<a;t++)t%4===0&&t&&(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)),l=l<<6|i.indexOf(o.charAt(t));return r=a%4*6,r===0?(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)):r===18?(s.push(l>>10&255),s.push(l>>2&255)):r===12&&s.push(l>>4&255),new Uint8Array(s)}function Rt(e){var t="",r=0,o,a,i=e.length,l=Y;for(o=0;o<i;o++)o%3===0&&o&&(t+=l[r>>18&63],t+=l[r>>12&63],t+=l[r>>6&63],t+=l[r&63]),r=(r<<8)+e[o];return a=i%3,a===0?(t+=l[r>>18&63],t+=l[r>>12&63],t+=l[r>>6&63],t+=l[r&63]):a===2?(t+=l[r>>10&63],t+=l[r>>4&63],t+=l[r<<2&63],t+=l[64]):a===1&&(t+=l[r>>2&63],t+=l[r<<4&63],t+=l[64],t+=l[64]),t}function Ht(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Yt=new b("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Pt,construct:Kt,predicate:Ht,represent:Rt}),Zt=Object.prototype.hasOwnProperty,Wt=Object.prototype.toString;function Qt(e){if(e===null)return!0;var t=[],r,o,a,i,l,s=e;for(r=0,o=s.length;r<o;r+=1){if(a=s[r],l=!1,Wt.call(a)!=="[object Object]")return!1;for(i in a)if(Zt.call(a,i))if(!l)l=!0;else return!1;if(!l)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function Gt(e){return e!==null?e:[]}var Jt=new b("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Qt,construct:Gt}),Xt=Object.prototype.toString;function er(e){if(e===null)return!0;var t,r,o,a,i,l=e;for(i=new Array(l.length),t=0,r=l.length;t<r;t+=1){if(o=l[t],Xt.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;i[t]=[a[0],o[a[0]]]}return!0}function tr(e){if(e===null)return[];var t,r,o,a,i,l=e;for(i=new Array(l.length),t=0,r=l.length;t<r;t+=1)o=l[t],a=Object.keys(o),i[t]=[a[0],o[a[0]]];return i}var rr=new b("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:er,construct:tr}),nr=Object.prototype.hasOwnProperty;function or(e){if(e===null)return!0;var t,r=e;for(t in r)if(nr.call(r,t)&&r[t]!==null)return!1;return!0}function ar(e){return e!==null?e:{}}var ir=new b("tag:yaml.org,2002:set",{kind:"mapping",resolve:or,construct:ar});
|
|
5
|
-
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}for(var lr=new Array(256),sr=new Array(256),$=0;$<256;$++)lr[$]=fe($)?1:0,sr[$]=fe($);const cr=[];for(let e=0;e<256;++e)cr.push((e+256).toString(16).slice(1));typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const{useAxios:ln,useDeleteUrlBuilder:sn,useErrors:ur,useExternalLinkCreator:cn,useFetchUrlBuilder:un,useFetcher:dn,useDebouncedFilter:pn,useStringHelpers:fn,useHelpers:gn,useGatewayFeatureSupported:mn,useTruncationDetector:hn,useValidators:yn}=Re;var L=(e=>(e.Debug="debug",e.Info="info",e.Notice="notice",e.Warn="warn",e.Error="error",e.Critical="crit",e))(L||{});class dr{constructor(t){D(this,"concurrentTokenSet",new Set);D(this,"concurrentTokenBorrowQueue",[]);for(let r=0;r<t;++r)this.concurrentTokenSet.add(Symbol(`token-${r}`))}hasAvailableConcurrentToken(){return this.concurrentTokenSet.size>0}borrowConcurrentToken(){if(this.concurrentTokenSet.size>0){const t=this.concurrentTokenSet.values().next().value;return this.concurrentTokenSet.delete(t),()=>{this.returnConcurrentToken(t)}}throw new Error("BUG: No available token to borrow")}returnConcurrentToken(t){if(this.concurrentTokenSet.has(t))throw new Error("Token already returned");const r=this.concurrentTokenBorrowQueue.shift();r?r[0](()=>this.returnConcurrentToken(t)):this.concurrentTokenSet.add(t)}async borrowToken(){return this.hasAvailableConcurrentToken()?this.borrowConcurrentToken():new Promise((t,r)=>{this.concurrentTokenBorrowQueue.push([t,r])})}clearWaitingQueue(t){for(;this.concurrentTokenBorrowQueue.length>0;){const[,r]=this.concurrentTokenBorrowQueue.shift();r(t)}}}class Z extends Error{constructor(t,r){super(t,r),this.name="AsyncAbortException"}}class M{constructor(t){D(this,"tokenBucket",null);D(this,"schedule",async t=>{let r;this.tokenBucket&&(r=await this.tokenBucket.borrowToken());try{const o=await t();return r==null||r(),o}catch(o){throw r==null||r(),o}});D(this,"cancelAll",(t,r)=>{var o;(o=this.tokenBucket)==null||o.clearWaitingQueue(new Z(t,r))});t.maxConcurrentAsyncs>0&&(this.tokenBucket=new dr(t.maxConcurrentAsyncs))}}const pr=Object.freeze(Object.defineProperty({__proto__:null,AsyncAbortException:Z,AsyncScheduler:M,useAsyncScheduler:e=>e instanceof M?e:e===null?new M({maxConcurrentAsyncs:0}):new M(e)},Symbol.toStringTag,{value:"Module"})),ge=[L.Debug,L.Info,L.Notice,L.Warn,L.Error,L.Critical],E={useI18n:q,...Object.freeze(Object.defineProperty({__proto__:null,supportedLevels:ge,useDataPlaneLogLevelChecker:e=>{const t=e.requestExecutor??(l=>l()),{getDataPlaneLogLevel:r,setDataPlaneLogLevel:o}=e,{getMessageFromError:a}=ur();return{checkDataPlaneLogLevel:(l,s)=>{const u=n.ref(n.toValue(s==null?void 0:s.currentLogLevelHint)??null);u.value===null&&t(async()=>{u.value=await r(l)}).catch(g=>{g instanceof Z||console.error("Failed to get data plane log level",g)}),s!=null&&s.currentLogLevelHint&&n.watch(()=>n.toValue(s.currentLogLevelHint),g=>{g&&(u.value=g)});const c=n.ref("pending"),f=n.ref(null);return{currentLogLevel:u,updateStatus:c,updateErrorMessage:f,updateLogLevel:async(g,p)=>{c.value="loading",f.value=null;try{await t(()=>o(l,g,p)),u.value=g,c.value="success"}catch(x){f.value=a(x),c.value="error"}}}}}},useFriendlyRevertTime:e=>{const{i18n:t}=q();return n.computed(()=>{const r=n.toValue(e);if(isNaN(r)||r<=0)return"";let o="";const a=r%60;a!==0&&(o+=`${a} ${t.t("modal.revert_to_default_after.seconds")}`);const i=Math.floor(r/60)%60;i!==0&&(o=`${i} ${t.t("modal.revert_to_default_after.minutes")} ${o}`);const l=Math.floor(r/3600);return l!==0&&(o=`${l} ${t.t("modal.revert_to_default_after.hours")} ${o}`),o})},useLogLevelCandidateSelectItems:e=>{const{i18n:t}=q();return n.computed(()=>{const r=n.toValue(e==null?void 0:e.disabled)??[];return ge.map(o=>({label:t.t(`log_level.${o}`),value:o,selected:(e==null?void 0:e.initialSelected)===o,disabled:r.includes(o)}))})},useLogLevelExplanation:e=>{const t=[L.Debug],{i18n:r}=q();return n.computed(()=>{const o=n.toValue(e);return{explanation:r.t(`modal.log_level_explanation.${o}`),warning:t.includes(o)?r.t("modal.log_level_disk_space_warning"):void 0}})}},Symbol.toStringTag,{value:"Module"})),...pr},I="24px",F=(e,t)=>{const r=e.__vccOpts||e;for(const[o,a]of t)r[o]=a;return r},fr=e=>(n.pushScopeId("data-v-14bdd285"),e=e(),n.popScopeId(),e),gr=["aria-hidden"],mr={key:0,"data-testid":"kui-icon-svg-title"},hr=fr(()=>n.createElementVNode("path",{d:"M10.6 16.6L17.65 9.55L16.25 8.15L10.6 13.8L7.75 10.95L6.35 12.35L10.6 16.6ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z",fill:"currentColor"},null,-1)),yr=n.defineComponent({__name:"CheckCircleIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:I,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const a=String(t.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return I}),o=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(a,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon check-circle-icon","data-testid":"kui-icon-wrapper-check-circle-icon",style:n.normalizeStyle(o.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-check-circle-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",mr,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),hr],8,gr))]),_:1},8,["aria-hidden","style"]))}}),br=F(yr,[["__scopeId","data-v-14bdd285"]]),wr=e=>(n.pushScopeId("data-v-d243aebc"),e=e(),n.popScopeId(),e),kr=["aria-hidden"],_r={key:0,"data-testid":"kui-icon-svg-title"},vr=wr(()=>n.createElementVNode("path",{d:"M8.4 17L12 13.4L15.6 17L17 15.6L13.4 12L17 8.4L15.6 7L12 10.6L8.4 7L7 8.4L10.6 12L7 15.6L8.4 17ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z",fill:"currentColor"},null,-1)),Cr=n.defineComponent({__name:"ClearIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:I,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const a=String(t.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return I}),o=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(a,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon clear-icon","data-testid":"kui-icon-wrapper-clear-icon",style:n.normalizeStyle(o.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-clear-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",_r,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),vr],8,kr))]),_:1},8,["aria-hidden","style"]))}}),xr=F(Cr,[["__scopeId","data-v-d243aebc"]]),Sr=e=>(n.pushScopeId("data-v-51fd13af"),e=e(),n.popScopeId(),e),Nr=["aria-hidden"],Lr={key:0,"data-testid":"kui-icon-svg-title"},Er=Sr(()=>n.createElementVNode("path",{d:"M4 17V14H20V17H4ZM4 10V7H20V10H4Z",fill:"currentColor"},null,-1)),Ir=n.defineComponent({__name:"EqualIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:I,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const a=String(t.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return I}),o=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(a,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon equal-icon","data-testid":"kui-icon-wrapper-equal-icon",style:n.normalizeStyle(o.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-equal-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",Lr,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),Er],8,Nr))]),_:1},8,["aria-hidden","style"]))}}),Tr=F(Ir,[["__scopeId","data-v-51fd13af"]]),me=e=>(n.pushScopeId("data-v-7d7124f1"),e=e(),n.popScopeId(),e),Ar=["aria-hidden"],Br={key:0,"data-testid":"kui-icon-svg-title"},$r=me(()=>n.createElementVNode("path",{d:"M12 22C10.6333 22 9.34167 21.7375 8.125 21.2125C6.90833 20.6875 5.84583 19.9708 4.9375 19.0625C4.02917 18.1542 3.3125 17.0917 2.7875 15.875C2.2625 14.6583 2 13.3667 2 12C2 10.6167 2.2625 9.32083 2.7875 8.1125C3.3125 6.90417 4.02917 5.84583 4.9375 4.9375C5.84583 4.02917 6.90833 3.3125 8.125 2.7875C9.34167 2.2625 10.6333 2 12 2C12.2833 2 12.5208 2.09583 12.7125 2.2875C12.9042 2.47917 13 2.71667 13 3C13 3.28333 12.9042 3.52083 12.7125 3.7125C12.5208 3.90417 12.2833 4 12 4C9.78333 4 7.89583 4.77917 6.3375 6.3375C4.77917 7.89583 4 9.78333 4 12C4 14.2167 4.77917 16.1042 6.3375 17.6625C7.89583 19.2208 9.78333 20 12 20C14.2167 20 16.1042 19.2208 17.6625 17.6625C19.2208 16.1042 20 14.2167 20 12C20 11.7167 20.0958 11.4792 20.2875 11.2875C20.4792 11.0958 20.7167 11 21 11C21.2833 11 21.5208 11.0958 21.7125 11.2875C21.9042 11.4792 22 11.7167 22 12C22 13.3667 21.7375 14.6583 21.2125 15.875C20.6875 17.0917 19.9708 18.1542 19.0625 19.0625C18.1542 19.9708 17.0958 20.6875 15.8875 21.2125C14.6792 21.7375 13.3833 22 12 22Z",fill:"currentColor","transform-origin":"center"},null,-1)),Vr=me(()=>n.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",dur:"1.5s",from:"0",repeatCount:"indefinite",to:"360",type:"rotate"},null,-1)),Dr=n.defineComponent({__name:"ProgressIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:I,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const a=String(t.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return I}),o=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(a,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon progress-icon","data-testid":"kui-icon-wrapper-progress-icon",style:n.normalizeStyle(o.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-progress-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",Br,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),$r,Vr],8,Ar))]),_:1},8,["aria-hidden","style"]))}}),Or=F(Dr,[["__scopeId","data-v-7d7124f1"]]),jr={"data-testid":"log-change-action"},qr={key:0},zr={"data-testid":"log-change-action-current-level"},Mr={key:0},Fr={"data-testid":"log-change-action-target-level"},Ur={"data-testid":"log-change-status"},Pr=n.defineComponent({__name:"CLLModalNodeRow",props:{dataPlaneId:{},hostname:{},hasDllCapability:{type:Boolean},targetLogLevel:{},checkLogLevel:{},logLevelHint:{}},setup(e,{expose:t}){const r=e,{i18n:o}=E.useI18n();let a=n.ref("not_supported"),i=n.ref("not_supported"),l=n.ref(null),s=async()=>{};r.hasDllCapability&&({currentLogLevel:a,updateStatus:i,updateErrorMessage:l,updateLogLevel:s}=r.checkLogLevel(r.dataPlaneId,{currentLogLevelHint:()=>r.logLevelHint??null})),t({updateLogLevel:s});const u=n.computed(()=>{switch(i.value){case"success":return"success";case"error":return"danger";case"loading":case"pending":return"warning";default:return"neutral"}}),c=n.computed(()=>{switch(i.value){case"success":return o.t("modal.dp_list.status.succeed");case"error":return o.t("modal.dp_list.status.failed");case"pending":return o.t("modal.dp_list.status.pending");case"loading":return o.t("modal.dp_list.status.loading");default:return o.t("modal.dp_list.status.not_supported")}}),f=n.computed(()=>{switch(i.value){case"success":return br;case"error":case"not_supported":return xr;case"loading":return Or;default:return Tr}});return(d,g)=>{const p=n.resolveComponent("KSkeleton"),x=n.resolveComponent("KBadge"),v=n.resolveComponent("KTooltip");return n.openBlock(),n.createElementBlock("tr",null,[n.createElementVNode("td",null,n.toDisplayString(d.hostname),1),n.createElementVNode("td",jr,[n.unref(a)==="not_supported"?(n.openBlock(),n.createElementBlock("span",qr,n.toDisplayString(n.unref(o).t("log_level.not_applicable")),1)):n.unref(a)?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[n.createElementVNode("span",zr,n.toDisplayString(n.unref(o).t(`log_level.${n.unref(a)}`)),1),n.unref(a)!==d.targetLogLevel?(n.openBlock(),n.createElementBlock("span",Mr,[n.createTextVNode(" → "),n.createElementVNode("span",Fr,n.toDisplayString(n.unref(o).t(`log_level.${d.targetLogLevel}`)),1)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createBlock(p,{key:1,type:"spinner"}))]),n.createElementVNode("td",Ur,[n.unref(l)?(n.openBlock(),n.createBlock(v,{key:0,text:n.unref(l)},{default:n.withCtx(()=>[n.createVNode(x,{appearance:u.value,class:"badge-cell"},{icon:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(f.value)))]),default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(c.value),1)]),_:1},8,["appearance"])]),_:1},8,["text"])):(n.openBlock(),n.createBlock(x,{key:1,appearance:u.value,class:"badge-cell"},{icon:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(f.value)))]),default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(c.value),1)]),_:1},8,["appearance"]))])])}}}),he=(e,t)=>{const r=e.__vccOpts||e;for(const[o,a]of t)r[o]=a;return r},Kr=he(Pr,[["__scopeId","data-v-ac7205dd"]]),Rr={class:"explanation-wrapper"},Hr={key:0,class:"warning-message","data-testid":"log-level-warning-message"},Yr={class:"revert-after-wrapper"},Zr={class:"time"},Wr={class:"seconds"},Qr={class:"formatted-time","data-testid":"log-level-timeout-formatted"},Gr={class:"data-plane-node-list","data-testid":"data-plane-node-list"},Jr={style:{width:"40%"}},Xr={style:{width:"40%"}},en=he(n.defineComponent({name:"ChangeLogLevelModal",__name:"ChangeLogLevelModal",props:n.mergeModels({instanceList:{},instanceLogLevel:{},requests:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(e){const t=e,r=n.useModel(e,"visible"),o=L.Notice,{i18n:a}=E.useI18n(),i=n.ref("edit"),l=n.ref(o),s=n.ref("60"),u=n.computed(()=>Math.floor(Number(s.value))),c=n.computed(()=>t.instanceList.filter(S=>S.hasDLLCapability!==!1)),f=n.computed(()=>{const S=c.value.length===1?a.t("modal.change_log_level.summary_with_name",{name:c.value[0].hostname}):a.t("modal.change_log_level.summary_with_number",{number:`${c.value.length}`});return a.t("modal.change_log_level.title",{summary:S})}),d=n.computed(()=>i.value==="submitting"||isNaN(u.value)||u.value<=0||c.value.length===0),g=E.useLogLevelCandidateSelectItems({initialSelected:o}),p=E.useLogLevelExplanation(l),x=E.useFriendlyRevertTime(u),v=E.useAsyncScheduler(t.requests.scheduler===void 0?{maxConcurrentAsyncs:10}:t.requests.scheduler),{checkDataPlaneLogLevel:W}=E.useDataPlaneLogLevelChecker({getDataPlaneLogLevel:t.requests.getDataPlaneLogLevel,setDataPlaneLogLevel:t.requests.setDataPlaneLogLevel,requestExecutor:v.schedule}),j=new Map,U=(S,C)=>{C===null?j.delete(S):j.set(S,C)},Q=async()=>{if(i.value!=="edit"){m();return}i.value="submitting";const S=Array.from(j.values()).map(C=>C.updateLogLevel(l.value,u.value));try{await Promise.all(S)}catch(C){console.error("Failed to update log level",C)}finally{i.value="submitted"}},m=()=>{r.value=!1,s.value="60",i.value="edit",l.value=o},P=n.computed(()=>{switch(i.value){case"submitting":return a.t("modal.action_button.submitting");case"submitted":return a.t("modal.action_button.ok");default:return a.t("modal.action_button.confirm")}});return(S,C)=>{const k=n.resolveComponent("KSelect"),_=n.resolveComponent("KLabel"),A=n.resolveComponent("KInput"),w=n.resolveComponent("KModal");return n.openBlock(),n.createBlock(w,{"action-button-disabled":d.value,"action-button-text":P.value,"data-testid":"change-log-level-modal","hide-cancel-button":!0,"hide-close-icon":i.value==="submitting","max-width":"640px",title:f.value,visible:r.value,onCancel:m,onProceed:Q},{default:n.withCtx(()=>[i.value==="edit"?(n.openBlock(),n.createBlock(k,{key:0,modelValue:l.value,"onUpdate:modelValue":C[0]||(C[0]=h=>l.value=h),class:"log-level-select","data-testid":"log-level-select",items:n.unref(g),label:n.unref(a).t("modal.select_log_level_title")},null,8,["modelValue","items","label"])):n.createCommentVNode("",!0),n.createElementVNode("div",Rr,[n.createVNode(_,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(a).t(`log_level.${l.value}`)),1)]),_:1}),n.createElementVNode("div",null,n.toDisplayString(n.unref(p).explanation),1),n.unref(p).warning?(n.openBlock(),n.createElementBlock("div",Hr,n.toDisplayString(n.unref(p).warning),1)):n.createCommentVNode("",!0)]),n.createElementVNode("div",Yr,[n.createVNode(_,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(a).t("modal.revert_to_default_after.label")),1)]),_:1}),n.createElementVNode("div",Zr,[n.createVNode(A,{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=h=>s.value=h),class:"time-input","data-testid":"log-level-timeout",disabled:i.value!=="edit",error:u.value<=0||isNaN(u.value),min:"1",type:"number"},null,8,["modelValue","disabled","error"]),n.createElementVNode("span",Wr,n.toDisplayString(n.unref(a).t("modal.revert_to_default_after.seconds")),1),n.createElementVNode("span",Qr,n.toDisplayString(n.unref(x)),1)])]),n.createElementVNode("table",Gr,[n.createElementVNode("thead",null,[n.createElementVNode("th",Jr,n.toDisplayString(n.unref(a).t("modal.dp_list.header.host")),1),n.createElementVNode("th",Xr,n.toDisplayString(n.unref(a).t("modal.dp_list.header.action")),1),n.createElementVNode("th",null,n.toDisplayString(n.unref(a).t("modal.dp_list.header.status")),1)]),n.createElementVNode("tbody",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.instanceList,h=>{var V;return n.openBlock(),n.createBlock(Kr,{key:h.id,ref_for:!0,ref:tn=>U(h.id,tn),"check-log-level":n.unref(W),"data-plane-id":h.id,"data-testid":`data-plane-node-list-row-${h.id}`,"has-dll-capability":h.hasDLLCapability??!0,hostname:h.hostname,"log-level-hint":(V=t.instanceLogLevel)==null?void 0:V.get(h.id),"target-log-level":l.value},null,8,["check-log-level","data-plane-id","data-testid","has-dll-capability","hostname","log-level-hint","target-log-level"])}),128))])])]),_:1},8,["action-button-disabled","action-button-text","hide-close-icon","title","visible"])}}}),[["__scopeId","data-v-983a59ac"]]);y.ChangeLogLevelModal=en,y.LogLevel=L,y.composables=E,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|
|
3
|
+
`+e.mark.snippet),o+" "+r):o}function j(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=ce(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}j.prototype=Object.create(Error.prototype),j.prototype.constructor=j,j.prototype.toString=function(e){return this.name+": "+ce(this,e)};var T=j,nt=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ot=["scalar","sequence","mapping"];function at(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}function it(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(nt.indexOf(r)===-1)throw new T('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=at(t.styleAliases||null),ot.indexOf(this.kind)===-1)throw new T('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var b=it;function ue(e,t){var r=[];return e[t].forEach(function(o){var a=r.length;r.forEach(function(i,l){i.tag===o.tag&&i.kind===o.kind&&i.multi===o.multi&&(a=l)}),r[a]=o}),r}function lt(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function o(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(o);return e}function H(e){return this.extend(e)}H.prototype.extend=function(e){var t=[],r=[];if(e instanceof b)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new T("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(a){if(!(a instanceof b))throw new T("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new T("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new T("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(a){if(!(a instanceof b))throw new T("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var o=Object.create(H.prototype);return o.implicit=(this.implicit||[]).concat(t),o.explicit=(this.explicit||[]).concat(r),o.compiledImplicit=ue(o,"implicit"),o.compiledExplicit=ue(o,"explicit"),o.compiledTypeMap=lt(o.compiledImplicit,o.compiledExplicit),o};var st=H,ct=new b("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),ut=new b("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),dt=new b("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),pt=new st({explicit:[ct,ut,dt]});function ft(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function gt(){return null}function mt(e){return e===null}var ht=new b("tag:yaml.org,2002:null",{kind:"scalar",resolve:ft,construct:gt,predicate:mt,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function yt(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function bt(e){return e==="true"||e==="True"||e==="TRUE"}function wt(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var kt=new b("tag:yaml.org,2002:bool",{kind:"scalar",resolve:yt,construct:bt,predicate:wt,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function _t(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function vt(e){return 48<=e&&e<=55}function Ct(e){return 48<=e&&e<=57}function xt(e){if(e===null)return!1;var t=e.length,r=0,o=!1,a;if(!t)return!1;if(a=e[r],(a==="-"||a==="+")&&(a=e[++r]),a==="0"){if(r+1===t)return!0;if(a=e[++r],a==="b"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;o=!0}return o&&a!=="_"}if(a==="x"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!_t(e.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}if(a==="o"){for(r++;r<t;r++)if(a=e[r],a!=="_"){if(!vt(e.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}}if(a==="_")return!1;for(;r<t;r++)if(a=e[r],a!=="_"){if(!Ct(e.charCodeAt(r)))return!1;o=!0}return!(!o||a==="_")}function Nt(e){var t=e,r=1,o;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),o=t[0],(o==="-"||o==="+")&&(o==="-"&&(r=-1),t=t.slice(1),o=t[0]),t==="0")return 0;if(o==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function St(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!R.isNegativeZero(e)}var Lt=new b("tag:yaml.org,2002:int",{kind:"scalar",resolve:xt,construct:Nt,predicate:St,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),It=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Et(e){return!(e===null||!It.test(e)||e[e.length-1]==="_")}function Tt(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var At=/^[-+]?[0-9]+e/;function $t(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(R.isNegativeZero(e))return"-0.0";return r=e.toString(10),At.test(r)?r.replace("e",".e"):r}function Bt(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||R.isNegativeZero(e))}var Vt=new b("tag:yaml.org,2002:float",{kind:"scalar",resolve:Et,construct:Tt,predicate:Bt,represent:$t,defaultStyle:"lowercase"}),Dt=pt.extend({implicit:[ht,kt,Lt,Vt]}),jt=Dt,de=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),pe=new RegExp("^([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]))?))?$");function Ot(e){return e===null?!1:de.exec(e)!==null||pe.exec(e)!==null}function qt(e){var t,r,o,a,i,l,s,u=0,c=null,f,d,g;if(t=de.exec(e),t===null&&(t=pe.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],o=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(r,o,a));if(i=+t[4],l=+t[5],s=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(f=+t[10],d=+(t[11]||0),c=(f*60+d)*6e4,t[9]==="-"&&(c=-c)),g=new Date(Date.UTC(r,o,a,i,l,s,u)),c&&g.setTime(g.getTime()-c),g}function zt(e){return e.toISOString()}var Ft=new b("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ot,construct:qt,instanceOf:Date,represent:zt});function Mt(e){return e==="<<"||e===null}var Ut=new b("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Mt}),Y=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
4
|
+
\r`;function Pt(e){if(e===null)return!1;var t,r,o=0,a=e.length,i=Y;for(r=0;r<a;r++)if(t=i.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function Kt(e){var t,r,o=e.replace(/[\r\n=]/g,""),a=o.length,i=Y,l=0,s=[];for(t=0;t<a;t++)t%4===0&&t&&(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)),l=l<<6|i.indexOf(o.charAt(t));return r=a%4*6,r===0?(s.push(l>>16&255),s.push(l>>8&255),s.push(l&255)):r===18?(s.push(l>>10&255),s.push(l>>2&255)):r===12&&s.push(l>>4&255),new Uint8Array(s)}function Rt(e){var t="",r=0,o,a,i=e.length,l=Y;for(o=0;o<i;o++)o%3===0&&o&&(t+=l[r>>18&63],t+=l[r>>12&63],t+=l[r>>6&63],t+=l[r&63]),r=(r<<8)+e[o];return a=i%3,a===0?(t+=l[r>>18&63],t+=l[r>>12&63],t+=l[r>>6&63],t+=l[r&63]):a===2?(t+=l[r>>10&63],t+=l[r>>4&63],t+=l[r<<2&63],t+=l[64]):a===1&&(t+=l[r>>2&63],t+=l[r<<4&63],t+=l[64],t+=l[64]),t}function Ht(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Yt=new b("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Pt,construct:Kt,predicate:Ht,represent:Rt}),Zt=Object.prototype.hasOwnProperty,Wt=Object.prototype.toString;function Qt(e){if(e===null)return!0;var t=[],r,o,a,i,l,s=e;for(r=0,o=s.length;r<o;r+=1){if(a=s[r],l=!1,Wt.call(a)!=="[object Object]")return!1;for(i in a)if(Zt.call(a,i))if(!l)l=!0;else return!1;if(!l)return!1;if(t.indexOf(i)===-1)t.push(i);else return!1}return!0}function Gt(e){return e!==null?e:[]}var Jt=new b("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Qt,construct:Gt}),Xt=Object.prototype.toString;function er(e){if(e===null)return!0;var t,r,o,a,i,l=e;for(i=new Array(l.length),t=0,r=l.length;t<r;t+=1){if(o=l[t],Xt.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;i[t]=[a[0],o[a[0]]]}return!0}function tr(e){if(e===null)return[];var t,r,o,a,i,l=e;for(i=new Array(l.length),t=0,r=l.length;t<r;t+=1)o=l[t],a=Object.keys(o),i[t]=[a[0],o[a[0]]];return i}var rr=new b("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:er,construct:tr}),nr=Object.prototype.hasOwnProperty;function or(e){if(e===null)return!0;var t,r=e;for(t in r)if(nr.call(r,t)&&r[t]!==null)return!1;return!0}function ar(e){return e!==null?e:{}}var ir=new b("tag:yaml.org,2002:set",{kind:"mapping",resolve:or,construct:ar});jt.extend({implicit:[Ft,Ut],explicit:[Yt,Jt,rr,ir]});function fe(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
5
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}for(var lr=new Array(256),sr=new Array(256),B=0;B<256;B++)lr[B]=fe(B)?1:0,sr[B]=fe(B);const cr=[];for(let e=0;e<256;++e)cr.push((e+256).toString(16).slice(1));typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const{useAxios:rn,useDeleteUrlBuilder:nn,useErrors:ur,useExternalLinkCreator:on,useFetchUrlBuilder:an,useFetcher:ln,useDebouncedFilter:sn,useStringHelpers:cn,useHelpers:un,useGatewayFeatureSupported:dn,useTruncationDetector:pn,useValidators:fn}=Re;var L=(e=>(e.Debug="debug",e.Info="info",e.Notice="notice",e.Warn="warn",e.Error="error",e.Critical="crit",e))(L||{});class dr{constructor(t){D(this,"concurrentTokenSet",new Set);D(this,"concurrentTokenBorrowQueue",[]);for(let r=0;r<t;++r)this.concurrentTokenSet.add(Symbol(`token-${r}`))}hasAvailableConcurrentToken(){return this.concurrentTokenSet.size>0}borrowConcurrentToken(){if(this.concurrentTokenSet.size>0){const t=this.concurrentTokenSet.values().next().value;return this.concurrentTokenSet.delete(t),()=>{this.returnConcurrentToken(t)}}throw new Error("BUG: No available token to borrow")}returnConcurrentToken(t){if(this.concurrentTokenSet.has(t))throw new Error("Token already returned");const r=this.concurrentTokenBorrowQueue.shift();r?r[0](()=>this.returnConcurrentToken(t)):this.concurrentTokenSet.add(t)}async borrowToken(){return this.hasAvailableConcurrentToken()?this.borrowConcurrentToken():new Promise((t,r)=>{this.concurrentTokenBorrowQueue.push([t,r])})}clearWaitingQueue(t){for(;this.concurrentTokenBorrowQueue.length>0;){const[,r]=this.concurrentTokenBorrowQueue.shift();r(t)}}}class Z extends Error{constructor(t,r){super(t,r),this.name="AsyncAbortException"}}class F{constructor(t){D(this,"tokenBucket",null);D(this,"schedule",async t=>{let r;this.tokenBucket&&(r=await this.tokenBucket.borrowToken());try{const o=await t();return r==null||r(),o}catch(o){throw r==null||r(),o}});D(this,"cancelAll",(t,r)=>{var o;(o=this.tokenBucket)==null||o.clearWaitingQueue(new Z(t,r))});t.maxConcurrentAsyncs>0&&(this.tokenBucket=new dr(t.maxConcurrentAsyncs))}}const pr=Object.freeze(Object.defineProperty({__proto__:null,AsyncAbortException:Z,AsyncScheduler:F,useAsyncScheduler:e=>e instanceof F?e:e===null?new F({maxConcurrentAsyncs:0}):new F(e)},Symbol.toStringTag,{value:"Module"})),ge=[L.Debug,L.Info,L.Notice,L.Warn,L.Error,L.Critical],I={useI18n:q,...Object.freeze(Object.defineProperty({__proto__:null,supportedLevels:ge,useDataPlaneLogLevelChecker:e=>{const t=e.requestExecutor??(l=>l()),{getDataPlaneLogLevel:r,setDataPlaneLogLevel:o}=e,{getMessageFromError:a}=ur();return{checkDataPlaneLogLevel:(l,s)=>{const u=n.ref(n.toValue(s==null?void 0:s.currentLogLevelHint)??null);u.value===null&&t(async()=>{u.value=await r(l)}).catch(g=>{g instanceof Z||console.error("Failed to get data plane log level",g)}),s!=null&&s.currentLogLevelHint&&n.watch(()=>n.toValue(s.currentLogLevelHint),g=>{g&&(u.value=g)});const c=n.ref("pending"),f=n.ref(null);return{currentLogLevel:u,updateStatus:c,updateErrorMessage:f,updateLogLevel:async(g,p)=>{c.value="loading",f.value=null;try{await t(()=>o(l,g,p)),u.value=g,c.value="success"}catch(x){f.value=a(x),c.value="error"}}}}}},useFriendlyRevertTime:e=>{const{i18n:t}=q();return n.computed(()=>{const r=n.toValue(e);if(isNaN(r)||r<=0)return"";let o="";const a=r%60;a!==0&&(o+=`${a} ${t.t("modal.revert_to_default_after.seconds")}`);const i=Math.floor(r/60)%60;i!==0&&(o=`${i} ${t.t("modal.revert_to_default_after.minutes")} ${o}`);const l=Math.floor(r/3600);return l!==0&&(o=`${l} ${t.t("modal.revert_to_default_after.hours")} ${o}`),o})},useLogLevelCandidateSelectItems:e=>{const{i18n:t}=q();return n.computed(()=>{const r=n.toValue(e==null?void 0:e.disabled)??[];return ge.map(o=>({label:t.t(`log_level.${o}`),value:o,selected:(e==null?void 0:e.initialSelected)===o,disabled:r.includes(o)}))})},useLogLevelExplanation:e=>{const t=[L.Debug],{i18n:r}=q();return n.computed(()=>{const o=n.toValue(e);return{explanation:r.t(`modal.log_level_explanation.${o}`),warning:t.includes(o)?r.t("modal.log_level_disk_space_warning"):void 0}})}},Symbol.toStringTag,{value:"Module"})),...pr},E="24px",M=(e,t)=>{const r=e.__vccOpts||e;for(const[o,a]of t)r[o]=a;return r},fr=e=>(n.pushScopeId("data-v-81eeb177"),e=e(),n.popScopeId(),e),gr=["aria-hidden"],mr={key:0,"data-testid":"kui-icon-svg-title"},hr=fr(()=>n.createElementVNode("path",{d:"M10.6 16.6L17.65 9.55L16.25 8.15L10.6 13.8L7.75 10.95L6.35 12.35L10.6 16.6ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z",fill:"currentColor"},null,-1)),yr=M(n.defineComponent({__name:"CheckCircleIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:E,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const a=String(t.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return E}),o=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(a,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon check-circle-icon","data-testid":"kui-icon-wrapper-check-circle-icon",style:n.normalizeStyle(o.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-check-circle-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",mr,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),hr],8,gr))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-81eeb177"]]),br=e=>(n.pushScopeId("data-v-20ae6e1c"),e=e(),n.popScopeId(),e),wr=["aria-hidden"],kr={key:0,"data-testid":"kui-icon-svg-title"},_r=br(()=>n.createElementVNode("path",{d:"M8.4 17L12 13.4L15.6 17L17 15.6L13.4 12L17 8.4L15.6 7L12 10.6L8.4 7L7 8.4L10.6 12L7 15.6L8.4 17ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22Z",fill:"currentColor"},null,-1)),vr=M(n.defineComponent({__name:"ClearIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:E,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const a=String(t.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return E}),o=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(a,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon clear-icon","data-testid":"kui-icon-wrapper-clear-icon",style:n.normalizeStyle(o.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-clear-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",kr,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),_r],8,wr))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-20ae6e1c"]]),Cr=e=>(n.pushScopeId("data-v-c5e89abd"),e=e(),n.popScopeId(),e),xr=["aria-hidden"],Nr={key:0,"data-testid":"kui-icon-svg-title"},Sr=Cr(()=>n.createElementVNode("path",{d:"M4 17V14H20V17H4ZM4 10V7H20V10H4Z",fill:"currentColor"},null,-1)),Lr=M(n.defineComponent({__name:"EqualIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:E,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const a=String(t.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return E}),o=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(a,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon equal-icon","data-testid":"kui-icon-wrapper-equal-icon",style:n.normalizeStyle(o.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-equal-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",Nr,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),Sr],8,xr))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-c5e89abd"]]),me=e=>(n.pushScopeId("data-v-50d7a43a"),e=e(),n.popScopeId(),e),Ir=["aria-hidden"],Er={key:0,"data-testid":"kui-icon-svg-title"},Tr=me(()=>n.createElementVNode("path",{d:"M12 22C10.6333 22 9.34167 21.7375 8.125 21.2125C6.90833 20.6875 5.84583 19.9708 4.9375 19.0625C4.02917 18.1542 3.3125 17.0917 2.7875 15.875C2.2625 14.6583 2 13.3667 2 12C2 10.6167 2.2625 9.32083 2.7875 8.1125C3.3125 6.90417 4.02917 5.84583 4.9375 4.9375C5.84583 4.02917 6.90833 3.3125 8.125 2.7875C9.34167 2.2625 10.6333 2 12 2C12.2833 2 12.5208 2.09583 12.7125 2.2875C12.9042 2.47917 13 2.71667 13 3C13 3.28333 12.9042 3.52083 12.7125 3.7125C12.5208 3.90417 12.2833 4 12 4C9.78333 4 7.89583 4.77917 6.3375 6.3375C4.77917 7.89583 4 9.78333 4 12C4 14.2167 4.77917 16.1042 6.3375 17.6625C7.89583 19.2208 9.78333 20 12 20C14.2167 20 16.1042 19.2208 17.6625 17.6625C19.2208 16.1042 20 14.2167 20 12C20 11.7167 20.0958 11.4792 20.2875 11.2875C20.4792 11.0958 20.7167 11 21 11C21.2833 11 21.5208 11.0958 21.7125 11.2875C21.9042 11.4792 22 11.7167 22 12C22 13.3667 21.7375 14.6583 21.2125 15.875C20.6875 17.0917 19.9708 18.1542 19.0625 19.0625C18.1542 19.9708 17.0958 20.6875 15.8875 21.2125C14.6792 21.7375 13.3833 22 12 22Z",fill:"currentColor","transform-origin":"center"},null,-1)),Ar=me(()=>n.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",dur:"1.5s",from:"0",repeatCount:"indefinite",to:"360",type:"rotate"},null,-1)),$r=M(n.defineComponent({__name:"ProgressIcon",props:{title:{type:String,required:!1,default:""},color:{type:String,required:!1,default:"currentColor"},display:{type:String,required:!1,default:"block"},decorative:{type:Boolean,required:!1,default:!1},size:{type:[Number,String],required:!1,default:E,validator:e=>{if(typeof e=="number"&&e>0)return!0;if(typeof e=="string"){const t=String(e).replace(/px/gi,""),r=Number(t);if(r&&!isNaN(r)&&Number.isInteger(r)&&r>0)return!0}return!1}},as:{type:String,required:!1,default:"span"}},setup(e){const t=e,r=n.computed(()=>{if(typeof t.size=="number"&&t.size>0)return`${t.size}px`;if(typeof t.size=="string"){const a=String(t.size).replace(/px/gi,""),i=Number(a);if(i&&!isNaN(i)&&Number.isInteger(i)&&i>0)return`${i}px`}return E}),o=n.computed(()=>({boxSizing:"border-box",color:t.color,display:t.display,height:r.value,lineHeight:"0",width:r.value}));return(a,i)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.as),{"aria-hidden":e.decorative?"true":void 0,class:"kui-icon progress-icon","data-testid":"kui-icon-wrapper-progress-icon",style:n.normalizeStyle(o.value)},{default:n.withCtx(()=>[(n.openBlock(),n.createElementBlock("svg",{"aria-hidden":e.decorative?"true":void 0,"data-testid":"kui-icon-svg-progress-icon",fill:"none",height:"100%",role:"img",viewBox:"0 0 24 24",width:"100%",xmlns:"http://www.w3.org/2000/svg"},[e.title?(n.openBlock(),n.createElementBlock("title",Er,n.toDisplayString(e.title),1)):n.createCommentVNode("",!0),Tr,Ar],8,Ir))]),_:1},8,["aria-hidden","style"]))}}),[["__scopeId","data-v-50d7a43a"]]),Br={"data-testid":"log-change-action"},Vr={key:0},Dr={"data-testid":"log-change-action-current-level"},jr={key:0},Or={"data-testid":"log-change-action-target-level"},qr={"data-testid":"log-change-status"},zr=n.defineComponent({__name:"CLLModalNodeRow",props:{dataPlaneId:{},hostname:{},hasDllCapability:{type:Boolean},targetLogLevel:{},checkLogLevel:{},logLevelHint:{}},setup(e,{expose:t}){const r=e,{i18n:o}=I.useI18n();let a=n.ref("not_supported"),i=n.ref("not_supported"),l=n.ref(null),s=async()=>{};r.hasDllCapability&&({currentLogLevel:a,updateStatus:i,updateErrorMessage:l,updateLogLevel:s}=r.checkLogLevel(r.dataPlaneId,{currentLogLevelHint:()=>r.logLevelHint??null})),t({updateLogLevel:s});const u=n.computed(()=>{switch(i.value){case"success":return"success";case"error":return"danger";case"loading":case"pending":return"warning";default:return"neutral"}}),c=n.computed(()=>{switch(i.value){case"success":return o.t("modal.dp_list.status.succeed");case"error":return o.t("modal.dp_list.status.failed");case"pending":return o.t("modal.dp_list.status.pending");case"loading":return o.t("modal.dp_list.status.loading");default:return o.t("modal.dp_list.status.not_supported")}}),f=n.computed(()=>{switch(i.value){case"success":return yr;case"error":case"not_supported":return vr;case"loading":return $r;default:return Lr}});return(d,g)=>{const p=n.resolveComponent("KSkeleton"),x=n.resolveComponent("KBadge"),v=n.resolveComponent("KTooltip");return n.openBlock(),n.createElementBlock("tr",null,[n.createElementVNode("td",null,n.toDisplayString(d.hostname),1),n.createElementVNode("td",Br,[n.unref(a)==="not_supported"?(n.openBlock(),n.createElementBlock("span",Vr,n.toDisplayString(n.unref(o).t("log_level.not_applicable")),1)):n.unref(a)?(n.openBlock(),n.createElementBlock(n.Fragment,{key:2},[n.createElementVNode("span",Dr,n.toDisplayString(n.unref(o).t(`log_level.${n.unref(a)}`)),1),n.unref(a)!==d.targetLogLevel?(n.openBlock(),n.createElementBlock("span",jr,[n.createTextVNode(" → "),n.createElementVNode("span",Or,n.toDisplayString(n.unref(o).t(`log_level.${d.targetLogLevel}`)),1)])):n.createCommentVNode("",!0)],64)):(n.openBlock(),n.createBlock(p,{key:1,type:"spinner"}))]),n.createElementVNode("td",qr,[n.unref(l)?(n.openBlock(),n.createBlock(v,{key:0,text:n.unref(l)},{default:n.withCtx(()=>[n.createVNode(x,{appearance:u.value,class:"badge-cell"},{icon:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(f.value)))]),default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(c.value),1)]),_:1},8,["appearance"])]),_:1},8,["text"])):(n.openBlock(),n.createBlock(x,{key:1,appearance:u.value,class:"badge-cell"},{icon:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(f.value)))]),default:n.withCtx(()=>[n.createTextVNode(" "+n.toDisplayString(c.value),1)]),_:1},8,["appearance"]))])])}}}),he=(e,t)=>{const r=e.__vccOpts||e;for(const[o,a]of t)r[o]=a;return r},Fr=he(zr,[["__scopeId","data-v-ac7205dd"]]),Mr={class:"explanation-wrapper"},Ur={key:0,class:"warning-message","data-testid":"log-level-warning-message"},Pr={class:"revert-after-wrapper"},Kr={class:"time"},Rr={class:"seconds"},Hr={class:"formatted-time","data-testid":"log-level-timeout-formatted"},Yr={class:"data-plane-node-list","data-testid":"data-plane-node-list"},Zr={style:{width:"40%"}},Wr={style:{width:"40%"}},Qr=he(n.defineComponent({name:"ChangeLogLevelModal",__name:"ChangeLogLevelModal",props:n.mergeModels({instanceList:{},instanceLogLevel:{},requests:{}},{visible:{type:Boolean},visibleModifiers:{}}),emits:["update:visible"],setup(e){const t=e,r=n.useModel(e,"visible"),o=L.Notice,{i18n:a}=I.useI18n(),i=n.ref("edit"),l=n.ref(o),s=n.ref("60"),u=n.computed(()=>Math.floor(Number(s.value))),c=n.computed(()=>t.instanceList.filter(N=>N.hasDLLCapability!==!1)),f=n.computed(()=>{const N=c.value.length===1?a.t("modal.change_log_level.summary_with_name",{name:c.value[0].hostname}):a.t("modal.change_log_level.summary_with_number",{number:`${c.value.length}`});return a.t("modal.change_log_level.title",{summary:N})}),d=n.computed(()=>i.value==="submitting"||isNaN(u.value)||u.value<=0||c.value.length===0),g=I.useLogLevelCandidateSelectItems({initialSelected:o}),p=I.useLogLevelExplanation(l),x=I.useFriendlyRevertTime(u),v=I.useAsyncScheduler(t.requests.scheduler===void 0?{maxConcurrentAsyncs:10}:t.requests.scheduler),{checkDataPlaneLogLevel:W}=I.useDataPlaneLogLevelChecker({getDataPlaneLogLevel:t.requests.getDataPlaneLogLevel,setDataPlaneLogLevel:t.requests.setDataPlaneLogLevel,requestExecutor:v.schedule}),O=new Map,U=(N,C)=>{C===null?O.delete(N):O.set(N,C)},Q=async()=>{if(i.value!=="edit"){m();return}i.value="submitting";const N=Array.from(O.values()).map(C=>C.updateLogLevel(l.value,u.value));try{await Promise.all(N)}catch(C){console.error("Failed to update log level",C)}finally{i.value="submitted"}},m=()=>{r.value=!1,s.value="60",i.value="edit",l.value=o},P=n.computed(()=>{switch(i.value){case"submitting":return a.t("modal.action_button.submitting");case"submitted":return a.t("modal.action_button.ok");default:return a.t("modal.action_button.confirm")}});return(N,C)=>{const k=n.resolveComponent("KSelect"),_=n.resolveComponent("KLabel"),A=n.resolveComponent("KInput"),w=n.resolveComponent("KModal");return n.openBlock(),n.createBlock(w,{"action-button-disabled":d.value,"action-button-text":P.value,"data-testid":"change-log-level-modal","hide-cancel-button":!0,"hide-close-icon":i.value==="submitting","max-width":"640px",title:f.value,visible:r.value,onCancel:m,onProceed:Q},{default:n.withCtx(()=>[i.value==="edit"?(n.openBlock(),n.createBlock(k,{key:0,modelValue:l.value,"onUpdate:modelValue":C[0]||(C[0]=h=>l.value=h),class:"log-level-select","data-testid":"log-level-select",items:n.unref(g),label:n.unref(a).t("modal.select_log_level_title")},null,8,["modelValue","items","label"])):n.createCommentVNode("",!0),n.createElementVNode("div",Mr,[n.createVNode(_,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(a).t(`log_level.${l.value}`)),1)]),_:1}),n.createElementVNode("div",null,n.toDisplayString(n.unref(p).explanation),1),n.unref(p).warning?(n.openBlock(),n.createElementBlock("div",Ur,n.toDisplayString(n.unref(p).warning),1)):n.createCommentVNode("",!0)]),n.createElementVNode("div",Pr,[n.createVNode(_,null,{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(n.unref(a).t("modal.revert_to_default_after.label")),1)]),_:1}),n.createElementVNode("div",Kr,[n.createVNode(A,{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=h=>s.value=h),class:"time-input","data-testid":"log-level-timeout",disabled:i.value!=="edit",error:u.value<=0||isNaN(u.value),min:"1",type:"number"},null,8,["modelValue","disabled","error"]),n.createElementVNode("span",Rr,n.toDisplayString(n.unref(a).t("modal.revert_to_default_after.seconds")),1),n.createElementVNode("span",Hr,n.toDisplayString(n.unref(x)),1)])]),n.createElementVNode("table",Yr,[n.createElementVNode("thead",null,[n.createElementVNode("th",Zr,n.toDisplayString(n.unref(a).t("modal.dp_list.header.host")),1),n.createElementVNode("th",Wr,n.toDisplayString(n.unref(a).t("modal.dp_list.header.action")),1),n.createElementVNode("th",null,n.toDisplayString(n.unref(a).t("modal.dp_list.header.status")),1)]),n.createElementVNode("tbody",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.instanceList,h=>{var V;return n.openBlock(),n.createBlock(Fr,{key:h.id,ref_for:!0,ref:Gr=>U(h.id,Gr),"check-log-level":n.unref(W),"data-plane-id":h.id,"data-testid":`data-plane-node-list-row-${h.id}`,"has-dll-capability":h.hasDLLCapability??!0,hostname:h.hostname,"log-level-hint":(V=t.instanceLogLevel)==null?void 0:V.get(h.id),"target-log-level":l.value},null,8,["check-log-level","data-plane-id","data-testid","has-dll-capability","hostname","log-level-hint","target-log-level"])}),128))])])]),_:1},8,["action-button-disabled","action-button-text","hide-close-icon","title","visible"])}}}),[["__scopeId","data-v-983a59ac"]]);y.ChangeLogLevelModal=Qr,y.LogLevel=L,y.composables=I,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/entities-data-plane-nodes",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/entities-data-plane-nodes.umd.js",
|
|
6
6
|
"module": "./dist/entities-data-plane-nodes.es.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@kong-ui-public/i18n": "^2.2.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@kong/design-tokens": "1.
|
|
31
|
+
"@kong/design-tokens": "1.13.2",
|
|
32
32
|
"@kong/kongponents": "9.0.0-alpha.162",
|
|
33
33
|
"axios": "^1.6.8",
|
|
34
34
|
"vue": "^3.4.27",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"errorLimit": "500KB"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@kong/icons": "^1.
|
|
54
|
-
"@kong-ui-public/entities-shared": "^3.3.
|
|
53
|
+
"@kong/icons": "^1.13.0",
|
|
54
|
+
"@kong-ui-public/entities-shared": "^3.3.4"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"dev": "cross-env USE_SANDBOX=true vite",
|