@kong-ui-public/entities-redis-configurations 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { computed as H, reactive as Nt, ref as $, watch as ke, defineComponent as Q, resolveComponent as D, createElementBlock as q, openBlock as k, createVNode as m, withCtx as
|
|
1
|
+
import { computed as H, reactive as Nt, ref as $, watch as ke, defineComponent as Q, resolveComponent as D, createElementBlock as q, openBlock as k, createVNode as m, withCtx as E, renderSlot as yn, unref as i, mergeModels as jt, useModel as Bt, createElementVNode as K, createTextVNode as te, toDisplayString as B, Fragment as We, renderList as mt, createBlock as F, getCurrentInstance as vn, onMounted as hn, onUnmounted as Tn, isReadonly as wn, toRefs as Sn, onBeforeMount as En, createCommentVNode as ee, isRef as Cn, createSlots as Ft, withModifiers as In, Teleport as Rn } from "vue";
|
|
2
2
|
import "@kong-ui-public/entities-shared/dist/style.css";
|
|
3
3
|
import "@kong-ui-public/entities-vaults/dist/style.css";
|
|
4
4
|
import { useAxios as gt, useErrors as kn, EntityBaseFormType as Ze, EntityBaseForm as On, SupportedEntityType as Ht, EntityFormSection as ue, EntityFilter as Kt, useDeleteUrlBuilder as xn, useFetcher as Pn, FetcherStatus as An, EntityBaseTable as Vn, PermissionsWrapper as De, TableTags as $n, EntityEmptyState as Ln, EntityDeleteModal as Mn, EntityTypes as Dn, ConfigurationSchemaSection as x, ConfigurationSchemaType as P, EntityBaseConfigCard as Un } from "@kong-ui-public/entities-shared";
|
|
@@ -387,10 +387,10 @@ function on(e, t, n, o, r, a) {
|
|
|
387
387
|
var p = n & uo, _ = e.length, l = t.length;
|
|
388
388
|
if (_ != l && !(p && l > _))
|
|
389
389
|
return !1;
|
|
390
|
-
var u = a.get(e),
|
|
391
|
-
if (u &&
|
|
392
|
-
return u == t &&
|
|
393
|
-
var w = -1,
|
|
390
|
+
var u = a.get(e), y = a.get(t);
|
|
391
|
+
if (u && y)
|
|
392
|
+
return u == t && y == e;
|
|
393
|
+
var w = -1, b = !0, S = n & co ? new Ke() : void 0;
|
|
394
394
|
for (a.set(e, t), a.set(t, e); ++w < _; ) {
|
|
395
395
|
var v = e[w], s = t[w];
|
|
396
396
|
if (o)
|
|
@@ -398,23 +398,23 @@ function on(e, t, n, o, r, a) {
|
|
|
398
398
|
if (I !== void 0) {
|
|
399
399
|
if (I)
|
|
400
400
|
continue;
|
|
401
|
-
|
|
401
|
+
b = !1;
|
|
402
402
|
break;
|
|
403
403
|
}
|
|
404
|
-
if (
|
|
404
|
+
if (S) {
|
|
405
405
|
if (!lo(t, function(V, f) {
|
|
406
|
-
if (!so(
|
|
407
|
-
return
|
|
406
|
+
if (!so(S, f) && (v === V || r(v, V, n, o, a)))
|
|
407
|
+
return S.push(f);
|
|
408
408
|
})) {
|
|
409
|
-
|
|
409
|
+
b = !1;
|
|
410
410
|
break;
|
|
411
411
|
}
|
|
412
412
|
} else if (!(v === s || r(v, s, n, o, a))) {
|
|
413
|
-
|
|
413
|
+
b = !1;
|
|
414
414
|
break;
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
|
-
return a.delete(e), a.delete(t),
|
|
417
|
+
return a.delete(e), a.delete(t), b;
|
|
418
418
|
}
|
|
419
419
|
function fo(e) {
|
|
420
420
|
var t = -1, n = Array(e.size);
|
|
@@ -456,8 +456,8 @@ function Ro(e, t, n, o, r, a, p) {
|
|
|
456
456
|
if (u)
|
|
457
457
|
return u == t;
|
|
458
458
|
o |= go, p.set(e, t);
|
|
459
|
-
var
|
|
460
|
-
return p.delete(e),
|
|
459
|
+
var y = on(_(e), _(t), o, r, a, p);
|
|
460
|
+
return p.delete(e), y;
|
|
461
461
|
case Eo:
|
|
462
462
|
if (nt)
|
|
463
463
|
return nt.call(e) == nt.call(t);
|
|
@@ -466,29 +466,29 @@ function Ro(e, t, n, o, r, a, p) {
|
|
|
466
466
|
}
|
|
467
467
|
var ko = 1, Oo = Object.prototype, xo = Oo.hasOwnProperty;
|
|
468
468
|
function Po(e, t, n, o, r, a) {
|
|
469
|
-
var p = n & ko, _ = Ct(e), l = _.length, u = Ct(t),
|
|
470
|
-
if (l !=
|
|
469
|
+
var p = n & ko, _ = Ct(e), l = _.length, u = Ct(t), y = u.length;
|
|
470
|
+
if (l != y && !p)
|
|
471
471
|
return !1;
|
|
472
472
|
for (var w = l; w--; ) {
|
|
473
|
-
var
|
|
474
|
-
if (!(p ?
|
|
473
|
+
var b = _[w];
|
|
474
|
+
if (!(p ? b in t : xo.call(t, b)))
|
|
475
475
|
return !1;
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
if (
|
|
479
|
-
return
|
|
477
|
+
var S = a.get(e), v = a.get(t);
|
|
478
|
+
if (S && v)
|
|
479
|
+
return S == t && v == e;
|
|
480
480
|
var s = !0;
|
|
481
481
|
a.set(e, t), a.set(t, e);
|
|
482
482
|
for (var I = p; ++w < l; ) {
|
|
483
|
-
|
|
484
|
-
var V = e[
|
|
483
|
+
b = _[w];
|
|
484
|
+
var V = e[b], f = t[b];
|
|
485
485
|
if (o)
|
|
486
|
-
var c = p ? o(f, V,
|
|
486
|
+
var c = p ? o(f, V, b, t, e, a) : o(V, f, b, e, t, a);
|
|
487
487
|
if (!(c === void 0 ? V === f || r(V, f, n, o, a) : c)) {
|
|
488
488
|
s = !1;
|
|
489
489
|
break;
|
|
490
490
|
}
|
|
491
|
-
I || (I =
|
|
491
|
+
I || (I = b == "constructor");
|
|
492
492
|
}
|
|
493
493
|
if (s && !I) {
|
|
494
494
|
var N = e.constructor, L = t.constructor;
|
|
@@ -500,22 +500,22 @@ var Ao = 1, Vt = "[object Arguments]", $t = "[object Array]", Ne = "[object Obje
|
|
|
500
500
|
function $o(e, t, n, o, r, a) {
|
|
501
501
|
var p = He(e), _ = He(t), l = p ? $t : ce(e), u = _ ? $t : ce(t);
|
|
502
502
|
l = l == Vt ? Ne : l, u = u == Vt ? Ne : u;
|
|
503
|
-
var
|
|
504
|
-
if (
|
|
503
|
+
var y = l == Ne, w = u == Ne, b = l == u;
|
|
504
|
+
if (b && dt(e)) {
|
|
505
505
|
if (!dt(t))
|
|
506
506
|
return !1;
|
|
507
|
-
p = !0,
|
|
507
|
+
p = !0, y = !1;
|
|
508
508
|
}
|
|
509
|
-
if (
|
|
509
|
+
if (b && !y)
|
|
510
510
|
return a || (a = new fe()), p || rn(e) ? on(e, t, n, o, r, a) : Ro(e, t, l, n, o, r, a);
|
|
511
511
|
if (!(n & Ao)) {
|
|
512
|
-
var
|
|
513
|
-
if (
|
|
514
|
-
var s =
|
|
512
|
+
var S = y && Lt.call(e, "__wrapped__"), v = w && Lt.call(t, "__wrapped__");
|
|
513
|
+
if (S || v) {
|
|
514
|
+
var s = S ? e.value() : e, I = v ? t.value() : t;
|
|
515
515
|
return a || (a = new fe()), r(s, I, n, o, a);
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
return
|
|
518
|
+
return b ? (a || (a = new fe()), Po(e, t, n, o, r, a)) : !1;
|
|
519
519
|
}
|
|
520
520
|
function an(e, t, n, o, r) {
|
|
521
521
|
return e === t ? !0 : e == null || t == null || !Oe(e) && !Oe(t) ? e !== e && t !== t : $o(e, t, n, o, an, r);
|
|
@@ -661,16 +661,16 @@ const ln = {
|
|
|
661
661
|
},
|
|
662
662
|
readonly: !1,
|
|
663
663
|
errorMessage: ""
|
|
664
|
-
}), u = $(),
|
|
665
|
-
ke(
|
|
664
|
+
}), u = $(), y = $(o), w = H(() => y.value === T.HOST_PORT_EE || y.value === T.CLUSTER || y.value === T.SENTINEL);
|
|
665
|
+
ke(y, (f) => {
|
|
666
666
|
l.fields.type = ze(f);
|
|
667
667
|
});
|
|
668
|
-
const
|
|
668
|
+
const b = H(() => {
|
|
669
669
|
var c;
|
|
670
|
-
if (r && Lo(u.value,
|
|
670
|
+
if (r && Lo(u.value, S.value) || !l.fields.name.length)
|
|
671
671
|
return !1;
|
|
672
672
|
const { config: f } = l.fields;
|
|
673
|
-
switch (
|
|
673
|
+
switch (y.value) {
|
|
674
674
|
case T.HOST_PORT_CE:
|
|
675
675
|
case T.HOST_PORT_EE:
|
|
676
676
|
return !!f.host && f.host.length > 0 && !!f.port && f.port > 0;
|
|
@@ -681,8 +681,8 @@ const ln = {
|
|
|
681
681
|
default:
|
|
682
682
|
throw new Error("Invalid redis type");
|
|
683
683
|
}
|
|
684
|
-
}),
|
|
685
|
-
switch (
|
|
684
|
+
}), S = H(() => {
|
|
685
|
+
switch (y.value) {
|
|
686
686
|
case T.HOST_PORT_CE:
|
|
687
687
|
return {
|
|
688
688
|
name: l.fields.name,
|
|
@@ -802,17 +802,17 @@ const ln = {
|
|
|
802
802
|
});
|
|
803
803
|
return {
|
|
804
804
|
form: l,
|
|
805
|
-
canSubmit:
|
|
806
|
-
payload:
|
|
805
|
+
canSubmit: b,
|
|
806
|
+
payload: S,
|
|
807
807
|
isEdit: r,
|
|
808
|
-
redisType:
|
|
808
|
+
redisType: y,
|
|
809
809
|
redisTypeIsEnterprise: w,
|
|
810
810
|
formType: _,
|
|
811
811
|
fetchUrl: s,
|
|
812
812
|
submit: async () => {
|
|
813
813
|
try {
|
|
814
814
|
l.readonly = !0, l.errorMessage = "";
|
|
815
|
-
let f =
|
|
815
|
+
let f = S.value;
|
|
816
816
|
return n.app === "konnect" && (f = {
|
|
817
817
|
...f,
|
|
818
818
|
config: h.removeNullValues(f.config)
|
|
@@ -827,7 +827,7 @@ const ln = {
|
|
|
827
827
|
l.fields.config,
|
|
828
828
|
h.removeNullValues(f.config)
|
|
829
829
|
// remove null values if data, so they can be replaced with default values
|
|
830
|
-
), l.fields.config.sentinel_nodes = h.addIdToSentinelNodes(f.config.sentinel_nodes ?? []), l.fields.config.cluster_nodes = h.addIdToClusterNodes(f.config.cluster_nodes ?? []), l.fields.name = f.name, l.fields.type = f.type, l.fields.tags = h.arrayToString(f.tags),
|
|
830
|
+
), l.fields.config.sentinel_nodes = h.addIdToSentinelNodes(f.config.sentinel_nodes ?? []), l.fields.config.cluster_nodes = h.addIdToClusterNodes(f.config.cluster_nodes ?? []), l.fields.name = f.name, l.fields.type = f.type, l.fields.tags = h.arrayToString(f.tags), y.value = Ye(f), u.value = JSON.parse(JSON.stringify(S.value));
|
|
831
831
|
}
|
|
832
832
|
};
|
|
833
833
|
}, Fo = { class: "array-card-container" }, Ho = /* @__PURE__ */ Q({
|
|
@@ -856,7 +856,7 @@ const ln = {
|
|
|
856
856
|
const o = D("KCard"), r = D("KButton");
|
|
857
857
|
return k(), q("div", Fo, [
|
|
858
858
|
m(o, { class: "card" }, {
|
|
859
|
-
default:
|
|
859
|
+
default: E(() => [
|
|
860
860
|
yn(t.$slots, "default", {}, void 0, !0)
|
|
861
861
|
]),
|
|
862
862
|
_: 3
|
|
@@ -867,7 +867,7 @@ const ln = {
|
|
|
867
867
|
disabled: e.disabled,
|
|
868
868
|
onClick: n[0] || (n[0] = (a) => t.$emit("remove-item"))
|
|
869
869
|
}, {
|
|
870
|
-
default:
|
|
870
|
+
default: E(() => [
|
|
871
871
|
m(i(jn))
|
|
872
872
|
]),
|
|
873
873
|
_: 1
|
|
@@ -1160,23 +1160,23 @@ const pe = {
|
|
|
1160
1160
|
info: i(n)("form.fields.cluster_nodes.tooltip"),
|
|
1161
1161
|
"tooltip-attributes": { maxWidth: "400" }
|
|
1162
1162
|
}, {
|
|
1163
|
-
default:
|
|
1164
|
-
|
|
1163
|
+
default: E(() => [
|
|
1164
|
+
te(B(i(n)("form.fields.cluster_nodes.title")), 1)
|
|
1165
1165
|
]),
|
|
1166
1166
|
_: 1
|
|
1167
1167
|
}, 8, ["info"]),
|
|
1168
1168
|
K("div", null, [
|
|
1169
|
-
(k(!0), q(We, null, mt(t.value, (
|
|
1169
|
+
(k(!0), q(We, null, mt(t.value, (y, w) => (k(), F(fn, {
|
|
1170
1170
|
key: `${w}`,
|
|
1171
1171
|
"data-testid": "redis-cluster-nodes",
|
|
1172
1172
|
disabled: a.readonly,
|
|
1173
|
-
onRemoveItem: (
|
|
1173
|
+
onRemoveItem: (b) => r(w)
|
|
1174
1174
|
}, {
|
|
1175
|
-
default:
|
|
1175
|
+
default: E(() => [
|
|
1176
1176
|
K("div", ea, [
|
|
1177
1177
|
m(l, {
|
|
1178
|
-
modelValue:
|
|
1179
|
-
"onUpdate:modelValue": (
|
|
1178
|
+
modelValue: y.ip,
|
|
1179
|
+
"onUpdate:modelValue": (b) => y.ip = b,
|
|
1180
1180
|
modelModifiers: { trim: !0 },
|
|
1181
1181
|
label: i(n)("form.fields.cluster_node_ip.label"),
|
|
1182
1182
|
"label-attributes": {
|
|
@@ -1188,8 +1188,8 @@ const pe = {
|
|
|
1188
1188
|
required: ""
|
|
1189
1189
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "label-attributes", "readonly"]),
|
|
1190
1190
|
m(l, {
|
|
1191
|
-
modelValue:
|
|
1192
|
-
"onUpdate:modelValue": (
|
|
1191
|
+
modelValue: y.port,
|
|
1192
|
+
"onUpdate:modelValue": (b) => y.port = b,
|
|
1193
1193
|
label: i(n)("form.fields.cluster_node_port.label"),
|
|
1194
1194
|
"label-attributes": {
|
|
1195
1195
|
info: i(n)("form.fields.cluster_node_port.tooltip"),
|
|
@@ -1209,7 +1209,7 @@ const pe = {
|
|
|
1209
1209
|
disabled: a.readonly,
|
|
1210
1210
|
onClick: o
|
|
1211
1211
|
}, {
|
|
1212
|
-
default:
|
|
1212
|
+
default: E(() => [
|
|
1213
1213
|
m(i(qt)),
|
|
1214
1214
|
K("span", null, B(i(n)("form.fields.cluster_nodes.add_button")), 1)
|
|
1215
1215
|
]),
|
|
@@ -1242,23 +1242,23 @@ const pe = {
|
|
|
1242
1242
|
info: i(n)("form.fields.sentinel_nodes.tooltip"),
|
|
1243
1243
|
"tooltip-attributes": { maxWidth: "400" }
|
|
1244
1244
|
}, {
|
|
1245
|
-
default:
|
|
1246
|
-
|
|
1245
|
+
default: E(() => [
|
|
1246
|
+
te(B(i(n)("form.fields.sentinel_nodes.title")), 1)
|
|
1247
1247
|
]),
|
|
1248
1248
|
_: 1
|
|
1249
1249
|
}, 8, ["info"]),
|
|
1250
1250
|
K("div", null, [
|
|
1251
|
-
(k(!0), q(We, null, mt(t.value, (
|
|
1252
|
-
key:
|
|
1251
|
+
(k(!0), q(We, null, mt(t.value, (y, w) => (k(), F(fn, {
|
|
1252
|
+
key: y.id,
|
|
1253
1253
|
"data-testid": "redis-sentinel-nodes",
|
|
1254
1254
|
disabled: a.readonly,
|
|
1255
|
-
onRemoveItem: (
|
|
1255
|
+
onRemoveItem: (b) => r(w)
|
|
1256
1256
|
}, {
|
|
1257
|
-
default:
|
|
1257
|
+
default: E(() => [
|
|
1258
1258
|
K("div", ia, [
|
|
1259
1259
|
m(l, {
|
|
1260
|
-
modelValue:
|
|
1261
|
-
"onUpdate:modelValue": (
|
|
1260
|
+
modelValue: y.host,
|
|
1261
|
+
"onUpdate:modelValue": (b) => y.host = b,
|
|
1262
1262
|
modelModifiers: { trim: !0 },
|
|
1263
1263
|
label: i(n)("form.fields.sentinel_node_host.label"),
|
|
1264
1264
|
"label-attributes": {
|
|
@@ -1270,8 +1270,8 @@ const pe = {
|
|
|
1270
1270
|
required: ""
|
|
1271
1271
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "label-attributes", "readonly"]),
|
|
1272
1272
|
m(l, {
|
|
1273
|
-
modelValue:
|
|
1274
|
-
"onUpdate:modelValue": (
|
|
1273
|
+
modelValue: y.port,
|
|
1274
|
+
"onUpdate:modelValue": (b) => y.port = b,
|
|
1275
1275
|
label: i(n)("form.fields.sentinel_node_port.label"),
|
|
1276
1276
|
"label-attributes": {
|
|
1277
1277
|
info: i(n)("form.fields.sentinel_node_port.tooltip"),
|
|
@@ -1291,7 +1291,7 @@ const pe = {
|
|
|
1291
1291
|
disabled: a.readonly,
|
|
1292
1292
|
onClick: o
|
|
1293
1293
|
}, {
|
|
1294
|
-
default:
|
|
1294
|
+
default: E(() => [
|
|
1295
1295
|
m(i(qt)),
|
|
1296
1296
|
K("span", null, B(i(n)("form.fields.sentinel_nodes.add_button")), 1)
|
|
1297
1297
|
]),
|
|
@@ -1381,22 +1381,22 @@ var ie = function() {
|
|
|
1381
1381
|
});
|
|
1382
1382
|
}
|
|
1383
1383
|
return new (n || (n = Promise))(function(a, p) {
|
|
1384
|
-
function _(
|
|
1384
|
+
function _(y) {
|
|
1385
1385
|
try {
|
|
1386
|
-
u(o.next(
|
|
1386
|
+
u(o.next(y));
|
|
1387
1387
|
} catch (w) {
|
|
1388
1388
|
p(w);
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
|
-
function l(
|
|
1391
|
+
function l(y) {
|
|
1392
1392
|
try {
|
|
1393
|
-
u(o.throw(
|
|
1393
|
+
u(o.throw(y));
|
|
1394
1394
|
} catch (w) {
|
|
1395
1395
|
p(w);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
|
-
function u(
|
|
1399
|
-
|
|
1398
|
+
function u(y) {
|
|
1399
|
+
y.done ? a(y.value) : r(y.value).then(_, l);
|
|
1400
1400
|
}
|
|
1401
1401
|
u((o = o.apply(e, t || [])).next());
|
|
1402
1402
|
});
|
|
@@ -1409,8 +1409,8 @@ var ie = function() {
|
|
|
1409
1409
|
return this;
|
|
1410
1410
|
}), p;
|
|
1411
1411
|
function _(u) {
|
|
1412
|
-
return function(
|
|
1413
|
-
return l([u,
|
|
1412
|
+
return function(y) {
|
|
1413
|
+
return l([u, y]);
|
|
1414
1414
|
};
|
|
1415
1415
|
}
|
|
1416
1416
|
function l(u) {
|
|
@@ -1451,8 +1451,8 @@ var ie = function() {
|
|
|
1451
1451
|
continue;
|
|
1452
1452
|
}
|
|
1453
1453
|
u = t.call(e, n);
|
|
1454
|
-
} catch (
|
|
1455
|
-
u = [6,
|
|
1454
|
+
} catch (y) {
|
|
1455
|
+
u = [6, y], r = 0;
|
|
1456
1456
|
} finally {
|
|
1457
1457
|
o = a = 0;
|
|
1458
1458
|
}
|
|
@@ -1513,7 +1513,7 @@ function ma(e, t, n) {
|
|
|
1513
1513
|
}
|
|
1514
1514
|
var Ut = function(e, t, n, o) {
|
|
1515
1515
|
return n === void 0 && (n = pn), o === void 0 && (o = mn.ttl), Te(void 0, void 0, void 0, function() {
|
|
1516
|
-
var r, a, p, _, l, u,
|
|
1516
|
+
var r, a, p, _, l, u, y;
|
|
1517
1517
|
return we(this, function(w) {
|
|
1518
1518
|
switch (w.label) {
|
|
1519
1519
|
case 0:
|
|
@@ -1533,16 +1533,16 @@ var Ut = function(e, t, n, o) {
|
|
|
1533
1533
|
if (p = !1, l = { data: r, error: a, isValidating: p }, typeof r < "u")
|
|
1534
1534
|
try {
|
|
1535
1535
|
n.set(e, l, o);
|
|
1536
|
-
} catch (
|
|
1537
|
-
console.error("swrv(mutate): failed to set cache",
|
|
1536
|
+
} catch (b) {
|
|
1537
|
+
console.error("swrv(mutate): failed to set cache", b);
|
|
1538
1538
|
}
|
|
1539
|
-
return u = qe.get(e), u && u.data.length && (
|
|
1540
|
-
return
|
|
1541
|
-
}),
|
|
1542
|
-
typeof l.data < "u" && (
|
|
1543
|
-
var v =
|
|
1544
|
-
v || delete
|
|
1545
|
-
}),
|
|
1539
|
+
return u = qe.get(e), u && u.data.length && (y = u.data.filter(function(b) {
|
|
1540
|
+
return b.key === e;
|
|
1541
|
+
}), y.forEach(function(b, S) {
|
|
1542
|
+
typeof l.data < "u" && (b.data = l.data), b.error = l.error, b.isValidating = l.isValidating, b.isLoading = l.isValidating;
|
|
1543
|
+
var v = S === y.length - 1;
|
|
1544
|
+
v || delete y[S];
|
|
1545
|
+
}), y = y.filter(Boolean)), [2, l];
|
|
1546
1546
|
}
|
|
1547
1547
|
});
|
|
1548
1548
|
});
|
|
@@ -1553,31 +1553,32 @@ function ga() {
|
|
|
1553
1553
|
var o, r, a = ie({}, mn), p = !1, _ = !1, l = vn(), u = (l == null ? void 0 : l.proxy) || l;
|
|
1554
1554
|
if (!u)
|
|
1555
1555
|
return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."), null;
|
|
1556
|
-
var
|
|
1556
|
+
var y = (u == null ? void 0 : u.$isServer) || !1;
|
|
1557
1557
|
t.length >= 1 && (o = t[0]), t.length >= 2 && (r = t[1]), t.length > 2 && (a = ie(ie({}, a), t[2]));
|
|
1558
|
-
var w =
|
|
1558
|
+
var w = y ? a.serverTTL : a.ttl, b = typeof o == "function" ? o : $(o);
|
|
1559
1559
|
typeof r > "u" && (r = a.fetcher);
|
|
1560
|
-
var
|
|
1561
|
-
|
|
1560
|
+
var S = null;
|
|
1561
|
+
S || (S = Nt({
|
|
1562
1562
|
data: void 0,
|
|
1563
1563
|
error: void 0,
|
|
1564
1564
|
isValidating: !0,
|
|
1565
|
+
isLoading: !0,
|
|
1565
1566
|
key: null
|
|
1566
1567
|
}));
|
|
1567
1568
|
var v = function(f, c) {
|
|
1568
1569
|
return Te(e, void 0, void 0, function() {
|
|
1569
|
-
var N, L, z,
|
|
1570
|
+
var N, L, z, X, le, W, ne, Z = this;
|
|
1570
1571
|
return we(this, function(se) {
|
|
1571
1572
|
switch (se.label) {
|
|
1572
1573
|
case 0:
|
|
1573
|
-
return N =
|
|
1574
|
+
return N = S.data === void 0, L = b.value, L ? (z = a.cache.get(L), X = z && z.data, S.isValidating = !0, S.isLoading = !X, X && (S.data = X.data, S.error = X.error), le = f || r, !le || !a.isDocumentVisible() && !N || (c == null ? void 0 : c.forceRevalidate) !== void 0 && !(c != null && c.forceRevalidate) ? (S.isValidating = !1, S.isLoading = !1, [
|
|
1574
1575
|
2
|
|
1575
1576
|
/*return*/
|
|
1576
|
-
]) : z && (W = !!(Date.now() - z.createdAt >= a.dedupingInterval || c != null && c.forceRevalidate), !W) ? (
|
|
1577
|
+
]) : z && (W = !!(Date.now() - z.createdAt >= a.dedupingInterval || c != null && c.forceRevalidate), !W) ? (S.isValidating = !1, S.isLoading = !1, [
|
|
1577
1578
|
2
|
|
1578
1579
|
/*return*/
|
|
1579
1580
|
]) : (ne = function() {
|
|
1580
|
-
return Te(
|
|
1581
|
+
return Te(Z, void 0, void 0, function() {
|
|
1581
1582
|
var G, ye, me, ve;
|
|
1582
1583
|
return we(this, function(de) {
|
|
1583
1584
|
switch (de.label) {
|
|
@@ -1590,15 +1591,15 @@ function ga() {
|
|
|
1590
1591
|
case 3:
|
|
1591
1592
|
de.sent(), de.label = 4;
|
|
1592
1593
|
case 4:
|
|
1593
|
-
return
|
|
1594
|
+
return S.isValidating = !1, S.isLoading = !1, at.delete(L), S.error !== void 0 && (ve = !p && a.shouldRetryOnError && (c ? c.shouldRetryOnError : !0), ve && ma(v, c ? c.errorRetryCount : 1, a)), [
|
|
1594
1595
|
2
|
|
1595
1596
|
/*return*/
|
|
1596
1597
|
];
|
|
1597
1598
|
}
|
|
1598
1599
|
});
|
|
1599
1600
|
});
|
|
1600
|
-
},
|
|
1601
|
-
return Te(
|
|
1601
|
+
}, X && a.revalidateDebounce ? (setTimeout(function() {
|
|
1602
|
+
return Te(Z, void 0, void 0, function() {
|
|
1602
1603
|
return we(this, function(G) {
|
|
1603
1604
|
switch (G.label) {
|
|
1604
1605
|
case 0:
|
|
@@ -1642,7 +1643,7 @@ function ga() {
|
|
|
1642
1643
|
return we(this, function(c) {
|
|
1643
1644
|
switch (c.label) {
|
|
1644
1645
|
case 0:
|
|
1645
|
-
return !
|
|
1646
|
+
return !S.error && a.isOnline() ? [4, v()] : [3, 2];
|
|
1646
1647
|
case 1:
|
|
1647
1648
|
return c.sent(), [3, 3];
|
|
1648
1649
|
case 2:
|
|
@@ -1659,20 +1660,20 @@ function ga() {
|
|
|
1659
1660
|
a.refreshInterval && (I = setTimeout(f, a.refreshInterval)), a.revalidateOnFocus && (document.addEventListener("visibilitychange", s, !1), window.addEventListener("focus", s, !1));
|
|
1660
1661
|
}), Tn(function() {
|
|
1661
1662
|
p = !0, I && clearTimeout(I), a.revalidateOnFocus && (document.removeEventListener("visibilitychange", s, !1), window.removeEventListener("focus", s, !1));
|
|
1662
|
-
var f = qe.get(
|
|
1663
|
+
var f = qe.get(b.value);
|
|
1663
1664
|
f && (f.data = f.data.filter(function(c) {
|
|
1664
|
-
return c !==
|
|
1665
|
+
return c !== S;
|
|
1665
1666
|
}));
|
|
1666
1667
|
});
|
|
1667
1668
|
try {
|
|
1668
|
-
ke(
|
|
1669
|
-
wn(
|
|
1669
|
+
ke(b, function(f) {
|
|
1670
|
+
wn(b) || (b.value = f), S.key = f, S.isValidating = !!f, pa(b.value, S, w), !y && !_ && b.value && v(), _ = !1;
|
|
1670
1671
|
}, {
|
|
1671
1672
|
immediate: !0
|
|
1672
1673
|
});
|
|
1673
1674
|
} catch {
|
|
1674
1675
|
}
|
|
1675
|
-
var V = ie(ie({}, Sn(
|
|
1676
|
+
var V = ie(ie({}, Sn(S)), { mutate: function(f, c) {
|
|
1676
1677
|
return v(f, ie(ie({}, c), { forceRevalidate: !0 }));
|
|
1677
1678
|
} });
|
|
1678
1679
|
return V;
|
|
@@ -1748,7 +1749,7 @@ const Le = (e) => {
|
|
|
1748
1749
|
setup(e, { emit: t }) {
|
|
1749
1750
|
const n = e, o = t, { i18n: { t: r }, i18nT: a } = pe.useI18n(), p = zt(), _ = $(), l = $(), u = (M, g) => {
|
|
1750
1751
|
_.value = M ?? "", l.value = g;
|
|
1751
|
-
},
|
|
1752
|
+
}, y = (M) => {
|
|
1752
1753
|
var g;
|
|
1753
1754
|
(g = l.value) == null || g.call(l, M), _.value = !1;
|
|
1754
1755
|
}, w = H(() => [
|
|
@@ -1780,11 +1781,11 @@ const Le = (e) => {
|
|
|
1780
1781
|
selected: c.value === T.HOST_PORT_CE,
|
|
1781
1782
|
disabled: f && N.value || !f && n.disabledPartialType === Y.REDIS_CE
|
|
1782
1783
|
}
|
|
1783
|
-
]),
|
|
1784
|
+
]), b = [
|
|
1784
1785
|
{ label: r("form.options.sentinel_role.master"), value: "master" },
|
|
1785
1786
|
{ label: r("form.options.sentinel_role.slave"), value: "slave" },
|
|
1786
1787
|
{ label: r("form.options.sentinel_role.any"), value: "any" }
|
|
1787
|
-
],
|
|
1788
|
+
], S = (M) => {
|
|
1788
1789
|
const g = M.value === T.HOST_PORT_CE ? r("form.options.type.suffix_open_source") : r("form.options.type.suffix_enterprise");
|
|
1789
1790
|
return `${M.label}${g}`;
|
|
1790
1791
|
}, v = () => n.disabledPartialType && ze(Se) === n.disabledPartialType ? n.disabledPartialType === Y.REDIS_CE ? T.HOST_PORT_EE : T.HOST_PORT_CE : Se, {
|
|
@@ -1796,16 +1797,16 @@ const Le = (e) => {
|
|
|
1796
1797
|
redisTypeIsEnterprise: N,
|
|
1797
1798
|
fetchUrl: L,
|
|
1798
1799
|
submit: z,
|
|
1799
|
-
setInitialFormValues:
|
|
1800
|
+
setInitialFormValues: X
|
|
1800
1801
|
} = Bo({
|
|
1801
1802
|
partialId: n.partialId,
|
|
1802
1803
|
defaultRedisType: v(),
|
|
1803
1804
|
config: n.config
|
|
1804
|
-
}), { fetcher: le } = Le(n.config), W = $(!1), ne = $(!1),
|
|
1805
|
+
}), { fetcher: le } = Le(n.config), W = $(!1), ne = $(!1), Z = $(0), se = async () => {
|
|
1805
1806
|
try {
|
|
1806
1807
|
if (f && !ne.value) {
|
|
1807
1808
|
const { count: g } = await le({ partialId: n.partialId });
|
|
1808
|
-
if (
|
|
1809
|
+
if (Z.value = g, g > 0) {
|
|
1809
1810
|
W.value = !0;
|
|
1810
1811
|
return;
|
|
1811
1812
|
}
|
|
@@ -1824,12 +1825,12 @@ const Le = (e) => {
|
|
|
1824
1825
|
}, ve = (M) => {
|
|
1825
1826
|
o("error", M);
|
|
1826
1827
|
}, de = (M) => {
|
|
1827
|
-
|
|
1828
|
+
X(M);
|
|
1828
1829
|
};
|
|
1829
1830
|
return En(async () => {
|
|
1830
1831
|
if (f) {
|
|
1831
1832
|
const { count: M } = await le({ partialId: n.partialId });
|
|
1832
|
-
|
|
1833
|
+
Z.value = M;
|
|
1833
1834
|
}
|
|
1834
1835
|
}), (M, g) => {
|
|
1835
1836
|
const Qe = D("KAlert"), Me = D("KSelect"), U = D("KInput"), he = D("KCheckbox"), C = D("KModal");
|
|
@@ -1852,32 +1853,32 @@ const Le = (e) => {
|
|
|
1852
1853
|
onLoading: me,
|
|
1853
1854
|
onSubmit: se
|
|
1854
1855
|
}, {
|
|
1855
|
-
default:
|
|
1856
|
-
|
|
1856
|
+
default: E(() => [
|
|
1857
|
+
Z.value > 0 && i(f) ? (k(), F(Qe, {
|
|
1857
1858
|
key: 0,
|
|
1858
1859
|
appearance: "warning",
|
|
1859
1860
|
class: "warning-alert",
|
|
1860
1861
|
"data-testid": "redis-update-warning-alert"
|
|
1861
1862
|
}, {
|
|
1862
|
-
default:
|
|
1863
|
+
default: E(() => [
|
|
1863
1864
|
m(i(a), {
|
|
1864
1865
|
keypath: "form.edit_warning_modal.description",
|
|
1865
1866
|
tag: "div"
|
|
1866
1867
|
}, {
|
|
1867
|
-
pluginCount:
|
|
1868
|
-
K("b", null, B(i(r)("form.edit_warning_modal.plugin_count", { count:
|
|
1868
|
+
pluginCount: E(() => [
|
|
1869
|
+
K("b", null, B(i(r)("form.edit_warning_modal.plugin_count", { count: Z.value })), 1)
|
|
1869
1870
|
]),
|
|
1870
1871
|
_: 1
|
|
1871
1872
|
})
|
|
1872
1873
|
]),
|
|
1873
1874
|
_: 1
|
|
1874
|
-
})) :
|
|
1875
|
+
})) : ee("", !0),
|
|
1875
1876
|
m(i(ue), {
|
|
1876
1877
|
"data-testid": "redis-type-section",
|
|
1877
1878
|
description: i(r)("form.sections.type.description"),
|
|
1878
1879
|
title: i(r)("form.sections.type.title")
|
|
1879
1880
|
}, {
|
|
1880
|
-
default:
|
|
1881
|
+
default: E(() => [
|
|
1881
1882
|
m(Me, {
|
|
1882
1883
|
modelValue: i(c),
|
|
1883
1884
|
"onUpdate:modelValue": g[0] || (g[0] = (d) => Cn(c) ? c.value = d : null),
|
|
@@ -1889,8 +1890,8 @@ const Le = (e) => {
|
|
|
1889
1890
|
readonly: i(s).readonly,
|
|
1890
1891
|
required: ""
|
|
1891
1892
|
}, {
|
|
1892
|
-
"selected-item-template":
|
|
1893
|
-
|
|
1893
|
+
"selected-item-template": E(({ item: d }) => [
|
|
1894
|
+
te(B(S(d)), 1)
|
|
1894
1895
|
]),
|
|
1895
1896
|
_: 1
|
|
1896
1897
|
}, 8, ["modelValue", "disabled", "items", "label", "readonly"])
|
|
@@ -1902,7 +1903,7 @@ const Le = (e) => {
|
|
|
1902
1903
|
description: i(r)("form.sections.general.description"),
|
|
1903
1904
|
title: i(r)("form.sections.general.title")
|
|
1904
1905
|
}, {
|
|
1905
|
-
default:
|
|
1906
|
+
default: E(() => [
|
|
1906
1907
|
m(U, {
|
|
1907
1908
|
modelValue: i(s).fields.name,
|
|
1908
1909
|
"onUpdate:modelValue": g[1] || (g[1] = (d) => i(s).fields.name = d),
|
|
@@ -1937,7 +1938,7 @@ const Le = (e) => {
|
|
|
1937
1938
|
description: i(r)("form.sections.sentinel_configuration.description"),
|
|
1938
1939
|
title: i(r)("form.sections.sentinel_configuration.title")
|
|
1939
1940
|
}, {
|
|
1940
|
-
default:
|
|
1941
|
+
default: E(() => [
|
|
1941
1942
|
m(U, {
|
|
1942
1943
|
modelValue: i(s).fields.config.sentinel_master,
|
|
1943
1944
|
"onUpdate:modelValue": g[3] || (g[3] = (d) => i(s).fields.config.sentinel_master = d),
|
|
@@ -1954,7 +1955,7 @@ const Le = (e) => {
|
|
|
1954
1955
|
modelValue: i(s).fields.config.sentinel_role,
|
|
1955
1956
|
"onUpdate:modelValue": g[4] || (g[4] = (d) => i(s).fields.config.sentinel_role = d),
|
|
1956
1957
|
"data-testid": "redis-sentinel-role-select",
|
|
1957
|
-
items:
|
|
1958
|
+
items: b,
|
|
1958
1959
|
"kpop-attributes": { "data-testid": "redis-sentinel-role-select-popover" },
|
|
1959
1960
|
label: i(r)("form.fields.sentinel_role.label"),
|
|
1960
1961
|
"label-attributes": {
|
|
@@ -2009,14 +2010,14 @@ const Le = (e) => {
|
|
|
2009
2010
|
}, null, 8, ["disabled", "update", "value"])
|
|
2010
2011
|
]),
|
|
2011
2012
|
_: 1
|
|
2012
|
-
}, 8, ["description", "title"])) :
|
|
2013
|
+
}, 8, ["description", "title"])) : ee("", !0),
|
|
2013
2014
|
i(c) === i(T).CLUSTER ? (k(), F(i(ue), {
|
|
2014
2015
|
key: 2,
|
|
2015
2016
|
"data-testid": "redis-cluster-configuration-section",
|
|
2016
2017
|
description: i(r)("form.sections.cluster.description"),
|
|
2017
2018
|
title: i(r)("form.sections.cluster.title")
|
|
2018
2019
|
}, {
|
|
2019
|
-
default:
|
|
2020
|
+
default: E(() => [
|
|
2020
2021
|
m(na, {
|
|
2021
2022
|
modelValue: i(s).fields.config.cluster_nodes,
|
|
2022
2023
|
"onUpdate:modelValue": g[10] || (g[10] = (d) => i(s).fields.config.cluster_nodes = d),
|
|
@@ -2036,13 +2037,13 @@ const Le = (e) => {
|
|
|
2036
2037
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2037
2038
|
]),
|
|
2038
2039
|
_: 1
|
|
2039
|
-
}, 8, ["description", "title"])) :
|
|
2040
|
+
}, 8, ["description", "title"])) : ee("", !0),
|
|
2040
2041
|
m(i(ue), {
|
|
2041
2042
|
"data-testid": "redis-connection-configuration-section",
|
|
2042
2043
|
description: i(r)("form.sections.connection.description"),
|
|
2043
2044
|
title: i(r)("form.sections.connection.title")
|
|
2044
2045
|
}, {
|
|
2045
|
-
default:
|
|
2046
|
+
default: E(() => [
|
|
2046
2047
|
i(c) === i(T).HOST_PORT_CE || i(c) === i(T).HOST_PORT_EE ? (k(), F(U, {
|
|
2047
2048
|
key: 0,
|
|
2048
2049
|
modelValue: i(s).fields.config.host,
|
|
@@ -2055,7 +2056,7 @@ const Le = (e) => {
|
|
|
2055
2056
|
tooltipAttributes: { maxWidth: "400" }
|
|
2056
2057
|
},
|
|
2057
2058
|
readonly: i(s).readonly
|
|
2058
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
2059
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : ee("", !0),
|
|
2059
2060
|
i(c) === i(T).HOST_PORT_CE || i(c) === i(T).HOST_PORT_EE ? (k(), F(U, {
|
|
2060
2061
|
key: 1,
|
|
2061
2062
|
modelValue: i(s).fields.config.port,
|
|
@@ -2069,7 +2070,7 @@ const Le = (e) => {
|
|
|
2069
2070
|
},
|
|
2070
2071
|
readonly: i(s).readonly,
|
|
2071
2072
|
type: "number"
|
|
2072
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
2073
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : ee("", !0),
|
|
2073
2074
|
i(c) === i(T).HOST_PORT_EE ? (k(), F(he, {
|
|
2074
2075
|
key: 2,
|
|
2075
2076
|
modelValue: i(s).fields.config.connection_is_proxied,
|
|
@@ -2081,7 +2082,7 @@ const Le = (e) => {
|
|
|
2081
2082
|
info: i(r)("form.fields.connection_is_proxied.tooltip"),
|
|
2082
2083
|
tooltipAttributes: { maxWidth: "400" }
|
|
2083
2084
|
}
|
|
2084
|
-
}, null, 8, ["modelValue", "disabled", "label", "label-attributes"])) :
|
|
2085
|
+
}, null, 8, ["modelValue", "disabled", "label", "label-attributes"])) : ee("", !0),
|
|
2085
2086
|
i(c) === i(T).HOST_PORT_CE ? (k(), F(U, {
|
|
2086
2087
|
key: 3,
|
|
2087
2088
|
modelValue: i(s).fields.config.timeout,
|
|
@@ -2095,7 +2096,7 @@ const Le = (e) => {
|
|
|
2095
2096
|
},
|
|
2096
2097
|
readonly: i(s).readonly,
|
|
2097
2098
|
type: "number"
|
|
2098
|
-
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) :
|
|
2099
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])) : ee("", !0),
|
|
2099
2100
|
m(U, {
|
|
2100
2101
|
modelValue: i(s).fields.config.database,
|
|
2101
2102
|
"onUpdate:modelValue": g[16] || (g[16] = (d) => i(s).fields.config.database = d),
|
|
@@ -2157,7 +2158,7 @@ const Le = (e) => {
|
|
|
2157
2158
|
description: i(r)("form.sections.tls.description"),
|
|
2158
2159
|
title: i(r)("form.sections.tls.title")
|
|
2159
2160
|
}, {
|
|
2160
|
-
default:
|
|
2161
|
+
default: E(() => [
|
|
2161
2162
|
m(he, {
|
|
2162
2163
|
modelValue: i(s).fields.config.ssl,
|
|
2163
2164
|
"onUpdate:modelValue": g[21] || (g[21] = (d) => i(s).fields.config.ssl = d),
|
|
@@ -2202,7 +2203,7 @@ const Le = (e) => {
|
|
|
2202
2203
|
description: i(r)("form.sections.keepalive.description"),
|
|
2203
2204
|
title: i(r)("form.sections.keepalive.title")
|
|
2204
2205
|
}, {
|
|
2205
|
-
default:
|
|
2206
|
+
default: E(() => [
|
|
2206
2207
|
m(U, {
|
|
2207
2208
|
modelValue: i(s).fields.config.keepalive_backlog,
|
|
2208
2209
|
"onUpdate:modelValue": g[24] || (g[24] = (d) => i(s).fields.config.keepalive_backlog = d),
|
|
@@ -2229,14 +2230,14 @@ const Le = (e) => {
|
|
|
2229
2230
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2230
2231
|
]),
|
|
2231
2232
|
_: 1
|
|
2232
|
-
}, 8, ["description", "title"])) :
|
|
2233
|
+
}, 8, ["description", "title"])) : ee("", !0),
|
|
2233
2234
|
i(c) !== i(T).HOST_PORT_CE ? (k(), F(i(ue), {
|
|
2234
2235
|
key: 4,
|
|
2235
2236
|
"data-testid": "redis-read-write-configuration-section",
|
|
2236
2237
|
description: i(r)("form.sections.read_write_configuration.description"),
|
|
2237
2238
|
title: i(r)("form.sections.read_write_configuration.title")
|
|
2238
2239
|
}, {
|
|
2239
|
-
default:
|
|
2240
|
+
default: E(() => [
|
|
2240
2241
|
m(U, {
|
|
2241
2242
|
modelValue: i(s).fields.config.read_timeout,
|
|
2242
2243
|
"onUpdate:modelValue": g[26] || (g[26] = (d) => i(s).fields.config.read_timeout = d),
|
|
@@ -2275,7 +2276,7 @@ const Le = (e) => {
|
|
|
2275
2276
|
}, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
|
|
2276
2277
|
]),
|
|
2277
2278
|
_: 1
|
|
2278
|
-
}, 8, ["description", "title"])) :
|
|
2279
|
+
}, 8, ["description", "title"])) : ee("", !0)
|
|
2279
2280
|
]),
|
|
2280
2281
|
_: 1
|
|
2281
2282
|
}, 8, ["action-teleport-target", "can-submit", "config", "edit-id", "entity-type", "error-message", "fetch-url", "form-fields", "is-readonly", "slidout-top-offset"])
|
|
@@ -2284,7 +2285,7 @@ const Le = (e) => {
|
|
|
2284
2285
|
config: n.config,
|
|
2285
2286
|
setup: _.value,
|
|
2286
2287
|
onCancel: g[29] || (g[29] = () => _.value = !1),
|
|
2287
|
-
onProceed:
|
|
2288
|
+
onProceed: y
|
|
2288
2289
|
}, null, 8, ["config", "setup"]),
|
|
2289
2290
|
m(C, {
|
|
2290
2291
|
"action-button-text": i(r)("form.edit_warning_modal.confirm"),
|
|
@@ -2296,13 +2297,13 @@ const Le = (e) => {
|
|
|
2296
2297
|
onCancel: g[30] || (g[30] = (d) => W.value = !1),
|
|
2297
2298
|
onProceed: G
|
|
2298
2299
|
}, {
|
|
2299
|
-
default:
|
|
2300
|
+
default: E(() => [
|
|
2300
2301
|
m(i(a), {
|
|
2301
2302
|
keypath: "form.edit_warning_modal.description",
|
|
2302
2303
|
tag: "div"
|
|
2303
2304
|
}, {
|
|
2304
|
-
pluginCount:
|
|
2305
|
-
K("b", null, B(i(r)("form.edit_warning_modal.plugin_count", { count:
|
|
2305
|
+
pluginCount: E(() => [
|
|
2306
|
+
K("b", null, B(i(r)("form.edit_warning_modal.plugin_count", { count: Z.value })), 1)
|
|
2306
2307
|
]),
|
|
2307
2308
|
_: 1
|
|
2308
2309
|
})
|
|
@@ -2345,11 +2346,11 @@ const Le = (e) => {
|
|
|
2345
2346
|
key: 0,
|
|
2346
2347
|
appearance: "info"
|
|
2347
2348
|
}, {
|
|
2348
|
-
default:
|
|
2349
|
-
|
|
2349
|
+
default: E(() => [
|
|
2350
|
+
te(" +" + B(i(n).length - lt), 1)
|
|
2350
2351
|
]),
|
|
2351
2352
|
_: 1
|
|
2352
|
-
})) :
|
|
2353
|
+
})) : ee("", !0)
|
|
2353
2354
|
]);
|
|
2354
2355
|
};
|
|
2355
2356
|
}
|
|
@@ -2397,29 +2398,29 @@ const Le = (e) => {
|
|
|
2397
2398
|
{ key: "name", label: r("linked_plugins_modal.headers.plugin") },
|
|
2398
2399
|
{ key: "instance_name", label: r("linked_plugins_modal.headers.instance_name") },
|
|
2399
2400
|
{ key: "actions", hideLabel: !0 }
|
|
2400
|
-
], { fetcher: p } = Le(n.config), _ = $(0), l = async (
|
|
2401
|
-
const { data:
|
|
2401
|
+
], { fetcher: p } = Le(n.config), _ = $(0), l = async (b) => {
|
|
2402
|
+
const { data: S, count: v } = await p({
|
|
2402
2403
|
partialId: n.partialId,
|
|
2403
|
-
size:
|
|
2404
|
-
offset:
|
|
2405
|
-
query:
|
|
2404
|
+
size: b.pageSize,
|
|
2405
|
+
offset: b.offset,
|
|
2406
|
+
query: b.query
|
|
2406
2407
|
});
|
|
2407
2408
|
_.value = v;
|
|
2408
2409
|
const s = {
|
|
2409
2410
|
total: v,
|
|
2410
|
-
data:
|
|
2411
|
+
data: S
|
|
2411
2412
|
};
|
|
2412
2413
|
return o("load", s), s;
|
|
2413
|
-
}, u = $(""),
|
|
2414
|
+
}, u = $(""), y = H(() => n.config.app === "konnect" || n.isExactMatch ? {
|
|
2414
2415
|
isExactMatch: !0
|
|
2415
2416
|
} : {
|
|
2416
2417
|
isExactMatch: !1,
|
|
2417
2418
|
fields: { name: { searchable: !0 } },
|
|
2418
2419
|
schema: { name: { type: "text" } }
|
|
2419
|
-
}), w = (
|
|
2420
|
-
o("view-plugin", { id:
|
|
2420
|
+
}), w = (b) => {
|
|
2421
|
+
o("view-plugin", { id: b.id, plugin: b.name });
|
|
2421
2422
|
};
|
|
2422
|
-
return (
|
|
2423
|
+
return (b, S) => {
|
|
2423
2424
|
const v = D("KDropdownItem"), s = D("KTableData");
|
|
2424
2425
|
return k(), F(s, {
|
|
2425
2426
|
"cache-identifier": i(gn)(e.partialId),
|
|
@@ -2429,15 +2430,15 @@ const Le = (e) => {
|
|
|
2429
2430
|
"pagination-attributes": { totalCount: _.value, disablePageJump: !0 },
|
|
2430
2431
|
"search-input": u.value
|
|
2431
2432
|
}, Ft({
|
|
2432
|
-
name:
|
|
2433
|
+
name: E(({ rowValue: I }) => [
|
|
2433
2434
|
m(Ia, { "plugin-name": I }, null, 8, ["plugin-name"])
|
|
2434
2435
|
]),
|
|
2435
|
-
"action-items":
|
|
2436
|
+
"action-items": E(({ row: I }) => [
|
|
2436
2437
|
m(v, {
|
|
2437
2438
|
onClick: (V) => w(I)
|
|
2438
2439
|
}, {
|
|
2439
|
-
default:
|
|
2440
|
-
|
|
2440
|
+
default: E(() => [
|
|
2441
|
+
te(B(i(r)("actions.view_plugin")), 1)
|
|
2441
2442
|
]),
|
|
2442
2443
|
_: 2
|
|
2443
2444
|
}, 1032, ["onClick"])
|
|
@@ -2446,12 +2447,12 @@ const Le = (e) => {
|
|
|
2446
2447
|
}, [
|
|
2447
2448
|
e.filterBarEnabled ? {
|
|
2448
2449
|
name: "toolbar",
|
|
2449
|
-
fn:
|
|
2450
|
+
fn: E(() => [
|
|
2450
2451
|
K("div", Ra, [
|
|
2451
2452
|
m(i(Kt), {
|
|
2452
2453
|
modelValue: u.value,
|
|
2453
|
-
"onUpdate:modelValue":
|
|
2454
|
-
config:
|
|
2454
|
+
"onUpdate:modelValue": S[0] || (S[0] = (I) => u.value = I),
|
|
2455
|
+
config: y.value
|
|
2455
2456
|
}, null, 8, ["modelValue", "config"])
|
|
2456
2457
|
])
|
|
2457
2458
|
]),
|
|
@@ -2489,9 +2490,9 @@ const Le = (e) => {
|
|
|
2489
2490
|
n("proceed");
|
|
2490
2491
|
};
|
|
2491
2492
|
return (l, u) => {
|
|
2492
|
-
const
|
|
2493
|
+
const y = D("KModal");
|
|
2493
2494
|
return k(), q("div", xa, [
|
|
2494
|
-
m(
|
|
2495
|
+
m(y, {
|
|
2495
2496
|
"action-button-text": i(o)("actions.done"),
|
|
2496
2497
|
"hide-cancel-button": "",
|
|
2497
2498
|
title: a.value,
|
|
@@ -2499,7 +2500,7 @@ const Le = (e) => {
|
|
|
2499
2500
|
onCancel: p,
|
|
2500
2501
|
onProceed: _
|
|
2501
2502
|
}, {
|
|
2502
|
-
default:
|
|
2503
|
+
default: E(() => [
|
|
2503
2504
|
m(Oa, {
|
|
2504
2505
|
config: e.config,
|
|
2505
2506
|
"partial-id": e.redisConfigurationId,
|
|
@@ -2537,8 +2538,8 @@ const Le = (e) => {
|
|
|
2537
2538
|
onCancel: r,
|
|
2538
2539
|
onProceed: r
|
|
2539
2540
|
}, {
|
|
2540
|
-
default:
|
|
2541
|
-
|
|
2541
|
+
default: E(() => [
|
|
2542
|
+
te(B(i(n)("delete.warning")), 1)
|
|
2542
2543
|
]),
|
|
2543
2544
|
_: 1
|
|
2544
2545
|
}, 8, ["action-button-text", "title", "visible"]);
|
|
@@ -2603,12 +2604,12 @@ const Le = (e) => {
|
|
|
2603
2604
|
var d, R;
|
|
2604
2605
|
let C = `${o.config.apiBaseUrl}${Ve.list[o.config.app]}`;
|
|
2605
2606
|
return o.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((d = o.config) == null ? void 0 : d.controlPlaneId) || "") : o.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (R = o.config) != null && R.workspace ? `/${o.config.workspace}` : "")), C;
|
|
2606
|
-
}), a = $(!1), p = $(""), _ = $(null), l = $(void 0), u = $(!1),
|
|
2607
|
+
}), a = $(!1), p = $(""), _ = $(null), l = $(void 0), u = $(!1), y = $(!1), w = $(""), b = $(!1), S = xn(o.config, r.value), v = $(1), s = H(() => o.config.app !== "kongManager" || !!o.config.disableSorting), { fetcher: I, fetcherState: V } = Pn(o.config, r);
|
|
2607
2608
|
async function f(C) {
|
|
2608
2609
|
const d = await I({ ...C, pageSize: Ma });
|
|
2609
2610
|
return d.data = d.data.filter((R) => R.type === Y.REDIS_CE || R.type === Y.REDIS_EE), d;
|
|
2610
2611
|
}
|
|
2611
|
-
const { i18n: { t: c } } = pe.useI18n(), { axiosInstance: N } = gt((he = o.config) == null ? void 0 : he.axiosRequestConfig), L = zt(), z = $(""),
|
|
2612
|
+
const { i18n: { t: c } } = pe.useI18n(), { axiosInstance: N } = gt((he = o.config) == null ? void 0 : he.axiosRequestConfig), L = zt(), z = $(""), X = H(() => {
|
|
2612
2613
|
const C = o.config.app === "konnect" || o.config.isExactMatch;
|
|
2613
2614
|
if (C)
|
|
2614
2615
|
return {
|
|
@@ -2633,7 +2634,7 @@ const Le = (e) => {
|
|
|
2633
2634
|
type: { label: c("list.table_headers.type") },
|
|
2634
2635
|
tags: { label: c("list.table_headers.tags") },
|
|
2635
2636
|
plugins: { label: c("list.table_headers.plugins") }
|
|
2636
|
-
},
|
|
2637
|
+
}, Z = (C) => ({
|
|
2637
2638
|
label: c("actions.view"),
|
|
2638
2639
|
to: o.config.getViewRoute(C)
|
|
2639
2640
|
}), se = (C) => ({
|
|
@@ -2641,7 +2642,7 @@ const Le = (e) => {
|
|
|
2641
2642
|
to: o.config.getEditRoute(C)
|
|
2642
2643
|
}), G = async (C) => {
|
|
2643
2644
|
const { count: d } = await le({ partialId: C.id });
|
|
2644
|
-
d > 0 ?
|
|
2645
|
+
d > 0 ? b.value = !0 : (l.value = C, u.value = !0);
|
|
2645
2646
|
}, ye = () => {
|
|
2646
2647
|
z.value = "";
|
|
2647
2648
|
}, me = async (C) => {
|
|
@@ -2654,13 +2655,13 @@ const Le = (e) => {
|
|
|
2654
2655
|
}, M = async () => {
|
|
2655
2656
|
var C, d, R;
|
|
2656
2657
|
if ((C = l.value) != null && C.id) {
|
|
2657
|
-
|
|
2658
|
+
y.value = !0;
|
|
2658
2659
|
try {
|
|
2659
|
-
await N.delete(
|
|
2660
|
+
await N.delete(S(l.value.id)), y.value = !1, u.value = !1, g(), n("delete:success", l.value);
|
|
2660
2661
|
} catch (J) {
|
|
2661
2662
|
w.value = ((R = (d = J.response) == null ? void 0 : d.data) == null ? void 0 : R.message) || J.message || c("errors.delete"), n("error", J);
|
|
2662
2663
|
} finally {
|
|
2663
|
-
|
|
2664
|
+
y.value = !1;
|
|
2664
2665
|
}
|
|
2665
2666
|
}
|
|
2666
2667
|
}, g = () => {
|
|
@@ -2726,29 +2727,29 @@ const Le = (e) => {
|
|
|
2726
2727
|
"onClick:row": d[2] || (d[2] = (O) => me(O)),
|
|
2727
2728
|
onSort: g
|
|
2728
2729
|
}, Ft({
|
|
2729
|
-
"toolbar-filter":
|
|
2730
|
+
"toolbar-filter": E(() => [
|
|
2730
2731
|
m(i(Kt), {
|
|
2731
2732
|
modelValue: z.value,
|
|
2732
2733
|
"onUpdate:modelValue": d[0] || (d[0] = (O) => z.value = O),
|
|
2733
|
-
config:
|
|
2734
|
+
config: X.value
|
|
2734
2735
|
}, null, 8, ["modelValue", "config"])
|
|
2735
2736
|
]),
|
|
2736
|
-
"toolbar-button":
|
|
2737
|
+
"toolbar-button": E(() => [
|
|
2737
2738
|
(k(), F(Rn, {
|
|
2738
2739
|
disabled: !e.useActionOutside,
|
|
2739
2740
|
to: "#kong-ui-app-page-header-action-button"
|
|
2740
2741
|
}, [
|
|
2741
2742
|
m(i(De), { "auth-function": e.canCreate }, {
|
|
2742
|
-
default:
|
|
2743
|
+
default: E(() => [
|
|
2743
2744
|
m(R, {
|
|
2744
2745
|
appearance: "primary",
|
|
2745
2746
|
"data-testid": "toolbar-add-redis-configuration",
|
|
2746
2747
|
size: "large",
|
|
2747
2748
|
to: e.config.createRoute
|
|
2748
2749
|
}, {
|
|
2749
|
-
default:
|
|
2750
|
+
default: E(() => [
|
|
2750
2751
|
m(i(Bn)),
|
|
2751
|
-
|
|
2752
|
+
te(" " + B(i(c)("actions.create")), 1)
|
|
2752
2753
|
]),
|
|
2753
2754
|
_: 1
|
|
2754
2755
|
}, 8, ["to"])
|
|
@@ -2757,31 +2758,31 @@ const Le = (e) => {
|
|
|
2757
2758
|
}, 8, ["auth-function"])
|
|
2758
2759
|
], 8, ["disabled"]))
|
|
2759
2760
|
]),
|
|
2760
|
-
name:
|
|
2761
|
+
name: E(({ rowValue: O }) => [
|
|
2761
2762
|
K("b", null, B(O ?? "-"), 1)
|
|
2762
2763
|
]),
|
|
2763
|
-
type:
|
|
2764
|
-
|
|
2764
|
+
type: E(({ row: O }) => [
|
|
2765
|
+
te(B(Qe(O)), 1)
|
|
2765
2766
|
]),
|
|
2766
|
-
tags:
|
|
2767
|
+
tags: E(({ rowValue: O }) => [
|
|
2767
2768
|
m(i($n), { tags: O }, null, 8, ["tags"])
|
|
2768
2769
|
]),
|
|
2769
|
-
plugins:
|
|
2770
|
+
plugins: E(({ row: O }) => [
|
|
2770
2771
|
m(Sa, {
|
|
2771
2772
|
config: e.config,
|
|
2772
2773
|
"partial-id": O.id,
|
|
2773
2774
|
onClick: In((Xe) => de(O.id), ["stop"])
|
|
2774
2775
|
}, null, 8, ["config", "partial-id", "onClick"])
|
|
2775
2776
|
]),
|
|
2776
|
-
actions:
|
|
2777
|
+
actions: E(({ row: O }) => [
|
|
2777
2778
|
m(bn, null, {
|
|
2778
|
-
default:
|
|
2779
|
+
default: E(({ copyToClipboard: Xe }) => [
|
|
2779
2780
|
m(J, {
|
|
2780
2781
|
"data-testid": "action-entity-copy-id",
|
|
2781
2782
|
onClick: (Na) => U(O, Xe)
|
|
2782
2783
|
}, {
|
|
2783
|
-
default:
|
|
2784
|
-
|
|
2784
|
+
default: E(() => [
|
|
2785
|
+
te(B(i(c)("actions.copy_id")), 1)
|
|
2785
2786
|
]),
|
|
2786
2787
|
_: 2
|
|
2787
2788
|
}, 1032, ["onClick"])
|
|
@@ -2791,11 +2792,11 @@ const Le = (e) => {
|
|
|
2791
2792
|
m(i(De), {
|
|
2792
2793
|
"auth-function": () => e.canRetrieve(O)
|
|
2793
2794
|
}, {
|
|
2794
|
-
default:
|
|
2795
|
+
default: E(() => [
|
|
2795
2796
|
m(J, {
|
|
2796
2797
|
"data-testid": "action-entity-view",
|
|
2797
2798
|
"has-divider": "",
|
|
2798
|
-
item:
|
|
2799
|
+
item: Z(O.id)
|
|
2799
2800
|
}, null, 8, ["item"])
|
|
2800
2801
|
]),
|
|
2801
2802
|
_: 2
|
|
@@ -2803,7 +2804,7 @@ const Le = (e) => {
|
|
|
2803
2804
|
m(i(De), {
|
|
2804
2805
|
"auth-function": () => e.canEdit(O)
|
|
2805
2806
|
}, {
|
|
2806
|
-
default:
|
|
2807
|
+
default: E(() => [
|
|
2807
2808
|
m(J, {
|
|
2808
2809
|
"data-testid": "action-entity-edit",
|
|
2809
2810
|
item: se(O.id)
|
|
@@ -2814,15 +2815,15 @@ const Le = (e) => {
|
|
|
2814
2815
|
m(i(De), {
|
|
2815
2816
|
"auth-function": () => e.canDelete(O)
|
|
2816
2817
|
}, {
|
|
2817
|
-
default:
|
|
2818
|
+
default: E(() => [
|
|
2818
2819
|
m(J, {
|
|
2819
2820
|
danger: "",
|
|
2820
2821
|
"data-testid": "action-entity-delete",
|
|
2821
2822
|
"has-divider": "",
|
|
2822
2823
|
onClick: (Xe) => G(O)
|
|
2823
2824
|
}, {
|
|
2824
|
-
default:
|
|
2825
|
-
|
|
2825
|
+
default: E(() => [
|
|
2826
|
+
te(B(i(c)("actions.delete")), 1)
|
|
2826
2827
|
]),
|
|
2827
2828
|
_: 2
|
|
2828
2829
|
}, 1032, ["onClick"])
|
|
@@ -2834,7 +2835,7 @@ const Le = (e) => {
|
|
|
2834
2835
|
}, [
|
|
2835
2836
|
e.enableV2EmptyStates ? {
|
|
2836
2837
|
name: "empty-state",
|
|
2837
|
-
fn:
|
|
2838
|
+
fn: E(() => [
|
|
2838
2839
|
m(i(Ln), {
|
|
2839
2840
|
"action-button-text": i(c)("list.action"),
|
|
2840
2841
|
appearance: "secondary",
|
|
@@ -2855,7 +2856,7 @@ const Le = (e) => {
|
|
|
2855
2856
|
"onClick:create": Me,
|
|
2856
2857
|
"onClick:learnMore": d[1] || (d[1] = () => n("click:learn-more"))
|
|
2857
2858
|
}, {
|
|
2858
|
-
image:
|
|
2859
|
+
image: E(() => [
|
|
2859
2860
|
K("div", La, [
|
|
2860
2861
|
m(i(Kn), {
|
|
2861
2862
|
color: i(va),
|
|
@@ -2863,10 +2864,10 @@ const Le = (e) => {
|
|
|
2863
2864
|
}, null, 8, ["color", "size"])
|
|
2864
2865
|
])
|
|
2865
2866
|
]),
|
|
2866
|
-
"feature-0-icon":
|
|
2867
|
+
"feature-0-icon": E(() => [
|
|
2867
2868
|
m(i(Hn))
|
|
2868
2869
|
]),
|
|
2869
|
-
"feature-1-icon":
|
|
2870
|
+
"feature-1-icon": E(() => [
|
|
2870
2871
|
m(i(Fn))
|
|
2871
2872
|
]),
|
|
2872
2873
|
_: 1
|
|
@@ -2876,11 +2877,11 @@ const Le = (e) => {
|
|
|
2876
2877
|
} : void 0
|
|
2877
2878
|
]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher-cache-key", "query"]),
|
|
2878
2879
|
m(Va, {
|
|
2879
|
-
visible:
|
|
2880
|
-
onClose: d[3] || (d[3] = (O) =>
|
|
2880
|
+
visible: b.value,
|
|
2881
|
+
onClose: d[3] || (d[3] = (O) => b.value = !1)
|
|
2881
2882
|
}, null, 8, ["visible"]),
|
|
2882
2883
|
m(i(Mn), {
|
|
2883
|
-
"action-pending":
|
|
2884
|
+
"action-pending": y.value,
|
|
2884
2885
|
description: i(c)("delete.description"),
|
|
2885
2886
|
"entity-name": l.value && (l.value.name || l.value.id),
|
|
2886
2887
|
"entity-type": i(Dn).RedisConfiguration,
|
|
@@ -2957,7 +2958,7 @@ const Le = (e) => {
|
|
|
2957
2958
|
updated_at: v.updated_at,
|
|
2958
2959
|
type: v.type,
|
|
2959
2960
|
...v.config
|
|
2960
|
-
}),
|
|
2961
|
+
}), y = (v) => {
|
|
2961
2962
|
const { id: s, name: I, created_at: V, updated_at: f, type: c, tags: N, ...L } = v;
|
|
2962
2963
|
return {
|
|
2963
2964
|
id: s,
|
|
@@ -3119,7 +3120,7 @@ const Le = (e) => {
|
|
|
3119
3120
|
label: r("form.fields.username.label"),
|
|
3120
3121
|
tooltip: r("form.fields.username.tooltip")
|
|
3121
3122
|
}
|
|
3122
|
-
},
|
|
3123
|
+
}, b = (v) => {
|
|
3123
3124
|
const s = {}, I = Object.keys(w);
|
|
3124
3125
|
for (const V of I)
|
|
3125
3126
|
v.includes(V) ? s[V] = {
|
|
@@ -3130,11 +3131,11 @@ const Le = (e) => {
|
|
|
3130
3131
|
hidden: !0
|
|
3131
3132
|
};
|
|
3132
3133
|
return s;
|
|
3133
|
-
},
|
|
3134
|
+
}, S = H(() => {
|
|
3134
3135
|
const v = ["id", "name", "tags", "type", "updated_at", "created_at"];
|
|
3135
3136
|
switch (p.value) {
|
|
3136
3137
|
case T.HOST_PORT_CE:
|
|
3137
|
-
return
|
|
3138
|
+
return b([
|
|
3138
3139
|
...v,
|
|
3139
3140
|
"host",
|
|
3140
3141
|
"port",
|
|
@@ -3147,7 +3148,7 @@ const Le = (e) => {
|
|
|
3147
3148
|
"server_name"
|
|
3148
3149
|
]);
|
|
3149
3150
|
case T.HOST_PORT_EE:
|
|
3150
|
-
return
|
|
3151
|
+
return b([
|
|
3151
3152
|
...v,
|
|
3152
3153
|
"host",
|
|
3153
3154
|
"port",
|
|
@@ -3165,7 +3166,7 @@ const Le = (e) => {
|
|
|
3165
3166
|
"connect_timeout"
|
|
3166
3167
|
]);
|
|
3167
3168
|
case T.CLUSTER:
|
|
3168
|
-
return
|
|
3169
|
+
return b([
|
|
3169
3170
|
...v,
|
|
3170
3171
|
"cluster_nodes",
|
|
3171
3172
|
"cluster_max_redirections",
|
|
@@ -3182,7 +3183,7 @@ const Le = (e) => {
|
|
|
3182
3183
|
"connect_timeout"
|
|
3183
3184
|
]);
|
|
3184
3185
|
case T.SENTINEL:
|
|
3185
|
-
return
|
|
3186
|
+
return b([
|
|
3186
3187
|
...v,
|
|
3187
3188
|
"sentinel_master",
|
|
3188
3189
|
"sentinel_role",
|
|
@@ -3207,10 +3208,10 @@ const Le = (e) => {
|
|
|
3207
3208
|
});
|
|
3208
3209
|
return (v, s) => (k(), q("div", Ua, [
|
|
3209
3210
|
m(i(Un), {
|
|
3210
|
-
"code-block-record-formatter":
|
|
3211
|
+
"code-block-record-formatter": y,
|
|
3211
3212
|
config: e.config,
|
|
3212
3213
|
"config-card-doc": e.configCardDoc,
|
|
3213
|
-
"config-schema":
|
|
3214
|
+
"config-schema": S.value,
|
|
3214
3215
|
"entity-type": i(Ht).RedisConfiguration,
|
|
3215
3216
|
"fetch-url": a.value,
|
|
3216
3217
|
"hide-title": e.hideTitle,
|
|
@@ -3219,7 +3220,7 @@ const Le = (e) => {
|
|
|
3219
3220
|
"onFetch:success": _,
|
|
3220
3221
|
onLoading: s[1] || (s[1] = (I) => v.$emit("loading", I))
|
|
3221
3222
|
}, {
|
|
3222
|
-
type:
|
|
3223
|
+
type: E(() => [
|
|
3223
3224
|
K("div", null, B(l.value), 1)
|
|
3224
3225
|
]),
|
|
3225
3226
|
_: 1
|