@kong-ui-public/analytics-metric-provider 7.2.2 → 7.2.3
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 { ref as re, watchEffect as
|
|
1
|
+
import { ref as re, watchEffect as He, computed as g, getCurrentInstance as Be, reactive as Ue, onMounted as Ke, onUnmounted as Pe, watch as Ze, isReadonly as Ge, toRefs as Xe, defineComponent as x, inject as xe, toRef as J, provide as je, renderSlot as Le, openBlock as p, createBlock as T, resolveDynamicComponent as L, normalizeStyle as q, withCtx as z, createElementBlock as y, toDisplayString as w, createCommentVNode as R, pushScopeId as A, popScopeId as V, createElementVNode as k, resolveComponent as ze, normalizeClass as Y, unref as N, createTextVNode as qe, createVNode as X, Fragment as _e, renderList as Ye, mergeProps as Qe, normalizeProps as We, guardReactiveProps as Je } from "vue";
|
|
2
2
|
import { TimePeriods as ie, TimeframeKeys as ne, queryableExploreDimensions as et, DeltaQueryTime as tt, UnaryQueryTime as rt } from "@kong-ui-public/analytics-utilities";
|
|
3
3
|
import { createI18n as it, i18nTComponent as nt } from "@kong-ui-public/i18n";
|
|
4
4
|
import { useAnalyticsConfigStore as at } from "@kong-ui-public/analytics-config-store";
|
|
@@ -46,7 +46,7 @@ function dt() {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
const ct = 2, Q = ["1XX", "2XX", "3XX", "4XX", "5XX"], we = ["4XX", "5XX"], mi = ["1XX", "2XX", "3XX"], ft = 30 * 1e3, vt = "analytics-query-provider";
|
|
49
|
-
var
|
|
49
|
+
var Ae = /* @__PURE__ */ ((e) => (e.VALIDATING = "VALIDATING", e.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", e.PENDING = "PENDING", e.SUCCESS = "SUCCESS", e.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", e.ERROR = "ERROR", e.STALE_IF_ERROR = "STALE_IF_ERROR", e))(Ae || {});
|
|
50
50
|
const pt = (e) => {
|
|
51
51
|
var t, r, a, n, i;
|
|
52
52
|
return e ? !!// TODO: revisit: currently only the first check ever matters?
|
|
@@ -57,7 +57,7 @@ function gt(e = re({}), t, r, a = pt) {
|
|
|
57
57
|
"PENDING"
|
|
58
58
|
/* PENDING */
|
|
59
59
|
);
|
|
60
|
-
return
|
|
60
|
+
return He(() => {
|
|
61
61
|
const i = a(e.value);
|
|
62
62
|
if (e.value && i && r.value) {
|
|
63
63
|
n.value = "VALIDATING_HAS_DATA";
|
|
@@ -86,21 +86,21 @@ function gt(e = re({}), t, r, a = pt) {
|
|
|
86
86
|
e.value === void 0 && t && (n.value = "ERROR");
|
|
87
87
|
}), {
|
|
88
88
|
state: n,
|
|
89
|
-
swrvState:
|
|
89
|
+
swrvState: Ae
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
const
|
|
92
|
+
const H = Symbol("default"), de = "status_code_grouped", Ne = (e, t, r, a, n) => {
|
|
93
93
|
e[t][r] || (e[t][r] = {}), e[t][r][a] = n;
|
|
94
94
|
};
|
|
95
95
|
function yt(e, t) {
|
|
96
96
|
var f;
|
|
97
97
|
const r = ((f = e.meta.metric_names) == null ? void 0 : f[0]) || "", a = e.meta.start_ms, n = Object.keys(e.meta.display || {}), i = !!n.find((c) => c === de), l = n.find((c) => c !== de);
|
|
98
98
|
return n.length > 2 || n.length > 1 && !i ? (console.error("Don't know how to work with provided dimensions:", n), {
|
|
99
|
-
previous: { [
|
|
100
|
-
current: { [
|
|
99
|
+
previous: { [H]: { [H]: 0 } },
|
|
100
|
+
current: { [H]: { [H]: 0 } }
|
|
101
101
|
}) : e.data.reduce((c, o) => {
|
|
102
|
-
const s = o.event[r], u = l ? o.event[l] :
|
|
103
|
-
return new Date(o.timestamp).getTime() === a && t ?
|
|
102
|
+
const s = o.event[r], u = l ? o.event[l] : H, d = i ? o.event[de] : H;
|
|
103
|
+
return new Date(o.timestamp).getTime() === a && t ? Ne(c, "previous", u, d, s) : Ne(c, "current", u, d, s), c;
|
|
104
104
|
}, {
|
|
105
105
|
previous: {},
|
|
106
106
|
current: {}
|
|
@@ -108,7 +108,7 @@ function yt(e, t) {
|
|
|
108
108
|
}
|
|
109
109
|
function mt(e) {
|
|
110
110
|
e.queryReady === void 0 && (e.queryReady = g(() => !0));
|
|
111
|
-
const { i18n: t } =
|
|
111
|
+
const { i18n: t } = K.useI18n(), r = g(() => {
|
|
112
112
|
var u, d;
|
|
113
113
|
return {
|
|
114
114
|
metrics: e.metrics.value,
|
|
@@ -126,7 +126,7 @@ function mt(e) {
|
|
|
126
126
|
return null;
|
|
127
127
|
const u = (v = e.filter) != null && v.value ? JSON.stringify(e.filter.value) : "";
|
|
128
128
|
return `metric-fetcher-${e.timeframe.value.cacheKey()}-${(C = e.dimensions) == null ? void 0 : C.join("-")}-${(m = e.metrics.value) == null ? void 0 : m.join("-")}-${u}`;
|
|
129
|
-
}), { response: n, error: i, isValidating: l } =
|
|
129
|
+
}), { response: n, error: i, isValidating: l } = K.useRequest(
|
|
130
130
|
() => a.value,
|
|
131
131
|
() => e.queryFn(r.value, e.abortController ?? new AbortController()),
|
|
132
132
|
{
|
|
@@ -135,8 +135,8 @@ function mt(e) {
|
|
|
135
135
|
errorRetryCount: ct
|
|
136
136
|
}
|
|
137
137
|
), { state: f, swrvState: c } = gt(n, i, l), o = g(() => {
|
|
138
|
-
var u, d, v, C, m, b,
|
|
139
|
-
return !((d = (u = n.value) == null ? void 0 : u.data) != null && d.length) || !((C = (v = n.value) == null ? void 0 : v.meta) != null && C.display) || !((
|
|
138
|
+
var u, d, v, C, m, b, I;
|
|
139
|
+
return !((d = (u = n.value) == null ? void 0 : u.data) != null && d.length) || !((C = (v = n.value) == null ? void 0 : v.meta) != null && C.display) || !((I = (b = (m = n.value) == null ? void 0 : m.meta) == null ? void 0 : b.metric_names) != null && I.length) ? { current: {}, previous: {} } : yt(n.value, e.withTrend.value);
|
|
140
140
|
}), s = g(() => {
|
|
141
141
|
var u, d, v;
|
|
142
142
|
if (e.timeframe.value.key === "custom") {
|
|
@@ -156,7 +156,7 @@ function mt(e) {
|
|
|
156
156
|
trendRange: s
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
const
|
|
159
|
+
const G = (e, t, r = H, a) => (a ?? [H]).reduce((i, l) => {
|
|
160
160
|
const f = e[t][r];
|
|
161
161
|
return f ? i + (f[l] || 0) : i;
|
|
162
162
|
}, 0);
|
|
@@ -175,7 +175,7 @@ function ht(e) {
|
|
|
175
175
|
let o = 0, s = 0;
|
|
176
176
|
if (n != null && n.value)
|
|
177
177
|
try {
|
|
178
|
-
o =
|
|
178
|
+
o = G(n.value, "current", e.lookupKey, e.sumGroupedValues), s = G(n.value, "previous", e.lookupKey, e.sumGroupedValues);
|
|
179
179
|
} catch (u) {
|
|
180
180
|
console.error(
|
|
181
181
|
"Metric card data doesn't have the expected structure:",
|
|
@@ -196,13 +196,13 @@ function ht(e) {
|
|
|
196
196
|
};
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
var ce = /* @__PURE__ */ new WeakMap(),
|
|
199
|
+
var ce = /* @__PURE__ */ new WeakMap(), Re = 0;
|
|
200
200
|
function Ct(e) {
|
|
201
201
|
if (!e.length)
|
|
202
202
|
return "";
|
|
203
203
|
for (var t = "arg", r = 0; r < e.length; ++r) {
|
|
204
204
|
var a = void 0;
|
|
205
|
-
e[r] === null || typeof e[r] != "object" && typeof e[r] != "function" ? typeof e[r] == "string" ? a = '"' + e[r] + '"' : a = String(e[r]) : ce.has(e[r]) ? a = ce.get(e[r]) : (a =
|
|
205
|
+
e[r] === null || typeof e[r] != "object" && typeof e[r] != "function" ? typeof e[r] == "string" ? a = '"' + e[r] + '"' : a = String(e[r]) : ce.has(e[r]) ? a = ce.get(e[r]) : (a = Re, ce.set(e[r], Re++)), t += "@" + a;
|
|
206
206
|
}
|
|
207
207
|
return t;
|
|
208
208
|
}
|
|
@@ -260,15 +260,15 @@ const fe = {
|
|
|
260
260
|
isDocumentVisible: _t,
|
|
261
261
|
fetcher: wt
|
|
262
262
|
};
|
|
263
|
-
var
|
|
264
|
-
return
|
|
263
|
+
var $ = function() {
|
|
264
|
+
return $ = Object.assign || function(e) {
|
|
265
265
|
for (var t, r = 1, a = arguments.length; r < a; r++) {
|
|
266
266
|
t = arguments[r];
|
|
267
267
|
for (var n in t)
|
|
268
268
|
Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
269
269
|
}
|
|
270
270
|
return e;
|
|
271
|
-
},
|
|
271
|
+
}, $.apply(this, arguments);
|
|
272
272
|
}, P = function(e, t, r, a) {
|
|
273
273
|
function n(i) {
|
|
274
274
|
return i instanceof r ? i : new r(function(l) {
|
|
@@ -359,7 +359,7 @@ var O = function() {
|
|
|
359
359
|
throw o[1];
|
|
360
360
|
return { value: o[0] ? o[1] : void 0, done: !0 };
|
|
361
361
|
}
|
|
362
|
-
},
|
|
362
|
+
}, Nt = function(e, t) {
|
|
363
363
|
var r = typeof Symbol == "function" && e[Symbol.iterator];
|
|
364
364
|
if (!r)
|
|
365
365
|
return e;
|
|
@@ -378,7 +378,7 @@ var O = function() {
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
return i;
|
|
381
|
-
},
|
|
381
|
+
}, Rt = function(e, t, r) {
|
|
382
382
|
if (r || arguments.length === 2)
|
|
383
383
|
for (var a = 0, n = t.length, i; a < n; a++)
|
|
384
384
|
(i || !(a in t)) && (i || (i = Array.prototype.slice.call(t, 0, a)), i[a] = t[a]);
|
|
@@ -398,7 +398,7 @@ var O = function() {
|
|
|
398
398
|
isOnline: fe.isOnline,
|
|
399
399
|
isDocumentVisible: fe.isDocumentVisible
|
|
400
400
|
};
|
|
401
|
-
function
|
|
401
|
+
function It(e, t, r) {
|
|
402
402
|
var a = ae.get(e);
|
|
403
403
|
if (a)
|
|
404
404
|
a.data.push(t);
|
|
@@ -407,7 +407,7 @@ function Tt(e, t, r) {
|
|
|
407
407
|
ae.set(e, [t], r > 0 ? r + n : r);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Tt(e, t, r) {
|
|
411
411
|
if (r.isDocumentVisible() && !(r.errorRetryCount !== void 0 && t > r.errorRetryCount)) {
|
|
412
412
|
var a = Math.min(t || 0, r.errorRetryCount), n = a * r.errorRetryInterval;
|
|
413
413
|
setTimeout(function() {
|
|
@@ -415,13 +415,13 @@ function Et(e, t, r) {
|
|
|
415
415
|
}, n);
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var
|
|
418
|
+
var Ie = function(e, t, r, a) {
|
|
419
419
|
return r === void 0 && (r = Ve), a === void 0 && (a = De.ttl), P(void 0, void 0, void 0, function() {
|
|
420
420
|
var n, i, l, f, c, o, s;
|
|
421
421
|
return Z(this, function(u) {
|
|
422
422
|
switch (u.label) {
|
|
423
423
|
case 0:
|
|
424
|
-
if (!
|
|
424
|
+
if (!kt(t))
|
|
425
425
|
return [3, 5];
|
|
426
426
|
u.label = 1;
|
|
427
427
|
case 1:
|
|
@@ -452,18 +452,18 @@ var Te = function(e, t, r, a) {
|
|
|
452
452
|
});
|
|
453
453
|
});
|
|
454
454
|
};
|
|
455
|
-
function
|
|
455
|
+
function Et() {
|
|
456
456
|
for (var e = this, t = [], r = 0; r < arguments.length; r++)
|
|
457
457
|
t[r] = arguments[r];
|
|
458
|
-
var a, n, i =
|
|
458
|
+
var a, n, i = $({}, De), l = !1, f = !1, c = Be(), o = (c == null ? void 0 : c.proxy) || c;
|
|
459
459
|
if (!o)
|
|
460
460
|
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;
|
|
461
461
|
var s = (o == null ? void 0 : o.$isServer) || !1;
|
|
462
|
-
t.length >= 1 && (a = t[0]), t.length >= 2 && (n = t[1]), t.length > 2 && (i =
|
|
462
|
+
t.length >= 1 && (a = t[0]), t.length >= 2 && (n = t[1]), t.length > 2 && (i = $($({}, i), t[2]));
|
|
463
463
|
var u = s ? i.serverTTL : i.ttl, d = typeof a == "function" ? a : re(a);
|
|
464
464
|
typeof n > "u" && (n = i.fetcher);
|
|
465
465
|
var v = null;
|
|
466
|
-
v || (v =
|
|
466
|
+
v || (v = Ue({
|
|
467
467
|
data: void 0,
|
|
468
468
|
error: void 0,
|
|
469
469
|
isValidating: !0,
|
|
@@ -471,11 +471,11 @@ function It() {
|
|
|
471
471
|
}));
|
|
472
472
|
var C = function(S, h) {
|
|
473
473
|
return P(e, void 0, void 0, function() {
|
|
474
|
-
var
|
|
474
|
+
var F, E, B, j, oe, he, se, Ce = this;
|
|
475
475
|
return Z(this, function(le) {
|
|
476
476
|
switch (le.label) {
|
|
477
477
|
case 0:
|
|
478
|
-
return
|
|
478
|
+
return F = v.data === void 0, E = d.value, E ? (B = i.cache.get(E), j = B && B.data, v.isValidating = !0, j && (v.data = j.data, v.error = j.error), oe = S || n, !oe || !i.isDocumentVisible() && !F || (h == null ? void 0 : h.forceRevalidate) !== void 0 && !(h != null && h.forceRevalidate) ? (v.isValidating = !1, [
|
|
479
479
|
2
|
|
480
480
|
/*return*/
|
|
481
481
|
]) : B && (he = !!(Date.now() - B.createdAt >= i.dedupingInterval || h != null && h.forceRevalidate), !he) ? (v.isValidating = !1, [
|
|
@@ -483,19 +483,19 @@ function It() {
|
|
|
483
483
|
/*return*/
|
|
484
484
|
]) : (se = function() {
|
|
485
485
|
return P(Ce, void 0, void 0, function() {
|
|
486
|
-
var
|
|
486
|
+
var U, be, ue, Se;
|
|
487
487
|
return Z(this, function(W) {
|
|
488
488
|
switch (W.label) {
|
|
489
489
|
case 0:
|
|
490
|
-
return
|
|
490
|
+
return U = ve.get(E), U ? [3, 2] : (be = Array.isArray(E) ? E : [E], ue = oe.apply(void 0, Rt([], Nt(be), !1)), ve.set(E, ue, i.dedupingInterval), [4, Ie(E, ue, i.cache, u)]);
|
|
491
491
|
case 1:
|
|
492
492
|
return W.sent(), [3, 4];
|
|
493
493
|
case 2:
|
|
494
|
-
return [4,
|
|
494
|
+
return [4, Ie(E, U.data, i.cache, u)];
|
|
495
495
|
case 3:
|
|
496
496
|
W.sent(), W.label = 4;
|
|
497
497
|
case 4:
|
|
498
|
-
return v.isValidating = !1, ve.delete(
|
|
498
|
+
return v.isValidating = !1, ve.delete(E), v.error !== void 0 && (Se = !l && i.shouldRetryOnError && (h ? h.shouldRetryOnError : !0), Se && Tt(C, h ? h.errorRetryCount : 1, i)), [
|
|
499
499
|
2
|
|
500
500
|
/*return*/
|
|
501
501
|
];
|
|
@@ -504,12 +504,12 @@ function It() {
|
|
|
504
504
|
});
|
|
505
505
|
}, j && i.revalidateDebounce ? (setTimeout(function() {
|
|
506
506
|
return P(Ce, void 0, void 0, function() {
|
|
507
|
-
return Z(this, function(
|
|
508
|
-
switch (
|
|
507
|
+
return Z(this, function(U) {
|
|
508
|
+
switch (U.label) {
|
|
509
509
|
case 0:
|
|
510
510
|
return l ? [3, 2] : [4, se()];
|
|
511
511
|
case 1:
|
|
512
|
-
|
|
512
|
+
U.sent(), U.label = 2;
|
|
513
513
|
case 2:
|
|
514
514
|
return [
|
|
515
515
|
2
|
|
@@ -541,7 +541,7 @@ function It() {
|
|
|
541
541
|
});
|
|
542
542
|
});
|
|
543
543
|
}, b = null;
|
|
544
|
-
|
|
544
|
+
Ke(function() {
|
|
545
545
|
var S = function() {
|
|
546
546
|
return P(e, void 0, void 0, function() {
|
|
547
547
|
return Z(this, function(h) {
|
|
@@ -571,27 +571,27 @@ function It() {
|
|
|
571
571
|
});
|
|
572
572
|
try {
|
|
573
573
|
Ze(d, function(S) {
|
|
574
|
-
|
|
574
|
+
Ge(d) || (d.value = S), v.key = S, v.isValidating = !!S, It(d.value, v, u), !s && !f && d.value && C(), f = !1;
|
|
575
575
|
}, {
|
|
576
576
|
immediate: !0
|
|
577
577
|
});
|
|
578
578
|
} catch {
|
|
579
579
|
}
|
|
580
|
-
var
|
|
581
|
-
return C(S,
|
|
580
|
+
var I = $($({}, Xe(v)), { mutate: function(S, h) {
|
|
581
|
+
return C(S, $($({}, h), { forceRevalidate: !0 }));
|
|
582
582
|
} });
|
|
583
|
-
return
|
|
583
|
+
return I;
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function kt(e) {
|
|
586
586
|
return e !== null && typeof e == "object" && typeof e.then == "function";
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function xt(e, t, r) {
|
|
589
589
|
const {
|
|
590
590
|
data: a,
|
|
591
591
|
error: n,
|
|
592
592
|
isValidating: i,
|
|
593
593
|
mutate: l
|
|
594
|
-
} =
|
|
594
|
+
} = Et(e, t, {
|
|
595
595
|
revalidateDebounce: 500,
|
|
596
596
|
revalidateOnFocus: !1,
|
|
597
597
|
dedupingInterval: 100,
|
|
@@ -605,12 +605,12 @@ function kt(e, t, r) {
|
|
|
605
605
|
revalidate: l
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
|
-
const
|
|
608
|
+
const K = {
|
|
609
609
|
useI18n: dt,
|
|
610
610
|
useMetricCardBuilder: ht,
|
|
611
611
|
useMetricFetcher: mt,
|
|
612
|
-
useRequest:
|
|
613
|
-
},
|
|
612
|
+
useRequest: xt
|
|
613
|
+
}, $e = Symbol("METRICS_PROVIDER_KEY"), Lt = (e) => {
|
|
614
614
|
const {
|
|
615
615
|
dimension: t,
|
|
616
616
|
dimensionFilterValue: r,
|
|
@@ -668,12 +668,12 @@ const U = {
|
|
|
668
668
|
refreshInterval: c,
|
|
669
669
|
queryFn: s,
|
|
670
670
|
abortController: o
|
|
671
|
-
},
|
|
671
|
+
}, I = K.useMetricFetcher(m), S = K.useMetricFetcher(b);
|
|
672
672
|
return {
|
|
673
|
-
trafficData:
|
|
673
|
+
trafficData: I,
|
|
674
674
|
latencyData: S
|
|
675
675
|
};
|
|
676
|
-
}, hi = /* @__PURE__ */
|
|
676
|
+
}, hi = /* @__PURE__ */ x({
|
|
677
677
|
__name: "MetricsProvider",
|
|
678
678
|
props: {
|
|
679
679
|
maxTimeframe: { default: ne.THIRTY_DAY },
|
|
@@ -694,7 +694,7 @@ const U = {
|
|
|
694
694
|
const t = e;
|
|
695
695
|
if (t.dimension && et.findIndex((v) => v === t.dimension) === -1)
|
|
696
696
|
throw new Error(`Attempted to use MetricsProvider with an invalid dimension: ${t.dimension}`);
|
|
697
|
-
const r =
|
|
697
|
+
const r = xe(vt);
|
|
698
698
|
let a, n;
|
|
699
699
|
r ? (a = r.queryFn, n = r.evaluateFeatureFlagFn) : (console.warn("Analytics dashboards require a query bridge supplied via provide / inject."), console.warn("Please ensure your application has a query bridge provided under the key 'analytics-query-provider', as described in"), console.warn("https://github.com/Kong/public-ui-components/blob/main/packages/analytics/analytics-metric-provider/README.md#requirements"), a = () => Promise.reject(new Error("Query bridge required")), n = (v, C) => C);
|
|
700
700
|
const i = at(), l = J(() => i.longRetention), f = g(() => !i.loading && t.queryReady), c = g(() => t.tz ? t.tz : new Intl.DateTimeFormat().resolvedOptions().timeZone), o = g(() => {
|
|
@@ -720,7 +720,7 @@ const U = {
|
|
|
720
720
|
averageLatencies: s,
|
|
721
721
|
abortController: t.abortController
|
|
722
722
|
});
|
|
723
|
-
return je(
|
|
723
|
+
return je($e, {
|
|
724
724
|
data: {
|
|
725
725
|
traffic: u,
|
|
726
726
|
latency: d
|
|
@@ -736,10 +736,10 @@ const U = {
|
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
738
|
});
|
|
739
|
-
function
|
|
739
|
+
function zt(e) {
|
|
740
740
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
741
741
|
}
|
|
742
|
-
var
|
|
742
|
+
var Oe = { exports: {} };
|
|
743
743
|
(function(e) {
|
|
744
744
|
(function() {
|
|
745
745
|
function t(o, s) {
|
|
@@ -765,22 +765,22 @@ var Me = { exports: {} };
|
|
|
765
765
|
}
|
|
766
766
|
c.addCommas = t, e.exports = c;
|
|
767
767
|
})();
|
|
768
|
-
})(
|
|
769
|
-
var
|
|
770
|
-
const
|
|
771
|
-
var
|
|
768
|
+
})(Oe);
|
|
769
|
+
var qt = Oe.exports;
|
|
770
|
+
const At = /* @__PURE__ */ zt(qt);
|
|
771
|
+
var O = /* @__PURE__ */ ((e) => (e.GENERIC_COUNT = "GenericCount", e.TRAFFIC = "Traffic", e.ERROR_RATE = "ErrorRate", e.LATENCY = "Latency", e))(O || {}), M = /* @__PURE__ */ ((e) => (e.Small = "sm", e.Medium = "md", e.Large = "lg", e.ExtraLarge = "xl", e))(M || {});
|
|
772
772
|
const _ = "24px", D = (e, t) => {
|
|
773
773
|
const r = e.__vccOpts || e;
|
|
774
774
|
for (const [a, n] of t)
|
|
775
775
|
r[a] = n;
|
|
776
776
|
return r;
|
|
777
|
-
}, Vt = (e) => (
|
|
777
|
+
}, Vt = (e) => (A("data-v-1f882620"), e = e(), V(), e), Dt = ["aria-hidden"], $t = {
|
|
778
778
|
key: 0,
|
|
779
779
|
"data-testid": "kui-icon-svg-title"
|
|
780
|
-
},
|
|
780
|
+
}, Ot = /* @__PURE__ */ Vt(() => /* @__PURE__ */ k("path", {
|
|
781
781
|
d: "M6.5 20C4.98333 20 3.6875 19.475 2.6125 18.425C1.5375 17.375 1 16.0917 1 14.575C1 13.275 1.39167 12.1167 2.175 11.1C2.95833 10.0833 3.98333 9.43333 5.25 9.15C5.66667 7.61667 6.5 6.375 7.75 5.425C9 4.475 10.4167 4 12 4C13.95 4 15.6042 4.67917 16.9625 6.0375C18.3208 7.39583 19 9.05 19 11C20.15 11.1333 21.1042 11.6292 21.8625 12.4875C22.6208 13.3458 23 14.35 23 15.5C23 16.75 22.5625 17.8125 21.6875 18.6875C20.8125 19.5625 19.75 20 18.5 20H13C12.45 20 11.9792 19.8042 11.5875 19.4125C11.1958 19.0208 11 18.55 11 18V12.85L9.4 14.4L8 13L12 9L16 13L14.6 14.4L13 12.85V18H18.5C19.2 18 19.7917 17.7583 20.275 17.275C20.7583 16.7917 21 16.2 21 15.5C21 14.8 20.7583 14.2083 20.275 13.725C19.7917 13.2417 19.2 13 18.5 13H17V11C17 9.61667 16.5125 8.4375 15.5375 7.4625C14.5625 6.4875 13.3833 6 12 6C10.6167 6 9.4375 6.4875 8.4625 7.4625C7.4875 8.4375 7 9.61667 7 11H6.5C5.53333 11 4.70833 11.3417 4.025 12.025C3.34167 12.7083 3 13.5333 3 14.5C3 15.4667 3.34167 16.2917 4.025 16.975C4.70833 17.6583 5.53333 18 6.5 18H9V20H6.5Z",
|
|
782
782
|
fill: "currentColor"
|
|
783
|
-
}, null, -1)),
|
|
783
|
+
}, null, -1)), Mt = /* @__PURE__ */ x({
|
|
784
784
|
__name: "CloudUploadIcon",
|
|
785
785
|
props: {
|
|
786
786
|
/** The accessibility text provided to screen readers */
|
|
@@ -849,13 +849,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
849
849
|
lineHeight: "0",
|
|
850
850
|
width: r.value
|
|
851
851
|
}));
|
|
852
|
-
return (n, i) => (p(),
|
|
852
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
853
853
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
854
854
|
class: "kui-icon cloud-upload-icon",
|
|
855
855
|
"data-testid": "kui-icon-wrapper-cloud-upload-icon",
|
|
856
|
-
style:
|
|
856
|
+
style: q(a.value)
|
|
857
857
|
}, {
|
|
858
|
-
default:
|
|
858
|
+
default: z(() => [
|
|
859
859
|
(p(), y("svg", {
|
|
860
860
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
861
861
|
"data-testid": "kui-icon-svg-cloud-upload-icon",
|
|
@@ -866,20 +866,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
866
866
|
width: "100%",
|
|
867
867
|
xmlns: "http://www.w3.org/2000/svg"
|
|
868
868
|
}, [
|
|
869
|
-
e.title ? (p(), y("title",
|
|
870
|
-
|
|
869
|
+
e.title ? (p(), y("title", $t, w(e.title), 1)) : R("", !0),
|
|
870
|
+
Ot
|
|
871
871
|
], 8, Dt))
|
|
872
872
|
]),
|
|
873
873
|
_: 1
|
|
874
874
|
}, 8, ["aria-hidden", "style"]));
|
|
875
875
|
}
|
|
876
|
-
}),
|
|
876
|
+
}), Ft = /* @__PURE__ */ D(Mt, [["__scopeId", "data-v-1f882620"]]), Ht = (e) => (A("data-v-c5e89abd"), e = e(), V(), e), Bt = ["aria-hidden"], Ut = {
|
|
877
877
|
key: 0,
|
|
878
878
|
"data-testid": "kui-icon-svg-title"
|
|
879
|
-
},
|
|
879
|
+
}, Kt = /* @__PURE__ */ Ht(() => /* @__PURE__ */ k("path", {
|
|
880
880
|
d: "M4 17V14H20V17H4ZM4 10V7H20V10H4Z",
|
|
881
881
|
fill: "currentColor"
|
|
882
|
-
}, null, -1)), Pt = /* @__PURE__ */
|
|
882
|
+
}, null, -1)), Pt = /* @__PURE__ */ x({
|
|
883
883
|
__name: "EqualIcon",
|
|
884
884
|
props: {
|
|
885
885
|
/** The accessibility text provided to screen readers */
|
|
@@ -948,13 +948,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
948
948
|
lineHeight: "0",
|
|
949
949
|
width: r.value
|
|
950
950
|
}));
|
|
951
|
-
return (n, i) => (p(),
|
|
951
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
952
952
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
953
953
|
class: "kui-icon equal-icon",
|
|
954
954
|
"data-testid": "kui-icon-wrapper-equal-icon",
|
|
955
|
-
style:
|
|
955
|
+
style: q(a.value)
|
|
956
956
|
}, {
|
|
957
|
-
default:
|
|
957
|
+
default: z(() => [
|
|
958
958
|
(p(), y("svg", {
|
|
959
959
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
960
960
|
"data-testid": "kui-icon-svg-equal-icon",
|
|
@@ -965,20 +965,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
965
965
|
width: "100%",
|
|
966
966
|
xmlns: "http://www.w3.org/2000/svg"
|
|
967
967
|
}, [
|
|
968
|
-
e.title ? (p(), y("title",
|
|
969
|
-
|
|
968
|
+
e.title ? (p(), y("title", Ut, w(e.title), 1)) : R("", !0),
|
|
969
|
+
Kt
|
|
970
970
|
], 8, Bt))
|
|
971
971
|
]),
|
|
972
972
|
_: 1
|
|
973
973
|
}, 8, ["aria-hidden", "style"]));
|
|
974
974
|
}
|
|
975
|
-
}), Zt = /* @__PURE__ */ D(Pt, [["__scopeId", "data-v-
|
|
975
|
+
}), Zt = /* @__PURE__ */ D(Pt, [["__scopeId", "data-v-c5e89abd"]]), Gt = (e) => (A("data-v-f8224911"), e = e(), V(), e), Xt = ["aria-hidden"], jt = {
|
|
976
976
|
key: 0,
|
|
977
977
|
"data-testid": "kui-icon-svg-title"
|
|
978
|
-
}, Yt = /* @__PURE__ */
|
|
978
|
+
}, Yt = /* @__PURE__ */ Gt(() => /* @__PURE__ */ k("path", {
|
|
979
979
|
d: "M5 11V9H15V11H5Z",
|
|
980
980
|
fill: "currentColor"
|
|
981
|
-
}, null, -1)), Qt = /* @__PURE__ */
|
|
981
|
+
}, null, -1)), Qt = /* @__PURE__ */ x({
|
|
982
982
|
__name: "IndeterminateSmallIcon",
|
|
983
983
|
props: {
|
|
984
984
|
/** The accessibility text provided to screen readers */
|
|
@@ -1047,13 +1047,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1047
1047
|
lineHeight: "0",
|
|
1048
1048
|
width: r.value
|
|
1049
1049
|
}));
|
|
1050
|
-
return (n, i) => (p(),
|
|
1050
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
1051
1051
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1052
1052
|
class: "kui-icon indeterminate-small-icon",
|
|
1053
1053
|
"data-testid": "kui-icon-wrapper-indeterminate-small-icon",
|
|
1054
|
-
style:
|
|
1054
|
+
style: q(a.value)
|
|
1055
1055
|
}, {
|
|
1056
|
-
default:
|
|
1056
|
+
default: z(() => [
|
|
1057
1057
|
(p(), y("svg", {
|
|
1058
1058
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1059
1059
|
"data-testid": "kui-icon-svg-indeterminate-small-icon",
|
|
@@ -1064,20 +1064,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
1064
1064
|
width: "100%",
|
|
1065
1065
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1066
1066
|
}, [
|
|
1067
|
-
e.title ? (p(), y("title", jt, w(e.title), 1)) :
|
|
1067
|
+
e.title ? (p(), y("title", jt, w(e.title), 1)) : R("", !0),
|
|
1068
1068
|
Yt
|
|
1069
|
-
], 8,
|
|
1069
|
+
], 8, Xt))
|
|
1070
1070
|
]),
|
|
1071
1071
|
_: 1
|
|
1072
1072
|
}, 8, ["aria-hidden", "style"]));
|
|
1073
1073
|
}
|
|
1074
|
-
}),
|
|
1074
|
+
}), Me = /* @__PURE__ */ D(Qt, [["__scopeId", "data-v-f8224911"]]), Wt = (e) => (A("data-v-7528c7a7"), e = e(), V(), e), Jt = ["aria-hidden"], er = {
|
|
1075
1075
|
key: 0,
|
|
1076
1076
|
"data-testid": "kui-icon-svg-title"
|
|
1077
|
-
}, tr = /* @__PURE__ */ Wt(() => /* @__PURE__ */
|
|
1077
|
+
}, tr = /* @__PURE__ */ Wt(() => /* @__PURE__ */ k("path", {
|
|
1078
1078
|
d: "M11 17H13V11H11V17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 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",
|
|
1079
1079
|
fill: "currentColor"
|
|
1080
|
-
}, null, -1)), rr = /* @__PURE__ */
|
|
1080
|
+
}, null, -1)), rr = /* @__PURE__ */ x({
|
|
1081
1081
|
__name: "InfoIcon",
|
|
1082
1082
|
props: {
|
|
1083
1083
|
/** The accessibility text provided to screen readers */
|
|
@@ -1146,13 +1146,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1146
1146
|
lineHeight: "0",
|
|
1147
1147
|
width: r.value
|
|
1148
1148
|
}));
|
|
1149
|
-
return (n, i) => (p(),
|
|
1149
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
1150
1150
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1151
1151
|
class: "kui-icon info-icon",
|
|
1152
1152
|
"data-testid": "kui-icon-wrapper-info-icon",
|
|
1153
|
-
style:
|
|
1153
|
+
style: q(a.value)
|
|
1154
1154
|
}, {
|
|
1155
|
-
default:
|
|
1155
|
+
default: z(() => [
|
|
1156
1156
|
(p(), y("svg", {
|
|
1157
1157
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1158
1158
|
"data-testid": "kui-icon-svg-info-icon",
|
|
@@ -1163,20 +1163,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
1163
1163
|
width: "100%",
|
|
1164
1164
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1165
1165
|
}, [
|
|
1166
|
-
e.title ? (p(), y("title", er, w(e.title), 1)) :
|
|
1166
|
+
e.title ? (p(), y("title", er, w(e.title), 1)) : R("", !0),
|
|
1167
1167
|
tr
|
|
1168
1168
|
], 8, Jt))
|
|
1169
1169
|
]),
|
|
1170
1170
|
_: 1
|
|
1171
1171
|
}, 8, ["aria-hidden", "style"]));
|
|
1172
1172
|
}
|
|
1173
|
-
}), ir = /* @__PURE__ */ D(rr, [["__scopeId", "data-v-
|
|
1173
|
+
}), ir = /* @__PURE__ */ D(rr, [["__scopeId", "data-v-7528c7a7"]]), nr = (e) => (A("data-v-bcf298a0"), e = e(), V(), e), ar = ["aria-hidden"], or = {
|
|
1174
1174
|
key: 0,
|
|
1175
1175
|
"data-testid": "kui-icon-svg-title"
|
|
1176
|
-
}, sr = /* @__PURE__ */ nr(() => /* @__PURE__ */
|
|
1176
|
+
}, sr = /* @__PURE__ */ nr(() => /* @__PURE__ */ k("path", {
|
|
1177
1177
|
d: "M15.25 5C14.9 5 14.6042 4.87917 14.3625 4.6375C14.1208 4.39583 14 4.1 14 3.75C14 3.4 14.1208 3.10417 14.3625 2.8625C14.6042 2.62083 14.9 2.5 15.25 2.5C15.6 2.5 15.8958 2.62083 16.1375 2.8625C16.3792 3.10417 16.5 3.4 16.5 3.75C16.5 4.1 16.3792 4.39583 16.1375 4.6375C15.8958 4.87917 15.6 5 15.25 5ZM15.25 21.5C14.9 21.5 14.6042 21.3792 14.3625 21.1375C14.1208 20.8958 14 20.6 14 20.25C14 19.9 14.1208 19.6042 14.3625 19.3625C14.6042 19.1208 14.9 19 15.25 19C15.6 19 15.8958 19.1208 16.1375 19.3625C16.3792 19.6042 16.5 19.9 16.5 20.25C16.5 20.6 16.3792 20.8958 16.1375 21.1375C15.8958 21.3792 15.6 21.5 15.25 21.5ZM19.25 8.5C18.9 8.5 18.6042 8.37917 18.3625 8.1375C18.1208 7.89583 18 7.6 18 7.25C18 6.9 18.1208 6.60417 18.3625 6.3625C18.6042 6.12083 18.9 6 19.25 6C19.6 6 19.8958 6.12083 20.1375 6.3625C20.3792 6.60417 20.5 6.9 20.5 7.25C20.5 7.6 20.3792 7.89583 20.1375 8.1375C19.8958 8.37917 19.6 8.5 19.25 8.5ZM19.25 18C18.9 18 18.6042 17.8792 18.3625 17.6375C18.1208 17.3958 18 17.1 18 16.75C18 16.4 18.1208 16.1042 18.3625 15.8625C18.6042 15.6208 18.9 15.5 19.25 15.5C19.6 15.5 19.8958 15.6208 20.1375 15.8625C20.3792 16.1042 20.5 16.4 20.5 16.75C20.5 17.1 20.3792 17.3958 20.1375 17.6375C19.8958 17.8792 19.6 18 19.25 18ZM20.75 13.25C20.4 13.25 20.1042 13.1292 19.8625 12.8875C19.6208 12.6458 19.5 12.35 19.5 12C19.5 11.65 19.6208 11.3542 19.8625 11.1125C20.1042 10.8708 20.4 10.75 20.75 10.75C21.1 10.75 21.3958 10.8708 21.6375 11.1125C21.8792 11.3542 22 11.65 22 12C22 12.35 21.8792 12.6458 21.6375 12.8875C21.3958 13.1292 21.1 13.25 20.75 13.25ZM12 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 2V4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20V22ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.9167 10.0042 11.8292 10.0125 11.7375C10.0208 11.6458 10.0417 11.5583 10.075 11.475L8 9.4L9.4 8L11.475 10.075C11.5417 10.0583 11.7167 10.0333 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14Z",
|
|
1178
1178
|
fill: "currentColor"
|
|
1179
|
-
}, null, -1)), lr = /* @__PURE__ */
|
|
1179
|
+
}, null, -1)), lr = /* @__PURE__ */ x({
|
|
1180
1180
|
__name: "ResponseIcon",
|
|
1181
1181
|
props: {
|
|
1182
1182
|
/** The accessibility text provided to screen readers */
|
|
@@ -1245,13 +1245,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1245
1245
|
lineHeight: "0",
|
|
1246
1246
|
width: r.value
|
|
1247
1247
|
}));
|
|
1248
|
-
return (n, i) => (p(),
|
|
1248
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
1249
1249
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1250
1250
|
class: "kui-icon response-icon",
|
|
1251
1251
|
"data-testid": "kui-icon-wrapper-response-icon",
|
|
1252
|
-
style:
|
|
1252
|
+
style: q(a.value)
|
|
1253
1253
|
}, {
|
|
1254
|
-
default:
|
|
1254
|
+
default: z(() => [
|
|
1255
1255
|
(p(), y("svg", {
|
|
1256
1256
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1257
1257
|
"data-testid": "kui-icon-svg-response-icon",
|
|
@@ -1262,20 +1262,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
1262
1262
|
width: "100%",
|
|
1263
1263
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1264
1264
|
}, [
|
|
1265
|
-
e.title ? (p(), y("title", or, w(e.title), 1)) :
|
|
1265
|
+
e.title ? (p(), y("title", or, w(e.title), 1)) : R("", !0),
|
|
1266
1266
|
sr
|
|
1267
1267
|
], 8, ar))
|
|
1268
1268
|
]),
|
|
1269
1269
|
_: 1
|
|
1270
1270
|
}, 8, ["aria-hidden", "style"]));
|
|
1271
1271
|
}
|
|
1272
|
-
}), ur = /* @__PURE__ */ D(lr, [["__scopeId", "data-v-
|
|
1272
|
+
}), ur = /* @__PURE__ */ D(lr, [["__scopeId", "data-v-bcf298a0"]]), dr = (e) => (A("data-v-a93e175e"), e = e(), V(), e), cr = ["aria-hidden"], fr = {
|
|
1273
1273
|
key: 0,
|
|
1274
1274
|
"data-testid": "kui-icon-svg-title"
|
|
1275
|
-
}, vr = /* @__PURE__ */ dr(() => /* @__PURE__ */
|
|
1275
|
+
}, vr = /* @__PURE__ */ dr(() => /* @__PURE__ */ k("path", {
|
|
1276
1276
|
d: "M16 18V16H18.6L13.4 10.85L9.4 14.85L2 7.4L3.4 6L9.4 12L13.4 8L20 14.6V12H22V18H16Z",
|
|
1277
1277
|
fill: "currentColor"
|
|
1278
|
-
}, null, -1)), pr = /* @__PURE__ */
|
|
1278
|
+
}, null, -1)), pr = /* @__PURE__ */ x({
|
|
1279
1279
|
__name: "TrendDownIcon",
|
|
1280
1280
|
props: {
|
|
1281
1281
|
/** The accessibility text provided to screen readers */
|
|
@@ -1344,13 +1344,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1344
1344
|
lineHeight: "0",
|
|
1345
1345
|
width: r.value
|
|
1346
1346
|
}));
|
|
1347
|
-
return (n, i) => (p(),
|
|
1347
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
1348
1348
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1349
1349
|
class: "kui-icon trend-down-icon",
|
|
1350
1350
|
"data-testid": "kui-icon-wrapper-trend-down-icon",
|
|
1351
|
-
style:
|
|
1351
|
+
style: q(a.value)
|
|
1352
1352
|
}, {
|
|
1353
|
-
default:
|
|
1353
|
+
default: z(() => [
|
|
1354
1354
|
(p(), y("svg", {
|
|
1355
1355
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1356
1356
|
"data-testid": "kui-icon-svg-trend-down-icon",
|
|
@@ -1361,20 +1361,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
1361
1361
|
width: "100%",
|
|
1362
1362
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1363
1363
|
}, [
|
|
1364
|
-
e.title ? (p(), y("title", fr, w(e.title), 1)) :
|
|
1364
|
+
e.title ? (p(), y("title", fr, w(e.title), 1)) : R("", !0),
|
|
1365
1365
|
vr
|
|
1366
1366
|
], 8, cr))
|
|
1367
1367
|
]),
|
|
1368
1368
|
_: 1
|
|
1369
1369
|
}, 8, ["aria-hidden", "style"]));
|
|
1370
1370
|
}
|
|
1371
|
-
}), gr = /* @__PURE__ */ D(pr, [["__scopeId", "data-v-
|
|
1371
|
+
}), gr = /* @__PURE__ */ D(pr, [["__scopeId", "data-v-a93e175e"]]), yr = (e) => (A("data-v-10923103"), e = e(), V(), e), mr = ["aria-hidden"], hr = {
|
|
1372
1372
|
key: 0,
|
|
1373
1373
|
"data-testid": "kui-icon-svg-title"
|
|
1374
|
-
}, Cr = /* @__PURE__ */ yr(() => /* @__PURE__ */
|
|
1374
|
+
}, Cr = /* @__PURE__ */ yr(() => /* @__PURE__ */ k("path", {
|
|
1375
1375
|
d: "M3.4 18L2 16.6L9.4 9.15L13.4 13.15L18.6 8H16V6H22V12H20V9.4L13.4 16L9.4 12L3.4 18Z",
|
|
1376
1376
|
fill: "currentColor"
|
|
1377
|
-
}, null, -1)), br = /* @__PURE__ */
|
|
1377
|
+
}, null, -1)), br = /* @__PURE__ */ x({
|
|
1378
1378
|
__name: "TrendUpIcon",
|
|
1379
1379
|
props: {
|
|
1380
1380
|
/** The accessibility text provided to screen readers */
|
|
@@ -1443,13 +1443,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1443
1443
|
lineHeight: "0",
|
|
1444
1444
|
width: r.value
|
|
1445
1445
|
}));
|
|
1446
|
-
return (n, i) => (p(),
|
|
1446
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
1447
1447
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1448
1448
|
class: "kui-icon trend-up-icon",
|
|
1449
1449
|
"data-testid": "kui-icon-wrapper-trend-up-icon",
|
|
1450
|
-
style:
|
|
1450
|
+
style: q(a.value)
|
|
1451
1451
|
}, {
|
|
1452
|
-
default:
|
|
1452
|
+
default: z(() => [
|
|
1453
1453
|
(p(), y("svg", {
|
|
1454
1454
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1455
1455
|
"data-testid": "kui-icon-svg-trend-up-icon",
|
|
@@ -1460,20 +1460,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
1460
1460
|
width: "100%",
|
|
1461
1461
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1462
1462
|
}, [
|
|
1463
|
-
e.title ? (p(), y("title", hr, w(e.title), 1)) :
|
|
1463
|
+
e.title ? (p(), y("title", hr, w(e.title), 1)) : R("", !0),
|
|
1464
1464
|
Cr
|
|
1465
1465
|
], 8, mr))
|
|
1466
1466
|
]),
|
|
1467
1467
|
_: 1
|
|
1468
1468
|
}, 8, ["aria-hidden", "style"]));
|
|
1469
1469
|
}
|
|
1470
|
-
}), Sr = /* @__PURE__ */ D(br, [["__scopeId", "data-v-
|
|
1470
|
+
}), Sr = /* @__PURE__ */ D(br, [["__scopeId", "data-v-10923103"]]), _r = (e) => (A("data-v-f70e9343"), e = e(), V(), e), wr = ["aria-hidden"], Nr = {
|
|
1471
1471
|
key: 0,
|
|
1472
1472
|
"data-testid": "kui-icon-svg-title"
|
|
1473
|
-
},
|
|
1473
|
+
}, Rr = /* @__PURE__ */ _r(() => /* @__PURE__ */ k("path", {
|
|
1474
1474
|
d: "M9 20C8.68333 20 8.4 19.9083 8.15 19.725C7.9 19.5417 7.71667 19.3083 7.6 19.025L5.3 13H1V11H6.7L9 17.1L13.6 4.975C13.7167 4.69167 13.9 4.45833 14.15 4.275C14.4 4.09167 14.6833 4 15 4C15.3167 4 15.6 4.09167 15.85 4.275C16.1 4.45833 16.2833 4.69167 16.4 4.975L18.7 11H23V13H17.3L15 6.9L10.4 19.025C10.2833 19.3083 10.1 19.5417 9.85 19.725C9.6 19.9083 9.31667 20 9 20Z",
|
|
1475
1475
|
fill: "currentColor"
|
|
1476
|
-
}, null, -1)),
|
|
1476
|
+
}, null, -1)), Ir = /* @__PURE__ */ x({
|
|
1477
1477
|
__name: "VitalsIcon",
|
|
1478
1478
|
props: {
|
|
1479
1479
|
/** The accessibility text provided to screen readers */
|
|
@@ -1542,13 +1542,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1542
1542
|
lineHeight: "0",
|
|
1543
1543
|
width: r.value
|
|
1544
1544
|
}));
|
|
1545
|
-
return (n, i) => (p(),
|
|
1545
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
1546
1546
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1547
1547
|
class: "kui-icon vitals-icon",
|
|
1548
1548
|
"data-testid": "kui-icon-wrapper-vitals-icon",
|
|
1549
|
-
style:
|
|
1549
|
+
style: q(a.value)
|
|
1550
1550
|
}, {
|
|
1551
|
-
default:
|
|
1551
|
+
default: z(() => [
|
|
1552
1552
|
(p(), y("svg", {
|
|
1553
1553
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1554
1554
|
"data-testid": "kui-icon-svg-vitals-icon",
|
|
@@ -1559,20 +1559,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
1559
1559
|
width: "100%",
|
|
1560
1560
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1561
1561
|
}, [
|
|
1562
|
-
e.title ? (p(), y("title",
|
|
1563
|
-
|
|
1562
|
+
e.title ? (p(), y("title", Nr, w(e.title), 1)) : R("", !0),
|
|
1563
|
+
Rr
|
|
1564
1564
|
], 8, wr))
|
|
1565
1565
|
]),
|
|
1566
1566
|
_: 1
|
|
1567
1567
|
}, 8, ["aria-hidden", "style"]));
|
|
1568
1568
|
}
|
|
1569
|
-
}),
|
|
1569
|
+
}), Tr = /* @__PURE__ */ D(Ir, [["__scopeId", "data-v-f70e9343"]]), Er = (e) => (A("data-v-7938753f"), e = e(), V(), e), kr = ["aria-hidden"], xr = {
|
|
1570
1570
|
key: 0,
|
|
1571
1571
|
"data-testid": "kui-icon-svg-title"
|
|
1572
|
-
}, Lr = /* @__PURE__ */
|
|
1572
|
+
}, Lr = /* @__PURE__ */ Er(() => /* @__PURE__ */ k("path", {
|
|
1573
1573
|
d: "M12.0001 22.025C11.7334 22.025 11.4793 21.975 11.2376 21.875C10.9959 21.775 10.7751 21.6333 10.5751 21.45L2.5501 13.425C2.36676 13.225 2.2251 13.0041 2.1251 12.7625C2.0251 12.5208 1.9751 12.2666 1.9751 12C1.9751 11.7333 2.0251 11.475 2.1251 11.225C2.2251 10.975 2.36676 10.7583 2.5501 10.575L10.5751 2.54998C10.7751 2.34998 10.9959 2.20414 11.2376 2.11248C11.4793 2.02081 11.7334 1.97498 12.0001 1.97498C12.2668 1.97498 12.5251 2.02081 12.7751 2.11248C13.0251 2.20414 13.2418 2.34998 13.4251 2.54998L21.4501 10.575C21.6501 10.7583 21.7959 10.975 21.8876 11.225C21.9793 11.475 22.0251 11.7333 22.0251 12C22.0251 12.2666 21.9793 12.5208 21.8876 12.7625C21.7959 13.0041 21.6501 13.225 21.4501 13.425L13.4251 21.45C13.2418 21.6333 13.0251 21.775 12.7751 21.875C12.5251 21.975 12.2668 22.025 12.0001 22.025ZM12.0001 20.025L20.0251 12L12.0001 3.97498L3.9751 12L12.0001 20.025ZM11.0001 13H13.0001V6.99998H11.0001V13ZM12.0001 16C12.2834 16 12.5209 15.9041 12.7126 15.7125C12.9043 15.5208 13.0001 15.2833 13.0001 15C13.0001 14.7166 12.9043 14.4791 12.7126 14.2875C12.5209 14.0958 12.2834 14 12.0001 14C11.7168 14 11.4793 14.0958 11.2876 14.2875C11.0959 14.4791 11.0001 14.7166 11.0001 15C11.0001 15.2833 11.0959 15.5208 11.2876 15.7125C11.4793 15.9041 11.7168 16 12.0001 16Z",
|
|
1574
1574
|
fill: "currentColor"
|
|
1575
|
-
}, null, -1)),
|
|
1575
|
+
}, null, -1)), zr = /* @__PURE__ */ x({
|
|
1576
1576
|
__name: "WarningOutlineIcon",
|
|
1577
1577
|
props: {
|
|
1578
1578
|
/** The accessibility text provided to screen readers */
|
|
@@ -1641,13 +1641,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1641
1641
|
lineHeight: "0",
|
|
1642
1642
|
width: r.value
|
|
1643
1643
|
}));
|
|
1644
|
-
return (n, i) => (p(),
|
|
1644
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
1645
1645
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1646
1646
|
class: "kui-icon warning-outline-icon",
|
|
1647
1647
|
"data-testid": "kui-icon-wrapper-warning-outline-icon",
|
|
1648
|
-
style:
|
|
1648
|
+
style: q(a.value)
|
|
1649
1649
|
}, {
|
|
1650
|
-
default:
|
|
1650
|
+
default: z(() => [
|
|
1651
1651
|
(p(), y("svg", {
|
|
1652
1652
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1653
1653
|
"data-testid": "kui-icon-svg-warning-outline-icon",
|
|
@@ -1658,20 +1658,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
1658
1658
|
width: "100%",
|
|
1659
1659
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1660
1660
|
}, [
|
|
1661
|
-
e.title ? (p(), y("title",
|
|
1661
|
+
e.title ? (p(), y("title", xr, w(e.title), 1)) : R("", !0),
|
|
1662
1662
|
Lr
|
|
1663
|
-
], 8,
|
|
1663
|
+
], 8, kr))
|
|
1664
1664
|
]),
|
|
1665
1665
|
_: 1
|
|
1666
1666
|
}, 8, ["aria-hidden", "style"]));
|
|
1667
1667
|
}
|
|
1668
|
-
}),
|
|
1668
|
+
}), qr = /* @__PURE__ */ D(zr, [["__scopeId", "data-v-7938753f"]]), Ar = (e) => (A("data-v-cce90bb9"), e = e(), V(), e), Vr = ["aria-hidden"], Dr = {
|
|
1669
1669
|
key: 0,
|
|
1670
1670
|
"data-testid": "kui-icon-svg-title"
|
|
1671
|
-
},
|
|
1671
|
+
}, $r = /* @__PURE__ */ Ar(() => /* @__PURE__ */ k("path", {
|
|
1672
1672
|
d: "M12.025 22.05C11.7583 22.05 11.5042 22 11.2625 21.9C11.0208 21.8 10.8 21.6583 10.6 21.475L2.575 13.45C2.39167 13.25 2.25 13.0292 2.15 12.7875C2.05 12.5458 2 12.2917 2 12.025C2 11.7583 2.05 11.5 2.15 11.25C2.25 11 2.39167 10.7833 2.575 10.6L10.6 2.575C10.8 2.375 11.0208 2.22917 11.2625 2.1375C11.5042 2.04583 11.7583 2 12.025 2C12.2917 2 12.55 2.04583 12.8 2.1375C13.05 2.22917 13.2667 2.375 13.45 2.575L21.475 10.6C21.675 10.7833 21.8208 11 21.9125 11.25C22.0042 11.5 22.05 11.7583 22.05 12.025C22.05 12.2917 22.0042 12.5458 21.9125 12.7875C21.8208 13.0292 21.675 13.25 21.475 13.45L13.45 21.475C13.2667 21.6583 13.05 21.8 12.8 21.9C12.55 22 12.2917 22.05 12.025 22.05ZM11.025 13.025H13.025V7.025H11.025V13.025ZM12.025 16.025C12.3083 16.025 12.5458 15.9292 12.7375 15.7375C12.9292 15.5458 13.025 15.3083 13.025 15.025C13.025 14.7417 12.9292 14.5042 12.7375 14.3125C12.5458 14.1208 12.3083 14.025 12.025 14.025C11.7417 14.025 11.5042 14.1208 11.3125 14.3125C11.1208 14.5042 11.025 14.7417 11.025 15.025C11.025 15.3083 11.1208 15.5458 11.3125 15.7375C11.5042 15.9292 11.7417 16.025 12.025 16.025Z",
|
|
1673
1673
|
fill: "currentColor"
|
|
1674
|
-
}, null, -1)),
|
|
1674
|
+
}, null, -1)), Or = /* @__PURE__ */ x({
|
|
1675
1675
|
__name: "WarningIcon",
|
|
1676
1676
|
props: {
|
|
1677
1677
|
/** The accessibility text provided to screen readers */
|
|
@@ -1740,13 +1740,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1740
1740
|
lineHeight: "0",
|
|
1741
1741
|
width: r.value
|
|
1742
1742
|
}));
|
|
1743
|
-
return (n, i) => (p(),
|
|
1743
|
+
return (n, i) => (p(), T(L(e.as), {
|
|
1744
1744
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1745
1745
|
class: "kui-icon warning-icon",
|
|
1746
1746
|
"data-testid": "kui-icon-wrapper-warning-icon",
|
|
1747
|
-
style:
|
|
1747
|
+
style: q(a.value)
|
|
1748
1748
|
}, {
|
|
1749
|
-
default:
|
|
1749
|
+
default: z(() => [
|
|
1750
1750
|
(p(), y("svg", {
|
|
1751
1751
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1752
1752
|
"data-testid": "kui-icon-svg-warning-icon",
|
|
@@ -1757,20 +1757,20 @@ const _ = "24px", D = (e, t) => {
|
|
|
1757
1757
|
width: "100%",
|
|
1758
1758
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1759
1759
|
}, [
|
|
1760
|
-
e.title ? (p(), y("title", Dr, w(e.title), 1)) :
|
|
1761
|
-
|
|
1760
|
+
e.title ? (p(), y("title", Dr, w(e.title), 1)) : R("", !0),
|
|
1761
|
+
$r
|
|
1762
1762
|
], 8, Vr))
|
|
1763
1763
|
]),
|
|
1764
1764
|
_: 1
|
|
1765
1765
|
}, 8, ["aria-hidden", "style"]));
|
|
1766
1766
|
}
|
|
1767
|
-
}),
|
|
1768
|
-
let a = !t || Number(e.toFixed(
|
|
1767
|
+
}), Fe = /* @__PURE__ */ D(Or, [["__scopeId", "data-v-cce90bb9"]]), ye = 2, Te = ye + 2, Mr = (e, t, r = !1) => {
|
|
1768
|
+
let a = !t || Number(e.toFixed(Te)) === 0 ? 0 : Number(e.toFixed(Te)) > 0 ? 1 : -1;
|
|
1769
1769
|
return r && (a *= -1), a;
|
|
1770
|
-
},
|
|
1770
|
+
}, Fr = (e, t, r) => t ? `${Math.abs(e * 100).toFixed(ye)}%` : r, Hr = (e, t) => t === 0 ? 0 : e / t - 1, Br = (e, t = !1) => (t && (e *= -1), e > 0 ? Sr : e < 0 ? gr : Me), Ur = "#ad000e", pe = "#6c7489", Ee = "#52596e", Kr = "#007d60", ee = "16px", Pr = "20px", Zr = { class: "metricscard" }, Gr = {
|
|
1771
1771
|
key: 0,
|
|
1772
1772
|
class: "metricscard-description"
|
|
1773
|
-
},
|
|
1773
|
+
}, Xr = { class: "metricscard-valuetrend" }, jr = {
|
|
1774
1774
|
key: 0,
|
|
1775
1775
|
class: "metricscard-error"
|
|
1776
1776
|
}, Yr = {
|
|
@@ -1779,13 +1779,13 @@ const _ = "24px", D = (e, t) => {
|
|
|
1779
1779
|
}, Qr = { "data-testid": "metric-trend-change" }, Wr = {
|
|
1780
1780
|
key: 0,
|
|
1781
1781
|
class: "metricscard-trend-range"
|
|
1782
|
-
}, Jr = /* @__PURE__ */
|
|
1782
|
+
}, Jr = /* @__PURE__ */ x({
|
|
1783
1783
|
__name: "MetricsCard",
|
|
1784
1784
|
props: {
|
|
1785
1785
|
cardType: {
|
|
1786
1786
|
type: String,
|
|
1787
1787
|
required: !0,
|
|
1788
|
-
default:
|
|
1788
|
+
default: O.GENERIC_COUNT
|
|
1789
1789
|
},
|
|
1790
1790
|
title: {
|
|
1791
1791
|
type: String,
|
|
@@ -1821,7 +1821,7 @@ const _ = "24px", D = (e, t) => {
|
|
|
1821
1821
|
},
|
|
1822
1822
|
trendIcon: {
|
|
1823
1823
|
type: Object,
|
|
1824
|
-
default:
|
|
1824
|
+
default: Me
|
|
1825
1825
|
},
|
|
1826
1826
|
trendRange: {
|
|
1827
1827
|
type: String,
|
|
@@ -1838,7 +1838,7 @@ const _ = "24px", D = (e, t) => {
|
|
|
1838
1838
|
cardSize: {
|
|
1839
1839
|
type: String,
|
|
1840
1840
|
required: !1,
|
|
1841
|
-
default: () =>
|
|
1841
|
+
default: () => M.Large
|
|
1842
1842
|
},
|
|
1843
1843
|
hasContainerTitle: {
|
|
1844
1844
|
type: Boolean,
|
|
@@ -1852,84 +1852,84 @@ const _ = "24px", D = (e, t) => {
|
|
|
1852
1852
|
},
|
|
1853
1853
|
setup(e) {
|
|
1854
1854
|
const t = /* @__PURE__ */ new Map([
|
|
1855
|
-
[
|
|
1856
|
-
[
|
|
1857
|
-
[
|
|
1858
|
-
[
|
|
1855
|
+
[O.GENERIC_COUNT, Tr],
|
|
1856
|
+
[O.TRAFFIC, Ft],
|
|
1857
|
+
[O.ERROR_RATE, qr],
|
|
1858
|
+
[O.LATENCY, ur]
|
|
1859
1859
|
]), r = e, a = (f) => {
|
|
1860
1860
|
const c = {
|
|
1861
|
-
red: `var(--kong-ui-metric-card-trend-negative, ${
|
|
1862
|
-
green: `var(--kong-ui-metric-card-trend-positive, ${
|
|
1863
|
-
grey: `var(--kong-ui-metric-card-trend-neutral, ${
|
|
1861
|
+
red: `var(--kong-ui-metric-card-trend-negative, ${Ur})`,
|
|
1862
|
+
green: `var(--kong-ui-metric-card-trend-positive, ${Kr})`,
|
|
1863
|
+
grey: `var(--kong-ui-metric-card-trend-neutral, ${Ee})`
|
|
1864
1864
|
};
|
|
1865
1865
|
return f > 0 ? c.green : f < 0 ? c.red : c.grey;
|
|
1866
|
-
}, n = (f) => f > 0 ? "positive" : f < 0 ? "negative" : "neutral", i = [
|
|
1866
|
+
}, n = (f) => f > 0 ? "positive" : f < 0 ? "negative" : "neutral", i = [M.Medium, M.Large].includes(r.cardSize), l = [M.Small].includes(r.cardSize);
|
|
1867
1867
|
return (f, c) => {
|
|
1868
|
-
const o =
|
|
1868
|
+
const o = ze("KTooltip");
|
|
1869
1869
|
return p(), y("div", Zr, [
|
|
1870
|
-
|
|
1870
|
+
k("div", {
|
|
1871
1871
|
class: Y(["metricscard-title", e.cardSize])
|
|
1872
1872
|
}, [
|
|
1873
|
-
|
|
1873
|
+
N(l) ? R("", !0) : (p(), T(L(N(t).get(e.cardType)), {
|
|
1874
1874
|
key: 0,
|
|
1875
1875
|
class: "metricscard-icon",
|
|
1876
|
-
color:
|
|
1877
|
-
size:
|
|
1876
|
+
color: N(pe),
|
|
1877
|
+
size: N(ee)
|
|
1878
1878
|
}, null, 8, ["color", "size"])),
|
|
1879
|
-
(p(),
|
|
1880
|
-
default:
|
|
1881
|
-
|
|
1879
|
+
(p(), T(L(e.titleTag), null, {
|
|
1880
|
+
default: z(() => [
|
|
1881
|
+
qe(w(e.title), 1)
|
|
1882
1882
|
]),
|
|
1883
1883
|
_: 1
|
|
1884
1884
|
})),
|
|
1885
|
-
e.tooltip ? (p(),
|
|
1885
|
+
e.tooltip ? (p(), T(o, {
|
|
1886
1886
|
key: 1,
|
|
1887
1887
|
class: "metricscard-tooltip",
|
|
1888
1888
|
placement: "right",
|
|
1889
1889
|
text: e.tooltip
|
|
1890
1890
|
}, {
|
|
1891
|
-
default:
|
|
1892
|
-
|
|
1893
|
-
color:
|
|
1894
|
-
size:
|
|
1891
|
+
default: z(() => [
|
|
1892
|
+
X(N(ir), {
|
|
1893
|
+
color: N(pe),
|
|
1894
|
+
size: N(ee)
|
|
1895
1895
|
}, null, 8, ["color", "size"])
|
|
1896
1896
|
]),
|
|
1897
1897
|
_: 1
|
|
1898
|
-
}, 8, ["text"])) :
|
|
1898
|
+
}, 8, ["text"])) : R("", !0)
|
|
1899
1899
|
], 2),
|
|
1900
|
-
e.description &&
|
|
1901
|
-
|
|
1902
|
-
])) :
|
|
1903
|
-
|
|
1900
|
+
e.description && N(i) ? (p(), y("div", Gr, [
|
|
1901
|
+
k("span", null, w(e.description), 1)
|
|
1902
|
+
])) : R("", !0),
|
|
1903
|
+
k("div", Xr, [
|
|
1904
1904
|
e.hasError ? (p(), y("div", jr, [
|
|
1905
|
-
|
|
1906
|
-
color:
|
|
1907
|
-
size:
|
|
1905
|
+
X(N(Fe), {
|
|
1906
|
+
color: N(pe),
|
|
1907
|
+
size: N(Pr)
|
|
1908
1908
|
}, null, 8, ["color", "size"]),
|
|
1909
|
-
|
|
1909
|
+
k("div", null, " " + w(e.errorMessage), 1)
|
|
1910
1910
|
])) : (p(), y("div", {
|
|
1911
1911
|
key: 1,
|
|
1912
1912
|
class: Y(["metricscard-value", e.cardSize]),
|
|
1913
1913
|
"data-testid": "metric-value"
|
|
1914
1914
|
}, w(e.metricValue), 3)),
|
|
1915
|
-
|
|
1916
|
-
|
|
1915
|
+
N(i) ? (p(), y("div", Yr, [
|
|
1916
|
+
k("div", {
|
|
1917
1917
|
class: Y(["metricscard-trend-change", n(e.changePolarity)]),
|
|
1918
1918
|
"data-testid": "metric-trend-parent"
|
|
1919
1919
|
}, [
|
|
1920
|
-
e.changePolarity !== 0 ? (p(),
|
|
1920
|
+
e.changePolarity !== 0 ? (p(), T(L(e.trendIcon), {
|
|
1921
1921
|
key: 0,
|
|
1922
1922
|
color: a(e.changePolarity),
|
|
1923
|
-
size:
|
|
1924
|
-
}, null, 8, ["color", "size"])) : (p(),
|
|
1923
|
+
size: N(ee)
|
|
1924
|
+
}, null, 8, ["color", "size"])) : (p(), T(N(Zt), {
|
|
1925
1925
|
key: 1,
|
|
1926
|
-
color:
|
|
1927
|
-
size:
|
|
1926
|
+
color: N(Ee),
|
|
1927
|
+
size: N(ee)
|
|
1928
1928
|
}, null, 8, ["color", "size"])),
|
|
1929
|
-
|
|
1929
|
+
k("div", Qr, w(e.metricChange), 1)
|
|
1930
1930
|
], 2),
|
|
1931
|
-
e.trendRange ? (p(), y("div", Wr, w(e.trendRange), 1)) :
|
|
1932
|
-
])) :
|
|
1931
|
+
e.trendRange ? (p(), y("div", Wr, w(e.trendRange), 1)) : R("", !0)
|
|
1932
|
+
])) : R("", !0)
|
|
1933
1933
|
])
|
|
1934
1934
|
]);
|
|
1935
1935
|
};
|
|
@@ -1941,10 +1941,10 @@ const _ = "24px", D = (e, t) => {
|
|
|
1941
1941
|
return r;
|
|
1942
1942
|
}, ei = /* @__PURE__ */ me(Jr, [["__scopeId", "data-v-1b8a31a0"]]), ti = {}, ri = { class: "loading-tabs" };
|
|
1943
1943
|
function ii(e, t) {
|
|
1944
|
-
const r =
|
|
1944
|
+
const r = ze("KSkeletonBox");
|
|
1945
1945
|
return p(), y("div", ri, [
|
|
1946
|
-
|
|
1947
|
-
|
|
1946
|
+
X(r, { width: "100" }),
|
|
1947
|
+
X(r, { width: "75" })
|
|
1948
1948
|
]);
|
|
1949
1949
|
}
|
|
1950
1950
|
const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c40"]]), ai = {
|
|
@@ -1962,7 +1962,7 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
1962
1962
|
}, ui = {
|
|
1963
1963
|
key: 2,
|
|
1964
1964
|
class: "cards-wrapper"
|
|
1965
|
-
}, di = /* @__PURE__ */
|
|
1965
|
+
}, di = /* @__PURE__ */ x({
|
|
1966
1966
|
__name: "MetricCardContainer",
|
|
1967
1967
|
props: {
|
|
1968
1968
|
fallbackDisplayText: {
|
|
@@ -1991,7 +1991,7 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
1991
1991
|
cardSize: {
|
|
1992
1992
|
type: String,
|
|
1993
1993
|
required: !1,
|
|
1994
|
-
default: () =>
|
|
1994
|
+
default: () => M.Large
|
|
1995
1995
|
},
|
|
1996
1996
|
containerTitle: {
|
|
1997
1997
|
type: String,
|
|
@@ -2006,10 +2006,10 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
2006
2006
|
},
|
|
2007
2007
|
setup(e) {
|
|
2008
2008
|
const t = e, r = g(() => t.cards.every((n) => (n == null ? void 0 : n.hasError) === !0)), a = (n) => {
|
|
2009
|
-
const i =
|
|
2009
|
+
const i = Hr(n.currentValue, n.previousValue) || 0, l = Mr(i, t.hasTrendAccess, n.increaseIsBad);
|
|
2010
2010
|
return {
|
|
2011
|
-
metricValue: n.formatValueFn ? n.formatValueFn(n.currentValue) :
|
|
2012
|
-
metricChange: n.formatChangeFn ? n.formatChangeFn(i) :
|
|
2011
|
+
metricValue: n.formatValueFn ? n.formatValueFn(n.currentValue) : At(n.currentValue, { capital: !0, round: !0 }) || "0",
|
|
2012
|
+
metricChange: n.formatChangeFn ? n.formatChangeFn(i) : Fr(i, t.hasTrendAccess, t.fallbackDisplayText),
|
|
2013
2013
|
changePolarity: l,
|
|
2014
2014
|
trendIcon: Br(l, n.increaseIsBad),
|
|
2015
2015
|
cardSize: t.cardSize,
|
|
@@ -2020,18 +2020,18 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
2020
2020
|
class: Y(["kong-ui-public-metric-card-container", e.cardSize])
|
|
2021
2021
|
}, [
|
|
2022
2022
|
t.containerTitle ? (p(), y("div", ai, [
|
|
2023
|
-
|
|
2024
|
-
t.containerDescription ? (p(), y("div", oi, w(t.containerDescription), 1)) :
|
|
2025
|
-
])) :
|
|
2023
|
+
qe(w(t.containerTitle) + " ", 1),
|
|
2024
|
+
t.containerDescription ? (p(), y("div", oi, w(t.containerDescription), 1)) : R("", !0)
|
|
2025
|
+
])) : R("", !0),
|
|
2026
2026
|
r.value ? (p(), y("div", si, [
|
|
2027
|
-
|
|
2028
|
-
e.errorMessage ? (p(), y("div", li, w(e.errorMessage), 1)) :
|
|
2027
|
+
X(N(Fe), { class: "error-display-icon" }),
|
|
2028
|
+
e.errorMessage ? (p(), y("div", li, w(e.errorMessage), 1)) : R("", !0)
|
|
2029
2029
|
])) : (p(), y("div", ui, [
|
|
2030
2030
|
(p(!0), y(_e, null, Ye(e.cards, (l, f) => (p(), y(_e, null, [
|
|
2031
|
-
e.loading ? (p(),
|
|
2031
|
+
e.loading ? (p(), T(ni, {
|
|
2032
2032
|
key: `skeleton-${f}`,
|
|
2033
|
-
class: Y(e.cardSize ===
|
|
2034
|
-
}, null, 8, ["class"])) : (p(),
|
|
2033
|
+
class: Y(e.cardSize === N(M).Small ? "loading-tabs-small" : "loading-tabs-large")
|
|
2034
|
+
}, null, 8, ["class"])) : (p(), T(ei, Qe({
|
|
2035
2035
|
key: f,
|
|
2036
2036
|
ref_for: !0
|
|
2037
2037
|
}, a(l), {
|
|
@@ -2049,19 +2049,19 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
2049
2049
|
]))
|
|
2050
2050
|
], 2));
|
|
2051
2051
|
}
|
|
2052
|
-
}), ci = /* @__PURE__ */ me(di, [["__scopeId", "data-v-d3a810e0"]]), Ci = /* @__PURE__ */
|
|
2052
|
+
}), ci = /* @__PURE__ */ me(di, [["__scopeId", "data-v-d3a810e0"]]), Ci = /* @__PURE__ */ x({
|
|
2053
2053
|
__name: "MetricsConsumer",
|
|
2054
2054
|
props: {
|
|
2055
2055
|
lookupKey: { default: void 0 },
|
|
2056
|
-
cardSize: { default:
|
|
2056
|
+
cardSize: { default: M.Large },
|
|
2057
2057
|
cardToDisplay: { default: void 0 }
|
|
2058
2058
|
},
|
|
2059
2059
|
setup(e) {
|
|
2060
|
-
const t = e, r =
|
|
2060
|
+
const t = e, r = xe($e);
|
|
2061
2061
|
if (!r)
|
|
2062
2062
|
throw new Error("MetricsConsumer must be nested inside a MetricsProvider instance.");
|
|
2063
|
-
const { traffic: a, latency: n } = r.data, { i18n: i } =
|
|
2064
|
-
cardType:
|
|
2063
|
+
const { traffic: a, latency: n } = r.data, { i18n: i } = K.useI18n(), l = K.useMetricCardBuilder({
|
|
2064
|
+
cardType: O.TRAFFIC,
|
|
2065
2065
|
title: g(() => r.longCardTitles ? i.t("metricCard.long.traffic") : i.t("metricCard.short.traffic")),
|
|
2066
2066
|
record: a.mapped,
|
|
2067
2067
|
hasError: a.hasError,
|
|
@@ -2069,22 +2069,22 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
2069
2069
|
sumGroupedValues: Q,
|
|
2070
2070
|
trendRange: a.trendRange
|
|
2071
2071
|
}), f = (m) => `${m.toFixed(ye)}%`, c = g(() => {
|
|
2072
|
-
const m = a.mapped.value, b =
|
|
2072
|
+
const m = a.mapped.value, b = G(m, "current", t.lookupKey, we), I = G(m, "current", t.lookupKey, Q), S = b / I * 100 || 0, h = G(m, "previous", t.lookupKey, we), F = G(m, "previous", t.lookupKey, Q), E = h / F * 100 || 0;
|
|
2073
2073
|
return {
|
|
2074
|
-
cardType:
|
|
2074
|
+
cardType: O.ERROR_RATE,
|
|
2075
2075
|
hasError: a.hasError.value,
|
|
2076
2076
|
currentValue: S,
|
|
2077
|
-
previousValue:
|
|
2077
|
+
previousValue: E,
|
|
2078
2078
|
formatValueFn: f,
|
|
2079
2079
|
title: r.longCardTitles ? i.t("metricCard.long.errorRate") : i.t("metricCard.short.errorRate"),
|
|
2080
2080
|
increaseIsBad: !0,
|
|
2081
2081
|
trendRange: a.trendRange.value
|
|
2082
2082
|
};
|
|
2083
|
-
}), o = (m) => `${m}ms`, s =
|
|
2084
|
-
cardType:
|
|
2083
|
+
}), o = (m) => `${m}ms`, s = K.useMetricCardBuilder({
|
|
2084
|
+
cardType: O.LATENCY,
|
|
2085
2085
|
title: g(() => {
|
|
2086
|
-
const { longCardTitles: m, averageLatencies: b } = r,
|
|
2087
|
-
return m ? i.t(`metricCard.long.${
|
|
2086
|
+
const { longCardTitles: m, averageLatencies: b } = r, I = b.value ? "averageLatency" : "p99Latency";
|
|
2087
|
+
return m ? i.t(`metricCard.long.${I}`) : i.t(`metricCard.short.${I}`);
|
|
2088
2088
|
}),
|
|
2089
2089
|
hasError: n.hasError,
|
|
2090
2090
|
record: n.mapped,
|
|
@@ -2100,7 +2100,7 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
2100
2100
|
hasTrendAccess: r.hasTrendAccess.value,
|
|
2101
2101
|
fallbackDisplayText: i.t("general.notAvailable"),
|
|
2102
2102
|
// If the parent container has a title, we enforce a Medium card size; otherwise, pass down provided cardSize
|
|
2103
|
-
cardSize: r.containerTitle.value ?
|
|
2103
|
+
cardSize: r.containerTitle.value ? M.Medium : t.cardSize,
|
|
2104
2104
|
hideTitle: !0
|
|
2105
2105
|
})), C = g(() => ({
|
|
2106
2106
|
loading: v.value.loading,
|
|
@@ -2111,7 +2111,7 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
2111
2111
|
latencyFormatted: o(s.value.currentValue)
|
|
2112
2112
|
}));
|
|
2113
2113
|
return (m, b) => Le(m.$slots, "default", { cardValues: C.value }, () => [
|
|
2114
|
-
|
|
2114
|
+
X(ci, We(Je(v.value)), null, 16)
|
|
2115
2115
|
]);
|
|
2116
2116
|
}
|
|
2117
2117
|
}), te = (e) => new Date(e), bi = (e, t) => {
|
|
@@ -2120,26 +2120,26 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
2120
2120
|
statusCode: 200,
|
|
2121
2121
|
body: fi(r, t)
|
|
2122
2122
|
});
|
|
2123
|
-
},
|
|
2123
|
+
}, ke = (e) => e.reduce((t, r) => (t[r] = { name: r }, t), {}), fi = (e, t) => {
|
|
2124
2124
|
var C, m;
|
|
2125
2125
|
const r = ie.get(ne.ONE_DAY), a = e.granularity === "trend" ? new tt(r) : new rt(r), n = a.endMs(), i = a.startMs(), l = a.granularityMs(), f = e.granularity === "trend" ? 2 : 1;
|
|
2126
2126
|
if ((e.dimensions ?? []).length > 2)
|
|
2127
2127
|
throw new Error(`Explore only supports 0-2 dimensions; got: ${JSON.stringify(e.dimensions)}`);
|
|
2128
2128
|
const c = (e.dimensions ?? []).find((b) => b !== "time"), o = (t == null ? void 0 : t.dimensionNames) ?? [], s = Math.max(o.length, 1), u = e.metrics || [], d = [];
|
|
2129
2129
|
for (let b = 0; b < f; b++)
|
|
2130
|
-
for (let
|
|
2131
|
-
const S = c ? { [c]: o[
|
|
2130
|
+
for (let I = 0; I < s; I++) {
|
|
2131
|
+
const S = c ? { [c]: o[I] } : {};
|
|
2132
2132
|
(C = e.dimensions) != null && C.includes("status_code_grouped") ? Q.forEach((h) => {
|
|
2133
|
-
const
|
|
2133
|
+
const F = u.reduce((E, B) => (E[B] = (f - b) * 1e3 + 100 * I + 1, E), { ...S, status_code_grouped: h });
|
|
2134
2134
|
d.push({
|
|
2135
2135
|
version: "v1",
|
|
2136
2136
|
timestamp: b === 0 ? te(i).toISOString() : te(i + l).toISOString(),
|
|
2137
|
-
event:
|
|
2137
|
+
event: F
|
|
2138
2138
|
});
|
|
2139
2139
|
}) : d.push({
|
|
2140
2140
|
version: "v1",
|
|
2141
2141
|
timestamp: b === 0 ? te(i).toISOString() : te(i + l).toISOString(),
|
|
2142
|
-
event: u.reduce((h,
|
|
2142
|
+
event: u.reduce((h, F) => (h[F] = (f - b) * 1e3 + 100 * I + 1, h), { ...S })
|
|
2143
2143
|
});
|
|
2144
2144
|
}
|
|
2145
2145
|
const v = {
|
|
@@ -2147,8 +2147,8 @@ const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c4
|
|
|
2147
2147
|
end_ms: n,
|
|
2148
2148
|
granularity_ms: l,
|
|
2149
2149
|
display: c ? {
|
|
2150
|
-
[c]:
|
|
2151
|
-
...(m = e.dimensions) != null && m.includes("status_code_grouped") ? { status_code_grouped:
|
|
2150
|
+
[c]: ke(o),
|
|
2151
|
+
...(m = e.dimensions) != null && m.includes("status_code_grouped") ? { status_code_grouped: ke(Q) } : {}
|
|
2152
2152
|
} : {},
|
|
2153
2153
|
metric_names: e.metrics,
|
|
2154
2154
|
query_id: "test"
|
|
@@ -2163,8 +2163,8 @@ export {
|
|
|
2163
2163
|
ft as DEFAULT_REFRESH_INTERVAL,
|
|
2164
2164
|
vt as INJECT_QUERY_PROVIDER,
|
|
2165
2165
|
ct as MAX_ANALYTICS_REQUEST_RETRIES,
|
|
2166
|
-
|
|
2167
|
-
|
|
2166
|
+
M as MetricCardSize,
|
|
2167
|
+
O as MetricCardType,
|
|
2168
2168
|
Ci as MetricsConsumer,
|
|
2169
2169
|
hi as MetricsProvider,
|
|
2170
2170
|
we as STATUS_CODES_FAILED,
|