@kong-ui-public/analytics-metric-provider 1.1.15 → 1.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as me, watchEffect as We, computed as R, getCurrentInstance as je, reactive as Be, onMounted as Qe, onUnmounted as Ze, watch as Je, isReadonly as Xe, toRefs as et, defineComponent as ne, toRef as
|
|
1
|
+
import { ref as me, watchEffect as We, computed as R, getCurrentInstance as je, reactive as Be, onMounted as Qe, onUnmounted as Ze, watch as Je, isReadonly as Xe, toRefs as et, defineComponent as ne, toRef as Ie, provide as tt, renderSlot as xe, resolveComponent as J, openBlock as S, createElementBlock as O, normalizeClass as X, unref as j, createVNode as $, toDisplayString as q, createCommentVNode as Z, Fragment as Ae, renderList as rt, createBlock as ee, mergeProps as at, createElementVNode as z, withCtx as nt, normalizeStyle as it, inject as st, normalizeProps as ot, guardReactiveProps as ut } from "vue";
|
|
2
2
|
import { createI18n as lt, i18nTComponent as ct } from "@kong-ui-public/i18n";
|
|
3
3
|
var dt = Object.defineProperty, ft = (e, t, r) => t in e ? dt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, I = (e, t, r) => (ft(e, typeof t != "symbol" ? t + "" : t, r), r), v = /* @__PURE__ */ ((e) => (e.MINUTELY = "Minutely", e.HOURLY = "Hourly", e.DAILY = "Daily", e.WEEKLY = "Weekly", e))(v || {}), p = /* @__PURE__ */ ((e) => (e.FIFTEEN_MIN = "15m", e.ONE_HOUR = "1h", e.SIX_HOUR = "6h", e.TWELVE_HOUR = "12h", e.ONE_DAY = "24h", e.SEVEN_DAY = "7d", e.THIRTY_DAY = "30d", e.CURRENT_WEEK = "current_week", e.CURRENT_MONTH = "current_month", e.CURRENT_QUARTER = "current_quarter", e.PREVIOUS_WEEK = "previous_week", e.PREVIOUS_MONTH = "previous_month", e.PREVIOUS_QUARTER = "previous_quarter", e))(p || {});
|
|
4
|
-
const
|
|
4
|
+
const Ce = {
|
|
5
5
|
[v.MINUTELY]: 60 * 1e3,
|
|
6
6
|
[v.HOURLY]: 60 * 60 * 1e3,
|
|
7
7
|
[v.DAILY]: 60 * 60 * 24 * 1e3,
|
|
@@ -14,15 +14,15 @@ function mt(e, t) {
|
|
|
14
14
|
origin: t
|
|
15
15
|
} : null;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
const i =
|
|
17
|
+
function Ve(e, t, r) {
|
|
18
|
+
const i = Ce[r], n = i >= Ce[v.DAILY] ? t.getTimezoneOffset() * 60 * 1e3 : 0;
|
|
19
19
|
return new Date(e((t.getTime() - n) / i) * i + n);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
21
|
+
function Oe(e, t) {
|
|
22
|
+
return Ve(Math.floor, e, t);
|
|
23
23
|
}
|
|
24
24
|
function vt(e, t) {
|
|
25
|
-
return
|
|
25
|
+
return Ve(Math.ceil, e, t);
|
|
26
26
|
}
|
|
27
27
|
function te(e) {
|
|
28
28
|
"@babel/helpers - typeof";
|
|
@@ -77,7 +77,7 @@ function re(e, t) {
|
|
|
77
77
|
var f = P(e), m = f.getDay(), h = (m < l ? 7 : 0) + m - l;
|
|
78
78
|
return f.setDate(f.getDate() - h), f.setHours(0, 0, 0, 0), f;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function be(e) {
|
|
81
81
|
w(1, arguments);
|
|
82
82
|
var t = P(e);
|
|
83
83
|
return t.setHours(0, 0, 0, 0), t;
|
|
@@ -98,7 +98,7 @@ function he(e) {
|
|
|
98
98
|
var t = P(e), r = t.getTime();
|
|
99
99
|
return r;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Ne(e) {
|
|
102
102
|
return w(1, arguments), Math.floor(he(e) / 1e3);
|
|
103
103
|
}
|
|
104
104
|
function Rt(e) {
|
|
@@ -114,7 +114,7 @@ function wt(e) {
|
|
|
114
114
|
var t = e / pt;
|
|
115
115
|
return Math.floor(t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function ge(e, t) {
|
|
118
118
|
w(2, arguments);
|
|
119
119
|
var r = _(t);
|
|
120
120
|
return ht(e, -r);
|
|
@@ -122,12 +122,12 @@ function Ve(e, t) {
|
|
|
122
122
|
function Dt(e, t) {
|
|
123
123
|
if (w(2, arguments), !t || te(t) !== "object")
|
|
124
124
|
return /* @__PURE__ */ new Date(NaN);
|
|
125
|
-
var r = t.years ? _(t.years) : 0, i = t.months ? _(t.months) : 0, n = t.weeks ? _(t.weeks) : 0, a = t.days ? _(t.days) : 0, o = t.hours ? _(t.hours) : 0, d = t.minutes ? _(t.minutes) : 0, c = t.seconds ? _(t.seconds) : 0, s =
|
|
125
|
+
var r = t.years ? _(t.years) : 0, i = t.months ? _(t.months) : 0, n = t.weeks ? _(t.weeks) : 0, a = t.days ? _(t.days) : 0, o = t.hours ? _(t.hours) : 0, d = t.minutes ? _(t.minutes) : 0, c = t.seconds ? _(t.seconds) : 0, s = ge(e, i + r * 12), u = St(s, a + n * 7), l = d + o * 60, f = c + l * 60, m = f * 1e3, h = new Date(u.getTime() - m);
|
|
126
126
|
return h;
|
|
127
127
|
}
|
|
128
|
-
class
|
|
128
|
+
class pe {
|
|
129
129
|
constructor(t) {
|
|
130
|
-
if (I(this, "timeframe"), this.constructor ===
|
|
130
|
+
if (I(this, "timeframe"), this.constructor === pe)
|
|
131
131
|
throw new Error("BaseQueryTime is not meant to be used directly.");
|
|
132
132
|
this.timeframe = t;
|
|
133
133
|
}
|
|
@@ -135,8 +135,8 @@ class ge {
|
|
|
135
135
|
if (t)
|
|
136
136
|
return new Date(this.endDate().getTime() - this.timeframe.timeframeLengthMs() * i);
|
|
137
137
|
{
|
|
138
|
-
const n = this.endDate(), a =
|
|
139
|
-
return
|
|
138
|
+
const n = this.endDate(), a = Oe(this.timeframe.rawStart(), r), o = (n.getTime() - a.getTime()) * (i - 1);
|
|
139
|
+
return Oe(
|
|
140
140
|
new Date(this.timeframe.rawStart().getTime() - o),
|
|
141
141
|
r
|
|
142
142
|
);
|
|
@@ -150,11 +150,11 @@ class ge {
|
|
|
150
150
|
}
|
|
151
151
|
// Return a UNIX timestamp suitable for use in the `start` query param.
|
|
152
152
|
startSeconds() {
|
|
153
|
-
return
|
|
153
|
+
return Ne(this.startDate());
|
|
154
154
|
}
|
|
155
155
|
// Return a UNIX timestamp suitable for use in the `end` query param.
|
|
156
156
|
endSeconds() {
|
|
157
|
-
return
|
|
157
|
+
return Ne(this.endDate());
|
|
158
158
|
}
|
|
159
159
|
// Return epoch time in milliseconds, suitable for use in the `startMs` query param.
|
|
160
160
|
startMs() {
|
|
@@ -169,7 +169,7 @@ class ge {
|
|
|
169
169
|
return this.startDate() >= Dt(/* @__PURE__ */ new Date(), { days: 1 });
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
let Fe = class extends
|
|
172
|
+
let Fe = class extends pe {
|
|
173
173
|
startDate() {
|
|
174
174
|
return this.calculateStartDate(this.timeframe.isRelative, this.timeframe.dataGranularity);
|
|
175
175
|
}
|
|
@@ -241,10 +241,10 @@ let At = class extends A {
|
|
|
241
241
|
return F(/* @__PURE__ */ new Date());
|
|
242
242
|
}
|
|
243
243
|
rawStart() {
|
|
244
|
-
return F((/* @__PURE__ */ new Date()
|
|
244
|
+
return F(ge(/* @__PURE__ */ new Date(), 1));
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
|
-
const
|
|
247
|
+
const Ue = /* @__PURE__ */ new Map([
|
|
248
248
|
[
|
|
249
249
|
p.FIFTEEN_MIN,
|
|
250
250
|
new A({
|
|
@@ -344,7 +344,7 @@ const Ne = /* @__PURE__ */ new Map([
|
|
|
344
344
|
timeframeText: "Week",
|
|
345
345
|
timeframeLength: () => {
|
|
346
346
|
const e = re(/* @__PURE__ */ new Date(), { weekStartsOn: 1 });
|
|
347
|
-
return (
|
|
347
|
+
return (be(ve(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
|
|
348
348
|
},
|
|
349
349
|
defaultResponseGranularity: v.DAILY,
|
|
350
350
|
dataGranularity: v.DAILY,
|
|
@@ -360,7 +360,7 @@ const Ne = /* @__PURE__ */ new Map([
|
|
|
360
360
|
timeframeText: "Month",
|
|
361
361
|
timeframeLength: () => {
|
|
362
362
|
const e = F(/* @__PURE__ */ new Date());
|
|
363
|
-
return (
|
|
363
|
+
return (be(ve(/* @__PURE__ */ new Date(), 1)).getTime() - e.getTime()) / 1e3;
|
|
364
364
|
},
|
|
365
365
|
defaultResponseGranularity: v.DAILY,
|
|
366
366
|
dataGranularity: v.DAILY,
|
|
@@ -389,7 +389,7 @@ const Ne = /* @__PURE__ */ new Map([
|
|
|
389
389
|
timeframeText: "Month",
|
|
390
390
|
timeframeLength: () => {
|
|
391
391
|
let e = 0;
|
|
392
|
-
const t = F(/* @__PURE__ */ new Date()), r = F(
|
|
392
|
+
const t = F(/* @__PURE__ */ new Date()), r = F(ge(/* @__PURE__ */ new Date(), 1));
|
|
393
393
|
return t.getTimezoneOffset() !== r.getTimezoneOffset() && (e = bt(t, r)), 60 * 60 * 24 * Et((/* @__PURE__ */ new Date()).setMonth((/* @__PURE__ */ new Date()).getMonth() - 1)) + Rt(e);
|
|
394
394
|
},
|
|
395
395
|
defaultResponseGranularity: v.DAILY,
|
|
@@ -415,12 +415,12 @@ const Nt = {
|
|
|
415
415
|
errorRate: "Average Error Rate",
|
|
416
416
|
latency: "P99 Latency"
|
|
417
417
|
}
|
|
418
|
-
},
|
|
418
|
+
}, Lt = {
|
|
419
419
|
general: Nt,
|
|
420
420
|
metricCard: Ut
|
|
421
421
|
};
|
|
422
|
-
function
|
|
423
|
-
const e = lt("en-us",
|
|
422
|
+
function Mt() {
|
|
423
|
+
const e = lt("en-us", Lt);
|
|
424
424
|
return {
|
|
425
425
|
i18n: e,
|
|
426
426
|
i18nT: ct(e)
|
|
@@ -428,7 +428,7 @@ function Lt() {
|
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
430
|
var k = /* @__PURE__ */ ((e) => (e.API_PRODUCT = "API_PRODUCT", e.API_PRODUCT_VERSION = "API_PRODUCT_VERSION", e.RUNTIME_GROUP = "RUNTIME_GROUP", e.GATEWAY_INSTANCE_ID = "GATEWAY_INSTANCE_ID", e.GATEWAY_SERVICE = "GATEWAY_SERVICE", e.ROUTE = "ROUTE", e.APPLICATION = "APPLICATION", e.STATUS_CODE = "STATUS_CODE", e.STATUS_CODE_GROUPED = "STATUS_CODE_GROUPED", e.TIME = "TIME", e.ORGANIZATION = "ORGANIZATION", e))(k || {}), ye = /* @__PURE__ */ ((e) => (e.REQUEST_COUNT = "REQUEST_COUNT", e.REQUEST_PER_MINUTE = "REQUEST_PER_MINUTE", e.RESPONSE_LATENCY_P99 = "RESPONSE_LATENCY_P99", e.RESPONSE_LATENCY_P95 = "RESPONSE_LATENCY_P95", e.RESPONSE_LATENCY_P50 = "RESPONSE_LATENCY_P50", e.RESPONSE_SIZE_P99 = "RESPONSE_SIZE_P99", e.RESPONSE_SIZE_P95 = "RESPONSE_SIZE_P95", e.RESPONSE_SIZE_P50 = "RESPONSE_SIZE_P50", e.REQUEST_SIZE_P99 = "REQUEST_SIZE_P99", e.REQUEST_SIZE_P95 = "REQUEST_SIZE_P95", e.REQUEST_SIZE_P50 = "REQUEST_SIZE_P50", e))(ye || {}), He = /* @__PURE__ */ ((e) => (e.IN = "IN", e.NOT_IN = "NOT_IN", e))(He || {});
|
|
431
|
-
const kt = 2, W = ["1XX", "2XX", "3XX", "4XX", "5XX"],
|
|
431
|
+
const kt = 2, W = ["1XX", "2XX", "3XX", "4XX", "5XX"], Le = ["4XX", "5XX"];
|
|
432
432
|
var $e = /* @__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))($e || {});
|
|
433
433
|
const Pt = (e) => {
|
|
434
434
|
var t, r, i, n, a;
|
|
@@ -517,8 +517,8 @@ function Vt(e) {
|
|
|
517
517
|
errorRetryCount: kt
|
|
518
518
|
}
|
|
519
519
|
), { state: c, swrvState: s } = Yt(a, o, d), u = R(() => {
|
|
520
|
-
var l, f, m, h, y, E, C, T, g,
|
|
521
|
-
return !((m = (f = (l = a.value) == null ? void 0 : l.data) == null ? void 0 : f.records) != null && m.length) || !((E = (y = (h = a.value) == null ? void 0 : h.data) == null ? void 0 : y.meta) != null && E.dimensions) || !((
|
|
520
|
+
var l, f, m, h, y, E, C, T, g, L;
|
|
521
|
+
return !((m = (f = (l = a.value) == null ? void 0 : l.data) == null ? void 0 : f.records) != null && m.length) || !((E = (y = (h = a.value) == null ? void 0 : h.data) == null ? void 0 : y.meta) != null && E.dimensions) || !((L = (g = (T = (C = a.value) == null ? void 0 : C.data) == null ? void 0 : T.meta) == null ? void 0 : g.metricNames) != null && L.length) ? { current: {}, previous: {} } : xt(a.value.data, t.value, !!e.withTrend);
|
|
522
522
|
});
|
|
523
523
|
return {
|
|
524
524
|
isLoading: R(() => s.PENDING === c.value),
|
|
@@ -561,13 +561,13 @@ function Ft(e) {
|
|
|
561
561
|
};
|
|
562
562
|
});
|
|
563
563
|
}
|
|
564
|
-
var ce = /* @__PURE__ */ new WeakMap(),
|
|
564
|
+
var ce = /* @__PURE__ */ new WeakMap(), ke = 0;
|
|
565
565
|
function Ht(e) {
|
|
566
566
|
if (!e.length)
|
|
567
567
|
return "";
|
|
568
568
|
for (var t = "arg", r = 0; r < e.length; ++r) {
|
|
569
569
|
var i = void 0;
|
|
570
|
-
e[r] === null || typeof e[r] != "object" && typeof e[r] != "function" ? typeof e[r] == "string" ? i = '"' + e[r] + '"' : i = String(e[r]) : ce.has(e[r]) ? i = ce.get(e[r]) : (i =
|
|
570
|
+
e[r] === null || typeof e[r] != "object" && typeof e[r] != "function" ? typeof e[r] == "string" ? i = '"' + e[r] + '"' : i = String(e[r]) : ce.has(e[r]) ? i = ce.get(e[r]) : (i = ke, ce.set(e[r], ke++)), t += "@" + i;
|
|
571
571
|
}
|
|
572
572
|
return t;
|
|
573
573
|
}
|
|
@@ -580,7 +580,7 @@ function $t(e) {
|
|
|
580
580
|
}
|
|
581
581
|
return Array.isArray(e) ? e = Ht(e) : e = String(e || ""), e;
|
|
582
582
|
}
|
|
583
|
-
var
|
|
583
|
+
var Te = (
|
|
584
584
|
/** @class */
|
|
585
585
|
function() {
|
|
586
586
|
function e(t) {
|
|
@@ -748,7 +748,7 @@ var b = globalThis && globalThis.__assign || function() {
|
|
|
748
748
|
for (var i = 0, n = t.length, a; i < n; i++)
|
|
749
749
|
(a || !(i in t)) && (a || (a = Array.prototype.slice.call(t, 0, i)), a[i] = t[i]);
|
|
750
750
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
751
|
-
}, Ke = new
|
|
751
|
+
}, Ke = new Te(), ae = new Te(), fe = new Te(), Ge = {
|
|
752
752
|
cache: Ke,
|
|
753
753
|
refreshInterval: 0,
|
|
754
754
|
ttl: 0,
|
|
@@ -780,7 +780,7 @@ function Bt(e, t, r) {
|
|
|
780
780
|
}, n);
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
|
-
var
|
|
783
|
+
var Pe = function(e, t, r, i) {
|
|
784
784
|
return r === void 0 && (r = Ke), i === void 0 && (i = Ge.ttl), Y(void 0, void 0, void 0, function() {
|
|
785
785
|
var n, a, o, d, c, s, u;
|
|
786
786
|
return x(this, function(l) {
|
|
@@ -836,31 +836,31 @@ function Qt() {
|
|
|
836
836
|
}));
|
|
837
837
|
var h = function(T, g) {
|
|
838
838
|
return Y(e, void 0, void 0, function() {
|
|
839
|
-
var
|
|
839
|
+
var L, D, K, G, ie, Se, se, we = this;
|
|
840
840
|
return x(this, function(oe) {
|
|
841
841
|
switch (oe.label) {
|
|
842
842
|
case 0:
|
|
843
|
-
return
|
|
843
|
+
return L = m.data === void 0, D = f.value, D ? (K = a.cache.get(D), G = K && K.data, m.isValidating = !0, G && (m.data = G.data, m.error = G.error), ie = T || n, !ie || !a.isDocumentVisible() && !L || (g == null ? void 0 : g.forceRevalidate) !== void 0 && !(g != null && g.forceRevalidate) ? (m.isValidating = !1, [
|
|
844
844
|
2
|
|
845
845
|
/*return*/
|
|
846
|
-
]) : K && (
|
|
846
|
+
]) : K && (Se = !!(Date.now() - K.createdAt >= a.dedupingInterval || g != null && g.forceRevalidate), !Se) ? (m.isValidating = !1, [
|
|
847
847
|
2
|
|
848
848
|
/*return*/
|
|
849
849
|
]) : (se = function() {
|
|
850
|
-
return Y(
|
|
851
|
-
var
|
|
850
|
+
return Y(we, void 0, void 0, function() {
|
|
851
|
+
var M, De, ue, _e;
|
|
852
852
|
return x(this, function(B) {
|
|
853
853
|
switch (B.label) {
|
|
854
854
|
case 0:
|
|
855
|
-
return
|
|
855
|
+
return M = fe.get(D), M ? [3, 2] : (De = Array.isArray(D) ? D : [D], ue = ie.apply(void 0, Wt([], qt(De), !1)), fe.set(D, ue, a.dedupingInterval), [4, Pe(D, ue, a.cache, l)]);
|
|
856
856
|
case 1:
|
|
857
857
|
return B.sent(), [3, 4];
|
|
858
858
|
case 2:
|
|
859
|
-
return [4,
|
|
859
|
+
return [4, Pe(D, M.data, a.cache, l)];
|
|
860
860
|
case 3:
|
|
861
861
|
B.sent(), B.label = 4;
|
|
862
862
|
case 4:
|
|
863
|
-
return m.isValidating = !1, fe.delete(D), m.error !== void 0 && (
|
|
863
|
+
return m.isValidating = !1, fe.delete(D), m.error !== void 0 && (_e = !o && a.shouldRetryOnError && (g ? g.shouldRetryOnError : !0), _e && Bt(h, g ? g.errorRetryCount : 1, a)), [
|
|
864
864
|
2
|
|
865
865
|
/*return*/
|
|
866
866
|
];
|
|
@@ -868,13 +868,13 @@ function Qt() {
|
|
|
868
868
|
});
|
|
869
869
|
});
|
|
870
870
|
}, G && a.revalidateDebounce ? (setTimeout(function() {
|
|
871
|
-
return Y(
|
|
872
|
-
return x(this, function(
|
|
873
|
-
switch (
|
|
871
|
+
return Y(we, void 0, void 0, function() {
|
|
872
|
+
return x(this, function(M) {
|
|
873
|
+
switch (M.label) {
|
|
874
874
|
case 0:
|
|
875
875
|
return o ? [3, 2] : [4, se()];
|
|
876
876
|
case 1:
|
|
877
|
-
|
|
877
|
+
M.sent(), M.label = 2;
|
|
878
878
|
case 2:
|
|
879
879
|
return [
|
|
880
880
|
2
|
|
@@ -974,7 +974,7 @@ function Jt(e, t, r) {
|
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
976
|
const H = {
|
|
977
|
-
useI18n:
|
|
977
|
+
useI18n: Mt,
|
|
978
978
|
useMetricCardBuilder: Ft,
|
|
979
979
|
useMetricFetcher: Vt,
|
|
980
980
|
useRequest: Jt
|
|
@@ -1055,7 +1055,7 @@ const H = {
|
|
|
1055
1055
|
const r = R(() => {
|
|
1056
1056
|
if (t.overrideTimeframe)
|
|
1057
1057
|
return t.overrideTimeframe;
|
|
1058
|
-
const a = t.hasTrendAccess ?
|
|
1058
|
+
const a = t.hasTrendAccess ? Ue.get(t.maxTimeframe) : Ue.get(p.ONE_DAY);
|
|
1059
1059
|
if (!a)
|
|
1060
1060
|
throw new Error("Metrics provider failed to resolve fallback timeframe.");
|
|
1061
1061
|
return a;
|
|
@@ -1065,8 +1065,8 @@ const H = {
|
|
|
1065
1065
|
} = Xt({
|
|
1066
1066
|
dimension: t.dimension,
|
|
1067
1067
|
dimensionFilterValue: t.filterValue,
|
|
1068
|
-
additionalFilter:
|
|
1069
|
-
queryReady:
|
|
1068
|
+
additionalFilter: Ie(t, "additionalFilter"),
|
|
1069
|
+
queryReady: Ie(t, "queryReady"),
|
|
1070
1070
|
timeframe: r,
|
|
1071
1071
|
hasTrendAccess: t.hasTrendAccess,
|
|
1072
1072
|
refreshInterval: t.refreshInterval,
|
|
@@ -1079,7 +1079,7 @@ const H = {
|
|
|
1079
1079
|
},
|
|
1080
1080
|
hasTrendAccess: t.hasTrendAccess,
|
|
1081
1081
|
longCardTitles: t.longCardTitles
|
|
1082
|
-
}), (a, o) =>
|
|
1082
|
+
}), (a, o) => xe(a.$slots, "default", {
|
|
1083
1083
|
hasTrendAccess: t.hasTrendAccess,
|
|
1084
1084
|
timeframe: r.value
|
|
1085
1085
|
});
|
|
@@ -1118,10 +1118,10 @@ var qe = { exports: {} };
|
|
|
1118
1118
|
var tr = qe.exports;
|
|
1119
1119
|
const rr = /* @__PURE__ */ er(tr);
|
|
1120
1120
|
var N = /* @__PURE__ */ ((e) => (e.Small = "sm", e.Medium = "md", e.Large = "lg", e.ExtraLarge = "xl", e))(N || {});
|
|
1121
|
-
const
|
|
1122
|
-
let i = !t || Number(e.toFixed(
|
|
1121
|
+
const Ee = 2, Ye = Ee + 2, ar = (e, t, r = !1) => {
|
|
1122
|
+
let i = !t || Number(e.toFixed(Ye)) === 0 ? 0 : Number(e.toFixed(Ye)) > 0 ? 1 : -1;
|
|
1123
1123
|
return r && (i *= -1), i;
|
|
1124
|
-
}, nr = (e, t, r) => t ? `${Math.abs(e * 100).toFixed(
|
|
1124
|
+
}, nr = (e, t, r) => t ? `${Math.abs(e * 100).toFixed(Ee)}%` : r, ir = (e, t) => t === 0 ? 0 : e / t - 1, sr = (e, t = !1) => (t && (e *= -1), e > 0 ? "arrowUp" : e < 0 ? "arrowDown" : "noData"), or = { class: "metricscard" }, ur = {
|
|
1125
1125
|
key: 0,
|
|
1126
1126
|
class: "metricscard-error"
|
|
1127
1127
|
}, lr = {
|
|
@@ -1232,12 +1232,12 @@ const Te = 2, Pe = Te + 2, ar = (e, t, r = !1) => {
|
|
|
1232
1232
|
]);
|
|
1233
1233
|
};
|
|
1234
1234
|
}
|
|
1235
|
-
}),
|
|
1235
|
+
}), Re = (e, t) => {
|
|
1236
1236
|
const r = e.__vccOpts || e;
|
|
1237
1237
|
for (const [i, n] of t)
|
|
1238
1238
|
r[i] = n;
|
|
1239
1239
|
return r;
|
|
1240
|
-
}, dr = /* @__PURE__ */
|
|
1240
|
+
}, dr = /* @__PURE__ */ Re(cr, [["__scopeId", "data-v-ee980c4c"]]), fr = {}, mr = { class: "loading-tabs" };
|
|
1241
1241
|
function vr(e, t) {
|
|
1242
1242
|
const r = J("KSkeletonBox");
|
|
1243
1243
|
return S(), O("div", mr, [
|
|
@@ -1245,7 +1245,7 @@ function vr(e, t) {
|
|
|
1245
1245
|
$(r, { width: "75" })
|
|
1246
1246
|
]);
|
|
1247
1247
|
}
|
|
1248
|
-
const hr = /* @__PURE__ */
|
|
1248
|
+
const hr = /* @__PURE__ */ Re(fr, [["render", vr], ["__scopeId", "data-v-e4239529"]]), yr = {
|
|
1249
1249
|
key: 0,
|
|
1250
1250
|
class: "error-display"
|
|
1251
1251
|
}, gr = {
|
|
@@ -1306,7 +1306,7 @@ const hr = /* @__PURE__ */ Ee(fr, [["render", vr], ["__scopeId", "data-v-e423952
|
|
|
1306
1306
|
size: "24"
|
|
1307
1307
|
}),
|
|
1308
1308
|
e.errorMessage ? (S(), O("div", gr, q(e.errorMessage), 1)) : Z("", !0)
|
|
1309
|
-
])) : (S(!0), O(
|
|
1309
|
+
])) : (S(!0), O(Ae, { key: 1 }, rt(e.cards, (d, c) => (S(), O(Ae, null, [
|
|
1310
1310
|
e.loading ? (S(), ee(hr, {
|
|
1311
1311
|
key: `skeleton-${c}`,
|
|
1312
1312
|
class: X(e.cardSize === j(N).Small ? "loading-tabs-small" : "loading-tabs-large")
|
|
@@ -1321,7 +1321,7 @@ const hr = /* @__PURE__ */ Ee(fr, [["render", vr], ["__scopeId", "data-v-e423952
|
|
|
1321
1321
|
], 2);
|
|
1322
1322
|
};
|
|
1323
1323
|
}
|
|
1324
|
-
}), Tr = /* @__PURE__ */
|
|
1324
|
+
}), Tr = /* @__PURE__ */ Re(pr, [["__scopeId", "data-v-390af84f"]]);
|
|
1325
1325
|
const Or = /* @__PURE__ */ ne({
|
|
1326
1326
|
__name: "MetricsConsumer",
|
|
1327
1327
|
props: {
|
|
@@ -1339,8 +1339,8 @@ const Or = /* @__PURE__ */ ne({
|
|
|
1339
1339
|
hasError: i.hasError,
|
|
1340
1340
|
lookupKey: t.lookupKey,
|
|
1341
1341
|
sumGroupedValues: W
|
|
1342
|
-
}), d = (y) => `${y.toFixed(
|
|
1343
|
-
const y = i.mapped.value, E = V(y, "current", t.lookupKey,
|
|
1342
|
+
}), d = (y) => `${y.toFixed(Ee)}%`, c = R(() => {
|
|
1343
|
+
const y = i.mapped.value, E = V(y, "current", t.lookupKey, Le), C = V(y, "current", t.lookupKey, W), T = E / C * 100 || 0, g = V(y, "previous", t.lookupKey, Le), L = V(y, "previous", t.lookupKey, W), D = g / L * 100 || 0;
|
|
1344
1344
|
return {
|
|
1345
1345
|
hasError: i.hasError.value,
|
|
1346
1346
|
currentValue: T,
|
|
@@ -1371,7 +1371,7 @@ const Or = /* @__PURE__ */ ne({
|
|
|
1371
1371
|
errorRateFormatted: d(c.value.currentValue),
|
|
1372
1372
|
latencyFormatted: s(u.value.currentValue)
|
|
1373
1373
|
}));
|
|
1374
|
-
return (y, E) =>
|
|
1374
|
+
return (y, E) => xe(y.$slots, "default", { cardValues: h.value }, () => [
|
|
1375
1375
|
$(j(Tr), ot(ut(m.value)), null, 16)
|
|
1376
1376
|
]);
|
|
1377
1377
|
}
|