@kong-ui-public/analytics-metric-provider 7.0.5 → 7.1.1
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.
- package/README.md +44 -8
- package/dist/style.css +1 -1
- package/dist/types/components/MetricCardContainer.vue.d.ts +91 -0
- package/dist/types/components/MetricCardContainer.vue.d.ts.map +1 -0
- package/dist/types/components/MetricsConsumer.vue.d.ts +3 -4
- package/dist/types/components/MetricsConsumer.vue.d.ts.map +1 -1
- package/dist/types/components/MetricsProvider.vue.d.ts +2 -2
- package/dist/types/components/MetricsTestHarness.vue.d.ts +2 -2
- package/dist/types/components/MetricsTestHarness.vue.d.ts.map +1 -1
- package/dist/types/components/display/MetricCardLoadingSkeleton.vue.d.ts +3 -0
- package/dist/types/components/display/MetricCardLoadingSkeleton.vue.d.ts.map +1 -0
- package/dist/types/components/display/MetricsCard.vue.d.ts +511 -0
- package/dist/types/components/display/MetricsCard.vue.d.ts.map +1 -0
- package/dist/types/composables/useMetricCardBuilder.d.ts +2 -1
- package/dist/types/composables/useMetricCardBuilder.d.ts.map +1 -1
- package/dist/types/enums/index.d.ts +3 -0
- package/dist/types/enums/index.d.ts.map +1 -0
- package/dist/types/enums/metric-card-size.enum.d.ts +7 -0
- package/dist/types/enums/metric-card-size.enum.d.ts.map +1 -0
- package/dist/types/enums/metric-card-type.enum.d.ts +7 -0
- package/dist/types/enums/metric-card-type.enum.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/metric-card.d.ts +36 -0
- package/dist/types/types/metric-card.d.ts.map +1 -0
- package/dist/types/utilities/index.d.ts +2 -0
- package/dist/types/utilities/index.d.ts.map +1 -0
- package/dist/types/utilities/trend-display.d.ts +24 -0
- package/dist/types/utilities/trend-display.d.ts.map +1 -0
- package/dist/vitals-metric-provider.es.js +736 -732
- package/dist/vitals-metric-provider.umd.js +1 -1
- package/package.json +9 -7
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { TimePeriods as ie, TimeframeKeys as ne, queryableExploreDimensions as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { useAnalyticsConfigStore as
|
|
5
|
-
const
|
|
1
|
+
import { ref as re, watchEffect as $e, computed as g, getCurrentInstance as Be, reactive as Ue, onMounted as Ke, onUnmounted as Pe, watch as Ge, isReadonly as Ze, toRefs as Xe, defineComponent as k, inject as ke, toRef as J, provide as je, renderSlot as Le, openBlock as p, createBlock as I, resolveDynamicComponent as L, normalizeStyle as q, withCtx as A, createElementBlock as y, toDisplayString as w, createCommentVNode as N, pushScopeId as z, popScopeId as D, createElementVNode as x, resolveComponent as Ae, normalizeClass as Y, unref as R, createTextVNode as qe, createVNode as X, Fragment as _e, renderList as Ye, mergeProps as Qe, normalizeProps as We, guardReactiveProps as Je } from "vue";
|
|
2
|
+
import { TimePeriods as ie, TimeframeKeys as ne, queryableExploreDimensions as et, DeltaQueryTime as tt, UnaryQueryTime as rt } from "@kong-ui-public/analytics-utilities";
|
|
3
|
+
import { createI18n as it, i18nTComponent as nt } from "@kong-ui-public/i18n";
|
|
4
|
+
import { useAnalyticsConfigStore as at } from "@kong-ui-public/analytics-config-store";
|
|
5
|
+
const ot = {
|
|
6
6
|
notAvailable: "N/A"
|
|
7
|
-
},
|
|
7
|
+
}, st = {
|
|
8
8
|
short: {
|
|
9
9
|
traffic: "Requests",
|
|
10
10
|
errorRate: "Error Rate",
|
|
@@ -17,7 +17,7 @@ const or = {
|
|
|
17
17
|
averageLatency: "Average Latency",
|
|
18
18
|
p99Latency: "P99 Latency"
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, lt = {
|
|
21
21
|
custom: "vs previous {numDays, plural, =1 {day} other {# days}}",
|
|
22
22
|
"15m": "vs previous 15 minutes",
|
|
23
23
|
"1h": "vs previous hour",
|
|
@@ -32,287 +32,287 @@ const or = {
|
|
|
32
32
|
previous_week: "vs previous time period",
|
|
33
33
|
previous_month: "vs previous time period",
|
|
34
34
|
previous_quarter: "vs previous quarter"
|
|
35
|
-
},
|
|
36
|
-
general:
|
|
37
|
-
metricCard:
|
|
38
|
-
trendRange:
|
|
35
|
+
}, ut = {
|
|
36
|
+
general: ot,
|
|
37
|
+
metricCard: st,
|
|
38
|
+
trendRange: lt
|
|
39
39
|
};
|
|
40
|
-
function
|
|
41
|
-
const e =
|
|
40
|
+
function dt() {
|
|
41
|
+
const e = it("en-us", ut);
|
|
42
42
|
return {
|
|
43
43
|
i18n: e,
|
|
44
|
-
i18nT:
|
|
44
|
+
i18nT: nt(e)
|
|
45
45
|
// Translation component <i18n-t>
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
var
|
|
50
|
-
const
|
|
51
|
-
var
|
|
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 ze = /* @__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))(ze || {});
|
|
50
|
+
const pt = (e) => {
|
|
51
|
+
var t, r, a, n, i;
|
|
52
52
|
return e ? !!// TODO: revisit: currently only the first check ever matters?
|
|
53
|
-
((
|
|
53
|
+
((t = Object.keys(e)) != null && t.length || (r = e.data) != null && r.length || (n = (a = e.data) == null ? void 0 : a.data) != null && n.length || !((i = e.data) != null && i.data) && typeof e.data == "object" && Object.keys(e == null ? void 0 : e.data).length) : !1;
|
|
54
54
|
};
|
|
55
|
-
function
|
|
56
|
-
const n =
|
|
55
|
+
function gt(e = re({}), t, r, a = pt) {
|
|
56
|
+
const n = re(
|
|
57
57
|
"PENDING"
|
|
58
58
|
/* PENDING */
|
|
59
59
|
);
|
|
60
|
-
return
|
|
60
|
+
return $e(() => {
|
|
61
61
|
const i = a(e.value);
|
|
62
|
-
if (e.value && i &&
|
|
62
|
+
if (e.value && i && r.value) {
|
|
63
63
|
n.value = "VALIDATING_HAS_DATA";
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
if (e.value &&
|
|
66
|
+
if (e.value && r.value) {
|
|
67
67
|
n.value = "VALIDATING";
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
|
-
if (e.value &&
|
|
70
|
+
if (e.value && t.value) {
|
|
71
71
|
n.value = "STALE_IF_ERROR";
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
74
|
-
if (e.value === void 0 && !
|
|
74
|
+
if (e.value === void 0 && !t.value) {
|
|
75
75
|
n.value = "PENDING";
|
|
76
76
|
return;
|
|
77
77
|
}
|
|
78
|
-
if (e.value && !
|
|
78
|
+
if (e.value && !t.value && i) {
|
|
79
79
|
n.value = "SUCCESS_HAS_DATA";
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
if (e.value && !
|
|
82
|
+
if (e.value && !t.value) {
|
|
83
83
|
n.value = "SUCCESS";
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
e.value === void 0 &&
|
|
86
|
+
e.value === void 0 && t && (n.value = "ERROR");
|
|
87
87
|
}), {
|
|
88
88
|
state: n,
|
|
89
|
-
swrvState:
|
|
89
|
+
swrvState: ze
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
const
|
|
93
|
-
e[
|
|
92
|
+
const $ = Symbol("default"), de = "status_code_grouped", Re = (e, t, r, a, n) => {
|
|
93
|
+
e[t][r] || (e[t][r] = {}), e[t][r][a] = n;
|
|
94
94
|
};
|
|
95
|
-
function
|
|
96
|
-
var
|
|
97
|
-
const
|
|
95
|
+
function yt(e, t) {
|
|
96
|
+
var f;
|
|
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: { [
|
|
101
|
-
}) : e.data.reduce((
|
|
102
|
-
const s = o.event[
|
|
103
|
-
return new Date(o.timestamp).getTime() === a &&
|
|
99
|
+
previous: { [$]: { [$]: 0 } },
|
|
100
|
+
current: { [$]: { [$]: 0 } }
|
|
101
|
+
}) : e.data.reduce((c, o) => {
|
|
102
|
+
const s = o.event[r], u = l ? o.event[l] : $, d = i ? o.event[de] : $;
|
|
103
|
+
return new Date(o.timestamp).getTime() === a && t ? Re(c, "previous", u, d, s) : Re(c, "current", u, d, s), c;
|
|
104
104
|
}, {
|
|
105
105
|
previous: {},
|
|
106
106
|
current: {}
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function mt(e) {
|
|
110
110
|
e.queryReady === void 0 && (e.queryReady = g(() => !0));
|
|
111
|
-
const { i18n:
|
|
112
|
-
var
|
|
111
|
+
const { i18n: t } = K.useI18n(), r = g(() => {
|
|
112
|
+
var u, d;
|
|
113
113
|
return {
|
|
114
114
|
metrics: e.metrics.value,
|
|
115
115
|
dimensions: [
|
|
116
|
-
...(
|
|
116
|
+
...(u = e.dimensions) != null && u.length ? [...e.dimensions] : [],
|
|
117
117
|
...e.withTrend.value ? ["time"] : []
|
|
118
118
|
],
|
|
119
119
|
granularity: e.withTrend.value ? "trend" : void 0,
|
|
120
|
-
...(
|
|
120
|
+
...(d = e.filter.value) != null && d.length ? { filters: e.filter.value } : {},
|
|
121
121
|
time_range: e.timeframe.value.v4Query(e.tz.value)
|
|
122
122
|
};
|
|
123
123
|
}), a = g(() => {
|
|
124
|
-
var
|
|
125
|
-
if (!((
|
|
124
|
+
var d, v, C, m;
|
|
125
|
+
if (!((d = e.queryReady) != null && d.value))
|
|
126
126
|
return null;
|
|
127
|
-
const
|
|
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("-")}-${
|
|
129
|
-
}), { response: n, error: i, isValidating:
|
|
127
|
+
const u = (v = e.filter) != null && v.value ? JSON.stringify(e.filter.value) : "";
|
|
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 } = K.useRequest(
|
|
130
130
|
() => a.value,
|
|
131
|
-
() => e.queryFn(
|
|
131
|
+
() => e.queryFn(r.value, e.abortController ?? new AbortController()),
|
|
132
132
|
{
|
|
133
133
|
refreshInterval: e.refreshInterval,
|
|
134
134
|
revalidateOnFocus: !1,
|
|
135
|
-
errorRetryCount:
|
|
135
|
+
errorRetryCount: ct
|
|
136
136
|
}
|
|
137
|
-
), { state:
|
|
138
|
-
var
|
|
139
|
-
return !((
|
|
137
|
+
), { state: f, swrvState: c } = gt(n, i, l), o = g(() => {
|
|
138
|
+
var u, d, v, C, m, S, T;
|
|
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) || !((T = (S = (m = n.value) == null ? void 0 : m.meta) == null ? void 0 : S.metric_names) != null && T.length) ? { current: {}, previous: {} } : yt(n.value, e.withTrend.value);
|
|
140
140
|
}), s = g(() => {
|
|
141
|
-
var
|
|
141
|
+
var u, d, v;
|
|
142
142
|
if (e.timeframe.value.key === "custom") {
|
|
143
|
-
if (!((
|
|
143
|
+
if (!((d = (u = n.value) == null ? void 0 : u.meta) != null && d.start_ms))
|
|
144
144
|
return "";
|
|
145
145
|
const { start_ms: C, end_ms: m } = n.value.meta;
|
|
146
|
-
let
|
|
147
|
-
return e.withTrend.value && (
|
|
146
|
+
let S = (m - C) / (1e3 * 60 * 60 * 24);
|
|
147
|
+
return e.withTrend.value && (S /= 2), t.t("trendRange.custom", { numDays: Math.round(S) });
|
|
148
148
|
} else
|
|
149
|
-
return e.withTrend.value ?
|
|
149
|
+
return e.withTrend.value ? t.t(`trendRange.${e.timeframe.value.key}`) : t.t(`trendRange.${(v = ie.get(ne.ONE_DAY)) == null ? void 0 : v.key}`);
|
|
150
150
|
});
|
|
151
151
|
return {
|
|
152
|
-
isLoading: g(() =>
|
|
153
|
-
hasError: g(() =>
|
|
152
|
+
isLoading: g(() => c.PENDING === f.value),
|
|
153
|
+
hasError: g(() => c.ERROR === f.value),
|
|
154
154
|
raw: n,
|
|
155
155
|
mapped: o,
|
|
156
156
|
trendRange: s
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
return
|
|
159
|
+
const Z = (e, t, r = $, a) => (a ?? [$]).reduce((i, l) => {
|
|
160
|
+
const f = e[t][r];
|
|
161
|
+
return f ? i + (f[l] || 0) : i;
|
|
162
162
|
}, 0);
|
|
163
|
-
function
|
|
163
|
+
function ht(e) {
|
|
164
164
|
const {
|
|
165
|
-
cardType:
|
|
166
|
-
title:
|
|
165
|
+
cardType: t,
|
|
166
|
+
title: r,
|
|
167
167
|
description: a,
|
|
168
168
|
record: n,
|
|
169
169
|
hasError: i,
|
|
170
|
-
increaseIsBad:
|
|
171
|
-
formatValueFn:
|
|
172
|
-
trendRange:
|
|
170
|
+
increaseIsBad: l,
|
|
171
|
+
formatValueFn: f,
|
|
172
|
+
trendRange: c
|
|
173
173
|
} = e;
|
|
174
174
|
return g(() => {
|
|
175
175
|
let o = 0, s = 0;
|
|
176
176
|
if (n != null && n.value)
|
|
177
177
|
try {
|
|
178
|
-
o =
|
|
179
|
-
} catch (
|
|
178
|
+
o = Z(n.value, "current", e.lookupKey, e.sumGroupedValues), s = Z(n.value, "previous", e.lookupKey, e.sumGroupedValues);
|
|
179
|
+
} catch (u) {
|
|
180
180
|
console.error(
|
|
181
181
|
"Metric card data doesn't have the expected structure:",
|
|
182
|
-
|
|
182
|
+
u
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
return {
|
|
186
|
-
cardType:
|
|
186
|
+
cardType: t,
|
|
187
187
|
hasError: i.value,
|
|
188
188
|
currentValue: o,
|
|
189
189
|
previousValue: s,
|
|
190
|
-
title:
|
|
190
|
+
title: r.value,
|
|
191
191
|
description: a,
|
|
192
|
-
increaseIsBad: !!
|
|
192
|
+
increaseIsBad: !!l,
|
|
193
193
|
// Coerce undefined to false
|
|
194
|
-
formatValueFn:
|
|
195
|
-
trendRange:
|
|
194
|
+
formatValueFn: f,
|
|
195
|
+
trendRange: c == null ? void 0 : c.value
|
|
196
196
|
};
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
var ce = /* @__PURE__ */ new WeakMap(),
|
|
200
|
-
function
|
|
199
|
+
var ce = /* @__PURE__ */ new WeakMap(), Ne = 0;
|
|
200
|
+
function Ct(e) {
|
|
201
201
|
if (!e.length)
|
|
202
202
|
return "";
|
|
203
|
-
for (var
|
|
203
|
+
for (var t = "arg", r = 0; r < e.length; ++r) {
|
|
204
204
|
var a = void 0;
|
|
205
|
-
e[
|
|
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 = Ne, ce.set(e[r], Ne++)), t += "@" + a;
|
|
206
206
|
}
|
|
207
|
-
return
|
|
207
|
+
return t;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function St(e) {
|
|
210
210
|
if (typeof e == "function")
|
|
211
211
|
try {
|
|
212
212
|
e = e();
|
|
213
213
|
} catch {
|
|
214
214
|
e = "";
|
|
215
215
|
}
|
|
216
|
-
return Array.isArray(e) ? e =
|
|
216
|
+
return Array.isArray(e) ? e = Ct(e) : e = String(e || ""), e;
|
|
217
217
|
}
|
|
218
218
|
var ge = (
|
|
219
219
|
/** @class */
|
|
220
220
|
function() {
|
|
221
|
-
function e(
|
|
222
|
-
|
|
221
|
+
function e(t) {
|
|
222
|
+
t === void 0 && (t = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = t;
|
|
223
223
|
}
|
|
224
|
-
return e.prototype.serializeKey = function(
|
|
225
|
-
return
|
|
226
|
-
}, e.prototype.get = function(
|
|
227
|
-
var
|
|
228
|
-
return this.items.get(
|
|
229
|
-
}, e.prototype.set = function(
|
|
230
|
-
var n = this.serializeKey(
|
|
231
|
-
data:
|
|
232
|
-
createdAt:
|
|
233
|
-
expiresAt: i ?
|
|
224
|
+
return e.prototype.serializeKey = function(t) {
|
|
225
|
+
return St(t);
|
|
226
|
+
}, e.prototype.get = function(t) {
|
|
227
|
+
var r = this.serializeKey(t);
|
|
228
|
+
return this.items.get(r);
|
|
229
|
+
}, e.prototype.set = function(t, r, a) {
|
|
230
|
+
var n = this.serializeKey(t), i = a || this.ttl, l = Date.now(), f = {
|
|
231
|
+
data: r,
|
|
232
|
+
createdAt: l,
|
|
233
|
+
expiresAt: i ? l + i : 1 / 0
|
|
234
234
|
};
|
|
235
|
-
this.dispatchExpire(i,
|
|
236
|
-
}, e.prototype.dispatchExpire = function(
|
|
235
|
+
this.dispatchExpire(i, f, n), this.items.set(n, f);
|
|
236
|
+
}, e.prototype.dispatchExpire = function(t, r, a) {
|
|
237
237
|
var n = this;
|
|
238
|
-
|
|
239
|
-
var i = Date.now(),
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
}, e.prototype.delete = function(
|
|
243
|
-
this.items.delete(
|
|
238
|
+
t && setTimeout(function() {
|
|
239
|
+
var i = Date.now(), l = i >= r.expiresAt;
|
|
240
|
+
l && n.delete(a);
|
|
241
|
+
}, t);
|
|
242
|
+
}, e.prototype.delete = function(t) {
|
|
243
|
+
this.items.delete(t);
|
|
244
244
|
}, e;
|
|
245
245
|
}()
|
|
246
246
|
);
|
|
247
|
-
function
|
|
247
|
+
function bt() {
|
|
248
248
|
return typeof navigator.onLine < "u" ? navigator.onLine : !0;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function _t() {
|
|
251
251
|
return typeof document < "u" && typeof document.visibilityState < "u" ? document.visibilityState !== "hidden" : !0;
|
|
252
252
|
}
|
|
253
|
-
var
|
|
254
|
-
return fetch(e).then(function(
|
|
255
|
-
return
|
|
253
|
+
var wt = function(e) {
|
|
254
|
+
return fetch(e).then(function(t) {
|
|
255
|
+
return t.json();
|
|
256
256
|
});
|
|
257
257
|
};
|
|
258
258
|
const fe = {
|
|
259
|
-
isOnline:
|
|
260
|
-
isDocumentVisible:
|
|
261
|
-
fetcher:
|
|
259
|
+
isOnline: bt,
|
|
260
|
+
isDocumentVisible: _t,
|
|
261
|
+
fetcher: wt
|
|
262
262
|
};
|
|
263
|
-
var
|
|
264
|
-
return
|
|
265
|
-
for (var
|
|
266
|
-
|
|
267
|
-
for (var n in
|
|
268
|
-
Object.prototype.hasOwnProperty.call(
|
|
263
|
+
var O = function() {
|
|
264
|
+
return O = Object.assign || function(e) {
|
|
265
|
+
for (var t, r = 1, a = arguments.length; r < a; r++) {
|
|
266
|
+
t = arguments[r];
|
|
267
|
+
for (var n in t)
|
|
268
|
+
Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
269
269
|
}
|
|
270
270
|
return e;
|
|
271
|
-
},
|
|
272
|
-
},
|
|
271
|
+
}, O.apply(this, arguments);
|
|
272
|
+
}, P = function(e, t, r, a) {
|
|
273
273
|
function n(i) {
|
|
274
|
-
return i instanceof
|
|
275
|
-
|
|
274
|
+
return i instanceof r ? i : new r(function(l) {
|
|
275
|
+
l(i);
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
|
-
return new (
|
|
279
|
-
function
|
|
278
|
+
return new (r || (r = Promise))(function(i, l) {
|
|
279
|
+
function f(s) {
|
|
280
280
|
try {
|
|
281
281
|
o(a.next(s));
|
|
282
|
-
} catch (
|
|
283
|
-
u
|
|
282
|
+
} catch (u) {
|
|
283
|
+
l(u);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function c(s) {
|
|
287
287
|
try {
|
|
288
288
|
o(a.throw(s));
|
|
289
|
-
} catch (
|
|
290
|
-
u
|
|
289
|
+
} catch (u) {
|
|
290
|
+
l(u);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
function o(s) {
|
|
294
|
-
s.done ? i(s.value) : n(s.value).then(
|
|
294
|
+
s.done ? i(s.value) : n(s.value).then(f, c);
|
|
295
295
|
}
|
|
296
|
-
o((a = a.apply(e,
|
|
296
|
+
o((a = a.apply(e, t || [])).next());
|
|
297
297
|
});
|
|
298
|
-
},
|
|
299
|
-
var
|
|
298
|
+
}, G = function(e, t) {
|
|
299
|
+
var r = { label: 0, sent: function() {
|
|
300
300
|
if (i[0] & 1)
|
|
301
301
|
throw i[1];
|
|
302
302
|
return i[1];
|
|
303
|
-
}, trys: [], ops: [] }, a, n, i,
|
|
304
|
-
return
|
|
303
|
+
}, trys: [], ops: [] }, a, n, i, l;
|
|
304
|
+
return l = { next: f(0), throw: f(1), return: f(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
|
|
305
305
|
return this;
|
|
306
|
-
}),
|
|
307
|
-
function
|
|
306
|
+
}), l;
|
|
307
|
+
function f(o) {
|
|
308
308
|
return function(s) {
|
|
309
|
-
return
|
|
309
|
+
return c([o, s]);
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function c(o) {
|
|
313
313
|
if (a)
|
|
314
314
|
throw new TypeError("Generator is already executing.");
|
|
315
|
-
for (;
|
|
315
|
+
for (; r; )
|
|
316
316
|
try {
|
|
317
317
|
if (a = 1, n && (i = o[0] & 2 ? n.return : o[0] ? n.throw || ((i = n.return) && i.call(n), 0) : n.next) && !(i = i.call(n, o[1])).done)
|
|
318
318
|
return i;
|
|
@@ -322,34 +322,34 @@ var F = function() {
|
|
|
322
322
|
i = o;
|
|
323
323
|
break;
|
|
324
324
|
case 4:
|
|
325
|
-
return
|
|
325
|
+
return r.label++, { value: o[1], done: !1 };
|
|
326
326
|
case 5:
|
|
327
|
-
|
|
327
|
+
r.label++, n = o[1], o = [0];
|
|
328
328
|
continue;
|
|
329
329
|
case 7:
|
|
330
|
-
o =
|
|
330
|
+
o = r.ops.pop(), r.trys.pop();
|
|
331
331
|
continue;
|
|
332
332
|
default:
|
|
333
|
-
if (i =
|
|
334
|
-
|
|
333
|
+
if (i = r.trys, !(i = i.length > 0 && i[i.length - 1]) && (o[0] === 6 || o[0] === 2)) {
|
|
334
|
+
r = 0;
|
|
335
335
|
continue;
|
|
336
336
|
}
|
|
337
337
|
if (o[0] === 3 && (!i || o[1] > i[0] && o[1] < i[3])) {
|
|
338
|
-
|
|
338
|
+
r.label = o[1];
|
|
339
339
|
break;
|
|
340
340
|
}
|
|
341
|
-
if (o[0] === 6 &&
|
|
342
|
-
|
|
341
|
+
if (o[0] === 6 && r.label < i[1]) {
|
|
342
|
+
r.label = i[1], i = o;
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
|
-
if (i &&
|
|
346
|
-
|
|
345
|
+
if (i && r.label < i[2]) {
|
|
346
|
+
r.label = i[2], r.ops.push(o);
|
|
347
347
|
break;
|
|
348
348
|
}
|
|
349
|
-
i[2] &&
|
|
349
|
+
i[2] && r.ops.pop(), r.trys.pop();
|
|
350
350
|
continue;
|
|
351
351
|
}
|
|
352
|
-
o =
|
|
352
|
+
o = t.call(e, r);
|
|
353
353
|
} catch (s) {
|
|
354
354
|
o = [6, s], n = 0;
|
|
355
355
|
} finally {
|
|
@@ -359,32 +359,32 @@ var F = function() {
|
|
|
359
359
|
throw o[1];
|
|
360
360
|
return { value: o[0] ? o[1] : void 0, done: !0 };
|
|
361
361
|
}
|
|
362
|
-
},
|
|
363
|
-
var
|
|
364
|
-
if (!
|
|
362
|
+
}, Rt = function(e, t) {
|
|
363
|
+
var r = typeof Symbol == "function" && e[Symbol.iterator];
|
|
364
|
+
if (!r)
|
|
365
365
|
return e;
|
|
366
|
-
var a =
|
|
366
|
+
var a = r.call(e), n, i = [], l;
|
|
367
367
|
try {
|
|
368
|
-
for (; (
|
|
368
|
+
for (; (t === void 0 || t-- > 0) && !(n = a.next()).done; )
|
|
369
369
|
i.push(n.value);
|
|
370
|
-
} catch (
|
|
371
|
-
|
|
370
|
+
} catch (f) {
|
|
371
|
+
l = { error: f };
|
|
372
372
|
} finally {
|
|
373
373
|
try {
|
|
374
|
-
n && !n.done && (
|
|
374
|
+
n && !n.done && (r = a.return) && r.call(a);
|
|
375
375
|
} finally {
|
|
376
|
-
if (
|
|
377
|
-
throw
|
|
376
|
+
if (l)
|
|
377
|
+
throw l.error;
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
return i;
|
|
381
|
-
},
|
|
382
|
-
if (
|
|
383
|
-
for (var a = 0, n =
|
|
384
|
-
(i || !(a in
|
|
385
|
-
return e.concat(i || Array.prototype.slice.call(
|
|
386
|
-
},
|
|
387
|
-
cache:
|
|
381
|
+
}, Nt = function(e, t, r) {
|
|
382
|
+
if (r || arguments.length === 2)
|
|
383
|
+
for (var a = 0, n = t.length, i; a < n; a++)
|
|
384
|
+
(i || !(a in t)) && (i || (i = Array.prototype.slice.call(t, 0, a)), i[a] = t[a]);
|
|
385
|
+
return e.concat(i || Array.prototype.slice.call(t));
|
|
386
|
+
}, De = new ge(), ae = new ge(), ve = new ge(), Ve = {
|
|
387
|
+
cache: De,
|
|
388
388
|
refreshInterval: 0,
|
|
389
389
|
ttl: 0,
|
|
390
390
|
serverTTL: 1e3,
|
|
@@ -398,118 +398,118 @@ var F = function() {
|
|
|
398
398
|
isOnline: fe.isOnline,
|
|
399
399
|
isDocumentVisible: fe.isDocumentVisible
|
|
400
400
|
};
|
|
401
|
-
function
|
|
401
|
+
function Tt(e, t, r) {
|
|
402
402
|
var a = ae.get(e);
|
|
403
403
|
if (a)
|
|
404
|
-
a.data.push(
|
|
404
|
+
a.data.push(t);
|
|
405
405
|
else {
|
|
406
406
|
var n = 5e3;
|
|
407
|
-
ae.set(e, [
|
|
407
|
+
ae.set(e, [t], r > 0 ? r + n : r);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
if (
|
|
412
|
-
var a = Math.min(
|
|
410
|
+
function It(e, t, r) {
|
|
411
|
+
if (r.isDocumentVisible() && !(r.errorRetryCount !== void 0 && t > r.errorRetryCount)) {
|
|
412
|
+
var a = Math.min(t || 0, r.errorRetryCount), n = a * r.errorRetryInterval;
|
|
413
413
|
setTimeout(function() {
|
|
414
414
|
e(null, { errorRetryCount: a + 1, shouldRetryOnError: !0 });
|
|
415
415
|
}, n);
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var
|
|
419
|
-
return
|
|
420
|
-
var n, i,
|
|
421
|
-
return
|
|
422
|
-
switch (
|
|
418
|
+
var Te = function(e, t, r, a) {
|
|
419
|
+
return r === void 0 && (r = De), a === void 0 && (a = Ve.ttl), P(void 0, void 0, void 0, function() {
|
|
420
|
+
var n, i, l, f, c, o, s;
|
|
421
|
+
return G(this, function(u) {
|
|
422
|
+
switch (u.label) {
|
|
423
423
|
case 0:
|
|
424
|
-
if (!
|
|
424
|
+
if (!xt(t))
|
|
425
425
|
return [3, 5];
|
|
426
|
-
|
|
426
|
+
u.label = 1;
|
|
427
427
|
case 1:
|
|
428
|
-
return
|
|
428
|
+
return u.trys.push([1, 3, , 4]), [4, t];
|
|
429
429
|
case 2:
|
|
430
|
-
return n =
|
|
430
|
+
return n = u.sent(), [3, 4];
|
|
431
431
|
case 3:
|
|
432
|
-
return
|
|
432
|
+
return f = u.sent(), i = f, [3, 4];
|
|
433
433
|
case 4:
|
|
434
434
|
return [3, 6];
|
|
435
435
|
case 5:
|
|
436
|
-
n =
|
|
436
|
+
n = t, u.label = 6;
|
|
437
437
|
case 6:
|
|
438
|
-
if (
|
|
438
|
+
if (l = !1, c = { data: n, error: i, isValidating: l }, typeof n < "u")
|
|
439
439
|
try {
|
|
440
|
-
|
|
441
|
-
} catch (
|
|
442
|
-
console.error("swrv(mutate): failed to set cache",
|
|
440
|
+
r.set(e, c, a);
|
|
441
|
+
} catch (d) {
|
|
442
|
+
console.error("swrv(mutate): failed to set cache", d);
|
|
443
443
|
}
|
|
444
|
-
return o = ae.get(e), o && o.data.length && (s = o.data.filter(function(
|
|
445
|
-
return
|
|
446
|
-
}), s.forEach(function(
|
|
447
|
-
typeof
|
|
448
|
-
var C =
|
|
449
|
-
C || delete s[
|
|
450
|
-
}), s = s.filter(Boolean)), [2,
|
|
444
|
+
return o = ae.get(e), o && o.data.length && (s = o.data.filter(function(d) {
|
|
445
|
+
return d.key === e;
|
|
446
|
+
}), s.forEach(function(d, v) {
|
|
447
|
+
typeof c.data < "u" && (d.data = c.data), d.error = c.error, d.isValidating = c.isValidating;
|
|
448
|
+
var C = v === s.length - 1;
|
|
449
|
+
C || delete s[v];
|
|
450
|
+
}), s = s.filter(Boolean)), [2, c];
|
|
451
451
|
}
|
|
452
452
|
});
|
|
453
453
|
});
|
|
454
454
|
};
|
|
455
|
-
function
|
|
456
|
-
for (var e = this,
|
|
457
|
-
r
|
|
458
|
-
var a, n, i =
|
|
455
|
+
function Et() {
|
|
456
|
+
for (var e = this, t = [], r = 0; r < arguments.length; r++)
|
|
457
|
+
t[r] = arguments[r];
|
|
458
|
+
var a, n, i = O({}, Ve), 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
|
-
|
|
463
|
-
var
|
|
462
|
+
t.length >= 1 && (a = t[0]), t.length >= 2 && (n = t[1]), t.length > 2 && (i = O(O({}, i), t[2]));
|
|
463
|
+
var u = s ? i.serverTTL : i.ttl, d = typeof a == "function" ? a : re(a);
|
|
464
464
|
typeof n > "u" && (n = i.fetcher);
|
|
465
|
-
var
|
|
466
|
-
|
|
465
|
+
var v = null;
|
|
466
|
+
v || (v = Ue({
|
|
467
467
|
data: void 0,
|
|
468
468
|
error: void 0,
|
|
469
469
|
isValidating: !0,
|
|
470
470
|
key: null
|
|
471
471
|
}));
|
|
472
|
-
var C = function(
|
|
473
|
-
return
|
|
474
|
-
var H,
|
|
475
|
-
return
|
|
476
|
-
switch (
|
|
472
|
+
var C = function(b, h) {
|
|
473
|
+
return P(e, void 0, void 0, function() {
|
|
474
|
+
var H, E, B, j, oe, he, se, Ce = this;
|
|
475
|
+
return G(this, function(le) {
|
|
476
|
+
switch (le.label) {
|
|
477
477
|
case 0:
|
|
478
|
-
return H =
|
|
478
|
+
return H = 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 = b || n, !oe || !i.isDocumentVisible() && !H || (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, [
|
|
482
482
|
2
|
|
483
483
|
/*return*/
|
|
484
484
|
]) : (se = function() {
|
|
485
|
-
return
|
|
486
|
-
var
|
|
487
|
-
return
|
|
485
|
+
return P(Ce, void 0, void 0, function() {
|
|
486
|
+
var U, Se, ue, be;
|
|
487
|
+
return G(this, function(W) {
|
|
488
488
|
switch (W.label) {
|
|
489
489
|
case 0:
|
|
490
|
-
return
|
|
490
|
+
return U = ve.get(E), U ? [3, 2] : (Se = Array.isArray(E) ? E : [E], ue = oe.apply(void 0, Nt([], Rt(Se), !1)), ve.set(E, ue, i.dedupingInterval), [4, Te(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, Te(E, U.data, i.cache, u)];
|
|
495
495
|
case 3:
|
|
496
496
|
W.sent(), W.label = 4;
|
|
497
497
|
case 4:
|
|
498
|
-
return
|
|
498
|
+
return v.isValidating = !1, ve.delete(E), v.error !== void 0 && (be = !l && i.shouldRetryOnError && (h ? h.shouldRetryOnError : !0), be && It(C, h ? h.errorRetryCount : 1, i)), [
|
|
499
499
|
2
|
|
500
500
|
/*return*/
|
|
501
501
|
];
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
});
|
|
505
|
-
},
|
|
506
|
-
return
|
|
507
|
-
return
|
|
508
|
-
switch (
|
|
505
|
+
}, j && i.revalidateDebounce ? (setTimeout(function() {
|
|
506
|
+
return P(Ce, void 0, void 0, function() {
|
|
507
|
+
return G(this, function(U) {
|
|
508
|
+
switch (U.label) {
|
|
509
509
|
case 0:
|
|
510
|
-
return
|
|
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
|
|
@@ -525,7 +525,7 @@ function Ir() {
|
|
|
525
525
|
case 1:
|
|
526
526
|
return [4, se()];
|
|
527
527
|
case 2:
|
|
528
|
-
|
|
528
|
+
le.sent(), le.label = 3;
|
|
529
529
|
case 3:
|
|
530
530
|
return [
|
|
531
531
|
2
|
|
@@ -535,25 +535,25 @@ function Ir() {
|
|
|
535
535
|
});
|
|
536
536
|
});
|
|
537
537
|
}, m = function() {
|
|
538
|
-
return
|
|
539
|
-
return
|
|
538
|
+
return P(e, void 0, void 0, function() {
|
|
539
|
+
return G(this, function(b) {
|
|
540
540
|
return [2, C(null, { shouldRetryOnError: !1 })];
|
|
541
541
|
});
|
|
542
542
|
});
|
|
543
|
-
},
|
|
543
|
+
}, S = null;
|
|
544
544
|
Ke(function() {
|
|
545
|
-
var
|
|
546
|
-
return
|
|
547
|
-
return
|
|
545
|
+
var b = function() {
|
|
546
|
+
return P(e, void 0, void 0, function() {
|
|
547
|
+
return G(this, function(h) {
|
|
548
548
|
switch (h.label) {
|
|
549
549
|
case 0:
|
|
550
|
-
return !
|
|
550
|
+
return !v.error && i.isOnline() ? [4, C()] : [3, 2];
|
|
551
551
|
case 1:
|
|
552
552
|
return h.sent(), [3, 3];
|
|
553
553
|
case 2:
|
|
554
|
-
|
|
554
|
+
S && clearTimeout(S), h.label = 3;
|
|
555
555
|
case 3:
|
|
556
|
-
return i.refreshInterval && !
|
|
556
|
+
return i.refreshInterval && !l && (S = setTimeout(b, i.refreshInterval)), [
|
|
557
557
|
2
|
|
558
558
|
/*return*/
|
|
559
559
|
];
|
|
@@ -561,119 +561,119 @@ function Ir() {
|
|
|
561
561
|
});
|
|
562
562
|
});
|
|
563
563
|
};
|
|
564
|
-
i.refreshInterval && (
|
|
565
|
-
}),
|
|
566
|
-
|
|
567
|
-
var
|
|
568
|
-
|
|
569
|
-
return h !==
|
|
564
|
+
i.refreshInterval && (S = setTimeout(b, i.refreshInterval)), i.revalidateOnFocus && (document.addEventListener("visibilitychange", m, !1), window.addEventListener("focus", m, !1));
|
|
565
|
+
}), Pe(function() {
|
|
566
|
+
l = !0, S && clearTimeout(S), i.revalidateOnFocus && (document.removeEventListener("visibilitychange", m, !1), window.removeEventListener("focus", m, !1));
|
|
567
|
+
var b = ae.get(d.value);
|
|
568
|
+
b && (b.data = b.data.filter(function(h) {
|
|
569
|
+
return h !== v;
|
|
570
570
|
}));
|
|
571
571
|
});
|
|
572
572
|
try {
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
Ge(d, function(b) {
|
|
574
|
+
Ze(d) || (d.value = b), v.key = b, v.isValidating = !!b, Tt(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(
|
|
580
|
+
var T = O(O({}, Xe(v)), { mutate: function(b, h) {
|
|
581
|
+
return C(b, O(O({}, h), { forceRevalidate: !0 }));
|
|
582
582
|
} });
|
|
583
|
-
return
|
|
583
|
+
return T;
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function xt(e) {
|
|
586
586
|
return e !== null && typeof e == "object" && typeof e.then == "function";
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function kt(e, t, r) {
|
|
589
589
|
const {
|
|
590
590
|
data: a,
|
|
591
591
|
error: n,
|
|
592
592
|
isValidating: i,
|
|
593
|
-
mutate:
|
|
594
|
-
} =
|
|
593
|
+
mutate: l
|
|
594
|
+
} = Et(e, t, {
|
|
595
595
|
revalidateDebounce: 500,
|
|
596
596
|
revalidateOnFocus: !1,
|
|
597
597
|
dedupingInterval: 100,
|
|
598
|
-
...
|
|
598
|
+
...r
|
|
599
599
|
});
|
|
600
600
|
return {
|
|
601
601
|
data: g(() => a.value),
|
|
602
602
|
response: a,
|
|
603
603
|
error: n,
|
|
604
604
|
isValidating: i,
|
|
605
|
-
revalidate:
|
|
605
|
+
revalidate: l
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
const K = {
|
|
609
|
-
useI18n:
|
|
610
|
-
useMetricCardBuilder:
|
|
611
|
-
useMetricFetcher:
|
|
612
|
-
useRequest:
|
|
613
|
-
},
|
|
609
|
+
useI18n: dt,
|
|
610
|
+
useMetricCardBuilder: ht,
|
|
611
|
+
useMetricFetcher: mt,
|
|
612
|
+
useRequest: kt
|
|
613
|
+
}, Oe = Symbol("METRICS_PROVIDER_KEY"), Lt = (e) => {
|
|
614
614
|
const {
|
|
615
|
-
dimension:
|
|
616
|
-
dimensionFilterValue:
|
|
615
|
+
dimension: t,
|
|
616
|
+
dimensionFilterValue: r,
|
|
617
617
|
additionalFilter: a,
|
|
618
618
|
queryReady: n,
|
|
619
619
|
timeframe: i,
|
|
620
|
-
tz:
|
|
621
|
-
hasTrendAccess:
|
|
622
|
-
refreshInterval:
|
|
620
|
+
tz: l,
|
|
621
|
+
hasTrendAccess: f,
|
|
622
|
+
refreshInterval: c,
|
|
623
623
|
abortController: o,
|
|
624
624
|
queryFn: s,
|
|
625
|
-
averageLatencies:
|
|
625
|
+
averageLatencies: u
|
|
626
626
|
} = e;
|
|
627
|
-
if (
|
|
627
|
+
if (r && !t)
|
|
628
628
|
throw new Error("Must provide a dimension if filtering by a value");
|
|
629
|
-
const
|
|
629
|
+
const d = !!(t && r), v = !!(t && !r), C = g(() => {
|
|
630
630
|
const h = [];
|
|
631
|
-
return
|
|
632
|
-
dimension:
|
|
631
|
+
return d && h.push({
|
|
632
|
+
dimension: t,
|
|
633
633
|
type: "in",
|
|
634
|
-
values: [
|
|
634
|
+
values: [r]
|
|
635
635
|
}), a.value && h.push(...a.value), h;
|
|
636
636
|
}), m = {
|
|
637
|
-
metrics:
|
|
637
|
+
metrics: re([
|
|
638
638
|
"request_count"
|
|
639
639
|
]),
|
|
640
640
|
// Traffic and error rate cards should only try to query for the dimension if it's going to be used.
|
|
641
641
|
// It isn't used for single entity queries.
|
|
642
642
|
dimensions: [
|
|
643
|
-
...
|
|
643
|
+
...t && !d ? [t] : [],
|
|
644
644
|
"status_code_grouped"
|
|
645
645
|
],
|
|
646
646
|
filter: C,
|
|
647
647
|
queryReady: n,
|
|
648
648
|
timeframe: i,
|
|
649
|
-
tz:
|
|
649
|
+
tz: l,
|
|
650
650
|
// Traffic and error rate cards can't query trend if multiple entities are expected.
|
|
651
|
-
withTrend: g(() =>
|
|
652
|
-
refreshInterval:
|
|
651
|
+
withTrend: g(() => f.value && !v),
|
|
652
|
+
refreshInterval: c,
|
|
653
653
|
queryFn: s,
|
|
654
654
|
abortController: o
|
|
655
|
-
},
|
|
655
|
+
}, S = {
|
|
656
656
|
metrics: g(() => [
|
|
657
|
-
|
|
657
|
+
u.value ? "response_latency_average" : "response_latency_p99"
|
|
658
658
|
]),
|
|
659
659
|
// To keep single-entity queries consistent, don't bother querying the dimension for latency
|
|
660
660
|
// in the single-entity case, even though it's possible.
|
|
661
|
-
...
|
|
661
|
+
...t && !d ? { dimensions: [t] } : {},
|
|
662
662
|
filter: C,
|
|
663
663
|
queryReady: n,
|
|
664
664
|
timeframe: i,
|
|
665
|
-
tz:
|
|
665
|
+
tz: l,
|
|
666
666
|
// Don't query latency trends in the multi-entity case: it's possible, but wasteful.
|
|
667
|
-
withTrend: g(() =>
|
|
668
|
-
refreshInterval:
|
|
667
|
+
withTrend: g(() => f.value && !v),
|
|
668
|
+
refreshInterval: c,
|
|
669
669
|
queryFn: s,
|
|
670
670
|
abortController: o
|
|
671
|
-
},
|
|
671
|
+
}, T = K.useMetricFetcher(m), b = K.useMetricFetcher(S);
|
|
672
672
|
return {
|
|
673
|
-
trafficData:
|
|
674
|
-
latencyData:
|
|
673
|
+
trafficData: T,
|
|
674
|
+
latencyData: b
|
|
675
675
|
};
|
|
676
|
-
},
|
|
676
|
+
}, hi = /* @__PURE__ */ k({
|
|
677
677
|
__name: "MetricsProvider",
|
|
678
678
|
props: {
|
|
679
679
|
maxTimeframe: { default: ne.THIRTY_DAY },
|
|
@@ -683,7 +683,7 @@ const K = {
|
|
|
683
683
|
filterValue: { default: void 0 },
|
|
684
684
|
additionalFilter: { default: void 0 },
|
|
685
685
|
queryReady: { type: Boolean, default: !0 },
|
|
686
|
-
refreshInterval: { default:
|
|
686
|
+
refreshInterval: { default: ft },
|
|
687
687
|
longCardTitles: { type: Boolean, default: !1 },
|
|
688
688
|
containerTitle: { default: void 0 },
|
|
689
689
|
description: { default: void 0 },
|
|
@@ -691,96 +691,96 @@ const K = {
|
|
|
691
691
|
abortController: { default: void 0 }
|
|
692
692
|
},
|
|
693
693
|
setup(e) {
|
|
694
|
-
const
|
|
695
|
-
if (
|
|
696
|
-
throw new Error(`Attempted to use MetricsProvider with an invalid dimension: ${
|
|
697
|
-
const
|
|
694
|
+
const t = e;
|
|
695
|
+
if (t.dimension && et.findIndex((v) => v === t.dimension) === -1)
|
|
696
|
+
throw new Error(`Attempted to use MetricsProvider with an invalid dimension: ${t.dimension}`);
|
|
697
|
+
const r = ke(vt);
|
|
698
698
|
let a, n;
|
|
699
|
-
|
|
700
|
-
const i =
|
|
701
|
-
if (
|
|
702
|
-
return
|
|
703
|
-
const
|
|
704
|
-
if (!
|
|
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
|
+
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(() => {
|
|
701
|
+
if (t.overrideTimeframe)
|
|
702
|
+
return t.overrideTimeframe;
|
|
703
|
+
const v = l.value ? ie.get(t.maxTimeframe) : ie.get(ne.ONE_DAY);
|
|
704
|
+
if (!v)
|
|
705
705
|
throw new Error("Metrics provider failed to resolve fallback timeframe.");
|
|
706
|
-
return
|
|
707
|
-
}), s = g(() =>
|
|
708
|
-
trafficData:
|
|
709
|
-
latencyData:
|
|
710
|
-
} =
|
|
711
|
-
dimension:
|
|
712
|
-
dimensionFilterValue:
|
|
713
|
-
additionalFilter: J(
|
|
714
|
-
queryReady:
|
|
706
|
+
return v;
|
|
707
|
+
}), s = g(() => t.percentileLatency ? !1 : n("MA-2527-analytics-sku-config-endpoint", !1)), {
|
|
708
|
+
trafficData: u,
|
|
709
|
+
latencyData: d
|
|
710
|
+
} = Lt({
|
|
711
|
+
dimension: t.dimension,
|
|
712
|
+
dimensionFilterValue: t.filterValue,
|
|
713
|
+
additionalFilter: J(t, "additionalFilter"),
|
|
714
|
+
queryReady: f,
|
|
715
715
|
timeframe: o,
|
|
716
|
-
tz:
|
|
717
|
-
hasTrendAccess:
|
|
718
|
-
refreshInterval:
|
|
716
|
+
tz: c,
|
|
717
|
+
hasTrendAccess: l,
|
|
718
|
+
refreshInterval: t.refreshInterval,
|
|
719
719
|
queryFn: a,
|
|
720
720
|
averageLatencies: s,
|
|
721
|
-
abortController:
|
|
721
|
+
abortController: t.abortController
|
|
722
722
|
});
|
|
723
|
-
return
|
|
723
|
+
return je(Oe, {
|
|
724
724
|
data: {
|
|
725
|
-
traffic:
|
|
726
|
-
latency:
|
|
725
|
+
traffic: u,
|
|
726
|
+
latency: d
|
|
727
727
|
},
|
|
728
|
-
description: J(() =>
|
|
729
|
-
containerTitle: J(() =>
|
|
730
|
-
hasTrendAccess:
|
|
731
|
-
longCardTitles:
|
|
728
|
+
description: J(() => t.description),
|
|
729
|
+
containerTitle: J(() => t.containerTitle),
|
|
730
|
+
hasTrendAccess: l,
|
|
731
|
+
longCardTitles: t.longCardTitles,
|
|
732
732
|
averageLatencies: s
|
|
733
|
-
}), (
|
|
734
|
-
hasTrendAccess:
|
|
733
|
+
}), (v, C) => Le(v.$slots, "default", {
|
|
734
|
+
hasTrendAccess: l.value,
|
|
735
735
|
timeframe: o.value
|
|
736
736
|
});
|
|
737
737
|
}
|
|
738
738
|
});
|
|
739
|
-
function
|
|
739
|
+
function At(e) {
|
|
740
740
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
741
741
|
}
|
|
742
|
-
var
|
|
742
|
+
var Me = { exports: {} };
|
|
743
743
|
(function(e) {
|
|
744
744
|
(function() {
|
|
745
|
-
function
|
|
745
|
+
function t(o, s) {
|
|
746
746
|
if (s.separator === !1 || o < 1e3)
|
|
747
747
|
return o.toString();
|
|
748
|
-
var
|
|
749
|
-
return
|
|
750
|
-
m && m % 3 === 0 &&
|
|
751
|
-
}),
|
|
748
|
+
var u = typeof s.separator == "string" ? s.separator : ",", d = [], v = Math.round(o).toString().split("");
|
|
749
|
+
return v.reverse().forEach(function(C, m) {
|
|
750
|
+
m && m % 3 === 0 && d.push(u), d.push(C);
|
|
751
|
+
}), d.reverse().join("");
|
|
752
752
|
}
|
|
753
|
-
function
|
|
754
|
-
var
|
|
755
|
-
return
|
|
753
|
+
function r(o, s, u) {
|
|
754
|
+
var d = o / s, v = u.round ? "round" : "floor";
|
|
755
|
+
return u.decimal === !1 ? (o = Math[v](d), o.toString()) : (u.precision ? o = d : o = d < 10 ? Math[v](d * 10) / 10 : Math[v](d), o = o.toString(), typeof u.decimal == "string" && (o = o.replace(".", u.decimal)), o);
|
|
756
756
|
}
|
|
757
|
-
var a = 1e3, n = 1e4, i = 1e6,
|
|
758
|
-
function
|
|
759
|
-
var
|
|
757
|
+
var a = 1e3, n = 1e4, i = 1e6, l = 1e9, f = 1e12;
|
|
758
|
+
function c(o, s) {
|
|
759
|
+
var u;
|
|
760
760
|
s = s || {};
|
|
761
|
-
var
|
|
762
|
-
|
|
763
|
-
var
|
|
764
|
-
return o <
|
|
761
|
+
var d = o < 0;
|
|
762
|
+
d && (o = Math.abs(o)), s.precision && (o = parseFloat(o.toPrecision(s.precision)));
|
|
763
|
+
var v = s.min10k ? n : a;
|
|
764
|
+
return o < v || s.precision && s.precision > Math.log10(o) ? u = t(r(o, 1, s), s) : o < i ? u = r(o, a, s) + "k" : o < l ? u = r(o, i, s) + "m" : o < f ? u = t(r(o, l, s), s) + "b" : u = t(r(o, f, s), s) + "t", d && (u = "-" + u), s.capital && (u = u.toUpperCase()), s.prefix && (u = s.prefix + u), s.suffix && (u = u + s.suffix), u;
|
|
765
765
|
}
|
|
766
|
-
|
|
766
|
+
c.addCommas = t, e.exports = c;
|
|
767
767
|
})();
|
|
768
|
-
})(
|
|
769
|
-
var
|
|
770
|
-
const
|
|
771
|
-
var
|
|
772
|
-
const
|
|
773
|
-
const
|
|
774
|
-
for (const [a, n] of
|
|
775
|
-
|
|
776
|
-
return
|
|
777
|
-
},
|
|
768
|
+
})(Me);
|
|
769
|
+
var qt = Me.exports;
|
|
770
|
+
const zt = /* @__PURE__ */ At(qt);
|
|
771
|
+
var M = /* @__PURE__ */ ((e) => (e.GENERIC_COUNT = "GenericCount", e.TRAFFIC = "Traffic", e.ERROR_RATE = "ErrorRate", e.LATENCY = "Latency", e))(M || {}), F = /* @__PURE__ */ ((e) => (e.Small = "sm", e.Medium = "md", e.Large = "lg", e.ExtraLarge = "xl", e))(F || {});
|
|
772
|
+
const _ = "24px", V = (e, t) => {
|
|
773
|
+
const r = e.__vccOpts || e;
|
|
774
|
+
for (const [a, n] of t)
|
|
775
|
+
r[a] = n;
|
|
776
|
+
return r;
|
|
777
|
+
}, Dt = (e) => (z("data-v-80a84c23"), e = e(), D(), e), Vt = ["aria-hidden"], Ot = {
|
|
778
778
|
key: 0,
|
|
779
779
|
"data-testid": "kui-icon-svg-title"
|
|
780
|
-
},
|
|
780
|
+
}, Mt = /* @__PURE__ */ Dt(() => /* @__PURE__ */ x("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)), Ft = /* @__PURE__ */ k({
|
|
784
784
|
__name: "CloudUploadIcon",
|
|
785
785
|
props: {
|
|
786
786
|
/** The accessibility text provided to screen readers */
|
|
@@ -811,14 +811,14 @@ const w = "24px", M = (e, r) => {
|
|
|
811
811
|
size: {
|
|
812
812
|
type: [Number, String],
|
|
813
813
|
required: !1,
|
|
814
|
-
default:
|
|
814
|
+
default: _,
|
|
815
815
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
816
816
|
validator: (e) => {
|
|
817
817
|
if (typeof e == "number" && e > 0)
|
|
818
818
|
return !0;
|
|
819
819
|
if (typeof e == "string") {
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
820
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
821
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
822
822
|
return !0;
|
|
823
823
|
}
|
|
824
824
|
return !1;
|
|
@@ -832,30 +832,30 @@ const w = "24px", M = (e, r) => {
|
|
|
832
832
|
}
|
|
833
833
|
},
|
|
834
834
|
setup(e) {
|
|
835
|
-
const
|
|
836
|
-
if (typeof
|
|
837
|
-
return `${
|
|
838
|
-
if (typeof
|
|
839
|
-
const n = String(
|
|
835
|
+
const t = e, r = g(() => {
|
|
836
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
837
|
+
return `${t.size}px`;
|
|
838
|
+
if (typeof t.size == "string") {
|
|
839
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
840
840
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
841
841
|
return `${i}px`;
|
|
842
842
|
}
|
|
843
|
-
return
|
|
843
|
+
return _;
|
|
844
844
|
}), a = g(() => ({
|
|
845
845
|
boxSizing: "border-box",
|
|
846
|
-
color:
|
|
847
|
-
display:
|
|
848
|
-
height:
|
|
846
|
+
color: t.color,
|
|
847
|
+
display: t.display,
|
|
848
|
+
height: r.value,
|
|
849
849
|
lineHeight: "0",
|
|
850
|
-
width:
|
|
850
|
+
width: r.value
|
|
851
851
|
}));
|
|
852
|
-
return (n, i) => (p(),
|
|
852
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
866
866
|
width: "100%",
|
|
867
867
|
xmlns: "http://www.w3.org/2000/svg"
|
|
868
868
|
}, [
|
|
869
|
-
e.title ? (p(), y("title",
|
|
870
|
-
|
|
871
|
-
], 8,
|
|
869
|
+
e.title ? (p(), y("title", Ot, w(e.title), 1)) : N("", !0),
|
|
870
|
+
Mt
|
|
871
|
+
], 8, Vt))
|
|
872
872
|
]),
|
|
873
873
|
_: 1
|
|
874
874
|
}, 8, ["aria-hidden", "style"]));
|
|
875
875
|
}
|
|
876
|
-
}),
|
|
876
|
+
}), Ht = /* @__PURE__ */ V(Ft, [["__scopeId", "data-v-80a84c23"]]), $t = (e) => (z("data-v-51fd13af"), e = e(), D(), e), Bt = ["aria-hidden"], Ut = {
|
|
877
877
|
key: 0,
|
|
878
878
|
"data-testid": "kui-icon-svg-title"
|
|
879
|
-
},
|
|
879
|
+
}, Kt = /* @__PURE__ */ $t(() => /* @__PURE__ */ x("path", {
|
|
880
880
|
d: "M4 17V14H20V17H4ZM4 10V7H20V10H4Z",
|
|
881
881
|
fill: "currentColor"
|
|
882
|
-
}, null, -1)),
|
|
882
|
+
}, null, -1)), Pt = /* @__PURE__ */ k({
|
|
883
883
|
__name: "EqualIcon",
|
|
884
884
|
props: {
|
|
885
885
|
/** The accessibility text provided to screen readers */
|
|
@@ -910,14 +910,14 @@ const w = "24px", M = (e, r) => {
|
|
|
910
910
|
size: {
|
|
911
911
|
type: [Number, String],
|
|
912
912
|
required: !1,
|
|
913
|
-
default:
|
|
913
|
+
default: _,
|
|
914
914
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
915
915
|
validator: (e) => {
|
|
916
916
|
if (typeof e == "number" && e > 0)
|
|
917
917
|
return !0;
|
|
918
918
|
if (typeof e == "string") {
|
|
919
|
-
const
|
|
920
|
-
if (
|
|
919
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
920
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
921
921
|
return !0;
|
|
922
922
|
}
|
|
923
923
|
return !1;
|
|
@@ -931,30 +931,30 @@ const w = "24px", M = (e, r) => {
|
|
|
931
931
|
}
|
|
932
932
|
},
|
|
933
933
|
setup(e) {
|
|
934
|
-
const
|
|
935
|
-
if (typeof
|
|
936
|
-
return `${
|
|
937
|
-
if (typeof
|
|
938
|
-
const n = String(
|
|
934
|
+
const t = e, r = g(() => {
|
|
935
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
936
|
+
return `${t.size}px`;
|
|
937
|
+
if (typeof t.size == "string") {
|
|
938
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
939
939
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
940
940
|
return `${i}px`;
|
|
941
941
|
}
|
|
942
|
-
return
|
|
942
|
+
return _;
|
|
943
943
|
}), a = g(() => ({
|
|
944
944
|
boxSizing: "border-box",
|
|
945
|
-
color:
|
|
946
|
-
display:
|
|
947
|
-
height:
|
|
945
|
+
color: t.color,
|
|
946
|
+
display: t.display,
|
|
947
|
+
height: r.value,
|
|
948
948
|
lineHeight: "0",
|
|
949
|
-
width:
|
|
949
|
+
width: r.value
|
|
950
950
|
}));
|
|
951
|
-
return (n, i) => (p(),
|
|
951
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
965
965
|
width: "100%",
|
|
966
966
|
xmlns: "http://www.w3.org/2000/svg"
|
|
967
967
|
}, [
|
|
968
|
-
e.title ? (p(), y("title",
|
|
969
|
-
|
|
970
|
-
], 8,
|
|
968
|
+
e.title ? (p(), y("title", Ut, w(e.title), 1)) : N("", !0),
|
|
969
|
+
Kt
|
|
970
|
+
], 8, Bt))
|
|
971
971
|
]),
|
|
972
972
|
_: 1
|
|
973
973
|
}, 8, ["aria-hidden", "style"]));
|
|
974
974
|
}
|
|
975
|
-
}),
|
|
975
|
+
}), Gt = /* @__PURE__ */ V(Pt, [["__scopeId", "data-v-51fd13af"]]), Zt = (e) => (z("data-v-c5283a2c"), e = e(), D(), e), Xt = ["aria-hidden"], jt = {
|
|
976
976
|
key: 0,
|
|
977
977
|
"data-testid": "kui-icon-svg-title"
|
|
978
|
-
},
|
|
978
|
+
}, Yt = /* @__PURE__ */ Zt(() => /* @__PURE__ */ x("path", {
|
|
979
979
|
d: "M5 11V9H15V11H5Z",
|
|
980
980
|
fill: "currentColor"
|
|
981
|
-
}, null, -1)),
|
|
981
|
+
}, null, -1)), Qt = /* @__PURE__ */ k({
|
|
982
982
|
__name: "IndeterminateSmallIcon",
|
|
983
983
|
props: {
|
|
984
984
|
/** The accessibility text provided to screen readers */
|
|
@@ -1009,14 +1009,14 @@ const w = "24px", M = (e, r) => {
|
|
|
1009
1009
|
size: {
|
|
1010
1010
|
type: [Number, String],
|
|
1011
1011
|
required: !1,
|
|
1012
|
-
default:
|
|
1012
|
+
default: _,
|
|
1013
1013
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1014
1014
|
validator: (e) => {
|
|
1015
1015
|
if (typeof e == "number" && e > 0)
|
|
1016
1016
|
return !0;
|
|
1017
1017
|
if (typeof e == "string") {
|
|
1018
|
-
const
|
|
1019
|
-
if (
|
|
1018
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
1019
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
1020
1020
|
return !0;
|
|
1021
1021
|
}
|
|
1022
1022
|
return !1;
|
|
@@ -1030,30 +1030,30 @@ const w = "24px", M = (e, r) => {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
},
|
|
1032
1032
|
setup(e) {
|
|
1033
|
-
const
|
|
1034
|
-
if (typeof
|
|
1035
|
-
return `${
|
|
1036
|
-
if (typeof
|
|
1037
|
-
const n = String(
|
|
1033
|
+
const t = e, r = g(() => {
|
|
1034
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
1035
|
+
return `${t.size}px`;
|
|
1036
|
+
if (typeof t.size == "string") {
|
|
1037
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
1038
1038
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1039
1039
|
return `${i}px`;
|
|
1040
1040
|
}
|
|
1041
|
-
return
|
|
1041
|
+
return _;
|
|
1042
1042
|
}), a = g(() => ({
|
|
1043
1043
|
boxSizing: "border-box",
|
|
1044
|
-
color:
|
|
1045
|
-
display:
|
|
1046
|
-
height:
|
|
1044
|
+
color: t.color,
|
|
1045
|
+
display: t.display,
|
|
1046
|
+
height: r.value,
|
|
1047
1047
|
lineHeight: "0",
|
|
1048
|
-
width:
|
|
1048
|
+
width: r.value
|
|
1049
1049
|
}));
|
|
1050
|
-
return (n, i) => (p(),
|
|
1050
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
1064
1064
|
width: "100%",
|
|
1065
1065
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1066
1066
|
}, [
|
|
1067
|
-
e.title ? (p(), y("title",
|
|
1068
|
-
|
|
1069
|
-
], 8,
|
|
1067
|
+
e.title ? (p(), y("title", jt, w(e.title), 1)) : N("", !0),
|
|
1068
|
+
Yt
|
|
1069
|
+
], 8, Xt))
|
|
1070
1070
|
]),
|
|
1071
1071
|
_: 1
|
|
1072
1072
|
}, 8, ["aria-hidden", "style"]));
|
|
1073
1073
|
}
|
|
1074
|
-
}),
|
|
1074
|
+
}), Fe = /* @__PURE__ */ V(Qt, [["__scopeId", "data-v-c5283a2c"]]), Wt = (e) => (z("data-v-7958c198"), e = e(), D(), e), Jt = ["aria-hidden"], er = {
|
|
1075
1075
|
key: 0,
|
|
1076
1076
|
"data-testid": "kui-icon-svg-title"
|
|
1077
|
-
},
|
|
1077
|
+
}, tr = /* @__PURE__ */ Wt(() => /* @__PURE__ */ x("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)),
|
|
1080
|
+
}, null, -1)), rr = /* @__PURE__ */ k({
|
|
1081
1081
|
__name: "InfoIcon",
|
|
1082
1082
|
props: {
|
|
1083
1083
|
/** The accessibility text provided to screen readers */
|
|
@@ -1108,14 +1108,14 @@ const w = "24px", M = (e, r) => {
|
|
|
1108
1108
|
size: {
|
|
1109
1109
|
type: [Number, String],
|
|
1110
1110
|
required: !1,
|
|
1111
|
-
default:
|
|
1111
|
+
default: _,
|
|
1112
1112
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1113
1113
|
validator: (e) => {
|
|
1114
1114
|
if (typeof e == "number" && e > 0)
|
|
1115
1115
|
return !0;
|
|
1116
1116
|
if (typeof e == "string") {
|
|
1117
|
-
const
|
|
1118
|
-
if (
|
|
1117
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
1118
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
1119
1119
|
return !0;
|
|
1120
1120
|
}
|
|
1121
1121
|
return !1;
|
|
@@ -1129,30 +1129,30 @@ const w = "24px", M = (e, r) => {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
},
|
|
1131
1131
|
setup(e) {
|
|
1132
|
-
const
|
|
1133
|
-
if (typeof
|
|
1134
|
-
return `${
|
|
1135
|
-
if (typeof
|
|
1136
|
-
const n = String(
|
|
1132
|
+
const t = e, r = g(() => {
|
|
1133
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
1134
|
+
return `${t.size}px`;
|
|
1135
|
+
if (typeof t.size == "string") {
|
|
1136
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
1137
1137
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1138
1138
|
return `${i}px`;
|
|
1139
1139
|
}
|
|
1140
|
-
return
|
|
1140
|
+
return _;
|
|
1141
1141
|
}), a = g(() => ({
|
|
1142
1142
|
boxSizing: "border-box",
|
|
1143
|
-
color:
|
|
1144
|
-
display:
|
|
1145
|
-
height:
|
|
1143
|
+
color: t.color,
|
|
1144
|
+
display: t.display,
|
|
1145
|
+
height: r.value,
|
|
1146
1146
|
lineHeight: "0",
|
|
1147
|
-
width:
|
|
1147
|
+
width: r.value
|
|
1148
1148
|
}));
|
|
1149
|
-
return (n, i) => (p(),
|
|
1149
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
1163
1163
|
width: "100%",
|
|
1164
1164
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1165
1165
|
}, [
|
|
1166
|
-
e.title ? (p(), y("title",
|
|
1167
|
-
|
|
1168
|
-
], 8,
|
|
1166
|
+
e.title ? (p(), y("title", er, w(e.title), 1)) : N("", !0),
|
|
1167
|
+
tr
|
|
1168
|
+
], 8, Jt))
|
|
1169
1169
|
]),
|
|
1170
1170
|
_: 1
|
|
1171
1171
|
}, 8, ["aria-hidden", "style"]));
|
|
1172
1172
|
}
|
|
1173
|
-
}),
|
|
1173
|
+
}), ir = /* @__PURE__ */ V(rr, [["__scopeId", "data-v-7958c198"]]), nr = (e) => (z("data-v-d0ffb1de"), e = e(), D(), e), ar = ["aria-hidden"], or = {
|
|
1174
1174
|
key: 0,
|
|
1175
1175
|
"data-testid": "kui-icon-svg-title"
|
|
1176
|
-
},
|
|
1176
|
+
}, sr = /* @__PURE__ */ nr(() => /* @__PURE__ */ x("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)),
|
|
1179
|
+
}, null, -1)), lr = /* @__PURE__ */ k({
|
|
1180
1180
|
__name: "ResponseIcon",
|
|
1181
1181
|
props: {
|
|
1182
1182
|
/** The accessibility text provided to screen readers */
|
|
@@ -1207,14 +1207,14 @@ const w = "24px", M = (e, r) => {
|
|
|
1207
1207
|
size: {
|
|
1208
1208
|
type: [Number, String],
|
|
1209
1209
|
required: !1,
|
|
1210
|
-
default:
|
|
1210
|
+
default: _,
|
|
1211
1211
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1212
1212
|
validator: (e) => {
|
|
1213
1213
|
if (typeof e == "number" && e > 0)
|
|
1214
1214
|
return !0;
|
|
1215
1215
|
if (typeof e == "string") {
|
|
1216
|
-
const
|
|
1217
|
-
if (
|
|
1216
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
1217
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
1218
1218
|
return !0;
|
|
1219
1219
|
}
|
|
1220
1220
|
return !1;
|
|
@@ -1228,30 +1228,30 @@ const w = "24px", M = (e, r) => {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
},
|
|
1230
1230
|
setup(e) {
|
|
1231
|
-
const
|
|
1232
|
-
if (typeof
|
|
1233
|
-
return `${
|
|
1234
|
-
if (typeof
|
|
1235
|
-
const n = String(
|
|
1231
|
+
const t = e, r = g(() => {
|
|
1232
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
1233
|
+
return `${t.size}px`;
|
|
1234
|
+
if (typeof t.size == "string") {
|
|
1235
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
1236
1236
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1237
1237
|
return `${i}px`;
|
|
1238
1238
|
}
|
|
1239
|
-
return
|
|
1239
|
+
return _;
|
|
1240
1240
|
}), a = g(() => ({
|
|
1241
1241
|
boxSizing: "border-box",
|
|
1242
|
-
color:
|
|
1243
|
-
display:
|
|
1244
|
-
height:
|
|
1242
|
+
color: t.color,
|
|
1243
|
+
display: t.display,
|
|
1244
|
+
height: r.value,
|
|
1245
1245
|
lineHeight: "0",
|
|
1246
|
-
width:
|
|
1246
|
+
width: r.value
|
|
1247
1247
|
}));
|
|
1248
|
-
return (n, i) => (p(),
|
|
1248
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
1262
1262
|
width: "100%",
|
|
1263
1263
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1264
1264
|
}, [
|
|
1265
|
-
e.title ? (p(), y("title",
|
|
1266
|
-
|
|
1267
|
-
], 8,
|
|
1265
|
+
e.title ? (p(), y("title", or, w(e.title), 1)) : N("", !0),
|
|
1266
|
+
sr
|
|
1267
|
+
], 8, ar))
|
|
1268
1268
|
]),
|
|
1269
1269
|
_: 1
|
|
1270
1270
|
}, 8, ["aria-hidden", "style"]));
|
|
1271
1271
|
}
|
|
1272
|
-
}),
|
|
1272
|
+
}), ur = /* @__PURE__ */ V(lr, [["__scopeId", "data-v-d0ffb1de"]]), dr = (e) => (z("data-v-7939cf04"), e = e(), D(), e), cr = ["aria-hidden"], fr = {
|
|
1273
1273
|
key: 0,
|
|
1274
1274
|
"data-testid": "kui-icon-svg-title"
|
|
1275
|
-
},
|
|
1275
|
+
}, vr = /* @__PURE__ */ dr(() => /* @__PURE__ */ x("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)),
|
|
1278
|
+
}, null, -1)), pr = /* @__PURE__ */ k({
|
|
1279
1279
|
__name: "TrendDownIcon",
|
|
1280
1280
|
props: {
|
|
1281
1281
|
/** The accessibility text provided to screen readers */
|
|
@@ -1306,14 +1306,14 @@ const w = "24px", M = (e, r) => {
|
|
|
1306
1306
|
size: {
|
|
1307
1307
|
type: [Number, String],
|
|
1308
1308
|
required: !1,
|
|
1309
|
-
default:
|
|
1309
|
+
default: _,
|
|
1310
1310
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1311
1311
|
validator: (e) => {
|
|
1312
1312
|
if (typeof e == "number" && e > 0)
|
|
1313
1313
|
return !0;
|
|
1314
1314
|
if (typeof e == "string") {
|
|
1315
|
-
const
|
|
1316
|
-
if (
|
|
1315
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
1316
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
1317
1317
|
return !0;
|
|
1318
1318
|
}
|
|
1319
1319
|
return !1;
|
|
@@ -1327,30 +1327,30 @@ const w = "24px", M = (e, r) => {
|
|
|
1327
1327
|
}
|
|
1328
1328
|
},
|
|
1329
1329
|
setup(e) {
|
|
1330
|
-
const
|
|
1331
|
-
if (typeof
|
|
1332
|
-
return `${
|
|
1333
|
-
if (typeof
|
|
1334
|
-
const n = String(
|
|
1330
|
+
const t = e, r = g(() => {
|
|
1331
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
1332
|
+
return `${t.size}px`;
|
|
1333
|
+
if (typeof t.size == "string") {
|
|
1334
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
1335
1335
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1336
1336
|
return `${i}px`;
|
|
1337
1337
|
}
|
|
1338
|
-
return
|
|
1338
|
+
return _;
|
|
1339
1339
|
}), a = g(() => ({
|
|
1340
1340
|
boxSizing: "border-box",
|
|
1341
|
-
color:
|
|
1342
|
-
display:
|
|
1343
|
-
height:
|
|
1341
|
+
color: t.color,
|
|
1342
|
+
display: t.display,
|
|
1343
|
+
height: r.value,
|
|
1344
1344
|
lineHeight: "0",
|
|
1345
|
-
width:
|
|
1345
|
+
width: r.value
|
|
1346
1346
|
}));
|
|
1347
|
-
return (n, i) => (p(),
|
|
1347
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
1361
1361
|
width: "100%",
|
|
1362
1362
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1363
1363
|
}, [
|
|
1364
|
-
e.title ? (p(), y("title",
|
|
1365
|
-
|
|
1366
|
-
], 8,
|
|
1364
|
+
e.title ? (p(), y("title", fr, w(e.title), 1)) : N("", !0),
|
|
1365
|
+
vr
|
|
1366
|
+
], 8, cr))
|
|
1367
1367
|
]),
|
|
1368
1368
|
_: 1
|
|
1369
1369
|
}, 8, ["aria-hidden", "style"]));
|
|
1370
1370
|
}
|
|
1371
|
-
}),
|
|
1371
|
+
}), gr = /* @__PURE__ */ V(pr, [["__scopeId", "data-v-7939cf04"]]), yr = (e) => (z("data-v-c6ab90e9"), e = e(), D(), e), mr = ["aria-hidden"], hr = {
|
|
1372
1372
|
key: 0,
|
|
1373
1373
|
"data-testid": "kui-icon-svg-title"
|
|
1374
|
-
},
|
|
1374
|
+
}, Cr = /* @__PURE__ */ yr(() => /* @__PURE__ */ x("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)),
|
|
1377
|
+
}, null, -1)), Sr = /* @__PURE__ */ k({
|
|
1378
1378
|
__name: "TrendUpIcon",
|
|
1379
1379
|
props: {
|
|
1380
1380
|
/** The accessibility text provided to screen readers */
|
|
@@ -1405,14 +1405,14 @@ const w = "24px", M = (e, r) => {
|
|
|
1405
1405
|
size: {
|
|
1406
1406
|
type: [Number, String],
|
|
1407
1407
|
required: !1,
|
|
1408
|
-
default:
|
|
1408
|
+
default: _,
|
|
1409
1409
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1410
1410
|
validator: (e) => {
|
|
1411
1411
|
if (typeof e == "number" && e > 0)
|
|
1412
1412
|
return !0;
|
|
1413
1413
|
if (typeof e == "string") {
|
|
1414
|
-
const
|
|
1415
|
-
if (
|
|
1414
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
1415
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
1416
1416
|
return !0;
|
|
1417
1417
|
}
|
|
1418
1418
|
return !1;
|
|
@@ -1426,30 +1426,30 @@ const w = "24px", M = (e, r) => {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
},
|
|
1428
1428
|
setup(e) {
|
|
1429
|
-
const
|
|
1430
|
-
if (typeof
|
|
1431
|
-
return `${
|
|
1432
|
-
if (typeof
|
|
1433
|
-
const n = String(
|
|
1429
|
+
const t = e, r = g(() => {
|
|
1430
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
1431
|
+
return `${t.size}px`;
|
|
1432
|
+
if (typeof t.size == "string") {
|
|
1433
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
1434
1434
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1435
1435
|
return `${i}px`;
|
|
1436
1436
|
}
|
|
1437
|
-
return
|
|
1437
|
+
return _;
|
|
1438
1438
|
}), a = g(() => ({
|
|
1439
1439
|
boxSizing: "border-box",
|
|
1440
|
-
color:
|
|
1441
|
-
display:
|
|
1442
|
-
height:
|
|
1440
|
+
color: t.color,
|
|
1441
|
+
display: t.display,
|
|
1442
|
+
height: r.value,
|
|
1443
1443
|
lineHeight: "0",
|
|
1444
|
-
width:
|
|
1444
|
+
width: r.value
|
|
1445
1445
|
}));
|
|
1446
|
-
return (n, i) => (p(),
|
|
1446
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
1460
1460
|
width: "100%",
|
|
1461
1461
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1462
1462
|
}, [
|
|
1463
|
-
e.title ? (p(), y("title",
|
|
1464
|
-
|
|
1465
|
-
], 8,
|
|
1463
|
+
e.title ? (p(), y("title", hr, w(e.title), 1)) : N("", !0),
|
|
1464
|
+
Cr
|
|
1465
|
+
], 8, mr))
|
|
1466
1466
|
]),
|
|
1467
1467
|
_: 1
|
|
1468
1468
|
}, 8, ["aria-hidden", "style"]));
|
|
1469
1469
|
}
|
|
1470
|
-
}),
|
|
1470
|
+
}), br = /* @__PURE__ */ V(Sr, [["__scopeId", "data-v-c6ab90e9"]]), _r = (e) => (z("data-v-989e7f51"), e = e(), D(), e), wr = ["aria-hidden"], Rr = {
|
|
1471
1471
|
key: 0,
|
|
1472
1472
|
"data-testid": "kui-icon-svg-title"
|
|
1473
|
-
},
|
|
1473
|
+
}, Nr = /* @__PURE__ */ _r(() => /* @__PURE__ */ x("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)), Tr = /* @__PURE__ */ k({
|
|
1477
1477
|
__name: "VitalsIcon",
|
|
1478
1478
|
props: {
|
|
1479
1479
|
/** The accessibility text provided to screen readers */
|
|
@@ -1504,14 +1504,14 @@ const w = "24px", M = (e, r) => {
|
|
|
1504
1504
|
size: {
|
|
1505
1505
|
type: [Number, String],
|
|
1506
1506
|
required: !1,
|
|
1507
|
-
default:
|
|
1507
|
+
default: _,
|
|
1508
1508
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1509
1509
|
validator: (e) => {
|
|
1510
1510
|
if (typeof e == "number" && e > 0)
|
|
1511
1511
|
return !0;
|
|
1512
1512
|
if (typeof e == "string") {
|
|
1513
|
-
const
|
|
1514
|
-
if (
|
|
1513
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
1514
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
1515
1515
|
return !0;
|
|
1516
1516
|
}
|
|
1517
1517
|
return !1;
|
|
@@ -1525,30 +1525,30 @@ const w = "24px", M = (e, r) => {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
},
|
|
1527
1527
|
setup(e) {
|
|
1528
|
-
const
|
|
1529
|
-
if (typeof
|
|
1530
|
-
return `${
|
|
1531
|
-
if (typeof
|
|
1532
|
-
const n = String(
|
|
1528
|
+
const t = e, r = g(() => {
|
|
1529
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
1530
|
+
return `${t.size}px`;
|
|
1531
|
+
if (typeof t.size == "string") {
|
|
1532
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
1533
1533
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1534
1534
|
return `${i}px`;
|
|
1535
1535
|
}
|
|
1536
|
-
return
|
|
1536
|
+
return _;
|
|
1537
1537
|
}), a = g(() => ({
|
|
1538
1538
|
boxSizing: "border-box",
|
|
1539
|
-
color:
|
|
1540
|
-
display:
|
|
1541
|
-
height:
|
|
1539
|
+
color: t.color,
|
|
1540
|
+
display: t.display,
|
|
1541
|
+
height: r.value,
|
|
1542
1542
|
lineHeight: "0",
|
|
1543
|
-
width:
|
|
1543
|
+
width: r.value
|
|
1544
1544
|
}));
|
|
1545
|
-
return (n, i) => (p(),
|
|
1545
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
1559
1559
|
width: "100%",
|
|
1560
1560
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1561
1561
|
}, [
|
|
1562
|
-
e.title ? (p(), y("title",
|
|
1563
|
-
|
|
1564
|
-
], 8,
|
|
1562
|
+
e.title ? (p(), y("title", Rr, w(e.title), 1)) : N("", !0),
|
|
1563
|
+
Nr
|
|
1564
|
+
], 8, wr))
|
|
1565
1565
|
]),
|
|
1566
1566
|
_: 1
|
|
1567
1567
|
}, 8, ["aria-hidden", "style"]));
|
|
1568
1568
|
}
|
|
1569
|
-
}),
|
|
1569
|
+
}), Ir = /* @__PURE__ */ V(Tr, [["__scopeId", "data-v-989e7f51"]]), Er = (e) => (z("data-v-5fc3c6c8"), e = e(), D(), e), xr = ["aria-hidden"], kr = {
|
|
1570
1570
|
key: 0,
|
|
1571
1571
|
"data-testid": "kui-icon-svg-title"
|
|
1572
|
-
},
|
|
1572
|
+
}, Lr = /* @__PURE__ */ Er(() => /* @__PURE__ */ x("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)), Ar = /* @__PURE__ */ k({
|
|
1576
1576
|
__name: "WarningOutlineIcon",
|
|
1577
1577
|
props: {
|
|
1578
1578
|
/** The accessibility text provided to screen readers */
|
|
@@ -1603,14 +1603,14 @@ const w = "24px", M = (e, r) => {
|
|
|
1603
1603
|
size: {
|
|
1604
1604
|
type: [Number, String],
|
|
1605
1605
|
required: !1,
|
|
1606
|
-
default:
|
|
1606
|
+
default: _,
|
|
1607
1607
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1608
1608
|
validator: (e) => {
|
|
1609
1609
|
if (typeof e == "number" && e > 0)
|
|
1610
1610
|
return !0;
|
|
1611
1611
|
if (typeof e == "string") {
|
|
1612
|
-
const
|
|
1613
|
-
if (
|
|
1612
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
1613
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
1614
1614
|
return !0;
|
|
1615
1615
|
}
|
|
1616
1616
|
return !1;
|
|
@@ -1624,30 +1624,30 @@ const w = "24px", M = (e, r) => {
|
|
|
1624
1624
|
}
|
|
1625
1625
|
},
|
|
1626
1626
|
setup(e) {
|
|
1627
|
-
const
|
|
1628
|
-
if (typeof
|
|
1629
|
-
return `${
|
|
1630
|
-
if (typeof
|
|
1631
|
-
const n = String(
|
|
1627
|
+
const t = e, r = g(() => {
|
|
1628
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
1629
|
+
return `${t.size}px`;
|
|
1630
|
+
if (typeof t.size == "string") {
|
|
1631
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
1632
1632
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1633
1633
|
return `${i}px`;
|
|
1634
1634
|
}
|
|
1635
|
-
return
|
|
1635
|
+
return _;
|
|
1636
1636
|
}), a = g(() => ({
|
|
1637
1637
|
boxSizing: "border-box",
|
|
1638
|
-
color:
|
|
1639
|
-
display:
|
|
1640
|
-
height:
|
|
1638
|
+
color: t.color,
|
|
1639
|
+
display: t.display,
|
|
1640
|
+
height: r.value,
|
|
1641
1641
|
lineHeight: "0",
|
|
1642
|
-
width:
|
|
1642
|
+
width: r.value
|
|
1643
1643
|
}));
|
|
1644
|
-
return (n, i) => (p(),
|
|
1644
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
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 w = "24px", M = (e, r) => {
|
|
|
1658
1658
|
width: "100%",
|
|
1659
1659
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1660
1660
|
}, [
|
|
1661
|
-
e.title ? (p(), y("title",
|
|
1662
|
-
|
|
1663
|
-
], 8,
|
|
1661
|
+
e.title ? (p(), y("title", kr, w(e.title), 1)) : N("", !0),
|
|
1662
|
+
Lr
|
|
1663
|
+
], 8, xr))
|
|
1664
1664
|
]),
|
|
1665
1665
|
_: 1
|
|
1666
1666
|
}, 8, ["aria-hidden", "style"]));
|
|
1667
1667
|
}
|
|
1668
|
-
}),
|
|
1668
|
+
}), qr = /* @__PURE__ */ V(Ar, [["__scopeId", "data-v-5fc3c6c8"]]), zr = (e) => (z("data-v-9f0a015f"), e = e(), D(), e), Dr = ["aria-hidden"], Vr = {
|
|
1669
1669
|
key: 0,
|
|
1670
1670
|
"data-testid": "kui-icon-svg-title"
|
|
1671
|
-
},
|
|
1671
|
+
}, Or = /* @__PURE__ */ zr(() => /* @__PURE__ */ x("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)), Mr = /* @__PURE__ */ k({
|
|
1675
1675
|
__name: "WarningIcon",
|
|
1676
1676
|
props: {
|
|
1677
1677
|
/** The accessibility text provided to screen readers */
|
|
@@ -1702,14 +1702,14 @@ const w = "24px", M = (e, r) => {
|
|
|
1702
1702
|
size: {
|
|
1703
1703
|
type: [Number, String],
|
|
1704
1704
|
required: !1,
|
|
1705
|
-
default:
|
|
1705
|
+
default: _,
|
|
1706
1706
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
1707
1707
|
validator: (e) => {
|
|
1708
1708
|
if (typeof e == "number" && e > 0)
|
|
1709
1709
|
return !0;
|
|
1710
1710
|
if (typeof e == "string") {
|
|
1711
|
-
const
|
|
1712
|
-
if (
|
|
1711
|
+
const t = String(e).replace(/px/gi, ""), r = Number(t);
|
|
1712
|
+
if (r && !isNaN(r) && Number.isInteger(r) && r > 0)
|
|
1713
1713
|
return !0;
|
|
1714
1714
|
}
|
|
1715
1715
|
return !1;
|
|
@@ -1723,30 +1723,30 @@ const w = "24px", M = (e, r) => {
|
|
|
1723
1723
|
}
|
|
1724
1724
|
},
|
|
1725
1725
|
setup(e) {
|
|
1726
|
-
const
|
|
1727
|
-
if (typeof
|
|
1728
|
-
return `${
|
|
1729
|
-
if (typeof
|
|
1730
|
-
const n = String(
|
|
1726
|
+
const t = e, r = g(() => {
|
|
1727
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
1728
|
+
return `${t.size}px`;
|
|
1729
|
+
if (typeof t.size == "string") {
|
|
1730
|
+
const n = String(t.size).replace(/px/gi, ""), i = Number(n);
|
|
1731
1731
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
1732
1732
|
return `${i}px`;
|
|
1733
1733
|
}
|
|
1734
|
-
return
|
|
1734
|
+
return _;
|
|
1735
1735
|
}), a = g(() => ({
|
|
1736
1736
|
boxSizing: "border-box",
|
|
1737
|
-
color:
|
|
1738
|
-
display:
|
|
1739
|
-
height:
|
|
1737
|
+
color: t.color,
|
|
1738
|
+
display: t.display,
|
|
1739
|
+
height: r.value,
|
|
1740
1740
|
lineHeight: "0",
|
|
1741
|
-
width:
|
|
1741
|
+
width: r.value
|
|
1742
1742
|
}));
|
|
1743
|
-
return (n, i) => (p(),
|
|
1743
|
+
return (n, i) => (p(), I(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: A(() => [
|
|
1750
1750
|
(p(), y("svg", {
|
|
1751
1751
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
1752
1752
|
"data-testid": "kui-icon-svg-warning-icon",
|
|
@@ -1757,37 +1757,35 @@ const w = "24px", M = (e, r) => {
|
|
|
1757
1757
|
width: "100%",
|
|
1758
1758
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1759
1759
|
}, [
|
|
1760
|
-
e.title ? (p(), y("title",
|
|
1761
|
-
|
|
1762
|
-
], 8,
|
|
1760
|
+
e.title ? (p(), y("title", Vr, w(e.title), 1)) : N("", !0),
|
|
1761
|
+
Or
|
|
1762
|
+
], 8, Dr))
|
|
1763
1763
|
]),
|
|
1764
1764
|
_: 1
|
|
1765
1765
|
}, 8, ["aria-hidden", "style"]));
|
|
1766
1766
|
}
|
|
1767
|
-
}), He = /* @__PURE__ */
|
|
1768
|
-
let a = !
|
|
1769
|
-
return
|
|
1770
|
-
},
|
|
1771
|
-
var O = /* @__PURE__ */ ((e) => (e.GENERIC_COUNT = "GenericCount", e.TRAFFIC = "Traffic", e.ERROR_RATE = "ErrorRate", e.LATENCY = "Latency", e))(O || {});
|
|
1772
|
-
const Ut = { class: "metricscard" }, Gt = {
|
|
1767
|
+
}), He = /* @__PURE__ */ V(Mr, [["__scopeId", "data-v-9f0a015f"]]), ye = 2, Ie = ye + 2, Fr = (e, t, r = !1) => {
|
|
1768
|
+
let a = !t || Number(e.toFixed(Ie)) === 0 ? 0 : Number(e.toFixed(Ie)) > 0 ? 1 : -1;
|
|
1769
|
+
return r && (a *= -1), a;
|
|
1770
|
+
}, Hr = (e, t, r) => t ? `${Math.abs(e * 100).toFixed(ye)}%` : r, $r = (e, t) => t === 0 ? 0 : e / t - 1, Br = (e, t = !1) => (t && (e *= -1), e > 0 ? br : e < 0 ? gr : Fe), Ur = "#ad000e", pe = "#6c7489", Ee = "#52596e", Kr = "#007d60", ee = "16px", Pr = "20px", Gr = { class: "metricscard" }, Zr = {
|
|
1773
1771
|
key: 0,
|
|
1774
1772
|
class: "metricscard-description"
|
|
1775
|
-
},
|
|
1773
|
+
}, Xr = { class: "metricscard-valuetrend" }, jr = {
|
|
1776
1774
|
key: 0,
|
|
1777
1775
|
class: "metricscard-error"
|
|
1778
|
-
},
|
|
1776
|
+
}, Yr = {
|
|
1779
1777
|
key: 2,
|
|
1780
1778
|
class: "metricscard-trend"
|
|
1781
|
-
},
|
|
1779
|
+
}, Qr = { "data-testid": "metric-trend-change" }, Wr = {
|
|
1782
1780
|
key: 0,
|
|
1783
1781
|
class: "metricscard-trend-range"
|
|
1784
|
-
},
|
|
1782
|
+
}, Jr = /* @__PURE__ */ k({
|
|
1785
1783
|
__name: "MetricsCard",
|
|
1786
1784
|
props: {
|
|
1787
1785
|
cardType: {
|
|
1788
1786
|
type: String,
|
|
1789
1787
|
required: !0,
|
|
1790
|
-
default:
|
|
1788
|
+
default: M.GENERIC_COUNT
|
|
1791
1789
|
},
|
|
1792
1790
|
title: {
|
|
1793
1791
|
type: String,
|
|
@@ -1823,7 +1821,7 @@ const Ut = { class: "metricscard" }, Gt = {
|
|
|
1823
1821
|
},
|
|
1824
1822
|
trendIcon: {
|
|
1825
1823
|
type: Object,
|
|
1826
|
-
default:
|
|
1824
|
+
default: Fe
|
|
1827
1825
|
},
|
|
1828
1826
|
trendRange: {
|
|
1829
1827
|
type: String,
|
|
@@ -1840,7 +1838,7 @@ const Ut = { class: "metricscard" }, Gt = {
|
|
|
1840
1838
|
cardSize: {
|
|
1841
1839
|
type: String,
|
|
1842
1840
|
required: !1,
|
|
1843
|
-
default: () =>
|
|
1841
|
+
default: () => F.Large
|
|
1844
1842
|
},
|
|
1845
1843
|
hasContainerTitle: {
|
|
1846
1844
|
type: Boolean,
|
|
@@ -1853,120 +1851,118 @@ const Ut = { class: "metricscard" }, Gt = {
|
|
|
1853
1851
|
}
|
|
1854
1852
|
},
|
|
1855
1853
|
setup(e) {
|
|
1856
|
-
const
|
|
1857
|
-
[
|
|
1858
|
-
[
|
|
1859
|
-
[
|
|
1860
|
-
[
|
|
1861
|
-
]),
|
|
1862
|
-
const
|
|
1863
|
-
red: `var(--kong-ui-metric-card-trend-negative, ${
|
|
1864
|
-
green: `var(--kong-ui-metric-card-trend-positive, ${
|
|
1865
|
-
grey: `var(--kong-ui-metric-card-trend-neutral, ${
|
|
1854
|
+
const t = /* @__PURE__ */ new Map([
|
|
1855
|
+
[M.GENERIC_COUNT, Ir],
|
|
1856
|
+
[M.TRAFFIC, Ht],
|
|
1857
|
+
[M.ERROR_RATE, qr],
|
|
1858
|
+
[M.LATENCY, ur]
|
|
1859
|
+
]), r = e, a = (f) => {
|
|
1860
|
+
const c = {
|
|
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})`
|
|
1866
1864
|
};
|
|
1867
|
-
return
|
|
1868
|
-
}, n = (
|
|
1869
|
-
return (
|
|
1870
|
-
const
|
|
1871
|
-
return p(), y("div",
|
|
1865
|
+
return f > 0 ? c.green : f < 0 ? c.red : c.grey;
|
|
1866
|
+
}, n = (f) => f > 0 ? "positive" : f < 0 ? "negative" : "neutral", i = [F.Medium, F.Large].includes(r.cardSize), l = [F.Small].includes(r.cardSize);
|
|
1867
|
+
return (f, c) => {
|
|
1868
|
+
const o = Ae("KTooltip");
|
|
1869
|
+
return p(), y("div", Gr, [
|
|
1872
1870
|
x("div", {
|
|
1873
|
-
class:
|
|
1871
|
+
class: Y(["metricscard-title", e.cardSize])
|
|
1874
1872
|
}, [
|
|
1875
|
-
|
|
1873
|
+
R(l) ? N("", !0) : (p(), I(L(R(t).get(e.cardType)), {
|
|
1876
1874
|
key: 0,
|
|
1877
1875
|
class: "metricscard-icon",
|
|
1878
|
-
color:
|
|
1879
|
-
size:
|
|
1876
|
+
color: R(pe),
|
|
1877
|
+
size: R(ee)
|
|
1880
1878
|
}, null, 8, ["color", "size"])),
|
|
1881
|
-
(p(),
|
|
1882
|
-
default:
|
|
1883
|
-
|
|
1879
|
+
(p(), I(L(e.titleTag), null, {
|
|
1880
|
+
default: A(() => [
|
|
1881
|
+
qe(w(e.title), 1)
|
|
1884
1882
|
]),
|
|
1885
1883
|
_: 1
|
|
1886
1884
|
})),
|
|
1887
|
-
e.tooltip ? (p(),
|
|
1885
|
+
e.tooltip ? (p(), I(o, {
|
|
1888
1886
|
key: 1,
|
|
1889
1887
|
class: "metricscard-tooltip",
|
|
1890
1888
|
placement: "right",
|
|
1891
1889
|
text: e.tooltip
|
|
1892
1890
|
}, {
|
|
1893
|
-
default:
|
|
1894
|
-
X(
|
|
1895
|
-
color:
|
|
1896
|
-
size:
|
|
1891
|
+
default: A(() => [
|
|
1892
|
+
X(R(ir), {
|
|
1893
|
+
color: R(pe),
|
|
1894
|
+
size: R(ee)
|
|
1897
1895
|
}, null, 8, ["color", "size"])
|
|
1898
1896
|
]),
|
|
1899
1897
|
_: 1
|
|
1900
|
-
}, 8, ["text"])) :
|
|
1898
|
+
}, 8, ["text"])) : N("", !0)
|
|
1901
1899
|
], 2),
|
|
1902
|
-
e.description &&
|
|
1903
|
-
x("span", null,
|
|
1904
|
-
])) :
|
|
1905
|
-
x("div",
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
color: _(ve),
|
|
1911
|
-
size: _(Zt)
|
|
1900
|
+
e.description && R(i) ? (p(), y("div", Zr, [
|
|
1901
|
+
x("span", null, w(e.description), 1)
|
|
1902
|
+
])) : N("", !0),
|
|
1903
|
+
x("div", Xr, [
|
|
1904
|
+
e.hasError ? (p(), y("div", jr, [
|
|
1905
|
+
X(R(He), {
|
|
1906
|
+
color: R(pe),
|
|
1907
|
+
size: R(Pr)
|
|
1912
1908
|
}, null, 8, ["color", "size"]),
|
|
1913
|
-
x("div", null, " " +
|
|
1909
|
+
x("div", null, " " + w(e.errorMessage), 1)
|
|
1914
1910
|
])) : (p(), y("div", {
|
|
1915
1911
|
key: 1,
|
|
1916
|
-
class:
|
|
1912
|
+
class: Y(["metricscard-value", e.cardSize]),
|
|
1917
1913
|
"data-testid": "metric-value"
|
|
1918
|
-
},
|
|
1919
|
-
|
|
1914
|
+
}, w(e.metricValue), 3)),
|
|
1915
|
+
R(i) ? (p(), y("div", Yr, [
|
|
1920
1916
|
x("div", {
|
|
1921
|
-
class:
|
|
1917
|
+
class: Y(["metricscard-trend-change", n(e.changePolarity)]),
|
|
1922
1918
|
"data-testid": "metric-trend-parent"
|
|
1923
1919
|
}, [
|
|
1924
|
-
e.changePolarity !== 0 ? (p(),
|
|
1920
|
+
e.changePolarity !== 0 ? (p(), I(L(e.trendIcon), {
|
|
1925
1921
|
key: 0,
|
|
1926
1922
|
color: a(e.changePolarity),
|
|
1927
|
-
size:
|
|
1928
|
-
}, null, 8, ["color", "size"])) : (p(),
|
|
1923
|
+
size: R(ee)
|
|
1924
|
+
}, null, 8, ["color", "size"])) : (p(), I(R(Gt), {
|
|
1929
1925
|
key: 1,
|
|
1930
|
-
color:
|
|
1931
|
-
size:
|
|
1926
|
+
color: R(Ee),
|
|
1927
|
+
size: R(ee)
|
|
1932
1928
|
}, null, 8, ["color", "size"])),
|
|
1933
|
-
x("div",
|
|
1929
|
+
x("div", Qr, w(e.metricChange), 1)
|
|
1934
1930
|
], 2),
|
|
1935
|
-
e.trendRange
|
|
1936
|
-
])) :
|
|
1937
|
-
]
|
|
1931
|
+
e.trendRange ? (p(), y("div", Wr, w(e.trendRange), 1)) : N("", !0)
|
|
1932
|
+
])) : N("", !0)
|
|
1933
|
+
])
|
|
1938
1934
|
]);
|
|
1939
1935
|
};
|
|
1940
1936
|
}
|
|
1941
|
-
}), me = (e,
|
|
1942
|
-
const
|
|
1943
|
-
for (const [a, n] of
|
|
1944
|
-
|
|
1945
|
-
return
|
|
1946
|
-
},
|
|
1947
|
-
function
|
|
1948
|
-
const
|
|
1937
|
+
}), me = (e, t) => {
|
|
1938
|
+
const r = e.__vccOpts || e;
|
|
1939
|
+
for (const [a, n] of t)
|
|
1940
|
+
r[a] = n;
|
|
1941
|
+
return r;
|
|
1942
|
+
}, ei = /* @__PURE__ */ me(Jr, [["__scopeId", "data-v-1b8a31a0"]]), ti = {}, ri = { class: "loading-tabs" };
|
|
1943
|
+
function ii(e, t) {
|
|
1944
|
+
const r = Ae("KSkeletonBox");
|
|
1949
1945
|
return p(), y("div", ri, [
|
|
1950
|
-
X(
|
|
1951
|
-
X(
|
|
1946
|
+
X(r, { width: "100" }),
|
|
1947
|
+
X(r, { width: "75" })
|
|
1952
1948
|
]);
|
|
1953
1949
|
}
|
|
1954
|
-
const
|
|
1950
|
+
const ni = /* @__PURE__ */ me(ti, [["render", ii], ["__scopeId", "data-v-f7eb9c40"]]), ai = {
|
|
1955
1951
|
key: 0,
|
|
1956
1952
|
class: "container-title"
|
|
1957
|
-
},
|
|
1953
|
+
}, oi = {
|
|
1958
1954
|
key: 0,
|
|
1959
1955
|
class: "container-description"
|
|
1960
|
-
},
|
|
1956
|
+
}, si = {
|
|
1961
1957
|
key: 1,
|
|
1962
1958
|
class: "error-display"
|
|
1963
|
-
},
|
|
1959
|
+
}, li = {
|
|
1964
1960
|
key: 0,
|
|
1965
1961
|
class: "error-display-message"
|
|
1966
1962
|
}, ui = {
|
|
1967
1963
|
key: 2,
|
|
1968
1964
|
class: "cards-wrapper"
|
|
1969
|
-
},
|
|
1965
|
+
}, di = /* @__PURE__ */ k({
|
|
1970
1966
|
__name: "MetricCardContainer",
|
|
1971
1967
|
props: {
|
|
1972
1968
|
fallbackDisplayText: {
|
|
@@ -1995,7 +1991,7 @@ const ii = /* @__PURE__ */ me(ei, [["render", ti], ["__scopeId", "data-v-f7eb9c4
|
|
|
1995
1991
|
cardSize: {
|
|
1996
1992
|
type: String,
|
|
1997
1993
|
required: !1,
|
|
1998
|
-
default: () =>
|
|
1994
|
+
default: () => F.Large
|
|
1999
1995
|
},
|
|
2000
1996
|
containerTitle: {
|
|
2001
1997
|
type: String,
|
|
@@ -2009,162 +2005,170 @@ const ii = /* @__PURE__ */ me(ei, [["render", ti], ["__scopeId", "data-v-f7eb9c4
|
|
|
2009
2005
|
}
|
|
2010
2006
|
},
|
|
2011
2007
|
setup(e) {
|
|
2012
|
-
const
|
|
2013
|
-
const i =
|
|
2008
|
+
const t = e, r = g(() => t.cards.every((n) => (n == null ? void 0 : n.hasError) === !0)), a = (n) => {
|
|
2009
|
+
const i = $r(n.currentValue, n.previousValue) || 0, l = Fr(i, t.hasTrendAccess, n.increaseIsBad);
|
|
2014
2010
|
return {
|
|
2015
|
-
metricValue: n.formatValueFn ? n.formatValueFn(n.currentValue) :
|
|
2016
|
-
metricChange: n.formatChangeFn ? n.formatChangeFn(i) :
|
|
2017
|
-
changePolarity:
|
|
2018
|
-
trendIcon:
|
|
2019
|
-
cardSize:
|
|
2020
|
-
hasContainerTitle: !!
|
|
2011
|
+
metricValue: n.formatValueFn ? n.formatValueFn(n.currentValue) : zt(n.currentValue, { capital: !0, round: !0 }) || "0",
|
|
2012
|
+
metricChange: n.formatChangeFn ? n.formatChangeFn(i) : Hr(i, t.hasTrendAccess, t.fallbackDisplayText),
|
|
2013
|
+
changePolarity: l,
|
|
2014
|
+
trendIcon: Br(l, n.increaseIsBad),
|
|
2015
|
+
cardSize: t.cardSize,
|
|
2016
|
+
hasContainerTitle: !!t.containerTitle
|
|
2021
2017
|
};
|
|
2022
2018
|
};
|
|
2023
2019
|
return (n, i) => (p(), y("div", {
|
|
2024
|
-
class:
|
|
2020
|
+
class: Y(["kong-ui-public-metric-card-container", e.cardSize])
|
|
2025
2021
|
}, [
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
])) :
|
|
2030
|
-
|
|
2031
|
-
X(
|
|
2032
|
-
e.errorMessage ? (p(), y("div",
|
|
2022
|
+
t.containerTitle ? (p(), y("div", ai, [
|
|
2023
|
+
qe(w(t.containerTitle) + " ", 1),
|
|
2024
|
+
t.containerDescription ? (p(), y("div", oi, w(t.containerDescription), 1)) : N("", !0)
|
|
2025
|
+
])) : N("", !0),
|
|
2026
|
+
r.value ? (p(), y("div", si, [
|
|
2027
|
+
X(R(He), { class: "error-display-icon" }),
|
|
2028
|
+
e.errorMessage ? (p(), y("div", li, w(e.errorMessage), 1)) : N("", !0)
|
|
2033
2029
|
])) : (p(), y("div", ui, [
|
|
2034
|
-
(p(!0), y(_e, null, Ye(e.cards, (
|
|
2035
|
-
e.loading ? (p(),
|
|
2036
|
-
key: `skeleton-${
|
|
2037
|
-
class:
|
|
2038
|
-
}, null, 8, ["class"])) : (p(),
|
|
2039
|
-
key:
|
|
2030
|
+
(p(!0), y(_e, null, Ye(e.cards, (l, f) => (p(), y(_e, null, [
|
|
2031
|
+
e.loading ? (p(), I(ni, {
|
|
2032
|
+
key: `skeleton-${f}`,
|
|
2033
|
+
class: Y(e.cardSize === R(F).Small ? "loading-tabs-small" : "loading-tabs-large")
|
|
2034
|
+
}, null, 8, ["class"])) : (p(), I(ei, Qe({
|
|
2035
|
+
key: f,
|
|
2040
2036
|
ref_for: !0
|
|
2041
|
-
}, a(
|
|
2037
|
+
}, a(l), {
|
|
2042
2038
|
"card-size": e.cardSize,
|
|
2043
|
-
"card-type":
|
|
2044
|
-
description:
|
|
2039
|
+
"card-type": l.cardType,
|
|
2040
|
+
description: l.description,
|
|
2045
2041
|
"error-message": e.errorMessage,
|
|
2046
|
-
"has-error":
|
|
2047
|
-
title:
|
|
2048
|
-
"title-tag":
|
|
2049
|
-
tooltip:
|
|
2050
|
-
"trend-range":
|
|
2042
|
+
"has-error": l.hasError,
|
|
2043
|
+
title: l.title,
|
|
2044
|
+
"title-tag": l.titleTag,
|
|
2045
|
+
tooltip: l.tooltip,
|
|
2046
|
+
"trend-range": l.trendRange
|
|
2051
2047
|
}), null, 16, ["card-size", "card-type", "description", "error-message", "has-error", "title", "title-tag", "tooltip", "trend-range"]))
|
|
2052
2048
|
], 64))), 256))
|
|
2053
2049
|
]))
|
|
2054
2050
|
], 2));
|
|
2055
2051
|
}
|
|
2056
|
-
}),
|
|
2052
|
+
}), ci = /* @__PURE__ */ me(di, [["__scopeId", "data-v-d3a810e0"]]), Ci = /* @__PURE__ */ k({
|
|
2057
2053
|
__name: "MetricsConsumer",
|
|
2058
2054
|
props: {
|
|
2059
2055
|
lookupKey: { default: void 0 },
|
|
2060
|
-
cardSize: { default:
|
|
2056
|
+
cardSize: { default: F.Large },
|
|
2061
2057
|
cardToDisplay: { default: void 0 }
|
|
2062
2058
|
},
|
|
2063
2059
|
setup(e) {
|
|
2064
|
-
const
|
|
2065
|
-
if (!
|
|
2060
|
+
const t = e, r = ke(Oe);
|
|
2061
|
+
if (!r)
|
|
2066
2062
|
throw new Error("MetricsConsumer must be nested inside a MetricsProvider instance.");
|
|
2067
|
-
const { traffic: a, latency: n } =
|
|
2068
|
-
cardType:
|
|
2069
|
-
title: g(() =>
|
|
2063
|
+
const { traffic: a, latency: n } = r.data, { i18n: i } = K.useI18n(), l = K.useMetricCardBuilder({
|
|
2064
|
+
cardType: M.TRAFFIC,
|
|
2065
|
+
title: g(() => r.longCardTitles ? i.t("metricCard.long.traffic") : i.t("metricCard.short.traffic")),
|
|
2070
2066
|
record: a.mapped,
|
|
2071
2067
|
hasError: a.hasError,
|
|
2072
|
-
lookupKey:
|
|
2068
|
+
lookupKey: t.lookupKey,
|
|
2073
2069
|
sumGroupedValues: Q,
|
|
2074
2070
|
trendRange: a.trendRange
|
|
2075
|
-
}),
|
|
2076
|
-
const m = a.mapped.value,
|
|
2071
|
+
}), f = (m) => `${m.toFixed(ye)}%`, c = g(() => {
|
|
2072
|
+
const m = a.mapped.value, S = Z(m, "current", t.lookupKey, we), T = Z(m, "current", t.lookupKey, Q), b = S / T * 100 || 0, h = Z(m, "previous", t.lookupKey, we), H = Z(m, "previous", t.lookupKey, Q), E = h / H * 100 || 0;
|
|
2077
2073
|
return {
|
|
2078
|
-
cardType:
|
|
2074
|
+
cardType: M.ERROR_RATE,
|
|
2079
2075
|
hasError: a.hasError.value,
|
|
2080
|
-
currentValue:
|
|
2081
|
-
previousValue:
|
|
2082
|
-
formatValueFn:
|
|
2083
|
-
title:
|
|
2076
|
+
currentValue: b,
|
|
2077
|
+
previousValue: E,
|
|
2078
|
+
formatValueFn: f,
|
|
2079
|
+
title: r.longCardTitles ? i.t("metricCard.long.errorRate") : i.t("metricCard.short.errorRate"),
|
|
2084
2080
|
increaseIsBad: !0,
|
|
2085
2081
|
trendRange: a.trendRange.value
|
|
2086
2082
|
};
|
|
2087
2083
|
}), o = (m) => `${m}ms`, s = K.useMetricCardBuilder({
|
|
2088
|
-
cardType:
|
|
2084
|
+
cardType: M.LATENCY,
|
|
2089
2085
|
title: g(() => {
|
|
2090
|
-
const { longCardTitles: m, averageLatencies:
|
|
2091
|
-
return m ? i.t(`metricCard.long.${
|
|
2086
|
+
const { longCardTitles: m, averageLatencies: S } = r, T = S.value ? "averageLatency" : "p99Latency";
|
|
2087
|
+
return m ? i.t(`metricCard.long.${T}`) : i.t(`metricCard.short.${T}`);
|
|
2092
2088
|
}),
|
|
2093
2089
|
hasError: n.hasError,
|
|
2094
2090
|
record: n.mapped,
|
|
2095
|
-
lookupKey:
|
|
2091
|
+
lookupKey: t.lookupKey,
|
|
2096
2092
|
increaseIsBad: !0,
|
|
2097
2093
|
formatValueFn: o,
|
|
2098
2094
|
trendRange: n.trendRange
|
|
2099
|
-
}),
|
|
2100
|
-
cards:
|
|
2101
|
-
containerTitle:
|
|
2102
|
-
containerDescription:
|
|
2103
|
-
loading:
|
|
2104
|
-
hasTrendAccess:
|
|
2095
|
+
}), u = g(() => t.cardToDisplay === "TRAFFIC" ? [l.value] : t.cardToDisplay === "ERROR_RATE" ? [c.value] : t.cardToDisplay === "LATENCY" ? [s.value] : [l.value, c.value, s.value]), d = g(() => t.cardToDisplay === "TRAFFIC" || t.cardToDisplay === "ERROR_RATE" ? a.isLoading.value : t.cardToDisplay === "LATENCY" ? n.isLoading.value : a.isLoading.value || n.isLoading.value), v = g(() => ({
|
|
2096
|
+
cards: u.value,
|
|
2097
|
+
containerTitle: r.containerTitle.value,
|
|
2098
|
+
containerDescription: r.description.value,
|
|
2099
|
+
loading: d.value,
|
|
2100
|
+
hasTrendAccess: r.hasTrendAccess.value,
|
|
2105
2101
|
fallbackDisplayText: i.t("general.notAvailable"),
|
|
2106
2102
|
// If the parent container has a title, we enforce a Medium card size; otherwise, pass down provided cardSize
|
|
2107
|
-
cardSize:
|
|
2103
|
+
cardSize: r.containerTitle.value ? F.Medium : t.cardSize,
|
|
2108
2104
|
hideTitle: !0
|
|
2109
2105
|
})), C = g(() => ({
|
|
2110
|
-
loading:
|
|
2111
|
-
trafficCard:
|
|
2112
|
-
errorRateCard:
|
|
2106
|
+
loading: v.value.loading,
|
|
2107
|
+
trafficCard: l.value,
|
|
2108
|
+
errorRateCard: c.value,
|
|
2113
2109
|
latencyCard: s.value,
|
|
2114
|
-
errorRateFormatted:
|
|
2110
|
+
errorRateFormatted: f(c.value.currentValue),
|
|
2115
2111
|
latencyFormatted: o(s.value.currentValue)
|
|
2116
2112
|
}));
|
|
2117
|
-
return (m,
|
|
2118
|
-
X(
|
|
2113
|
+
return (m, S) => Le(m.$slots, "default", { cardValues: C.value }, () => [
|
|
2114
|
+
X(ci, We(Je(v.value)), null, 16)
|
|
2119
2115
|
]);
|
|
2120
2116
|
}
|
|
2121
|
-
}),
|
|
2122
|
-
const
|
|
2117
|
+
}), te = (e) => new Date(e), Si = (e, t) => {
|
|
2118
|
+
const r = e.body;
|
|
2123
2119
|
e.reply({
|
|
2124
2120
|
statusCode: 200,
|
|
2125
|
-
body:
|
|
2121
|
+
body: fi(r, t)
|
|
2126
2122
|
});
|
|
2127
|
-
}, xe = (e) => e.reduce((
|
|
2123
|
+
}, xe = (e) => e.reduce((t, r) => (t[r] = { name: r }, t), {}), fi = (e, t) => {
|
|
2128
2124
|
var C, m;
|
|
2129
|
-
const
|
|
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;
|
|
2130
2126
|
if ((e.dimensions ?? []).length > 2)
|
|
2131
2127
|
throw new Error(`Explore only supports 0-2 dimensions; got: ${JSON.stringify(e.dimensions)}`);
|
|
2132
|
-
const
|
|
2133
|
-
for (let
|
|
2134
|
-
for (let
|
|
2135
|
-
const
|
|
2128
|
+
const c = (e.dimensions ?? []).find((S) => S !== "time"), o = (t == null ? void 0 : t.dimensionNames) ?? [], s = Math.max(o.length, 1), u = e.metrics || [], d = [];
|
|
2129
|
+
for (let S = 0; S < f; S++)
|
|
2130
|
+
for (let T = 0; T < s; T++) {
|
|
2131
|
+
const b = c ? { [c]: o[T] } : {};
|
|
2136
2132
|
(C = e.dimensions) != null && C.includes("status_code_grouped") ? Q.forEach((h) => {
|
|
2137
|
-
const H =
|
|
2138
|
-
|
|
2133
|
+
const H = u.reduce((E, B) => (E[B] = (f - S) * 1e3 + 100 * T + 1, E), { ...b, status_code_grouped: h });
|
|
2134
|
+
d.push({
|
|
2139
2135
|
version: "v1",
|
|
2140
|
-
timestamp:
|
|
2136
|
+
timestamp: S === 0 ? te(i).toISOString() : te(i + l).toISOString(),
|
|
2141
2137
|
event: H
|
|
2142
2138
|
});
|
|
2143
|
-
}) :
|
|
2139
|
+
}) : d.push({
|
|
2144
2140
|
version: "v1",
|
|
2145
|
-
timestamp:
|
|
2146
|
-
event:
|
|
2141
|
+
timestamp: S === 0 ? te(i).toISOString() : te(i + l).toISOString(),
|
|
2142
|
+
event: u.reduce((h, H) => (h[H] = (f - S) * 1e3 + 100 * T + 1, h), { ...b })
|
|
2147
2143
|
});
|
|
2148
2144
|
}
|
|
2149
|
-
const
|
|
2145
|
+
const v = {
|
|
2150
2146
|
start_ms: i,
|
|
2151
2147
|
end_ms: n,
|
|
2152
|
-
granularity_ms:
|
|
2153
|
-
display:
|
|
2154
|
-
[
|
|
2148
|
+
granularity_ms: l,
|
|
2149
|
+
display: c ? {
|
|
2150
|
+
[c]: xe(o),
|
|
2155
2151
|
...(m = e.dimensions) != null && m.includes("status_code_grouped") ? { status_code_grouped: xe(Q) } : {}
|
|
2156
2152
|
} : {},
|
|
2157
2153
|
metric_names: e.metrics,
|
|
2158
2154
|
query_id: "test"
|
|
2159
2155
|
};
|
|
2160
2156
|
return {
|
|
2161
|
-
data:
|
|
2162
|
-
meta:
|
|
2157
|
+
data: d,
|
|
2158
|
+
meta: v
|
|
2163
2159
|
};
|
|
2164
2160
|
};
|
|
2165
2161
|
export {
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2162
|
+
Q as ALL_STATUS_CODE_GROUPS,
|
|
2163
|
+
ft as DEFAULT_REFRESH_INTERVAL,
|
|
2164
|
+
vt as INJECT_QUERY_PROVIDER,
|
|
2165
|
+
ct as MAX_ANALYTICS_REQUEST_RETRIES,
|
|
2166
|
+
F as MetricCardSize,
|
|
2167
|
+
M as MetricCardType,
|
|
2168
|
+
Ci as MetricsConsumer,
|
|
2169
|
+
hi as MetricsProvider,
|
|
2170
|
+
we as STATUS_CODES_FAILED,
|
|
2171
|
+
mi as STATUS_CODES_SUCCESS,
|
|
2172
|
+
fi as mockExploreResponse,
|
|
2173
|
+
Si as mockExploreResponseFromCypress
|
|
2170
2174
|
};
|