@kong-ui-public/dashboard-renderer 8.30.0 → 8.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{GeoMapRenderer-DBfDS4cI.js → GeoMapRenderer-VT-W38ak.js} +1 -1
- package/dist/dashboard-renderer.es.js +1 -1
- package/dist/dashboard-renderer.umd.js +6 -6
- package/dist/{index-D0YYz-0D.js → index-BX85m-BS.js} +788 -731
- package/dist/style.css +1 -1
- package/dist/types/components/DashboardRenderer.vue.d.ts +132 -4
- package/dist/types/components/DashboardRenderer.vue.d.ts.map +1 -1
- package/dist/types/components/DashboardTile.vue.d.ts +198 -6
- package/dist/types/components/DashboardTile.vue.d.ts.map +1 -1
- package/dist/types/components/TopTalkersRenderer.vue.d.ts +11 -0
- package/dist/types/components/TopTalkersRenderer.vue.d.ts.map +1 -0
- package/package.json +11 -11
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ge, computed as w, openBlock as z, createElementBlock as se, renderSlot as et, createTextVNode as Je, toDisplayString as ie, createVNode as ue, withCtx as $, inject as Ae, provide as As, toRaw as Is, isRef as Ls, isReactive as qs, toRef as dt, hasInjectionContext as ui, ref as Q, onMounted as Mt, watch as $e, onUnmounted as at, getCurrentInstance as Ps, readonly as Wt, resolveComponent as _e, withKeys as Hs, unref as D, createElementVNode as ce, createCommentVNode as me, createBlock as B, watchEffect as ss, createSlots as pt, normalizeStyle as Et, normalizeClass as rt, mergeProps as ns, normalizeProps as Fs, guardReactiveProps as $s, defineAsyncComponent as rs, Fragment as Vt, useCssVars as Zt, useModel as os, nextTick as Jt, resolveDynamicComponent as as, toHandlers as Us, mergeModels as Ct, renderList as ls, useTemplateRef as ci } from "vue";
|
|
2
2
|
import { isPlatformDatasource as ei, msToGranularity as Gt, TimePeriods as ti, TIMEFRAME_LOOKUP as ii, requestFilterTypeEmptyV2 as Bs, relativeTimeRangeValuesRequestV2 as Ws, fetchAllRequests as Gs, restoreAfterCapture as di, prepareForCapture as Ys, formatTimestamp as hi, EXPORT_RECORD_LIMIT as us, finestGranularityForDuration as js, Granularities as fi, formatTime as mi } from "@kong-ui-public/analytics-utilities";
|
|
3
3
|
import { InfoIcon as Ks, VisibilityOffIcon as cs, WarningOutlineIcon as ds, WarningIcon as pi, ProgressIcon as Qs, RefreshIcon as Xs, EditIcon as Vs, MoreIcon as Zs } from "@kong/icons";
|
|
4
4
|
import { createI18n as Js, i18nTComponent as en } from "@kong-ui-public/i18n";
|
|
5
5
|
import { useAnalyticsConfigStore as si, useDatasourceConfigStore as lt } from "@kong-ui-public/analytics-config-store";
|
|
6
|
-
import { handleQueryError as hs, SimpleChart as tn, AnalyticsChart as Yt, requestsToScatterData as sn, TopNTable as nn } from "@kong-ui-public/analytics-chart";
|
|
6
|
+
import { handleQueryError as hs, SimpleChart as tn, AnalyticsChart as Yt, requestsToScatterData as sn, TopNTable as nn, TopTalkersGrid as rn, TopTalkersColumn as on } from "@kong-ui-public/analytics-chart";
|
|
7
7
|
import fs from "swrv";
|
|
8
8
|
import "axios";
|
|
9
|
-
import { MetricsProvider as
|
|
10
|
-
import { TableDataGrid as
|
|
11
|
-
import { KSegmentedControl as
|
|
12
|
-
const
|
|
9
|
+
import { MetricsProvider as an, MetricsConsumer as ln } from "@kong-ui-public/analytics-metric-provider";
|
|
10
|
+
import { TableDataGrid as un } from "@kong-ui-public/table-data-grid";
|
|
11
|
+
import { KSegmentedControl as cn } from "@kong/kongponents";
|
|
12
|
+
const dn = {
|
|
13
13
|
lessThanXSeconds: {
|
|
14
14
|
one: "less than a second",
|
|
15
15
|
other: "less than {{count}} seconds"
|
|
@@ -71,9 +71,9 @@ const un = {
|
|
|
71
71
|
one: "almost 1 year",
|
|
72
72
|
other: "almost {{count}} years"
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, hn = (s, e, t) => {
|
|
75
75
|
let i;
|
|
76
|
-
const n =
|
|
76
|
+
const n = dn[s];
|
|
77
77
|
return typeof n == "string" ? i = n : e === 1 ? i = n.one : i = n.other.replace("{{count}}", e.toString()), t?.addSuffix ? t.comparison && t.comparison > 0 ? "in " + i : i + " ago" : i;
|
|
78
78
|
};
|
|
79
79
|
function Lt(s) {
|
|
@@ -82,42 +82,42 @@ function Lt(s) {
|
|
|
82
82
|
return s.formats[t] || s.formats[s.defaultWidth];
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
const
|
|
85
|
+
const fn = {
|
|
86
86
|
full: "EEEE, MMMM do, y",
|
|
87
87
|
long: "MMMM do, y",
|
|
88
88
|
medium: "MMM d, y",
|
|
89
89
|
short: "MM/dd/yyyy"
|
|
90
|
-
},
|
|
90
|
+
}, mn = {
|
|
91
91
|
full: "h:mm:ss a zzzz",
|
|
92
92
|
long: "h:mm:ss a z",
|
|
93
93
|
medium: "h:mm:ss a",
|
|
94
94
|
short: "h:mm a"
|
|
95
|
-
},
|
|
95
|
+
}, pn = {
|
|
96
96
|
full: "{{date}} 'at' {{time}}",
|
|
97
97
|
long: "{{date}} 'at' {{time}}",
|
|
98
98
|
medium: "{{date}}, {{time}}",
|
|
99
99
|
short: "{{date}}, {{time}}"
|
|
100
|
-
},
|
|
100
|
+
}, gn = {
|
|
101
101
|
date: Lt({
|
|
102
|
-
formats:
|
|
102
|
+
formats: fn,
|
|
103
103
|
defaultWidth: "full"
|
|
104
104
|
}),
|
|
105
105
|
time: Lt({
|
|
106
|
-
formats:
|
|
106
|
+
formats: mn,
|
|
107
107
|
defaultWidth: "full"
|
|
108
108
|
}),
|
|
109
109
|
dateTime: Lt({
|
|
110
|
-
formats:
|
|
110
|
+
formats: pn,
|
|
111
111
|
defaultWidth: "full"
|
|
112
112
|
})
|
|
113
|
-
},
|
|
113
|
+
}, yn = {
|
|
114
114
|
lastWeek: "'last' eeee 'at' p",
|
|
115
115
|
yesterday: "'yesterday at' p",
|
|
116
116
|
today: "'today at' p",
|
|
117
117
|
tomorrow: "'tomorrow at' p",
|
|
118
118
|
nextWeek: "eeee 'at' p",
|
|
119
119
|
other: "P"
|
|
120
|
-
},
|
|
120
|
+
}, vn = (s, e, t, i) => yn[s];
|
|
121
121
|
function ut(s) {
|
|
122
122
|
return (e, t) => {
|
|
123
123
|
const i = t?.context ? String(t.context) : "standalone";
|
|
@@ -133,15 +133,15 @@ function ut(s) {
|
|
|
133
133
|
return n[r];
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const _n = {
|
|
137
137
|
narrow: ["B", "A"],
|
|
138
138
|
abbreviated: ["BC", "AD"],
|
|
139
139
|
wide: ["Before Christ", "Anno Domini"]
|
|
140
|
-
},
|
|
140
|
+
}, wn = {
|
|
141
141
|
narrow: ["1", "2", "3", "4"],
|
|
142
142
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
143
143
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
144
|
-
},
|
|
144
|
+
}, bn = {
|
|
145
145
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
146
146
|
abbreviated: [
|
|
147
147
|
"Jan",
|
|
@@ -171,7 +171,7 @@ const yn = {
|
|
|
171
171
|
"November",
|
|
172
172
|
"December"
|
|
173
173
|
]
|
|
174
|
-
},
|
|
174
|
+
}, xn = {
|
|
175
175
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
176
176
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
177
177
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -184,7 +184,7 @@ const yn = {
|
|
|
184
184
|
"Friday",
|
|
185
185
|
"Saturday"
|
|
186
186
|
]
|
|
187
|
-
},
|
|
187
|
+
}, En = {
|
|
188
188
|
narrow: {
|
|
189
189
|
am: "a",
|
|
190
190
|
pm: "p",
|
|
@@ -215,7 +215,7 @@ const yn = {
|
|
|
215
215
|
evening: "evening",
|
|
216
216
|
night: "night"
|
|
217
217
|
}
|
|
218
|
-
},
|
|
218
|
+
}, Cn = {
|
|
219
219
|
narrow: {
|
|
220
220
|
am: "a",
|
|
221
221
|
pm: "p",
|
|
@@ -246,7 +246,7 @@ const yn = {
|
|
|
246
246
|
evening: "in the evening",
|
|
247
247
|
night: "at night"
|
|
248
248
|
}
|
|
249
|
-
},
|
|
249
|
+
}, Rn = (s, e) => {
|
|
250
250
|
const t = Number(s), i = t % 100;
|
|
251
251
|
if (i > 20 || i < 10)
|
|
252
252
|
switch (i % 10) {
|
|
@@ -258,29 +258,29 @@ const yn = {
|
|
|
258
258
|
return t + "rd";
|
|
259
259
|
}
|
|
260
260
|
return t + "th";
|
|
261
|
-
},
|
|
262
|
-
ordinalNumber:
|
|
261
|
+
}, kn = {
|
|
262
|
+
ordinalNumber: Rn,
|
|
263
263
|
era: ut({
|
|
264
|
-
values:
|
|
264
|
+
values: _n,
|
|
265
265
|
defaultWidth: "wide"
|
|
266
266
|
}),
|
|
267
267
|
quarter: ut({
|
|
268
|
-
values:
|
|
268
|
+
values: wn,
|
|
269
269
|
defaultWidth: "wide",
|
|
270
270
|
argumentCallback: (s) => s - 1
|
|
271
271
|
}),
|
|
272
272
|
month: ut({
|
|
273
|
-
values:
|
|
273
|
+
values: bn,
|
|
274
274
|
defaultWidth: "wide"
|
|
275
275
|
}),
|
|
276
276
|
day: ut({
|
|
277
|
-
values:
|
|
277
|
+
values: xn,
|
|
278
278
|
defaultWidth: "wide"
|
|
279
279
|
}),
|
|
280
280
|
dayPeriod: ut({
|
|
281
|
-
values:
|
|
281
|
+
values: En,
|
|
282
282
|
defaultWidth: "wide",
|
|
283
|
-
formattingValues:
|
|
283
|
+
formattingValues: Cn,
|
|
284
284
|
defaultFormattingWidth: "wide"
|
|
285
285
|
})
|
|
286
286
|
};
|
|
@@ -289,9 +289,9 @@ function ct(s) {
|
|
|
289
289
|
const i = t.width, n = i && s.matchPatterns[i] || s.matchPatterns[s.defaultMatchWidth], r = e.match(n);
|
|
290
290
|
if (!r)
|
|
291
291
|
return null;
|
|
292
|
-
const o = r[0], a = i && s.parsePatterns[i] || s.parsePatterns[s.defaultParseWidth], c = Array.isArray(a) ?
|
|
292
|
+
const o = r[0], a = i && s.parsePatterns[i] || s.parsePatterns[s.defaultParseWidth], c = Array.isArray(a) ? Sn(a, (d) => d.test(o)) : (
|
|
293
293
|
// [TODO] -- I challenge you to fix the type
|
|
294
|
-
|
|
294
|
+
Tn(a, (d) => d.test(o))
|
|
295
295
|
);
|
|
296
296
|
let l;
|
|
297
297
|
l = s.valueCallback ? s.valueCallback(c) : c, l = t.valueCallback ? (
|
|
@@ -302,17 +302,17 @@ function ct(s) {
|
|
|
302
302
|
return { value: l, rest: u };
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function Tn(s, e) {
|
|
306
306
|
for (const t in s)
|
|
307
307
|
if (Object.prototype.hasOwnProperty.call(s, t) && e(s[t]))
|
|
308
308
|
return t;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Sn(s, e) {
|
|
311
311
|
for (let t = 0; t < s.length; t++)
|
|
312
312
|
if (e(s[t]))
|
|
313
313
|
return t;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Dn(s) {
|
|
316
316
|
return (e, t = {}) => {
|
|
317
317
|
const i = e.match(s.matchPattern);
|
|
318
318
|
if (!i) return null;
|
|
@@ -324,23 +324,23 @@ function Tn(s) {
|
|
|
324
324
|
return { value: o, rest: a };
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
|
-
const
|
|
327
|
+
const On = /^(\d+)(th|st|nd|rd)?/i, zn = /\d+/i, Mn = {
|
|
328
328
|
narrow: /^(b|a)/i,
|
|
329
329
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
330
330
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
331
|
-
},
|
|
331
|
+
}, Nn = {
|
|
332
332
|
any: [/^b/i, /^(a|c)/i]
|
|
333
|
-
},
|
|
333
|
+
}, An = {
|
|
334
334
|
narrow: /^[1234]/i,
|
|
335
335
|
abbreviated: /^q[1234]/i,
|
|
336
336
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
337
|
-
},
|
|
337
|
+
}, In = {
|
|
338
338
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
339
|
-
},
|
|
339
|
+
}, Ln = {
|
|
340
340
|
narrow: /^[jfmasond]/i,
|
|
341
341
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
342
342
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
343
|
-
},
|
|
343
|
+
}, qn = {
|
|
344
344
|
narrow: [
|
|
345
345
|
/^j/i,
|
|
346
346
|
/^f/i,
|
|
@@ -369,18 +369,18 @@ const Sn = /^(\d+)(th|st|nd|rd)?/i, Dn = /\d+/i, On = {
|
|
|
369
369
|
/^n/i,
|
|
370
370
|
/^d/i
|
|
371
371
|
]
|
|
372
|
-
},
|
|
372
|
+
}, Pn = {
|
|
373
373
|
narrow: /^[smtwf]/i,
|
|
374
374
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
375
375
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
376
376
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
377
|
-
},
|
|
377
|
+
}, Hn = {
|
|
378
378
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
379
379
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
380
|
-
},
|
|
380
|
+
}, Fn = {
|
|
381
381
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
382
382
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
383
|
-
},
|
|
383
|
+
}, $n = {
|
|
384
384
|
any: {
|
|
385
385
|
am: /^a/i,
|
|
386
386
|
pm: /^p/i,
|
|
@@ -391,60 +391,60 @@ const Sn = /^(\d+)(th|st|nd|rd)?/i, Dn = /\d+/i, On = {
|
|
|
391
391
|
evening: /evening/i,
|
|
392
392
|
night: /night/i
|
|
393
393
|
}
|
|
394
|
-
},
|
|
395
|
-
ordinalNumber:
|
|
396
|
-
matchPattern:
|
|
397
|
-
parsePattern:
|
|
394
|
+
}, Un = {
|
|
395
|
+
ordinalNumber: Dn({
|
|
396
|
+
matchPattern: On,
|
|
397
|
+
parsePattern: zn,
|
|
398
398
|
valueCallback: (s) => parseInt(s, 10)
|
|
399
399
|
}),
|
|
400
400
|
era: ct({
|
|
401
|
-
matchPatterns:
|
|
401
|
+
matchPatterns: Mn,
|
|
402
402
|
defaultMatchWidth: "wide",
|
|
403
|
-
parsePatterns:
|
|
403
|
+
parsePatterns: Nn,
|
|
404
404
|
defaultParseWidth: "any"
|
|
405
405
|
}),
|
|
406
406
|
quarter: ct({
|
|
407
|
-
matchPatterns:
|
|
407
|
+
matchPatterns: An,
|
|
408
408
|
defaultMatchWidth: "wide",
|
|
409
|
-
parsePatterns:
|
|
409
|
+
parsePatterns: In,
|
|
410
410
|
defaultParseWidth: "any",
|
|
411
411
|
valueCallback: (s) => s + 1
|
|
412
412
|
}),
|
|
413
413
|
month: ct({
|
|
414
|
-
matchPatterns:
|
|
414
|
+
matchPatterns: Ln,
|
|
415
415
|
defaultMatchWidth: "wide",
|
|
416
|
-
parsePatterns:
|
|
416
|
+
parsePatterns: qn,
|
|
417
417
|
defaultParseWidth: "any"
|
|
418
418
|
}),
|
|
419
419
|
day: ct({
|
|
420
|
-
matchPatterns:
|
|
420
|
+
matchPatterns: Pn,
|
|
421
421
|
defaultMatchWidth: "wide",
|
|
422
|
-
parsePatterns:
|
|
422
|
+
parsePatterns: Hn,
|
|
423
423
|
defaultParseWidth: "any"
|
|
424
424
|
}),
|
|
425
425
|
dayPeriod: ct({
|
|
426
|
-
matchPatterns:
|
|
426
|
+
matchPatterns: Fn,
|
|
427
427
|
defaultMatchWidth: "any",
|
|
428
|
-
parsePatterns:
|
|
428
|
+
parsePatterns: $n,
|
|
429
429
|
defaultParseWidth: "any"
|
|
430
430
|
})
|
|
431
|
-
},
|
|
431
|
+
}, Bn = {
|
|
432
432
|
code: "en-US",
|
|
433
|
-
formatDistance:
|
|
434
|
-
formatLong:
|
|
435
|
-
formatRelative:
|
|
436
|
-
localize:
|
|
437
|
-
match:
|
|
433
|
+
formatDistance: hn,
|
|
434
|
+
formatLong: gn,
|
|
435
|
+
formatRelative: vn,
|
|
436
|
+
localize: kn,
|
|
437
|
+
match: Un,
|
|
438
438
|
options: {
|
|
439
439
|
weekStartsOn: 0,
|
|
440
440
|
firstWeekContainsDate: 1
|
|
441
441
|
}
|
|
442
442
|
};
|
|
443
|
-
let
|
|
443
|
+
let Wn = {};
|
|
444
444
|
function gt() {
|
|
445
|
-
return
|
|
445
|
+
return Wn;
|
|
446
446
|
}
|
|
447
|
-
const ms = 6048e5,
|
|
447
|
+
const ms = 6048e5, Gn = 864e5, gi = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
448
448
|
function je(s, e) {
|
|
449
449
|
return typeof s == "function" ? s(e) : s && typeof s == "object" && gi in s ? s[gi](e) : s instanceof Date ? new s.constructor(e) : new Date(e);
|
|
450
450
|
}
|
|
@@ -465,7 +465,7 @@ function yi(s) {
|
|
|
465
465
|
);
|
|
466
466
|
return t.setUTCFullYear(e.getFullYear()), +s - +t;
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Yn(s, ...e) {
|
|
469
469
|
const t = je.bind(
|
|
470
470
|
null,
|
|
471
471
|
e.find((i) => typeof i == "object")
|
|
@@ -476,43 +476,43 @@ function vi(s, e) {
|
|
|
476
476
|
const t = Ie(s, e?.in);
|
|
477
477
|
return t.setHours(0, 0, 0, 0), t;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
480
|
-
const [i, n] =
|
|
479
|
+
function jn(s, e, t) {
|
|
480
|
+
const [i, n] = Yn(
|
|
481
481
|
t?.in,
|
|
482
482
|
s,
|
|
483
483
|
e
|
|
484
484
|
), r = vi(i), o = vi(n), a = +r - yi(r), c = +o - yi(o);
|
|
485
|
-
return Math.round((a - c) /
|
|
485
|
+
return Math.round((a - c) / Gn);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function Kn(s, e) {
|
|
488
488
|
const t = Ie(s, e?.in);
|
|
489
489
|
return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t;
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Qn(s, e) {
|
|
492
492
|
const t = Ie(s, e?.in);
|
|
493
|
-
return
|
|
493
|
+
return jn(t, Kn(t)) + 1;
|
|
494
494
|
}
|
|
495
495
|
function ht(s, e) {
|
|
496
496
|
const t = gt(), i = e?.weekStartsOn ?? e?.locale?.options?.weekStartsOn ?? t.weekStartsOn ?? t.locale?.options?.weekStartsOn ?? 0, n = Ie(s, e?.in), r = n.getDay(), o = (r < i ? 7 : 0) + r - i;
|
|
497
497
|
return n.setDate(n.getDate() - o), n.setHours(0, 0, 0, 0), n;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function Rt(s, e) {
|
|
500
500
|
return ht(s, { ...e, weekStartsOn: 1 });
|
|
501
501
|
}
|
|
502
502
|
function ps(s, e) {
|
|
503
503
|
const t = Ie(s, e?.in), i = t.getFullYear(), n = je(t, 0);
|
|
504
504
|
n.setFullYear(i + 1, 0, 4), n.setHours(0, 0, 0, 0);
|
|
505
|
-
const r =
|
|
505
|
+
const r = Rt(n), o = je(t, 0);
|
|
506
506
|
o.setFullYear(i, 0, 4), o.setHours(0, 0, 0, 0);
|
|
507
|
-
const a =
|
|
507
|
+
const a = Rt(o);
|
|
508
508
|
return t.getTime() >= r.getTime() ? i + 1 : t.getTime() >= a.getTime() ? i : i - 1;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Xn(s, e) {
|
|
511
511
|
const t = ps(s, e), i = je(s, 0);
|
|
512
|
-
return i.setFullYear(t, 0, 4), i.setHours(0, 0, 0, 0),
|
|
512
|
+
return i.setFullYear(t, 0, 4), i.setHours(0, 0, 0, 0), Rt(i);
|
|
513
513
|
}
|
|
514
|
-
function
|
|
515
|
-
const t = Ie(s, e?.in), i = +
|
|
514
|
+
function Vn(s, e) {
|
|
515
|
+
const t = Ie(s, e?.in), i = +Rt(t) - +Xn(t);
|
|
516
516
|
return Math.round(i / ms) + 1;
|
|
517
517
|
}
|
|
518
518
|
function gs(s, e) {
|
|
@@ -523,19 +523,19 @@ function gs(s, e) {
|
|
|
523
523
|
const l = ht(c, e);
|
|
524
524
|
return +t >= +a ? i + 1 : +t >= +l ? i : i - 1;
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function Zn(s, e) {
|
|
527
527
|
const t = gt(), i = e?.firstWeekContainsDate ?? e?.locale?.options?.firstWeekContainsDate ?? t.firstWeekContainsDate ?? t.locale?.options?.firstWeekContainsDate ?? 1, n = gs(s, e), r = je(e?.in || s, 0);
|
|
528
528
|
return r.setFullYear(n, 0, i), r.setHours(0, 0, 0, 0), ht(r, e);
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
const t = Ie(s, e?.in), i = +ht(t, e) - +
|
|
530
|
+
function Jn(s, e) {
|
|
531
|
+
const t = Ie(s, e?.in), i = +ht(t, e) - +Zn(t, e);
|
|
532
532
|
return Math.round(i / ms) + 1;
|
|
533
533
|
}
|
|
534
534
|
function ee(s, e) {
|
|
535
535
|
const t = s < 0 ? "-" : "", i = Math.abs(s).toString().padStart(e, "0");
|
|
536
536
|
return t + i;
|
|
537
537
|
}
|
|
538
|
-
const
|
|
538
|
+
const Ye = {
|
|
539
539
|
// Year
|
|
540
540
|
y(s, e) {
|
|
541
541
|
const t = s.getFullYear(), i = t > 0 ? t : 1 - t;
|
|
@@ -618,7 +618,7 @@ const Ge = {
|
|
|
618
618
|
const i = s.getFullYear(), n = i > 0 ? i : 1 - i;
|
|
619
619
|
return t.ordinalNumber(n, { unit: "year" });
|
|
620
620
|
}
|
|
621
|
-
return
|
|
621
|
+
return Ye.y(s, e);
|
|
622
622
|
},
|
|
623
623
|
// Local week-numbering year
|
|
624
624
|
Y: function(s, e, t, i) {
|
|
@@ -717,7 +717,7 @@ const Ge = {
|
|
|
717
717
|
switch (e) {
|
|
718
718
|
case "M":
|
|
719
719
|
case "MM":
|
|
720
|
-
return
|
|
720
|
+
return Ye.M(s, e);
|
|
721
721
|
// 1st, 2nd, ..., 12th
|
|
722
722
|
case "Mo":
|
|
723
723
|
return t.ordinalNumber(i + 1, { unit: "month" });
|
|
@@ -768,21 +768,21 @@ const Ge = {
|
|
|
768
768
|
},
|
|
769
769
|
// Local week of year
|
|
770
770
|
w: function(s, e, t, i) {
|
|
771
|
-
const n =
|
|
771
|
+
const n = Jn(s, i);
|
|
772
772
|
return e === "wo" ? t.ordinalNumber(n, { unit: "week" }) : ee(n, e.length);
|
|
773
773
|
},
|
|
774
774
|
// ISO week of year
|
|
775
775
|
I: function(s, e, t) {
|
|
776
|
-
const i =
|
|
776
|
+
const i = Vn(s);
|
|
777
777
|
return e === "Io" ? t.ordinalNumber(i, { unit: "week" }) : ee(i, e.length);
|
|
778
778
|
},
|
|
779
779
|
// Day of the month
|
|
780
780
|
d: function(s, e, t) {
|
|
781
|
-
return e === "do" ? t.ordinalNumber(s.getDate(), { unit: "date" }) :
|
|
781
|
+
return e === "do" ? t.ordinalNumber(s.getDate(), { unit: "date" }) : Ye.d(s, e);
|
|
782
782
|
},
|
|
783
783
|
// Day of year
|
|
784
784
|
D: function(s, e, t) {
|
|
785
|
-
const i =
|
|
785
|
+
const i = Qn(s);
|
|
786
786
|
return e === "Do" ? t.ordinalNumber(i, { unit: "dayOfYear" }) : ee(i, e.length);
|
|
787
787
|
},
|
|
788
788
|
// Day of week
|
|
@@ -1013,11 +1013,11 @@ const Ge = {
|
|
|
1013
1013
|
let i = s.getHours() % 12;
|
|
1014
1014
|
return i === 0 && (i = 12), t.ordinalNumber(i, { unit: "hour" });
|
|
1015
1015
|
}
|
|
1016
|
-
return
|
|
1016
|
+
return Ye.h(s, e);
|
|
1017
1017
|
},
|
|
1018
1018
|
// Hour [0-23]
|
|
1019
1019
|
H: function(s, e, t) {
|
|
1020
|
-
return e === "Ho" ? t.ordinalNumber(s.getHours(), { unit: "hour" }) :
|
|
1020
|
+
return e === "Ho" ? t.ordinalNumber(s.getHours(), { unit: "hour" }) : Ye.H(s, e);
|
|
1021
1021
|
},
|
|
1022
1022
|
// Hour [0-11]
|
|
1023
1023
|
K: function(s, e, t) {
|
|
@@ -1031,15 +1031,15 @@ const Ge = {
|
|
|
1031
1031
|
},
|
|
1032
1032
|
// Minute
|
|
1033
1033
|
m: function(s, e, t) {
|
|
1034
|
-
return e === "mo" ? t.ordinalNumber(s.getMinutes(), { unit: "minute" }) :
|
|
1034
|
+
return e === "mo" ? t.ordinalNumber(s.getMinutes(), { unit: "minute" }) : Ye.m(s, e);
|
|
1035
1035
|
},
|
|
1036
1036
|
// Second
|
|
1037
1037
|
s: function(s, e, t) {
|
|
1038
|
-
return e === "so" ? t.ordinalNumber(s.getSeconds(), { unit: "second" }) :
|
|
1038
|
+
return e === "so" ? t.ordinalNumber(s.getSeconds(), { unit: "second" }) : Ye.s(s, e);
|
|
1039
1039
|
},
|
|
1040
1040
|
// Fraction of second
|
|
1041
1041
|
S: function(s, e) {
|
|
1042
|
-
return
|
|
1042
|
+
return Ye.S(s, e);
|
|
1043
1043
|
},
|
|
1044
1044
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1045
1045
|
X: function(s, e, t) {
|
|
@@ -1148,7 +1148,7 @@ const xi = (s, e) => {
|
|
|
1148
1148
|
default:
|
|
1149
1149
|
return e.time({ width: "full" });
|
|
1150
1150
|
}
|
|
1151
|
-
},
|
|
1151
|
+
}, er = (s, e) => {
|
|
1152
1152
|
const t = s.match(/(P+)(p+)?/) || [], i = t[1], n = t[2];
|
|
1153
1153
|
if (!n)
|
|
1154
1154
|
return xi(s, e);
|
|
@@ -1168,51 +1168,51 @@ const xi = (s, e) => {
|
|
|
1168
1168
|
break;
|
|
1169
1169
|
}
|
|
1170
1170
|
return r.replace("{{date}}", xi(i, e)).replace("{{time}}", ys(n, e));
|
|
1171
|
-
},
|
|
1171
|
+
}, tr = {
|
|
1172
1172
|
p: ys,
|
|
1173
|
-
P:
|
|
1174
|
-
},
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
1173
|
+
P: er
|
|
1174
|
+
}, ir = /^D+$/, sr = /^Y+$/, nr = ["D", "DD", "YY", "YYYY"];
|
|
1175
|
+
function rr(s) {
|
|
1176
|
+
return ir.test(s);
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return
|
|
1178
|
+
function or(s) {
|
|
1179
|
+
return sr.test(s);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1182
|
-
const i =
|
|
1183
|
-
if (console.warn(i),
|
|
1181
|
+
function ar(s, e, t) {
|
|
1182
|
+
const i = lr(s, e, t);
|
|
1183
|
+
if (console.warn(i), nr.includes(s)) throw new RangeError(i);
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function lr(s, e, t) {
|
|
1186
1186
|
const i = s[0] === "Y" ? "years" : "days of the month";
|
|
1187
1187
|
return `Use \`${s.toLowerCase()}\` instead of \`${s}\` (in \`${e}\`) for formatting ${i} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function ur(s) {
|
|
1190
1190
|
return s instanceof Date || typeof s == "object" && Object.prototype.toString.call(s) === "[object Date]";
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return !(!
|
|
1192
|
+
function cr(s) {
|
|
1193
|
+
return !(!ur(s) && typeof s != "number" || isNaN(+Ie(s)));
|
|
1194
1194
|
}
|
|
1195
|
-
const
|
|
1196
|
-
function
|
|
1197
|
-
const i = gt(), n = t?.locale ?? i.locale ??
|
|
1198
|
-
if (!
|
|
1195
|
+
const dr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, hr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, fr = /^'([^]*?)'?$/, mr = /''/g, pr = /[a-zA-Z]/;
|
|
1196
|
+
function gr(s, e, t) {
|
|
1197
|
+
const i = gt(), n = t?.locale ?? i.locale ?? Bn, r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? i.firstWeekContainsDate ?? i.locale?.options?.firstWeekContainsDate ?? 1, o = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? i.weekStartsOn ?? i.locale?.options?.weekStartsOn ?? 0, a = Ie(s, t?.in);
|
|
1198
|
+
if (!cr(a))
|
|
1199
1199
|
throw new RangeError("Invalid time value");
|
|
1200
|
-
let c = e.match(
|
|
1200
|
+
let c = e.match(hr).map((u) => {
|
|
1201
1201
|
const d = u[0];
|
|
1202
1202
|
if (d === "p" || d === "P") {
|
|
1203
|
-
const h =
|
|
1203
|
+
const h = tr[d];
|
|
1204
1204
|
return h(u, n.formatLong);
|
|
1205
1205
|
}
|
|
1206
1206
|
return u;
|
|
1207
|
-
}).join("").match(
|
|
1207
|
+
}).join("").match(dr).map((u) => {
|
|
1208
1208
|
if (u === "''")
|
|
1209
1209
|
return { isToken: !1, value: "'" };
|
|
1210
1210
|
const d = u[0];
|
|
1211
1211
|
if (d === "'")
|
|
1212
|
-
return { isToken: !1, value:
|
|
1212
|
+
return { isToken: !1, value: yr(u) };
|
|
1213
1213
|
if (_i[d])
|
|
1214
1214
|
return { isToken: !0, value: u };
|
|
1215
|
-
if (d.match(
|
|
1215
|
+
if (d.match(pr))
|
|
1216
1216
|
throw new RangeError(
|
|
1217
1217
|
"Format string contains an unescaped latin alphabet character `" + d + "`"
|
|
1218
1218
|
);
|
|
@@ -1227,43 +1227,43 @@ function mr(s, e, t) {
|
|
|
1227
1227
|
return c.map((u) => {
|
|
1228
1228
|
if (!u.isToken) return u.value;
|
|
1229
1229
|
const d = u.value;
|
|
1230
|
-
(!t?.useAdditionalWeekYearTokens &&
|
|
1230
|
+
(!t?.useAdditionalWeekYearTokens && or(d) || !t?.useAdditionalDayOfYearTokens && rr(d)) && ar(d, e, String(s));
|
|
1231
1231
|
const h = _i[d[0]];
|
|
1232
1232
|
return h(a, d, n.localize, l);
|
|
1233
1233
|
}).join("");
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1236
|
-
const e = s.match(
|
|
1237
|
-
return e ? e[1].replace(
|
|
1235
|
+
function yr(s) {
|
|
1236
|
+
const e = s.match(fr);
|
|
1237
|
+
return e ? e[1].replace(mr, "'") : s;
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1239
|
+
function vr() {
|
|
1240
1240
|
return Object.assign({}, gt());
|
|
1241
1241
|
}
|
|
1242
1242
|
function Ei(s, e, t) {
|
|
1243
|
-
const i =
|
|
1244
|
-
return "formatToParts" in n ?
|
|
1243
|
+
const i = vr(), n = br(s, t.timeZone, t.locale ?? i.locale);
|
|
1244
|
+
return "formatToParts" in n ? _r(n, e) : wr(n, e);
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function _r(s, e) {
|
|
1247
1247
|
const t = s.formatToParts(e);
|
|
1248
1248
|
for (let i = t.length - 1; i >= 0; --i)
|
|
1249
1249
|
if (t[i].type === "timeZoneName")
|
|
1250
1250
|
return t[i].value;
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function wr(s, e) {
|
|
1253
1253
|
const t = s.format(e).replace(/\u200E/g, ""), i = / [\w-+ ]+$/.exec(t);
|
|
1254
1254
|
return i ? i[0].substr(1) : "";
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function br(s, e, t) {
|
|
1257
1257
|
return new Intl.DateTimeFormat(t ? [t.code, "en-US"] : void 0, {
|
|
1258
1258
|
timeZone: e,
|
|
1259
1259
|
timeZoneName: s
|
|
1260
1260
|
});
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1263
|
-
const t =
|
|
1264
|
-
return "formatToParts" in t ?
|
|
1262
|
+
function xr(s, e) {
|
|
1263
|
+
const t = Tr(e);
|
|
1264
|
+
return "formatToParts" in t ? Cr(t, s) : Rr(t, s);
|
|
1265
1265
|
}
|
|
1266
|
-
const
|
|
1266
|
+
const Er = {
|
|
1267
1267
|
year: 0,
|
|
1268
1268
|
month: 1,
|
|
1269
1269
|
day: 2,
|
|
@@ -1271,11 +1271,11 @@ const br = {
|
|
|
1271
1271
|
minute: 4,
|
|
1272
1272
|
second: 5
|
|
1273
1273
|
};
|
|
1274
|
-
function
|
|
1274
|
+
function Cr(s, e) {
|
|
1275
1275
|
try {
|
|
1276
1276
|
const t = s.formatToParts(e), i = [];
|
|
1277
1277
|
for (let n = 0; n < t.length; n++) {
|
|
1278
|
-
const r =
|
|
1278
|
+
const r = Er[t[n].type];
|
|
1279
1279
|
r !== void 0 && (i[r] = parseInt(t[n].value, 10));
|
|
1280
1280
|
}
|
|
1281
1281
|
return i;
|
|
@@ -1285,7 +1285,7 @@ function xr(s, e) {
|
|
|
1285
1285
|
throw t;
|
|
1286
1286
|
}
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function Rr(s, e) {
|
|
1289
1289
|
const t = s.format(e), i = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(t);
|
|
1290
1290
|
return [
|
|
1291
1291
|
parseInt(i[3], 10),
|
|
@@ -1305,9 +1305,9 @@ const qt = {}, Ci = new Intl.DateTimeFormat("en-US", {
|
|
|
1305
1305
|
hour: "2-digit",
|
|
1306
1306
|
minute: "2-digit",
|
|
1307
1307
|
second: "2-digit"
|
|
1308
|
-
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")),
|
|
1309
|
-
function
|
|
1310
|
-
return qt[s] || (qt[s] =
|
|
1308
|
+
}).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), kr = Ci === "06/25/2014, 00:00:00" || Ci === "06/25/2014 00:00:00";
|
|
1309
|
+
function Tr(s) {
|
|
1310
|
+
return qt[s] || (qt[s] = kr ? new Intl.DateTimeFormat("en-US", {
|
|
1311
1311
|
hourCycle: "h23",
|
|
1312
1312
|
timeZone: s,
|
|
1313
1313
|
year: "numeric",
|
|
@@ -1331,7 +1331,7 @@ function vs(s, e, t, i, n, r, o) {
|
|
|
1331
1331
|
const a = /* @__PURE__ */ new Date(0);
|
|
1332
1332
|
return a.setUTCFullYear(s, e, t), a.setUTCHours(i, n, r, o), a;
|
|
1333
1333
|
}
|
|
1334
|
-
const Ri = 36e5,
|
|
1334
|
+
const Ri = 36e5, Sr = 6e4, Pt = {
|
|
1335
1335
|
timezoneZ: /^(Z)$/,
|
|
1336
1336
|
timezoneHH: /^([+-]\d{2})$/,
|
|
1337
1337
|
timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
|
|
@@ -1348,25 +1348,25 @@ function _s(s, e, t) {
|
|
|
1348
1348
|
if (i = Pt.timezoneHHMM.exec(s), i) {
|
|
1349
1349
|
n = parseInt(i[2], 10);
|
|
1350
1350
|
const o = parseInt(i[3], 10);
|
|
1351
|
-
return ki(n, o) ? (r = Math.abs(n) * Ri + o *
|
|
1351
|
+
return ki(n, o) ? (r = Math.abs(n) * Ri + o * Sr, i[1] === "+" ? -r : r) : NaN;
|
|
1352
1352
|
}
|
|
1353
|
-
if (
|
|
1353
|
+
if (zr(s)) {
|
|
1354
1354
|
e = new Date(e || Date.now());
|
|
1355
|
-
const o = t ? e :
|
|
1356
|
-
return -(t ? a :
|
|
1355
|
+
const o = t ? e : Dr(e), a = jt(o, s);
|
|
1356
|
+
return -(t ? a : Or(e, a, s));
|
|
1357
1357
|
}
|
|
1358
1358
|
return NaN;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function Dr(s) {
|
|
1361
1361
|
return vs(s.getFullYear(), s.getMonth(), s.getDate(), s.getHours(), s.getMinutes(), s.getSeconds(), s.getMilliseconds());
|
|
1362
1362
|
}
|
|
1363
1363
|
function jt(s, e) {
|
|
1364
|
-
const t =
|
|
1364
|
+
const t = xr(s, e), i = vs(t[0], t[1] - 1, t[2], t[3] % 24, t[4], t[5], 0).getTime();
|
|
1365
1365
|
let n = s.getTime();
|
|
1366
1366
|
const r = n % 1e3;
|
|
1367
1367
|
return n -= r >= 0 ? r : 1e3 + r, i - n;
|
|
1368
1368
|
}
|
|
1369
|
-
function
|
|
1369
|
+
function Or(s, e, t) {
|
|
1370
1370
|
let n = s.getTime() - e;
|
|
1371
1371
|
const r = jt(new Date(n), t);
|
|
1372
1372
|
if (e === r)
|
|
@@ -1379,7 +1379,7 @@ function ki(s, e) {
|
|
|
1379
1379
|
return -23 <= s && s <= 23 && (e == null || 0 <= e && e <= 59);
|
|
1380
1380
|
}
|
|
1381
1381
|
const Ti = {};
|
|
1382
|
-
function
|
|
1382
|
+
function zr(s) {
|
|
1383
1383
|
if (Ti[s])
|
|
1384
1384
|
return !0;
|
|
1385
1385
|
try {
|
|
@@ -1388,7 +1388,7 @@ function Dr(s) {
|
|
|
1388
1388
|
return !1;
|
|
1389
1389
|
}
|
|
1390
1390
|
}
|
|
1391
|
-
const
|
|
1391
|
+
const Mr = 60 * 1e3, Nr = {
|
|
1392
1392
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1393
1393
|
X: function(s, e, t) {
|
|
1394
1394
|
const i = Ht(t.timeZone, s);
|
|
@@ -1435,7 +1435,7 @@ const Or = 60 * 1e3, zr = {
|
|
|
1435
1435
|
case "O":
|
|
1436
1436
|
case "OO":
|
|
1437
1437
|
case "OOO":
|
|
1438
|
-
return "GMT" +
|
|
1438
|
+
return "GMT" + Ar(i, ":");
|
|
1439
1439
|
default:
|
|
1440
1440
|
return "GMT" + st(i, ":");
|
|
1441
1441
|
}
|
|
@@ -1454,12 +1454,12 @@ const Or = 60 * 1e3, zr = {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
};
|
|
1456
1456
|
function Ht(s, e) {
|
|
1457
|
-
const t = s ? _s(s, e, !0) /
|
|
1457
|
+
const t = s ? _s(s, e, !0) / Mr : e?.getTimezoneOffset() ?? 0;
|
|
1458
1458
|
if (Number.isNaN(t))
|
|
1459
1459
|
throw new RangeError("Invalid time zone specified: " + s);
|
|
1460
1460
|
return t;
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function kt(s, e) {
|
|
1463
1463
|
const t = s < 0 ? "-" : "";
|
|
1464
1464
|
let i = Math.abs(s).toString();
|
|
1465
1465
|
for (; i.length < e; )
|
|
@@ -1467,21 +1467,21 @@ function Rt(s, e) {
|
|
|
1467
1467
|
return t + i;
|
|
1468
1468
|
}
|
|
1469
1469
|
function st(s, e = "") {
|
|
1470
|
-
const t = s > 0 ? "-" : "+", i = Math.abs(s), n =
|
|
1470
|
+
const t = s > 0 ? "-" : "+", i = Math.abs(s), n = kt(Math.floor(i / 60), 2), r = kt(Math.floor(i % 60), 2);
|
|
1471
1471
|
return t + n + e + r;
|
|
1472
1472
|
}
|
|
1473
1473
|
function Si(s, e) {
|
|
1474
|
-
return s % 60 === 0 ? (s > 0 ? "-" : "+") +
|
|
1474
|
+
return s % 60 === 0 ? (s > 0 ? "-" : "+") + kt(Math.abs(s) / 60, 2) : st(s, e);
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1476
|
+
function Ar(s, e = "") {
|
|
1477
1477
|
const t = s > 0 ? "-" : "+", i = Math.abs(s), n = Math.floor(i / 60), r = i % 60;
|
|
1478
|
-
return r === 0 ? t + String(n) : t + String(n) + e +
|
|
1478
|
+
return r === 0 ? t + String(n) : t + String(n) + e + kt(r, 2);
|
|
1479
1479
|
}
|
|
1480
1480
|
function Di(s) {
|
|
1481
1481
|
const e = new Date(Date.UTC(s.getFullYear(), s.getMonth(), s.getDate(), s.getHours(), s.getMinutes(), s.getSeconds(), s.getMilliseconds()));
|
|
1482
1482
|
return e.setUTCFullYear(s.getFullYear()), +s - +e;
|
|
1483
1483
|
}
|
|
1484
|
-
const
|
|
1484
|
+
const Ir = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, Ft = 36e5, Oi = 6e4, Lr = 2, ke = {
|
|
1485
1485
|
dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
|
|
1486
1486
|
datePattern: /^([0-9W+-]+)(.*)/,
|
|
1487
1487
|
// year tokens
|
|
@@ -1513,14 +1513,14 @@ const Nr = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)
|
|
|
1513
1513
|
HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
1514
1514
|
HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
|
|
1515
1515
|
// time zone tokens (to identify the presence of a tz)
|
|
1516
|
-
timeZone:
|
|
1516
|
+
timeZone: Ir
|
|
1517
1517
|
};
|
|
1518
|
-
function
|
|
1518
|
+
function qr(s, e = {}) {
|
|
1519
1519
|
if (arguments.length < 1)
|
|
1520
1520
|
throw new TypeError("1 argument required, but only " + arguments.length + " present");
|
|
1521
1521
|
if (s === null)
|
|
1522
1522
|
return /* @__PURE__ */ new Date(NaN);
|
|
1523
|
-
const t = e.additionalDigits == null ?
|
|
1523
|
+
const t = e.additionalDigits == null ? Lr : Number(e.additionalDigits);
|
|
1524
1524
|
if (t !== 2 && t !== 1 && t !== 0)
|
|
1525
1525
|
throw new RangeError("additionalDigits must be 0, 1 or 2");
|
|
1526
1526
|
if (s instanceof Date || typeof s == "object" && Object.prototype.toString.call(s) === "[object Date]")
|
|
@@ -1529,13 +1529,13 @@ function Ir(s, e = {}) {
|
|
|
1529
1529
|
return new Date(s);
|
|
1530
1530
|
if (Object.prototype.toString.call(s) !== "[object String]")
|
|
1531
1531
|
return /* @__PURE__ */ new Date(NaN);
|
|
1532
|
-
const i =
|
|
1532
|
+
const i = Pr(s), { year: n, restDateString: r } = Hr(i.date, t), o = Fr(r, n);
|
|
1533
1533
|
if (o === null || isNaN(o.getTime()))
|
|
1534
1534
|
return /* @__PURE__ */ new Date(NaN);
|
|
1535
1535
|
if (o) {
|
|
1536
1536
|
const a = o.getTime();
|
|
1537
1537
|
let c = 0, l;
|
|
1538
|
-
if (i.time && (c =
|
|
1538
|
+
if (i.time && (c = $r(i.time), c === null || isNaN(c)))
|
|
1539
1539
|
return /* @__PURE__ */ new Date(NaN);
|
|
1540
1540
|
if (i.timeZone || e.timeZone) {
|
|
1541
1541
|
if (l = _s(i.timeZone || e.timeZone, new Date(a + c)), isNaN(l))
|
|
@@ -1546,7 +1546,7 @@ function Ir(s, e = {}) {
|
|
|
1546
1546
|
} else
|
|
1547
1547
|
return /* @__PURE__ */ new Date(NaN);
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function Pr(s) {
|
|
1550
1550
|
const e = {};
|
|
1551
1551
|
let t = ke.dateTimePattern.exec(s), i;
|
|
1552
1552
|
if (t ? (e.date = t[1], i = t[3]) : (t = ke.datePattern.exec(s), t ? (e.date = t[1], i = t[2]) : (e.date = null, i = s)), i) {
|
|
@@ -1555,7 +1555,7 @@ function Lr(s) {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
return e;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function Hr(s, e) {
|
|
1559
1559
|
if (s) {
|
|
1560
1560
|
const t = ke.YYY[e], i = ke.YYYYY[e];
|
|
1561
1561
|
let n = ke.YYYY.exec(s) || i.exec(s);
|
|
@@ -1578,7 +1578,7 @@ function qr(s, e) {
|
|
|
1578
1578
|
year: null
|
|
1579
1579
|
};
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function Fr(s, e) {
|
|
1582
1582
|
if (e === null)
|
|
1583
1583
|
return null;
|
|
1584
1584
|
let t, i, n;
|
|
@@ -1590,7 +1590,7 @@ function Pr(s, e) {
|
|
|
1590
1590
|
if (r = ke.DDD.exec(s), r) {
|
|
1591
1591
|
t = /* @__PURE__ */ new Date(0);
|
|
1592
1592
|
const o = parseInt(r[1], 10);
|
|
1593
|
-
return
|
|
1593
|
+
return Wr(e, o) ? (t.setUTCFullYear(e, 0, o), t) : /* @__PURE__ */ new Date(NaN);
|
|
1594
1594
|
}
|
|
1595
1595
|
if (r = ke.MMDD.exec(s), r) {
|
|
1596
1596
|
t = /* @__PURE__ */ new Date(0), i = parseInt(r[1], 10) - 1;
|
|
@@ -1606,7 +1606,7 @@ function Pr(s, e) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
return null;
|
|
1608
1608
|
}
|
|
1609
|
-
function
|
|
1609
|
+
function $r(s) {
|
|
1610
1610
|
let e, t, i = ke.HH.exec(s);
|
|
1611
1611
|
if (i)
|
|
1612
1612
|
return e = parseFloat(i[1].replace(",", ".")), $t(e) ? e % 24 * Ft : NaN;
|
|
@@ -1626,7 +1626,7 @@ function zi(s, e, t) {
|
|
|
1626
1626
|
const n = i.getUTCDay() || 7, r = e * 7 + t + 1 - n;
|
|
1627
1627
|
return i.setUTCDate(i.getUTCDate() + r), i;
|
|
1628
1628
|
}
|
|
1629
|
-
const
|
|
1629
|
+
const Ur = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Br = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
1630
1630
|
function ws(s) {
|
|
1631
1631
|
return s % 400 === 0 || s % 4 === 0 && s % 100 !== 0;
|
|
1632
1632
|
}
|
|
@@ -1637,12 +1637,12 @@ function Mi(s, e, t) {
|
|
|
1637
1637
|
if (t < 1)
|
|
1638
1638
|
return !1;
|
|
1639
1639
|
const i = ws(s);
|
|
1640
|
-
if (i && t >
|
|
1640
|
+
if (i && t > Br[e] || !i && t > Ur[e])
|
|
1641
1641
|
return !1;
|
|
1642
1642
|
}
|
|
1643
1643
|
return !0;
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1645
|
+
function Wr(s, e) {
|
|
1646
1646
|
if (e < 1)
|
|
1647
1647
|
return !1;
|
|
1648
1648
|
const t = ws(s);
|
|
@@ -1654,32 +1654,32 @@ function Ni(s, e) {
|
|
|
1654
1654
|
function $t(s, e, t) {
|
|
1655
1655
|
return !(s < 0 || s >= 25 || e != null && (e < 0 || e >= 60) || t != null && (t < 0 || t >= 60));
|
|
1656
1656
|
}
|
|
1657
|
-
const
|
|
1657
|
+
const Gr = /([xXOz]+)|''|'(''|[^'])+('|$)/g;
|
|
1658
1658
|
function Ai(s, e, t = {}) {
|
|
1659
1659
|
e = String(e);
|
|
1660
|
-
const i = e.match(
|
|
1660
|
+
const i = e.match(Gr);
|
|
1661
1661
|
if (i) {
|
|
1662
|
-
const n =
|
|
1662
|
+
const n = qr(t.originalDate || s, t);
|
|
1663
1663
|
e = i.reduce(function(r, o) {
|
|
1664
1664
|
if (o[0] === "'")
|
|
1665
1665
|
return r;
|
|
1666
|
-
const a = r.indexOf(o), c = r[a - 1] === "'", l = r.replace(o, "'" +
|
|
1666
|
+
const a = r.indexOf(o), c = r[a - 1] === "'", l = r.replace(o, "'" + Nr[o[0]](n, o, t) + "'");
|
|
1667
1667
|
return c ? l.substring(0, a - 1) + l.substring(a + 1) : l;
|
|
1668
1668
|
}, e);
|
|
1669
1669
|
}
|
|
1670
|
-
return
|
|
1670
|
+
return gr(s, e, t);
|
|
1671
1671
|
}
|
|
1672
|
-
const Kt = "#6c7489", Ii = "12px",
|
|
1673
|
-
var
|
|
1674
|
-
function
|
|
1672
|
+
const Kt = "#6c7489", Ii = "12px", Yr = "16px", Li = "20px", qi = "32px", bs = "20px";
|
|
1673
|
+
var wt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1674
|
+
function jr(s) {
|
|
1675
1675
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
1676
1676
|
}
|
|
1677
|
-
var
|
|
1678
|
-
function
|
|
1677
|
+
var bt = { exports: {} }, Kr = bt.exports, Pi;
|
|
1678
|
+
function Qr() {
|
|
1679
1679
|
return Pi || (Pi = 1, (function(s, e) {
|
|
1680
1680
|
(function(t, i) {
|
|
1681
1681
|
i();
|
|
1682
|
-
})(
|
|
1682
|
+
})(Kr, function() {
|
|
1683
1683
|
function t(l, u) {
|
|
1684
1684
|
return typeof u > "u" ? u = { autoBom: !1 } : typeof u != "object" && (console.warn("Deprecated: Expected third argument to be a object"), u = { autoBom: !u }), u.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type) ? new Blob(["\uFEFF", l], { type: l.type }) : l;
|
|
1685
1685
|
}
|
|
@@ -1708,7 +1708,7 @@ function jr() {
|
|
|
1708
1708
|
u.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), l.dispatchEvent(u);
|
|
1709
1709
|
}
|
|
1710
1710
|
}
|
|
1711
|
-
var o = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof
|
|
1711
|
+
var o = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof wt == "object" && wt.global === wt ? wt : void 0, a = o.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), c = o.saveAs || (typeof window != "object" || window !== o ? function() {
|
|
1712
1712
|
} : "download" in HTMLAnchorElement.prototype && !a ? function(l, u, d) {
|
|
1713
1713
|
var h = o.URL || o.webkitURL, y = document.createElement("a");
|
|
1714
1714
|
u = u || l.name || "download", y.download = u, y.rel = "noopener", typeof l == "string" ? (y.href = l, y.origin === location.origin ? r(y) : n(y.href) ? i(l, u, d) : r(y, y.target = "_blank")) : (y.href = h.createObjectURL(l), setTimeout(function() {
|
|
@@ -1743,15 +1743,15 @@ function jr() {
|
|
|
1743
1743
|
});
|
|
1744
1744
|
o.saveAs = c.saveAs = c, s.exports = c;
|
|
1745
1745
|
});
|
|
1746
|
-
})(
|
|
1746
|
+
})(bt)), bt.exports;
|
|
1747
1747
|
}
|
|
1748
|
-
var
|
|
1749
|
-
var
|
|
1750
|
-
function
|
|
1748
|
+
var Xr = Qr(), xt = { exports: {} };
|
|
1749
|
+
var Vr = xt.exports, Hi;
|
|
1750
|
+
function Zr() {
|
|
1751
1751
|
return Hi || (Hi = 1, (function(s, e) {
|
|
1752
1752
|
((t, i) => {
|
|
1753
1753
|
s.exports = i();
|
|
1754
|
-
})(
|
|
1754
|
+
})(Vr, function t() {
|
|
1755
1755
|
var i = typeof self < "u" ? self : typeof window < "u" ? window : i !== void 0 ? i : {}, n = !i.document && !!i.postMessage, r = i.IS_PAPA_WORKER || !1, o = {}, a = 0, c = {};
|
|
1756
1756
|
function l(m) {
|
|
1757
1757
|
return m.charCodeAt(0) === 65279 ? m.slice(1) : m;
|
|
@@ -1792,7 +1792,7 @@ function Xr() {
|
|
|
1792
1792
|
}, this._readChunk = function() {
|
|
1793
1793
|
if (this._finished) this._chunkLoaded();
|
|
1794
1794
|
else {
|
|
1795
|
-
if (f = new XMLHttpRequest(), this._config.withCredentials && (f.withCredentials = this._config.withCredentials), n || (f.onload =
|
|
1795
|
+
if (f = new XMLHttpRequest(), this._config.withCredentials && (f.withCredentials = this._config.withCredentials), n || (f.onload = U(this._chunkLoaded, this), f.onerror = U(this._chunkError, this)), f.ontimeout = U(this._chunkTimeout, this), f.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !n), this._config.downloadTimeout && !n && (f.timeout = this._config.downloadTimeout), this._config.downloadRequestHeaders) {
|
|
1796
1796
|
var g, C = this._config.downloadRequestHeaders;
|
|
1797
1797
|
for (g in C) f.setRequestHeader(g, C[g]);
|
|
1798
1798
|
}
|
|
@@ -1817,7 +1817,7 @@ function Xr() {
|
|
|
1817
1817
|
(m = m || {}).chunkSize || (m.chunkSize = c.LocalChunkSize), u.call(this, m);
|
|
1818
1818
|
var f, g, C = typeof FileReader < "u";
|
|
1819
1819
|
this.stream = function(k) {
|
|
1820
|
-
this._input = k, g = k.slice || k.webkitSlice || k.mozSlice, C ? ((f = new FileReader()).onload =
|
|
1820
|
+
this._input = k, g = k.slice || k.webkitSlice || k.mozSlice, C ? ((f = new FileReader()).onload = U(this._chunkLoaded, this), f.onerror = U(this._chunkError, this)) : f = new FileReaderSync(), this._nextChunk();
|
|
1821
1821
|
}, this._nextChunk = function() {
|
|
1822
1822
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
1823
1823
|
}, this._readChunk = function() {
|
|
@@ -1851,69 +1851,69 @@ function Xr() {
|
|
|
1851
1851
|
C && f.length === 1 && (this._finished = !0);
|
|
1852
1852
|
}, this._nextChunk = function() {
|
|
1853
1853
|
this._checkIsFinished(), f.length ? this.parseChunk(f.shift()) : g = !0;
|
|
1854
|
-
}, this._streamData =
|
|
1854
|
+
}, this._streamData = U(function(k) {
|
|
1855
1855
|
try {
|
|
1856
1856
|
f.push(typeof k == "string" ? k : k.toString(this._config.encoding)), g && (g = !1, this._checkIsFinished(), this.parseChunk(f.shift()));
|
|
1857
1857
|
} catch (I) {
|
|
1858
1858
|
this._streamError(I);
|
|
1859
1859
|
}
|
|
1860
|
-
}, this), this._streamError =
|
|
1860
|
+
}, this), this._streamError = U(function(k) {
|
|
1861
1861
|
this._streamCleanUp(), this._sendError(k);
|
|
1862
|
-
}, this), this._streamEnd =
|
|
1862
|
+
}, this), this._streamEnd = U(function() {
|
|
1863
1863
|
this._streamCleanUp(), C = !0, this._streamData("");
|
|
1864
|
-
}, this), this._streamCleanUp =
|
|
1864
|
+
}, this), this._streamCleanUp = U(function() {
|
|
1865
1865
|
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
1866
1866
|
}, this);
|
|
1867
1867
|
}
|
|
1868
1868
|
function R(m) {
|
|
1869
|
-
var f, g, C, k, I = Math.pow(2, 53), oe = -I, we = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, be = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, J = this, le = 0, H = 0, ne = !1,
|
|
1869
|
+
var f, g, C, k, I = Math.pow(2, 53), oe = -I, we = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, be = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, J = this, le = 0, H = 0, ne = !1, b = !1, T = [], x = { data: [], errors: [], meta: {} };
|
|
1870
1870
|
function X(G) {
|
|
1871
1871
|
return m.skipEmptyLines === "greedy" ? G.join("").trim() === "" : G.length === 1 && G[0].length === 0;
|
|
1872
1872
|
}
|
|
1873
1873
|
function K() {
|
|
1874
|
-
if (x && C && (
|
|
1874
|
+
if (x && C && (ye("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + c.DefaultDelimiter + "'"), C = !1), m.skipEmptyLines && (x.data = x.data.filter(function(P) {
|
|
1875
1875
|
return !X(P);
|
|
1876
|
-
})),
|
|
1877
|
-
let P = function(
|
|
1878
|
-
T.push(
|
|
1876
|
+
})), de()) {
|
|
1877
|
+
let P = function(he) {
|
|
1878
|
+
T.push(he);
|
|
1879
1879
|
};
|
|
1880
1880
|
if (x) if (Array.isArray(x.data[0])) {
|
|
1881
|
-
for (var G = 0;
|
|
1881
|
+
for (var G = 0; de() && G < x.data.length; G++) x.data[G].forEach(P);
|
|
1882
1882
|
x.data.splice(0, 1);
|
|
1883
1883
|
} else x.data.forEach(P);
|
|
1884
1884
|
}
|
|
1885
|
-
function Y(P,
|
|
1886
|
-
for (var
|
|
1885
|
+
function Y(P, he) {
|
|
1886
|
+
for (var fe = m.header ? {} : [], V = 0; V < P.length; V++) {
|
|
1887
1887
|
var te = V, j = P[V], j = ((Te, F) => ((re) => (m.dynamicTypingFunction && m.dynamicTyping[re] === void 0 && (m.dynamicTyping[re] = m.dynamicTypingFunction(re)), (m.dynamicTyping[re] || m.dynamicTyping) === !0))(Te) ? F === "true" || F === "TRUE" || F !== "false" && F !== "FALSE" && (((re) => {
|
|
1888
1888
|
if (we.test(re) && (re = parseFloat(re), oe < re && re < I))
|
|
1889
1889
|
return 1;
|
|
1890
1890
|
})(F) ? parseFloat(F) : be.test(F) ? new Date(F) : F === "" ? null : F) : F)(te = m.header ? V >= T.length ? "__parsed_extra" : T[V] : te, j = m.transform ? m.transform(j, te) : j);
|
|
1891
|
-
te === "__parsed_extra" ? (
|
|
1891
|
+
te === "__parsed_extra" ? (fe[te] = fe[te] || [], fe[te].push(j)) : fe[te] = j;
|
|
1892
1892
|
}
|
|
1893
|
-
return m.header && (V > T.length ?
|
|
1893
|
+
return m.header && (V > T.length ? ye("FieldMismatch", "TooManyFields", "Too many fields: expected " + T.length + " fields but parsed " + V, H + he) : V < T.length && ye("FieldMismatch", "TooFewFields", "Too few fields: expected " + T.length + " fields but parsed " + V, H + he)), fe;
|
|
1894
1894
|
}
|
|
1895
1895
|
var ae;
|
|
1896
1896
|
x && (m.header || m.dynamicTyping || m.transform) && (ae = 1, !x.data.length || Array.isArray(x.data[0]) ? (x.data = x.data.map(Y), ae = x.data.length) : x.data = Y(x.data, 0), m.header && x.meta && (x.meta.fields = T), H += ae);
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1898
|
+
function de() {
|
|
1899
1899
|
return m.header && T.length === 0;
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1901
|
+
function ye(G, Y, ae, P) {
|
|
1902
1902
|
G = { type: G, code: Y, message: ae }, P !== void 0 && (G.row = P), x.errors.push(G);
|
|
1903
1903
|
}
|
|
1904
1904
|
W(m.step) && (k = m.step, m.step = function(G) {
|
|
1905
|
-
x = G,
|
|
1905
|
+
x = G, de() ? K() : (K(), x.data.length !== 0 && (le += G.data.length, m.preview && le > m.preview ? g.abort() : (x.data = x.data[0], k(x, J))));
|
|
1906
1906
|
}), this.parse = function(G, Y, ae) {
|
|
1907
|
-
var P = m.quoteChar || '"', P = (m.newline || (m.newline = this.guessLineEndings(G, P)), C = !1, m.delimiter ? W(m.delimiter) && (m.delimiter = m.delimiter(G), x.meta.delimiter = m.delimiter) : ((P = ((
|
|
1907
|
+
var P = m.quoteChar || '"', P = (m.newline || (m.newline = this.guessLineEndings(G, P)), C = !1, m.delimiter ? W(m.delimiter) && (m.delimiter = m.delimiter(G), x.meta.delimiter = m.delimiter) : ((P = ((he, fe, V, te, j) => {
|
|
1908
1908
|
var Te, F, re, Fe;
|
|
1909
1909
|
j = j || [",", " ", "|", ";", c.RECORD_SEP, c.UNIT_SEP];
|
|
1910
|
-
for (var
|
|
1911
|
-
for (var De, Ke = j[
|
|
1912
|
-
0 < Ce.data.length && (Oe /= Ce.data.length - pe), 1.99 < Oe && (F === void 0 ||
|
|
1910
|
+
for (var Be = 0; Be < j.length; Be++) {
|
|
1911
|
+
for (var De, Ke = j[Be], ve = 0, Oe = 0, pe = 0, Ce = (re = void 0, new A({ comments: te, delimiter: Ke, newline: fe, preview: 10 }).parse(he)), Me = 0; Me < Ce.data.length; Me++) V && X(Ce.data[Me]) ? pe++ : (De = Ce.data[Me].length, Oe += De, re === void 0 ? re = De : 0 < De && (ve += Math.abs(De - re), re = De));
|
|
1912
|
+
0 < Ce.data.length && (Oe /= Ce.data.length - pe), 1.99 < Oe && (F === void 0 || ve < F || ve === F && Fe < Oe) && (F = ve, Te = Ke, Fe = Oe);
|
|
1913
1913
|
}
|
|
1914
1914
|
return { successful: !!(m.delimiter = Te), bestDelimiter: Te };
|
|
1915
1915
|
})(G, m.newline, m.skipEmptyLines, m.comments, m.delimitersToGuess)).successful ? m.delimiter = P.bestDelimiter : (C = !0, m.delimiter = c.DefaultDelimiter), x.meta.delimiter = m.delimiter), O(m));
|
|
1916
|
-
return P.header =
|
|
1916
|
+
return P.header = de(), m.preview && m.header && P.preview++, f = G, g = new A(P), x = g.parse(f, Y, ae), K(), ne ? { meta: { paused: !0 } } : x || { meta: { paused: !1 } };
|
|
1917
1917
|
}, this.paused = function() {
|
|
1918
1918
|
return ne;
|
|
1919
1919
|
}, this.pause = function() {
|
|
@@ -1921,18 +1921,18 @@ function Xr() {
|
|
|
1921
1921
|
}, this.resume = function() {
|
|
1922
1922
|
J.streamer._halted ? (ne = !1, J.streamer.parseChunk(f, !0)) : setTimeout(J.resume, 3);
|
|
1923
1923
|
}, this.aborted = function() {
|
|
1924
|
-
return
|
|
1924
|
+
return b;
|
|
1925
1925
|
}, this.abort = function() {
|
|
1926
|
-
|
|
1927
|
-
}, this.guessLineEndings = function(
|
|
1928
|
-
|
|
1929
|
-
var P = new RegExp(_(P) + "([^]*?)" + _(P), "gm"), ae = (
|
|
1930
|
-
`),
|
|
1931
|
-
if (ae.length === 1 ||
|
|
1926
|
+
b = !0, g.abort(), x.meta.aborted = !0, W(m.complete) && m.complete(x), f = "";
|
|
1927
|
+
}, this.guessLineEndings = function(he, P) {
|
|
1928
|
+
he = he.substring(0, 1048576);
|
|
1929
|
+
var P = new RegExp(_(P) + "([^]*?)" + _(P), "gm"), ae = (he = he.replace(P, "")).split("\r"), P = he.split(`
|
|
1930
|
+
`), he = 1 < P.length && P[0].length < ae[0].length;
|
|
1931
|
+
if (ae.length === 1 || he) return `
|
|
1932
1932
|
`;
|
|
1933
|
-
for (var
|
|
1934
|
-
` &&
|
|
1935
|
-
return
|
|
1933
|
+
for (var fe = 0, V = 0; V < ae.length; V++) ae[V][0] === `
|
|
1934
|
+
` && fe++;
|
|
1935
|
+
return fe >= ae.length / 2 ? `\r
|
|
1936
1936
|
` : "\r";
|
|
1937
1937
|
};
|
|
1938
1938
|
}
|
|
@@ -1947,84 +1947,84 @@ function Xr() {
|
|
|
1947
1947
|
` && (g = `
|
|
1948
1948
|
`);
|
|
1949
1949
|
var H = 0, ne = !1;
|
|
1950
|
-
this.parse = function(
|
|
1951
|
-
if (typeof
|
|
1952
|
-
var X =
|
|
1953
|
-
if (!
|
|
1954
|
-
if (oe || oe !== !1 &&
|
|
1955
|
-
for (var
|
|
1956
|
-
if (P =
|
|
1957
|
-
else if (x) return
|
|
1958
|
-
if (!C || P.substring(0,
|
|
1950
|
+
this.parse = function(b, T, x) {
|
|
1951
|
+
if (typeof b != "string") throw new Error("Input must be a string");
|
|
1952
|
+
var X = b.length, K = f.length, de = g.length, ye = C.length, G = W(k), Y = [], ae = [], P = [], he = H = 0;
|
|
1953
|
+
if (!b) return ve();
|
|
1954
|
+
if (oe || oe !== !1 && b.indexOf(J) === -1) {
|
|
1955
|
+
for (var fe = b.split(g), V = 0; V < fe.length; V++) {
|
|
1956
|
+
if (P = fe[V], H += P.length, V !== fe.length - 1) H += g.length;
|
|
1957
|
+
else if (x) return ve();
|
|
1958
|
+
if (!C || P.substring(0, ye) !== C) {
|
|
1959
1959
|
if (G) {
|
|
1960
|
-
if (Y = [], Fe(P.split(f)), Oe(), ne) return
|
|
1960
|
+
if (Y = [], Fe(P.split(f)), Oe(), ne) return ve();
|
|
1961
1961
|
} else Fe(P.split(f));
|
|
1962
|
-
if (I && I <= V) return Y = Y.slice(0, I),
|
|
1962
|
+
if (I && I <= V) return Y = Y.slice(0, I), ve(!0);
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
|
-
return
|
|
1965
|
+
return ve();
|
|
1966
1966
|
}
|
|
1967
|
-
for (var te =
|
|
1968
|
-
if ((F =
|
|
1969
|
-
if (F === X - 1) return De(
|
|
1970
|
-
if (J === le &&
|
|
1971
|
-
else if (J === le || F === 0 ||
|
|
1972
|
-
te !== -1 && te < F + 1 && (te =
|
|
1973
|
-
var re =
|
|
1974
|
-
if (
|
|
1975
|
-
P.push(
|
|
1967
|
+
for (var te = b.indexOf(f, H), j = b.indexOf(g, H), Te = new RegExp(_(le) + _(J), "g"), F = b.indexOf(J, H); ; ) if (b[H] === J) for (F = H, H++; ; ) {
|
|
1968
|
+
if ((F = b.indexOf(J, F + 1)) === -1) return x || ae.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: Y.length, index: H }), De();
|
|
1969
|
+
if (F === X - 1) return De(b.substring(H, F).replace(Te, J));
|
|
1970
|
+
if (J === le && b[F + 1] === le) F++;
|
|
1971
|
+
else if (J === le || F === 0 || b[F - 1] !== le) {
|
|
1972
|
+
te !== -1 && te < F + 1 && (te = b.indexOf(f, F + 1));
|
|
1973
|
+
var re = Be((j = j !== -1 && j < F + 1 ? b.indexOf(g, F + 1) : j) === -1 ? te : Math.min(te, j));
|
|
1974
|
+
if (b.substr(F + 1 + re, K) === f) {
|
|
1975
|
+
P.push(b.substring(H, F).replace(Te, J)), b[H = F + 1 + re + K] !== J && (F = b.indexOf(J, H)), te = b.indexOf(f, H), j = b.indexOf(g, H);
|
|
1976
1976
|
break;
|
|
1977
1977
|
}
|
|
1978
|
-
if (re =
|
|
1979
|
-
if (P.push(
|
|
1980
|
-
if (I && Y.length >= I) return
|
|
1978
|
+
if (re = Be(j), b.substring(F + 1 + re, F + 1 + re + de) === g) {
|
|
1979
|
+
if (P.push(b.substring(H, F).replace(Te, J)), Ke(F + 1 + re + de), te = b.indexOf(f, H), F = b.indexOf(J, H), G && (Oe(), ne)) return ve();
|
|
1980
|
+
if (I && Y.length >= I) return ve(!0);
|
|
1981
1981
|
break;
|
|
1982
1982
|
}
|
|
1983
1983
|
ae.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: Y.length, index: H }), F++;
|
|
1984
1984
|
}
|
|
1985
1985
|
}
|
|
1986
|
-
else if (C && P.length === 0 &&
|
|
1987
|
-
if (j === -1) return
|
|
1988
|
-
H = j +
|
|
1989
|
-
} else if (te !== -1 && (te < j || j === -1)) P.push(
|
|
1986
|
+
else if (C && P.length === 0 && b.substring(H, H + ye) === C) {
|
|
1987
|
+
if (j === -1) return ve();
|
|
1988
|
+
H = j + de, j = b.indexOf(g, H), te = b.indexOf(f, H);
|
|
1989
|
+
} else if (te !== -1 && (te < j || j === -1)) P.push(b.substring(H, te)), H = te + K, te = b.indexOf(f, H);
|
|
1990
1990
|
else {
|
|
1991
1991
|
if (j === -1) break;
|
|
1992
|
-
if (P.push(
|
|
1993
|
-
if (I && Y.length >= I) return
|
|
1992
|
+
if (P.push(b.substring(H, j)), Ke(j + de), G && (Oe(), ne)) return ve();
|
|
1993
|
+
if (I && Y.length >= I) return ve(!0);
|
|
1994
1994
|
}
|
|
1995
1995
|
return De();
|
|
1996
1996
|
function Fe(pe) {
|
|
1997
|
-
Y.push(pe),
|
|
1997
|
+
Y.push(pe), he = H;
|
|
1998
1998
|
}
|
|
1999
|
-
function
|
|
1999
|
+
function Be(pe) {
|
|
2000
2000
|
var Ce = 0;
|
|
2001
|
-
return Ce = pe !== -1 && (pe =
|
|
2001
|
+
return Ce = pe !== -1 && (pe = b.substring(F + 1, pe)) && pe.trim() === "" ? pe.length : Ce;
|
|
2002
2002
|
}
|
|
2003
2003
|
function De(pe) {
|
|
2004
|
-
return x || (pe === void 0 && (pe =
|
|
2004
|
+
return x || (pe === void 0 && (pe = b.substring(H)), P.push(pe), H = X, Fe(P), G && Oe()), ve();
|
|
2005
2005
|
}
|
|
2006
2006
|
function Ke(pe) {
|
|
2007
|
-
H = pe, Fe(P), P = [], j =
|
|
2007
|
+
H = pe, Fe(P), P = [], j = b.indexOf(g, H);
|
|
2008
2008
|
}
|
|
2009
|
-
function
|
|
2009
|
+
function ve(pe) {
|
|
2010
2010
|
if (m.header && !T && Y.length && !be) {
|
|
2011
2011
|
var Ce = Y[0], Me = /* @__PURE__ */ Object.create(null), tt = new Set(Ce);
|
|
2012
|
-
let
|
|
2013
|
-
for (let
|
|
2014
|
-
let ze = l(Ce[
|
|
2015
|
-
if (Me[ze = W(m.transformHeader) ? m.transformHeader(ze,
|
|
2012
|
+
let _t = !1;
|
|
2013
|
+
for (let We = 0; We < Ce.length; We++) {
|
|
2014
|
+
let ze = l(Ce[We]);
|
|
2015
|
+
if (Me[ze = W(m.transformHeader) ? m.transformHeader(ze, We) : ze]) {
|
|
2016
2016
|
let Qe, M = Me[ze];
|
|
2017
2017
|
for (; Qe = ze + "_" + M, M++, tt.has(Qe); ) ;
|
|
2018
|
-
tt.add(Qe), Ce[
|
|
2019
|
-
} else Me[ze] = 1, Ce[
|
|
2018
|
+
tt.add(Qe), Ce[We] = Qe, Me[ze]++, _t = !0, (we = we === null ? {} : we)[Qe] = ze;
|
|
2019
|
+
} else Me[ze] = 1, Ce[We] = ze;
|
|
2020
2020
|
tt.add(ze);
|
|
2021
2021
|
}
|
|
2022
|
-
|
|
2022
|
+
_t && console.warn("Duplicate headers found and renamed."), be = !0;
|
|
2023
2023
|
}
|
|
2024
|
-
return { data: Y, errors: ae, meta: { delimiter: f, linebreak: g, aborted: ne, truncated: !!pe, cursor:
|
|
2024
|
+
return { data: Y, errors: ae, meta: { delimiter: f, linebreak: g, aborted: ne, truncated: !!pe, cursor: he + (T || 0), renamedHeaders: we } };
|
|
2025
2025
|
}
|
|
2026
2026
|
function Oe() {
|
|
2027
|
-
k(
|
|
2027
|
+
k(ve()), Y = [], ae = [];
|
|
2028
2028
|
}
|
|
2029
2029
|
}, this.abort = function() {
|
|
2030
2030
|
ne = !0;
|
|
@@ -2059,7 +2059,7 @@ function Xr() {
|
|
|
2059
2059
|
for (f in m) g[f] = O(m[f]);
|
|
2060
2060
|
return g;
|
|
2061
2061
|
}
|
|
2062
|
-
function
|
|
2062
|
+
function U(m, f) {
|
|
2063
2063
|
return function() {
|
|
2064
2064
|
m.apply(f, arguments);
|
|
2065
2065
|
};
|
|
@@ -2101,35 +2101,35 @@ function Xr() {
|
|
|
2101
2101
|
} else if (typeof m == "object") return typeof m.data == "string" && (m.data = JSON.parse(m.data)), Array.isArray(m.data) && (m.fields || (m.fields = m.meta && m.meta.fields || J), m.fields || (m.fields = Array.isArray(m.data[0]) ? m.fields : typeof m.data[0] == "object" ? Object.keys(m.data[0]) : []), Array.isArray(m.data[0]) || typeof m.data[0] == "object" || (m.data = [m.data])), ne(m.fields || [], m.data || [], be);
|
|
2102
2102
|
throw new Error("Unable to serialize unrecognized input");
|
|
2103
2103
|
function ne(T, x, X) {
|
|
2104
|
-
var K = "",
|
|
2105
|
-
if (
|
|
2106
|
-
for (var G = 0; G < T.length; G++) 0 < G && (K += k), K +=
|
|
2104
|
+
var K = "", de = (typeof T == "string" && (T = JSON.parse(T)), typeof x == "string" && (x = JSON.parse(x)), Array.isArray(T) && 0 < T.length), ye = !Array.isArray(x[0]);
|
|
2105
|
+
if (de && C) {
|
|
2106
|
+
for (var G = 0; G < T.length; G++) 0 < G && (K += k), K += b(T[G], G);
|
|
2107
2107
|
0 < x.length && (K += I);
|
|
2108
2108
|
}
|
|
2109
2109
|
for (var Y = 0; Y < x.length; Y++) {
|
|
2110
|
-
var ae = (
|
|
2111
|
-
if (X && !
|
|
2112
|
-
for (var
|
|
2113
|
-
var te =
|
|
2114
|
-
|
|
2110
|
+
var ae = (de ? T : x[Y]).length, P = !1, he = de ? Object.keys(x[Y]).length === 0 : x[Y].length === 0;
|
|
2111
|
+
if (X && !de && (P = X === "greedy" ? x[Y].join("").trim() === "" : x[Y].length === 1 && x[Y][0].length === 0), X === "greedy" && de) {
|
|
2112
|
+
for (var fe = [], V = 0; V < ae; V++) {
|
|
2113
|
+
var te = ye ? T[V] : V;
|
|
2114
|
+
fe.push(x[Y][te]);
|
|
2115
2115
|
}
|
|
2116
|
-
P =
|
|
2116
|
+
P = fe.join("").trim() === "";
|
|
2117
2117
|
}
|
|
2118
2118
|
if (!P) {
|
|
2119
2119
|
for (var j = 0; j < ae; j++) {
|
|
2120
|
-
0 < j && !
|
|
2121
|
-
var Te =
|
|
2122
|
-
K +=
|
|
2120
|
+
0 < j && !he && (K += k);
|
|
2121
|
+
var Te = de && ye ? T[j] : j;
|
|
2122
|
+
K += b(x[Y][Te], j);
|
|
2123
2123
|
}
|
|
2124
|
-
Y < x.length - 1 && (!X || 0 < ae && !
|
|
2124
|
+
Y < x.length - 1 && (!X || 0 < ae && !he) && (K += I);
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
2127
|
return K;
|
|
2128
2128
|
}
|
|
2129
|
-
function
|
|
2130
|
-
var X, K,
|
|
2131
|
-
return T == null ? "" : T.constructor === Date ? isNaN(T.getTime()) ? "" : T.toISOString() : (
|
|
2132
|
-
for (var Y = 0; Y < G.length; Y++) if (-1 <
|
|
2129
|
+
function b(T, x) {
|
|
2130
|
+
var X, K, de;
|
|
2131
|
+
return T == null ? "" : T.constructor === Date ? isNaN(T.getTime()) ? "" : T.toISOString() : (de = !1, le && typeof T == "string" && le.test(T) && (T = "'" + T, de = !0), K = (X = T.toString()).replace(H, we), (de = de || g === !0 || typeof g == "function" && g(T, x) || Array.isArray(g) && g[x] || ((ye, G) => {
|
|
2132
|
+
for (var Y = 0; Y < G.length; Y++) if (-1 < ye.indexOf(G[Y])) return !0;
|
|
2133
2133
|
return !1;
|
|
2134
2134
|
})(K, c.BAD_DELIMITERS) || -1 < K.indexOf(k) || -1 < X.indexOf(oe) || K.charAt(0) === " " || K.charAt(K.length - 1) === " ") ? oe + K + oe : K);
|
|
2135
2135
|
}
|
|
@@ -2138,10 +2138,10 @@ function Xr() {
|
|
|
2138
2138
|
m = m.data, c.WORKER_ID === void 0 && m && (c.WORKER_ID = m.workerId), typeof m.input == "string" ? i.postMessage({ workerId: c.WORKER_ID, results: c.parse(m.input, m.config), finished: !0 }) : (i.File && m.input instanceof File || m.input instanceof Object) && (m = c.parse(m.input, m.config)) && i.postMessage({ workerId: c.WORKER_ID, results: m, finished: !0 });
|
|
2139
2139
|
}), (d.prototype = Object.create(u.prototype)).constructor = d, (h.prototype = Object.create(u.prototype)).constructor = h, (y.prototype = Object.create(y.prototype)).constructor = y, (v.prototype = Object.create(u.prototype)).constructor = v, c;
|
|
2140
2140
|
});
|
|
2141
|
-
})(
|
|
2141
|
+
})(xt)), xt.exports;
|
|
2142
2142
|
}
|
|
2143
|
-
var
|
|
2144
|
-
const
|
|
2143
|
+
var Jr = Zr(), nt = /* @__PURE__ */ ((s) => (s.String = "string", s.Number = "number", s.Boolean = "boolean", s.Object = "object", s.Undefined = "undefined", s))(nt || {});
|
|
2144
|
+
const eo = ["id"], to = /* @__PURE__ */ ge({
|
|
2145
2145
|
__name: "VueJsonCsv",
|
|
2146
2146
|
props: {
|
|
2147
2147
|
data: {
|
|
@@ -2183,7 +2183,7 @@ const Zr = ["id"], Jr = /* @__PURE__ */ _e({
|
|
|
2183
2183
|
},
|
|
2184
2184
|
emits: ["export-started", "export-finished"],
|
|
2185
2185
|
setup(s, { emit: e }) {
|
|
2186
|
-
const t = e, i = s, n =
|
|
2186
|
+
const t = e, i = s, n = w(() => `export_${(/* @__PURE__ */ new Date()).getTime()}`), r = w(() => {
|
|
2187
2187
|
const u = c();
|
|
2188
2188
|
return u.length ? u : null;
|
|
2189
2189
|
}), o = () => {
|
|
@@ -2211,7 +2211,7 @@ const Zr = ["id"], Jr = /* @__PURE__ */ _e({
|
|
|
2211
2211
|
return;
|
|
2212
2212
|
}
|
|
2213
2213
|
t("export-started", r.value);
|
|
2214
|
-
let u =
|
|
2214
|
+
let u = Jr.unparse(r.value, Object.assign({
|
|
2215
2215
|
delimiter: i.delimiter,
|
|
2216
2216
|
encoding: i.encoding
|
|
2217
2217
|
}));
|
|
@@ -2220,7 +2220,7 @@ const Zr = ["id"], Jr = /* @__PURE__ */ _e({
|
|
|
2220
2220
|
const d = new Blob([u], {
|
|
2221
2221
|
type: "text/csv;charset=" + i.encoding
|
|
2222
2222
|
});
|
|
2223
|
-
|
|
2223
|
+
Xr.saveAs(d, i.filename);
|
|
2224
2224
|
}
|
|
2225
2225
|
};
|
|
2226
2226
|
return (u, d) => (z(), se("div", {
|
|
@@ -2231,9 +2231,9 @@ const Zr = ["id"], Jr = /* @__PURE__ */ _e({
|
|
|
2231
2231
|
et(u.$slots, "default", {}, () => [
|
|
2232
2232
|
Je("Download " + ie(s.filename), 1)
|
|
2233
2233
|
])
|
|
2234
|
-
], 8,
|
|
2234
|
+
], 8, eo));
|
|
2235
2235
|
}
|
|
2236
|
-
}),
|
|
2236
|
+
}), io = /* @__PURE__ */ ge({
|
|
2237
2237
|
__name: "DownloadCsv",
|
|
2238
2238
|
props: {
|
|
2239
2239
|
rows: {},
|
|
@@ -2241,32 +2241,32 @@ const Zr = ["id"], Jr = /* @__PURE__ */ _e({
|
|
|
2241
2241
|
filename: {}
|
|
2242
2242
|
},
|
|
2243
2243
|
setup(s) {
|
|
2244
|
-
const e = s, t =
|
|
2244
|
+
const e = s, t = w(() => Object.keys(e.headers));
|
|
2245
2245
|
return (i, n) => (z(), se("div", null, [
|
|
2246
|
-
|
|
2246
|
+
ue(to, {
|
|
2247
2247
|
data: s.rows,
|
|
2248
2248
|
fields: t.value,
|
|
2249
2249
|
filename: s.filename,
|
|
2250
2250
|
labels: s.headers
|
|
2251
2251
|
}, {
|
|
2252
|
-
default:
|
|
2252
|
+
default: $(() => [
|
|
2253
2253
|
et(i.$slots, "default")
|
|
2254
2254
|
]),
|
|
2255
2255
|
_: 3
|
|
2256
2256
|
}, 8, ["data", "fields", "filename", "labels"])
|
|
2257
2257
|
]));
|
|
2258
2258
|
}
|
|
2259
|
-
}),
|
|
2260
|
-
renderer:
|
|
2261
|
-
pdfExport:
|
|
2262
|
-
csvExport:
|
|
2263
|
-
chartLabels:
|
|
2264
|
-
jumpToExplore:
|
|
2265
|
-
jumpToRequests:
|
|
2266
|
-
unsupported_time_range_badge:
|
|
2267
|
-
unsupported_time_range_warning:
|
|
2268
|
-
query_aged_out_warning:
|
|
2269
|
-
granularities:
|
|
2259
|
+
}), so = { not_configured: { title: "Chart is not fully configured", description: "Begin by choosing at least one metric" }, noQueryBridge: "No query bridge provided. Unable to render dashboard.", unexpectedError: "An unexpected error has occurred.", trendRange: { "24h": "Last 24-hour summary", "7d": "Last 7-day summary", "30d": "Last 30-day summary" }, edit: "Edit", duplicateTile: "Duplicate", exit_fullscreen: "Exit fullscreen", fullscreen: "Fullscreen", remove: "Remove", delete: "Delete", as_of_today: "As of today" }, no = { branding: "Kong Konnect", generated: "Generated {timestamp}", dashboardNote: "For a live, interactive experience, open this dashboard in Konnect", pageOf: "{page} / {total}" }, ro = { defaultFilename: "Chart export", exportAsCsv: "Export as CSV", dataError: "Error loading data", noDataRange: "No data in selected range", noDataRetry: "Please adjust the time period and try again", timeRangeSelected: "selected", exportPreview: "Export preview", exportTimeRange: "Time range", exportDescription: "Exports a CSV of the data represented in the chart.", maximumRecordAmount: "The number of groups is limited to {value}", previewRows: "Previewing {rowsMax} of {rowsTotal} row{plural}", downloadButton: "Export", cancelButton: "Cancel", UtcOffset: "UTC offset", Timestamp: "Timestamp" }, oo = { control_plane: "Control plane", data_plane_node_version: "Data plane node version", env: "Environment", gateway_service: "Gateway service", hostname: "Hostname", plugin: "Plugin", plugin_name: "Plugin name", plugin_scope: "Plugin scope", region: "Region", request_count: "Request count", route: "Route", status_code: "Status code", team: "Team", name: "Name", ai_count: "LLM request count", ai_plugin: "AI plugin", ai_provider: "Provider", ai_request_model: "Request model", ai_response_model: "Response model", error_rate: "Error rate", request_per_minute: "Requests per minute", requests_per_minute: "Requests per minute", response_latency_average: "Response latency (avg)", response_latency_p99: "Response latency (p99)", response_latency_p95: "Response latency (p95)", response_latency_p50: "Response latency (p50)", kong_latency_average: "Kong latency (avg)", kong_latency_p99: "Kong latency (p99)", kong_latency_p95: "Kong latency (p95)", kong_latency_p50: "Kong latency (p50)", kong_internal_latency_average: "Kong internal latency (avg)", kong_internal_latency_p99: "Kong internal latency (p99)", kong_internal_latency_p95: "Kong internal latency (p95)", kong_internal_latency_p50: "Kong internal latency (p50)", llm_cache_status: "Cache status", llm_embeddings_model: "Embeddings model", llm_embeddings_provider: "Embeddings provider", upstream_latency_average: "Upstream latency (avg)", upstream_latency_p99: "Upstream latency (p99)", upstream_latency_p95: "Upstream latency (p95)", upstream_latency_p50: "Upstream latency (p50)", response_size_p99: "Response size (p99)", response_size_p95: "Response size (p95)", response_size_p50: "Response size (p50)", response_size_average: "Response size (avg)", response_size_sum: "Response size (sum)", response_source: "Response source", request_size_p99: "Request size (p99)", request_size_p95: "Request size (p95)", request_size_p50: "Request size (p50)", request_size_average: "Request size (avg)", request_size_sum: "Request size (sum)", total_tokens_per_minute: "Total tokens per minute", control_plane_group: "Control plane group", consumer: "Consumer", country_code: "Country", country: "Country", data_plane_node: "Data plane node", api_package: "API package", api_product: "API product", api_product_version: "API product version", portal: "Portal", realm: "Realm", runtime_group: "Runtime group", application: "Application", status_code_grouped: "Status code (grouped)", upstream_status_code: "Upstream status code", upstream_status_code_grouped: "Upstream status code group", time: "Time", Service: "Service", ServiceVersion: "Service version", Route: "Route", Application: "Application", RuntimeGroup: "Runtime group", GatewayService: "Gateway service", StatusCode: "Status code", CodeClass: "Status code (grouped)", Time: "Time", API_PRODUCT: "Api product", API_PRODUCT_VERSION: "API product version", RUNTIME_GROUP: "Runtime group", GATEWAY_SERVICE: "Gateway service", ROUTE: "Route", APPLICATION: "Application", STATUS_CODE: "Status code", STATUS_CODE_GROUPED: "Status code (grouped)", TIME: "Time", ORGANIZATION: "Organization", TotalRequests: "Request count", RequestsPerMinute: "Requests per minute", LatencyP99: "Response latency (p99)", LatencyP95: "Response latency (p95)", LatencyP50: "Response latency (p50)", LatencyAverage: "Response latency (avg)", UpstreamLatencyP99: "Upstream latency (p99)", UpstreamLatencyP95: "Upstream latency (p95)", UpstreamLatencyP50: "Upstream latency (p50)", UpstreamLatencyAverage: "Upstream latency (avg)", KongLatencyP99: "Kong latency (p99)", KongLatencyP95: "Kong latency (p95)", KongLatencyP50: "Kong latency (p50)", KongLatencyAverage: "Kong latency (avg)", ResponseSizeP99: "Response size (p99)", ResponseSizeP95: "Response size (p95)", ResponseSizeP50: "Response size (p50)", RequestSizeP99: "Request size (p99)", RequestSizeP95: "Request size (p95)", RequestSizeP50: "Request size (p50)", SuccessfulRequests: "Successful requests", SUCCESS: "Successful requests", FailedRequests: "Failed requests", FAILURE: "Failed requests", "5XX": "5xx", "4XX": "4xx", "3XX": "3xx", "2XX": "2xx", "1XX": "1xx", REQUEST_COUNT: "Request count", REQUEST_PER_MINUTE: "Requests per minute", RESPONSE_LATENCY_P99: "Response latency", RESPONSE_LATENCY_P95: "Response latency", RESPONSE_LATENCY_P50: "Response latency", RESPONSE_SIZE_P99: "Response size (p99)", RESPONSE_SIZE_P95: "Response size (p95)", RESPONSE_SIZE_P50: "Response size (p50)", REQUEST_SIZE_P99: "Request size (p99)", REQUEST_SIZE_P95: "Request size (p95)", REQUEST_SIZE_P50: "Request size (p50)", CONTROL_PLANE: "Control plane", ____OTHER____: "Others", ai_request_count: "Request count", total_tokens: "Total token count", prompt_tokens: "Prompt token count", completion_tokens: "Completion token count", cost: "Costs", cost_per_request_average: "Cost per request (avg)", llm_cache_embeddings_latency_average: "Embeddings latency (avg)", llm_cache_fetch_latency_average: "Fetch latency (avg)", llm_latency_average: "Llm latency (avg)", time_to_first_token_average: "Time to first token (avg)", time_to_first_token_p99: "Time to first token (p99)", time_to_first_token_p95: "Time to first token (p95)", time_to_first_token_p50: "Time to first token (p50)", time_per_token_average: "Time per token (avg)", time_per_token_p99: "Time per token (p99)", time_per_token_p95: "Time per token (p95)", time_per_token_p50: "Time per token (p50)", "threshold-warning": "Warning threshold: {value}", "threshold-error": "Error threshold: {value}", "thatreshold-neutral": "Alert threshold: {value}", api: "API", vulnerability_count: "Vulnerability count", a2a_latency_average: "A2A latency (avg)", a2a_response_size_sum: "A2A response size (sum)", a2a_context_id: "A2A context ID", a2a_error: "A2A error", a2a_method: "A2A method", a2a_task_id: "A2A task ID", active_agents: "Active agents", mcp_error: "MCP error", mcp_method: "MCP method", mcp_latency_average: "MCP latency (avg)", mcp_latency_p99: "MCP latency (p99)", mcp_latency_p95: "MCP latency (p95)", mcp_latency_p50: "MCP latency (p50)", mcp_response_size_sum: "MCP response size (sum)", mcp_session_id: "MCP session ID", mcp_tool_name: "MCP tool name", mcp_response_body_size_sum: "MCP response size (sum)", control_plane_count: "Control plane count", service_count: "Gateway service count", "record_bytes:sum": "Record size (sum)", "record_count:sum": "Record count (sum)", "request_count:sum": "Request count (sum)", route_count: "Route count", consumer_count: "Consumer count", plugin_count: "Plugin count", node_count: "Data plane node count", virtual_cluster_id: "Virtual cluster", backend_cluster_id: "Backend cluster", listener_id: "Listener", principal_name: "Principal name", principal_type: "Principal type", request_type: "Request type", topic_name: "Topic name", partition_index: "Partition index", api_key: "API key", data_plane_group: "Data plane group", managed_cache: "Managed cache", network: "Network", provider: "Provider", provider_region: "Provider region", cache_eviction_rate: "Cache eviction rate", cache_expiration_rate: "Cache expiration rate", cache_items_average: "Cache items (avg)", cache_memory_utilization_max: "Cache memory utilization (max)", cache_status: "Cache status", cache_hit_rate: "Cache hit rate" }, ao = "Explore", lo = "View requests", uo = "Limited timeframe", co = "The selected timeframe exceeds what this datasource supports, so this tile is limited to the maximum supported timeframe.", ho = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", fo = { daily: "1 day", fiveMinutely: "5 minutes", hourly: "1 hour", minutely: "1 minute", tenMinutely: "10 minutes", tenSecondly: "10 seconds", thirtyMinutely: "30 minutes", thirtySecondly: "30 seconds", twelveHourly: "12 hours", twoHourly: "2 hours", weekly: "1 week", unknown: "Unknown" }, xs = {
|
|
2260
|
+
renderer: so,
|
|
2261
|
+
pdfExport: no,
|
|
2262
|
+
csvExport: ro,
|
|
2263
|
+
chartLabels: oo,
|
|
2264
|
+
jumpToExplore: ao,
|
|
2265
|
+
jumpToRequests: lo,
|
|
2266
|
+
unsupported_time_range_badge: uo,
|
|
2267
|
+
unsupported_time_range_warning: co,
|
|
2268
|
+
query_aged_out_warning: ho,
|
|
2269
|
+
granularities: fo
|
|
2270
2270
|
};
|
|
2271
2271
|
function Es() {
|
|
2272
2272
|
const s = Js("en-us", xs);
|
|
@@ -2276,15 +2276,15 @@ function Es() {
|
|
|
2276
2276
|
// Translation component <i18n-t>
|
|
2277
2277
|
};
|
|
2278
2278
|
}
|
|
2279
|
-
const yt = 170, ni = 6, He = "analytics-query-provider", Fi = "{entity-id}",
|
|
2280
|
-
function
|
|
2279
|
+
const yt = 170, ni = 6, He = "analytics-query-provider", Fi = "{entity-id}", mo = "{cp-id}", po = "{timeframe}", go = 30 * 1e3, yo = 3e5, vo = 36e5;
|
|
2280
|
+
function _o() {
|
|
2281
2281
|
const s = Ae(He);
|
|
2282
2282
|
return {
|
|
2283
2283
|
evaluateFeatureFlag: (t, i) => typeof s?.evaluateFeatureFlagFn != "function" ? i : s.evaluateFeatureFlagFn(t, i)
|
|
2284
2284
|
};
|
|
2285
2285
|
}
|
|
2286
2286
|
var Ut = { exports: {} }, $i;
|
|
2287
|
-
function
|
|
2287
|
+
function wo() {
|
|
2288
2288
|
return $i || ($i = 1, (function(s) {
|
|
2289
2289
|
var e = Object.prototype.hasOwnProperty, t = "~";
|
|
2290
2290
|
function i() {
|
|
@@ -2390,8 +2390,8 @@ function vo() {
|
|
|
2390
2390
|
}, a.prototype.off = a.prototype.removeListener, a.prototype.addListener = a.prototype.on, a.prefixed = t, a.EventEmitter = a, s.exports = a;
|
|
2391
2391
|
})(Ut)), Ut.exports;
|
|
2392
2392
|
}
|
|
2393
|
-
var
|
|
2394
|
-
const
|
|
2393
|
+
var bo = wo();
|
|
2394
|
+
const xo = /* @__PURE__ */ jr(bo);
|
|
2395
2395
|
class ri extends Error {
|
|
2396
2396
|
name = "TimeoutError";
|
|
2397
2397
|
constructor(e, t) {
|
|
@@ -2399,7 +2399,7 @@ class ri extends Error {
|
|
|
2399
2399
|
}
|
|
2400
2400
|
}
|
|
2401
2401
|
const Ui = (s) => s.reason ?? new DOMException("This operation was aborted.", "AbortError");
|
|
2402
|
-
function
|
|
2402
|
+
function Eo(s, e) {
|
|
2403
2403
|
const {
|
|
2404
2404
|
milliseconds: t,
|
|
2405
2405
|
fallback: i,
|
|
@@ -2438,7 +2438,7 @@ function bo(s, e) {
|
|
|
2438
2438
|
r.clearTimeout.call(void 0, a), a = void 0;
|
|
2439
2439
|
}, u;
|
|
2440
2440
|
}
|
|
2441
|
-
function
|
|
2441
|
+
function Co(s, e, t) {
|
|
2442
2442
|
let i = 0, n = s.length;
|
|
2443
2443
|
for (; n > 0; ) {
|
|
2444
2444
|
const r = Math.trunc(n / 2);
|
|
@@ -2447,7 +2447,7 @@ function xo(s, e, t) {
|
|
|
2447
2447
|
}
|
|
2448
2448
|
return i;
|
|
2449
2449
|
}
|
|
2450
|
-
const
|
|
2450
|
+
const Ro = 100;
|
|
2451
2451
|
class Bi {
|
|
2452
2452
|
#t = [];
|
|
2453
2453
|
// The queue is stored as a sorted array, but dequeued items are left before `#head` until compaction. Only items from `#head` onward are live, which keeps repeated dequeues amortized O(1).
|
|
@@ -2467,7 +2467,7 @@ class Bi {
|
|
|
2467
2467
|
return;
|
|
2468
2468
|
}
|
|
2469
2469
|
this.#r();
|
|
2470
|
-
const a =
|
|
2470
|
+
const a = Co(this.#t, o, (c, l) => l.priority - c.priority);
|
|
2471
2471
|
this.#t.splice(a, 0, o);
|
|
2472
2472
|
}
|
|
2473
2473
|
setPriority(e, t) {
|
|
@@ -2485,7 +2485,7 @@ class Bi {
|
|
|
2485
2485
|
if (this.#e === this.#t.length)
|
|
2486
2486
|
return;
|
|
2487
2487
|
const e = this.#t[this.#e];
|
|
2488
|
-
return this.#e++, this.#e === this.#t.length ? (this.#t.length = 0, this.#e = 0) : this.#e >
|
|
2488
|
+
return this.#e++, this.#e === this.#t.length ? (this.#t.length = 0, this.#e = 0) : this.#e > Ro && this.#e > this.#t.length / 2 && this.#r(), e?.run;
|
|
2489
2489
|
}
|
|
2490
2490
|
filter(e) {
|
|
2491
2491
|
const t = [];
|
|
@@ -2502,7 +2502,7 @@ class Bi {
|
|
|
2502
2502
|
this.#e !== 0 && (this.#t.splice(0, this.#e), this.#e = 0);
|
|
2503
2503
|
}
|
|
2504
2504
|
}
|
|
2505
|
-
class
|
|
2505
|
+
class ko extends xo {
|
|
2506
2506
|
#t;
|
|
2507
2507
|
#e;
|
|
2508
2508
|
#r = 0;
|
|
@@ -2744,7 +2744,7 @@ class Co extends wo {
|
|
|
2744
2744
|
throw this.#$(), this.#y.delete(r), h;
|
|
2745
2745
|
}
|
|
2746
2746
|
let u = e({ signal: t.signal });
|
|
2747
|
-
if (t.timeout !== void 0 && (u =
|
|
2747
|
+
if (t.timeout !== void 0 && (u = Eo(Promise.resolve(u), {
|
|
2748
2748
|
milliseconds: t.timeout,
|
|
2749
2749
|
message: `Task timed out after ${t.timeout}ms (queue has ${this.#s} running, ${this.#i.size} waiting)`
|
|
2750
2750
|
})), t.signal) {
|
|
@@ -3038,7 +3038,7 @@ class Co extends wo {
|
|
|
3038
3038
|
}));
|
|
3039
3039
|
}
|
|
3040
3040
|
}
|
|
3041
|
-
const
|
|
3041
|
+
const To = () => {
|
|
3042
3042
|
const s = si(), e = Ae(He);
|
|
3043
3043
|
if (!e)
|
|
3044
3044
|
return;
|
|
@@ -3046,7 +3046,7 @@ const Ro = () => {
|
|
|
3046
3046
|
console.warn("Detected incorrect use of useRequestQueue. This composable should not be used in nested components. Please discuss with team-data or report an issue if you feel you have a use case.");
|
|
3047
3047
|
return;
|
|
3048
3048
|
}
|
|
3049
|
-
const t = new
|
|
3049
|
+
const t = new ko({
|
|
3050
3050
|
carryoverConcurrencyCount: !0,
|
|
3051
3051
|
concurrency: s.maxParallelRequests,
|
|
3052
3052
|
interval: s.requestInterval,
|
|
@@ -3058,7 +3058,7 @@ const Ro = () => {
|
|
|
3058
3058
|
};
|
|
3059
3059
|
As(He, i);
|
|
3060
3060
|
};
|
|
3061
|
-
function
|
|
3061
|
+
function So(s) {
|
|
3062
3062
|
const e = `[${s.name}] ${s.message}`, t = [];
|
|
3063
3063
|
return s.fix && t.push(`fix: ${s.fix}`), s.sources?.length && t.push(`sources: ${s.sources.join(", ")}`), s.docs && t.push(`see: ${s.docs}`), t.length === 0 ? e : [e, ...t.map((i, n) => `${n < t.length - 1 ? "├▶" : "╰▶"} ${i}`)].join(`
|
|
3064
3064
|
`);
|
|
@@ -3067,13 +3067,13 @@ function Wi(s, ...e) {
|
|
|
3067
3067
|
return typeof s == "function" ? s(...e) : s;
|
|
3068
3068
|
}
|
|
3069
3069
|
// @__NO_SIDE_EFFECTS__
|
|
3070
|
-
function
|
|
3070
|
+
function Do({ method: s = "warn", formatter: e = So } = {}) {
|
|
3071
3071
|
return (t, { method: i = s } = {}) => {
|
|
3072
3072
|
console[i](e(t));
|
|
3073
3073
|
};
|
|
3074
3074
|
}
|
|
3075
|
-
const
|
|
3076
|
-
var
|
|
3075
|
+
const Oo = Error.captureStackTrace;
|
|
3076
|
+
var zo = class Cs extends Error {
|
|
3077
3077
|
name;
|
|
3078
3078
|
/**
|
|
3079
3079
|
* The diagnostic code, e.g. `MATH_E001`.
|
|
@@ -3110,7 +3110,7 @@ var Do = class Cs extends Error {
|
|
|
3110
3110
|
* Ignored on engines without `Error.captureStackTrace`.
|
|
3111
3111
|
*/
|
|
3112
3112
|
constructor(e, t = Cs) {
|
|
3113
|
-
super(e.why, { cause: e.cause }), this.code = this.name = e.code, this.fix = e.fix, this.docs = e.docs, this.sources = e.sources,
|
|
3113
|
+
super(e.why, { cause: e.cause }), this.code = this.name = e.code, this.fix = e.fix, this.docs = e.docs, this.sources = e.sources, Oo?.(this, t);
|
|
3114
3114
|
}
|
|
3115
3115
|
/**
|
|
3116
3116
|
* Converts the diagnostic into a serializable structured object.
|
|
@@ -3127,15 +3127,15 @@ var Do = class Cs extends Error {
|
|
|
3127
3127
|
};
|
|
3128
3128
|
}
|
|
3129
3129
|
};
|
|
3130
|
-
function
|
|
3130
|
+
function Mo(s, e) {
|
|
3131
3131
|
return typeof s == "string" ? `${s}/${e.toLowerCase()}` : s?.(e);
|
|
3132
3132
|
}
|
|
3133
3133
|
// @__NO_SIDE_EFFECTS__
|
|
3134
|
-
function
|
|
3134
|
+
function No(s) {
|
|
3135
3135
|
const e = s.reporters ?? [], t = {}, { docsBase: i } = s;
|
|
3136
3136
|
for (const n of Object.keys(s.codes)) {
|
|
3137
|
-
const r = s.codes[n], o = r.docs === !1 ? void 0 : r.docs ||
|
|
3138
|
-
const u = new
|
|
3137
|
+
const r = s.codes[n], o = r.docs === !1 ? void 0 : r.docs || Mo(i, n), a = (c = {}, l = {}) => {
|
|
3138
|
+
const u = new zo({
|
|
3139
3139
|
code: n,
|
|
3140
3140
|
why: Wi(r.why, c),
|
|
3141
3141
|
fix: Wi(r.fix, c),
|
|
@@ -3150,8 +3150,8 @@ function zo(s) {
|
|
|
3150
3150
|
}
|
|
3151
3151
|
return t;
|
|
3152
3152
|
}
|
|
3153
|
-
const
|
|
3154
|
-
reporters: [/* @__PURE__ */
|
|
3153
|
+
const Ao = typeof window < "u", Io = /* @__PURE__ */ No({
|
|
3154
|
+
reporters: [/* @__PURE__ */ Do()],
|
|
3155
3155
|
codes: {
|
|
3156
3156
|
PINIA_R1001: {
|
|
3157
3157
|
why: 'Directly pass all stores to "mapStores()" without putting them in an array. This will fail in production.',
|
|
@@ -3200,7 +3200,7 @@ function ot(s) {
|
|
|
3200
3200
|
const e = Is(s), t = {};
|
|
3201
3201
|
for (const i in e) {
|
|
3202
3202
|
const n = e[i];
|
|
3203
|
-
n?.effect ? t[i] =
|
|
3203
|
+
n?.effect ? t[i] = w({
|
|
3204
3204
|
get: () => s[i],
|
|
3205
3205
|
set(r) {
|
|
3206
3206
|
s[i] = r;
|
|
@@ -3209,11 +3209,11 @@ function ot(s) {
|
|
|
3209
3209
|
}
|
|
3210
3210
|
return t;
|
|
3211
3211
|
}
|
|
3212
|
-
const Pe = (s) => s?.chart.type === "table", Qt = (s) => s?.query?.datasource === "requests", Xt = (s) => !!s && !Pe(s) && !Qt(s),
|
|
3212
|
+
const Pe = (s) => s?.chart.type === "table", Qt = (s) => s?.query?.datasource === "requests", Xt = (s) => !!s && !Pe(s) && !Qt(s), Lo = (s, e) => {
|
|
3213
3213
|
const t = s.header_description ?? ("description" in s.chart ? s.chart.description : void 0);
|
|
3214
3214
|
if (t)
|
|
3215
|
-
return t.replaceAll(
|
|
3216
|
-
},
|
|
3215
|
+
return t.replaceAll(po, e) || void 0;
|
|
3216
|
+
}, qo = [
|
|
3217
3217
|
"basic",
|
|
3218
3218
|
"api_usage",
|
|
3219
3219
|
"llm_usage",
|
|
@@ -3222,28 +3222,28 @@ const Pe = (s) => s?.chart.type === "table", Qt = (s) => s?.query?.datasource ==
|
|
|
3222
3222
|
"platform_usage",
|
|
3223
3223
|
"managed_cache_usage",
|
|
3224
3224
|
void 0
|
|
3225
|
-
],
|
|
3226
|
-
function
|
|
3225
|
+
], Po = (s) => qo.includes(s);
|
|
3226
|
+
function Ho({
|
|
3227
3227
|
queryBridge: s,
|
|
3228
3228
|
context: e,
|
|
3229
3229
|
definition: t,
|
|
3230
3230
|
chartData: i
|
|
3231
3231
|
}) {
|
|
3232
|
-
const n = Q(""), r = Q(""), o = Q(void 0), a = Q(void 0), c = si(), l = lt(), { stripUnknownFilters: u, loading: d } = ot(l), h =
|
|
3233
|
-
|
|
3232
|
+
const n = Q(""), r = Q(""), o = Q(void 0), a = Q(void 0), c = si(), l = lt(), { stripUnknownFilters: u, loading: d } = ot(l), h = w(() => Pe(t.value));
|
|
3233
|
+
Mt(async () => {
|
|
3234
3234
|
n.value = await s?.exploreBaseUrl?.() ?? "", r.value = await s?.requestsBaseUrl?.() ?? "";
|
|
3235
3235
|
});
|
|
3236
|
-
const y =
|
|
3236
|
+
const y = w(() => c.analytics && c.percentiles), v = w(() => {
|
|
3237
3237
|
const g = t.value.chart.type;
|
|
3238
3238
|
return ["golden_signals", "gauge"].includes(g) ? !1 : g === "top_n" ? !!e.value.editable || !!e.value.showTileActions : !0;
|
|
3239
|
-
}), R =
|
|
3239
|
+
}), R = w(() => r.value && t.value.query && !h.value && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "managed_cache_usage" && !ei(t.value.query.datasource) && y.value && !d.value), _ = w(() => n.value && t.value.query && Po(t.value.query.datasource) && y.value && !d.value), A = w(() => i.value ? Gt(i.value.meta.granularity_ms) : void 0), N = w(() => {
|
|
3240
3240
|
const g = t.value, C = [...e.value.filters, ...g.query.filters ?? []], k = "metrics" in g.query ? g.query.metrics : void 0, I = g.query?.datasource ?? "api_usage";
|
|
3241
3241
|
return u.value({
|
|
3242
3242
|
datasource: I,
|
|
3243
3243
|
filters: C,
|
|
3244
3244
|
queryFields: k
|
|
3245
3245
|
});
|
|
3246
|
-
}), E =
|
|
3246
|
+
}), E = w(() => {
|
|
3247
3247
|
if (!_.value || !v.value)
|
|
3248
3248
|
return "";
|
|
3249
3249
|
const g = t.value;
|
|
@@ -3254,18 +3254,18 @@ function qo({
|
|
|
3254
3254
|
});
|
|
3255
3255
|
const C = g.query.time_range || e.value.timeSpec, k = m(C, N.value);
|
|
3256
3256
|
return f(k);
|
|
3257
|
-
}), S =
|
|
3257
|
+
}), S = w(() => {
|
|
3258
3258
|
if (!R.value || !v.value)
|
|
3259
3259
|
return "";
|
|
3260
3260
|
const g = N.value, C = t.value;
|
|
3261
3261
|
if (Pe(C))
|
|
3262
3262
|
return "";
|
|
3263
|
-
const k =
|
|
3263
|
+
const k = U(
|
|
3264
3264
|
C.query.time_range || e.value.timeSpec,
|
|
3265
3265
|
g
|
|
3266
3266
|
);
|
|
3267
3267
|
return O(k);
|
|
3268
|
-
}), O = (g) => R.value ? `${r.value}?q=${JSON.stringify(g)}` : "",
|
|
3268
|
+
}), O = (g) => R.value ? `${r.value}?q=${JSON.stringify(g)}` : "", U = (g, C) => {
|
|
3269
3269
|
const k = i.value?.meta?.start ? new Date(i.value.meta.start) : void 0, I = i.value?.meta?.end ? new Date(i.value.meta.end) : void 0;
|
|
3270
3270
|
return {
|
|
3271
3271
|
filter: C,
|
|
@@ -3300,7 +3300,7 @@ function qo({
|
|
|
3300
3300
|
const C = t.value.query.datasource && t.value.query.datasource !== "basic" ? t.value.query.datasource : "api_usage";
|
|
3301
3301
|
return `${n.value}?q=${JSON.stringify(g)}&d=${C}&c=${t.value.chart.type}`;
|
|
3302
3302
|
};
|
|
3303
|
-
return
|
|
3303
|
+
return $e([R, _], ([g, C]) => {
|
|
3304
3304
|
g && (o.value = { href: "" }), C && (a.value = { href: "" });
|
|
3305
3305
|
}), {
|
|
3306
3306
|
exploreLinkKebabMenu: E,
|
|
@@ -3316,13 +3316,13 @@ function qo({
|
|
|
3316
3316
|
buildRequestLink: O
|
|
3317
3317
|
};
|
|
3318
3318
|
}
|
|
3319
|
-
const Rs = (s) => s.type === "relative" ? ti.get(ii[s.time_range])?.timeframeLengthMs() : new Date(s.end).getTime() - new Date(s.start).getTime(),
|
|
3319
|
+
const Rs = (s) => s.type === "relative" ? ti.get(ii[s.time_range])?.timeframeLengthMs() : new Date(s.end).getTime() - new Date(s.start).getTime(), Fo = (s) => s.reduce((e, t) => {
|
|
3320
3320
|
const i = ti.get(ii[t])?.maximumTimeframeLength();
|
|
3321
3321
|
return i === void 0 || e && i <= e.durationSeconds ? e : { durationSeconds: i, key: t };
|
|
3322
3322
|
}, void 0), ks = (s, e) => {
|
|
3323
3323
|
if (!s || !e?.length)
|
|
3324
3324
|
return;
|
|
3325
|
-
const t = Rs(s), i =
|
|
3325
|
+
const t = Rs(s), i = Fo(e);
|
|
3326
3326
|
return t !== void 0 && i && t > i.durationSeconds * 1e3 ? i : void 0;
|
|
3327
3327
|
}, Ts = (s, e) => {
|
|
3328
3328
|
const t = ks(s, e);
|
|
@@ -3334,7 +3334,7 @@ const Rs = (s) => s.type === "relative" ? ti.get(ii[s.time_range])?.timeframeLen
|
|
|
3334
3334
|
start: new Date(new Date(s.end).getTime() - t.durationSeconds * 1e3)
|
|
3335
3335
|
};
|
|
3336
3336
|
};
|
|
3337
|
-
function
|
|
3337
|
+
function $o() {
|
|
3338
3338
|
const s = Ae(He), e = lt(), { datasourceConfigMap: t, stripUnknownFilters: i } = ot(e);
|
|
3339
3339
|
let n = null;
|
|
3340
3340
|
return at(() => {
|
|
@@ -3377,10 +3377,10 @@ function Ho() {
|
|
|
3377
3377
|
return s.queryFn(A, l);
|
|
3378
3378
|
} };
|
|
3379
3379
|
}
|
|
3380
|
-
const
|
|
3380
|
+
const Uo = "24H", Bo = {
|
|
3381
3381
|
status_code: "response_http_status",
|
|
3382
3382
|
upstream_status_code: "upstream_status"
|
|
3383
|
-
},
|
|
3383
|
+
}, Wo = {
|
|
3384
3384
|
cost: "usd",
|
|
3385
3385
|
latencies_response_ms: "ms",
|
|
3386
3386
|
latencies_upstream_ms: "ms",
|
|
@@ -3390,24 +3390,24 @@ const Fo = "24H", $o = {
|
|
|
3390
3390
|
response_body_size: "bytes",
|
|
3391
3391
|
response_header_content_length: "bytes",
|
|
3392
3392
|
ai_count: "count"
|
|
3393
|
-
},
|
|
3393
|
+
}, Go = (s) => Ws.includes(s), Yo = (s) => {
|
|
3394
3394
|
const e = s?.tz ? { tz: s.tz } : {};
|
|
3395
3395
|
if (s?.type === "absolute")
|
|
3396
3396
|
return { type: "absolute", start: s.start, end: s.end, ...e };
|
|
3397
3397
|
const t = s?.time_range.toUpperCase() ?? "";
|
|
3398
3398
|
return {
|
|
3399
3399
|
type: "relative",
|
|
3400
|
-
time_range:
|
|
3400
|
+
time_range: Go(t) ? t : Uo,
|
|
3401
3401
|
...e
|
|
3402
3402
|
};
|
|
3403
|
-
}, ji = (s) =>
|
|
3403
|
+
}, ji = (s) => Bo[s] ?? s, jo = (s) => ({
|
|
3404
3404
|
metric: ji(s.metric),
|
|
3405
3405
|
dimension: s.dimension ? ji(s.dimension) : void 0,
|
|
3406
3406
|
unroll: s.unroll,
|
|
3407
|
-
metricUnit:
|
|
3407
|
+
metricUnit: Wo[s.metric],
|
|
3408
3408
|
extraFields: s.extra_fields
|
|
3409
3409
|
}), Bt = "requests";
|
|
3410
|
-
function
|
|
3410
|
+
function Ko() {
|
|
3411
3411
|
const s = Ae(He), e = lt(), { datasourceConfigMap: t, stripUnknownFilters: i } = ot(e);
|
|
3412
3412
|
let n = null;
|
|
3413
3413
|
at(() => {
|
|
@@ -3435,32 +3435,32 @@ function Yo() {
|
|
|
3435
3435
|
datasource: Bt,
|
|
3436
3436
|
query: {
|
|
3437
3437
|
filters: d,
|
|
3438
|
-
time_range:
|
|
3438
|
+
time_range: Yo(r(a, c))
|
|
3439
3439
|
}
|
|
3440
3440
|
}, u, { maxRecords: a.max_records });
|
|
3441
3441
|
} };
|
|
3442
3442
|
}
|
|
3443
|
-
function
|
|
3443
|
+
function Qo({
|
|
3444
3444
|
context: s,
|
|
3445
3445
|
globalFilters: e = Q([]),
|
|
3446
3446
|
isFullscreen: t = Q(!1),
|
|
3447
3447
|
preview: i = Q(!1)
|
|
3448
3448
|
}) {
|
|
3449
|
-
const n = si(), r = lt(), { loading: o } = ot(n), { loading: a } = ot(r), c =
|
|
3449
|
+
const n = si(), r = lt(), { loading: o } = ot(n), { loading: a } = ot(r), c = w(() => s.value.timeSpec ? s.value.timeSpec : {
|
|
3450
3450
|
type: "relative",
|
|
3451
3451
|
time_range: n.defaultQueryTimeForOrg
|
|
3452
|
-
}), l =
|
|
3452
|
+
}), l = w(() => {
|
|
3453
3453
|
const { tz: S } = s.value;
|
|
3454
3454
|
return S || new Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
3455
|
-
}), u =
|
|
3455
|
+
}), u = w(() => {
|
|
3456
3456
|
const { editable: S } = s.value;
|
|
3457
3457
|
return S === void 0 || i.value ? !1 : S;
|
|
3458
|
-
}), d =
|
|
3458
|
+
}), d = w(() => {
|
|
3459
3459
|
const { showTileActions: S } = s.value;
|
|
3460
3460
|
return i.value ? !1 : S === void 0 ? !0 : S;
|
|
3461
|
-
}), h =
|
|
3461
|
+
}), h = w(() => [...s.value.filters ?? [], ...e.value]), y = w(() => {
|
|
3462
3462
|
let { refreshInterval: S } = s.value;
|
|
3463
|
-
if (S === void 0 && (S =
|
|
3463
|
+
if (S === void 0 && (S = go), t.value) {
|
|
3464
3464
|
let O = !1;
|
|
3465
3465
|
if (c.value.type === "relative")
|
|
3466
3466
|
O = ["15m", "1h", "6h", "12h", "24h"].includes(c.value.time_range);
|
|
@@ -3468,18 +3468,18 @@ function jo({
|
|
|
3468
3468
|
const m = c.value.start.getTime(), f = c.value.end.getTime();
|
|
3469
3469
|
O = Math.abs(f - m) <= 864e5;
|
|
3470
3470
|
}
|
|
3471
|
-
const
|
|
3472
|
-
c.value.type === "absolute" && c.value.end.getTime() <
|
|
3471
|
+
const U = (/* @__PURE__ */ new Date()).getTime();
|
|
3472
|
+
c.value.type === "absolute" && c.value.end.getTime() < U || c.value.type === "relative" && ["previous_week", "previous_month"].includes(c.value.time_range) ? S = 0 : O ? S = yo : S = vo;
|
|
3473
3473
|
}
|
|
3474
3474
|
return S;
|
|
3475
|
-
}), v =
|
|
3475
|
+
}), v = w(() => ({
|
|
3476
3476
|
filters: h.value,
|
|
3477
3477
|
timeSpec: c.value,
|
|
3478
3478
|
tz: l.value,
|
|
3479
3479
|
refreshInterval: y.value,
|
|
3480
3480
|
editable: u.value,
|
|
3481
3481
|
showTileActions: d.value
|
|
3482
|
-
})), R =
|
|
3482
|
+
})), R = w(() => !o.value && !a.value), _ = w(() => !i.value && !!Ps()?.vnode?.props?.onTileTimeRangeZoom), A = w(() => !i.value), N = w(() => !i.value), E = w(() => ({
|
|
3483
3483
|
enabled: _.value,
|
|
3484
3484
|
showExploreAction: A.value,
|
|
3485
3485
|
showRequestsAction: N.value,
|
|
@@ -3529,8 +3529,8 @@ function jo({
|
|
|
3529
3529
|
zoomConfiguration: E
|
|
3530
3530
|
};
|
|
3531
3531
|
}
|
|
3532
|
-
const
|
|
3533
|
-
function
|
|
3532
|
+
const Xo = 6, Ss = 6, Ds = 4;
|
|
3533
|
+
function Vo(s, e) {
|
|
3534
3534
|
const { pageWidth: t, pageHeight: i, margin: n } = e, r = n + 1, o = n + e.headerHeight - 3, a = i - n - Ss + 3, c = a + 4;
|
|
3535
3535
|
e.title && (s.setFont("helvetica", "bold"), s.setFontSize(11), s.setTextColor(60), s.text(e.title, n, r)), s.setFont("helvetica", "normal"), s.setFontSize(8), s.setTextColor(120), s.text(e.generatedAt, t - n, r, { align: "right" }), e.subtitle && s.text(e.subtitle, n, r + Ds), s.setDrawColor(220), s.line(n, o, t - n, o), s.line(n, a, t - n, a), s.setFont("helvetica", "bold"), s.setTextColor(60), s.text(e.branding, n, c);
|
|
3536
3536
|
const l = s.getTextWidth(e.branding);
|
|
@@ -3538,7 +3538,7 @@ function Qo(s, e) {
|
|
|
3538
3538
|
const u = ` ${e.dashboardNote}`;
|
|
3539
3539
|
e.dashboardUrl ? (s.setTextColor(0, 68, 204), s.textWithLink(u, n + l, c, { url: e.dashboardUrl })) : (s.setTextColor(120), s.text(u, n + l, c)), s.setTextColor(120), s.text(e.pageLabel, t - n, c, { align: "right" });
|
|
3540
3540
|
}
|
|
3541
|
-
function
|
|
3541
|
+
function Zo(s) {
|
|
3542
3542
|
const e = s.querySelector(".kong-ui-public-grid-layout, .grid-stack");
|
|
3543
3543
|
if (!e)
|
|
3544
3544
|
return [];
|
|
@@ -3551,7 +3551,7 @@ function Xo(s) {
|
|
|
3551
3551
|
n.set(a, l !== void 0 ? Math.max(l, c) : c);
|
|
3552
3552
|
}), [...n.entries()].map(([r, o]) => ({ top: r, bottom: o })).sort((r, o) => r.top - o.top);
|
|
3553
3553
|
}
|
|
3554
|
-
function
|
|
3554
|
+
function Jo(s, e, t, i) {
|
|
3555
3555
|
if (!s.length) {
|
|
3556
3556
|
const o = [];
|
|
3557
3557
|
let a = 0;
|
|
@@ -3569,7 +3569,7 @@ function Vo(s, e, t, i) {
|
|
|
3569
3569
|
}
|
|
3570
3570
|
return r < e && n.push({ startY: r, height: e - r }), n;
|
|
3571
3571
|
}
|
|
3572
|
-
function
|
|
3572
|
+
function ea(s) {
|
|
3573
3573
|
const { i18n: e } = Es(), t = Q({ status: "idle" });
|
|
3574
3574
|
async function i(n = {}) {
|
|
3575
3575
|
const {
|
|
@@ -3607,9 +3607,9 @@ function Zo(s) {
|
|
|
3607
3607
|
excludeMode: "remove",
|
|
3608
3608
|
embedFonts: !0,
|
|
3609
3609
|
plugins: [S]
|
|
3610
|
-
}),
|
|
3610
|
+
}), U = Zo(A), W = A.getBoundingClientRect().width, m = W ? O.width / W : h;
|
|
3611
3611
|
t.value = { status: "generating" };
|
|
3612
|
-
const f = /* @__PURE__ */ new Date(), g = new E({ orientation: l, unit: "mm", format: u }), C = g.internal.pageSize.getWidth(), k = g.internal.pageSize.getHeight(), I =
|
|
3612
|
+
const f = /* @__PURE__ */ new Date(), g = new E({ orientation: l, unit: "mm", format: u }), C = g.internal.pageSize.getWidth(), k = g.internal.pageSize.getHeight(), I = Xo + (a ? Ds : 0), oe = C - d * 2, we = k - d * 2 - I - Ss, be = O.width / oe, J = we * be, le = Jo(U, O.height, J, m), H = {
|
|
3613
3613
|
title: o,
|
|
3614
3614
|
subtitle: a,
|
|
3615
3615
|
dashboardUrl: c,
|
|
@@ -3625,11 +3625,11 @@ function Zo(s) {
|
|
|
3625
3625
|
};
|
|
3626
3626
|
for (let ne = 0; ne < le.length; ne++) {
|
|
3627
3627
|
ne > 0 && g.addPage();
|
|
3628
|
-
const { startY:
|
|
3628
|
+
const { startY: b, height: T } = le[ne], x = document.createElement("canvas");
|
|
3629
3629
|
x.width = O.width, x.height = T, x.getContext("2d").drawImage(
|
|
3630
3630
|
O,
|
|
3631
3631
|
0,
|
|
3632
|
-
|
|
3632
|
+
b,
|
|
3633
3633
|
O.width,
|
|
3634
3634
|
T,
|
|
3635
3635
|
0,
|
|
@@ -3643,7 +3643,7 @@ function Zo(s) {
|
|
|
3643
3643
|
d + I,
|
|
3644
3644
|
oe,
|
|
3645
3645
|
T / be
|
|
3646
|
-
),
|
|
3646
|
+
), Vo(g, {
|
|
3647
3647
|
...H,
|
|
3648
3648
|
pageLabel: e.t("pdfExport.pageOf", { page: String(ne + 1), total: String(le.length) })
|
|
3649
3649
|
});
|
|
@@ -3665,22 +3665,22 @@ function Zo(s) {
|
|
|
3665
3665
|
};
|
|
3666
3666
|
}
|
|
3667
3667
|
const Ee = {
|
|
3668
|
-
useContextLinks:
|
|
3669
|
-
useDashboardContext:
|
|
3670
|
-
useEvaluateFeatureFlag:
|
|
3671
|
-
useExportPdf:
|
|
3668
|
+
useContextLinks: Ho,
|
|
3669
|
+
useDashboardContext: Qo,
|
|
3670
|
+
useEvaluateFeatureFlag: _o,
|
|
3671
|
+
useExportPdf: ea,
|
|
3672
3672
|
useI18n: Es,
|
|
3673
|
-
useIssueQuery:
|
|
3674
|
-
useIssueRequestsQuery:
|
|
3675
|
-
useRequestQueue:
|
|
3676
|
-
},
|
|
3673
|
+
useIssueQuery: $o,
|
|
3674
|
+
useIssueRequestsQuery: Ko,
|
|
3675
|
+
useRequestQueue: To
|
|
3676
|
+
}, ta = { class: "kong-ui-public-csv-export-modal" }, ia = {
|
|
3677
3677
|
key: 0,
|
|
3678
3678
|
class: "selected-range"
|
|
3679
|
-
},
|
|
3679
|
+
}, sa = {
|
|
3680
3680
|
key: 4,
|
|
3681
3681
|
class: "text-muted",
|
|
3682
3682
|
tag: "span"
|
|
3683
|
-
}, Ki = 3,
|
|
3683
|
+
}, Ki = 3, na = /* @__PURE__ */ ge({
|
|
3684
3684
|
__name: "CsvExportModal",
|
|
3685
3685
|
props: {
|
|
3686
3686
|
exportState: {},
|
|
@@ -3689,22 +3689,22 @@ const Ee = {
|
|
|
3689
3689
|
},
|
|
3690
3690
|
emits: ["closeModal"],
|
|
3691
3691
|
setup(s, { emit: e }) {
|
|
3692
|
-
const { i18n: t } = Ee.useI18n(), i = s, n = e, r = `${i.filename.replace(/\s+/g, "-").toLowerCase()}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, o = Q(1), a =
|
|
3692
|
+
const { i18n: t } = Ee.useI18n(), i = s, n = e, r = `${i.filename.replace(/\s+/g, "-").toLowerCase()}-${(/* @__PURE__ */ new Date()).toISOString().slice(0, 10)}.csv`, o = Q(1), a = w(() => h.value.rows.length), c = w(() => i.exportState.status === "success" && !!i.exportState.chartData?.data?.length), l = w(() => {
|
|
3693
3693
|
if (i.exportState.status !== "success" || !i.exportState.chartData?.meta)
|
|
3694
3694
|
return "";
|
|
3695
3695
|
const { start: v, end: R } = i.exportState.chartData.meta;
|
|
3696
3696
|
return v && R ? `${hi(new Date(v))} - ${hi(new Date(R), { includeTZ: !0 })}` : "";
|
|
3697
|
-
}), u =
|
|
3697
|
+
}), u = w(() => i.exportState.status !== "success" ? "" : t.t("csvExport.previewRows", {
|
|
3698
3698
|
rowsMax: Math.min(Ki, a.value),
|
|
3699
3699
|
rowsTotal: a.value,
|
|
3700
3700
|
plural: a.value === 1 ? "" : "s"
|
|
3701
3701
|
})), d = () => {
|
|
3702
3702
|
n("closeModal");
|
|
3703
|
-
}, h =
|
|
3703
|
+
}, h = w(() => {
|
|
3704
3704
|
if (i.exportState.status !== "success" || !c.value || !i.exportState.chartData?.meta.metric_names)
|
|
3705
3705
|
return { headers: [], rows: [], csvHeaders: {} };
|
|
3706
3706
|
const v = i.exportState.chartData, R = v.data.some((O) => O.timestamp !== v.data[0].timestamp), _ = v.data.map((O) => {
|
|
3707
|
-
const
|
|
3707
|
+
const U = new Date(O.timestamp);
|
|
3708
3708
|
return {
|
|
3709
3709
|
...Object.keys(O.event).reduce((m, f) => {
|
|
3710
3710
|
if (f in v.meta.display) {
|
|
@@ -3715,8 +3715,8 @@ const Ee = {
|
|
|
3715
3715
|
return m;
|
|
3716
3716
|
}, {}),
|
|
3717
3717
|
...R ? {
|
|
3718
|
-
timestamp: Ai(
|
|
3719
|
-
tzOffset: Ai(
|
|
3718
|
+
timestamp: Ai(U, "yyyy-MM-dd HH:mm:ss"),
|
|
3719
|
+
tzOffset: Ai(U, "XXX")
|
|
3720
3720
|
} : {}
|
|
3721
3721
|
};
|
|
3722
3722
|
});
|
|
@@ -3737,7 +3737,7 @@ const Ee = {
|
|
|
3737
3737
|
label: t.t(`chartLabels.${O}`),
|
|
3738
3738
|
key: O
|
|
3739
3739
|
}))
|
|
3740
|
-
], S = E.reduce((O,
|
|
3740
|
+
], S = E.reduce((O, U) => (O[U.key] = U.label, O), {});
|
|
3741
3741
|
return { headers: E, csvHeaders: S, rows: _ };
|
|
3742
3742
|
}), y = async () => {
|
|
3743
3743
|
if (i.exportState.status !== "success")
|
|
@@ -3748,12 +3748,12 @@ const Ee = {
|
|
|
3748
3748
|
data: v.slice(0, Ki)
|
|
3749
3749
|
};
|
|
3750
3750
|
};
|
|
3751
|
-
return
|
|
3751
|
+
return $e(h, () => {
|
|
3752
3752
|
o.value++;
|
|
3753
3753
|
}), (v, R) => {
|
|
3754
|
-
const _ =
|
|
3755
|
-
return z(), se("div",
|
|
3756
|
-
|
|
3754
|
+
const _ = _e("KSkeleton"), A = _e("KEmptyState"), N = _e("KTableData"), E = _e("KTooltip"), S = _e("KButton"), O = _e("KModal");
|
|
3755
|
+
return z(), se("div", ta, [
|
|
3756
|
+
ue(O, {
|
|
3757
3757
|
class: "vitals-report",
|
|
3758
3758
|
"data-testid": "csv-export-modal",
|
|
3759
3759
|
"show-dismiss-icon": "",
|
|
@@ -3762,12 +3762,12 @@ const Ee = {
|
|
|
3762
3762
|
onCancel: d,
|
|
3763
3763
|
onKeyup: Hs(d, ["esc"])
|
|
3764
3764
|
}, {
|
|
3765
|
-
default:
|
|
3766
|
-
|
|
3767
|
-
s.exportState.status === "success" && c.value ? (z(), se("div",
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
])) :
|
|
3765
|
+
default: $(() => [
|
|
3766
|
+
ce("div", null, [
|
|
3767
|
+
s.exportState.status === "success" && c.value ? (z(), se("div", ia, [
|
|
3768
|
+
ce("p", null, ie(s.modalDescription ? s.modalDescription : D(t).t("csvExport.exportDescription")), 1),
|
|
3769
|
+
ce("p", null, ie(D(t).t("csvExport.exportTimeRange")) + ": " + ie(l.value), 1)
|
|
3770
|
+
])) : me("", !0),
|
|
3771
3771
|
s.exportState.status === "loading" ? (z(), B(_, {
|
|
3772
3772
|
key: 1,
|
|
3773
3773
|
class: "chart-skeleton",
|
|
@@ -3782,13 +3782,13 @@ const Ee = {
|
|
|
3782
3782
|
"row-hover": !1,
|
|
3783
3783
|
sortable: !1
|
|
3784
3784
|
}, {
|
|
3785
|
-
"empty-state":
|
|
3786
|
-
|
|
3787
|
-
title:
|
|
3788
|
-
|
|
3785
|
+
"empty-state": $(() => [
|
|
3786
|
+
ue(A, { "action-button-visible": !1 }, {
|
|
3787
|
+
title: $(() => [
|
|
3788
|
+
ce("h5", null, ie(D(t).t("csvExport.noDataRange")), 1)
|
|
3789
3789
|
]),
|
|
3790
|
-
default:
|
|
3791
|
-
|
|
3790
|
+
default: $(() => [
|
|
3791
|
+
ce("p", null, ie(D(t).t("csvExport.noDataRetry")), 1)
|
|
3792
3792
|
]),
|
|
3793
3793
|
_: 1
|
|
3794
3794
|
})
|
|
@@ -3798,53 +3798,53 @@ const Ee = {
|
|
|
3798
3798
|
key: 3,
|
|
3799
3799
|
"action-button-visible": !1
|
|
3800
3800
|
}, {
|
|
3801
|
-
title:
|
|
3802
|
-
|
|
3801
|
+
title: $(() => [
|
|
3802
|
+
ce("h5", null, ie(D(t).t("csvExport.dataError")), 1)
|
|
3803
3803
|
]),
|
|
3804
3804
|
_: 1
|
|
3805
|
-
})) :
|
|
3806
|
-
s.exportState.status === "success" && c.value ? (z(), se("div",
|
|
3805
|
+
})) : me("", !0),
|
|
3806
|
+
s.exportState.status === "success" && c.value ? (z(), se("div", sa, [
|
|
3807
3807
|
Je(ie(u.value) + " ", 1),
|
|
3808
|
-
|
|
3808
|
+
ue(E, {
|
|
3809
3809
|
class: "preview-tooltip",
|
|
3810
3810
|
placement: "right",
|
|
3811
3811
|
text: D(t).t("csvExport.maximumRecordAmount", { value: D(us) })
|
|
3812
3812
|
}, {
|
|
3813
|
-
default:
|
|
3814
|
-
|
|
3813
|
+
default: $(() => [
|
|
3814
|
+
ue(D(Ks), {
|
|
3815
3815
|
color: `var(--kui-color-text-neutral, ${D(Kt)})`,
|
|
3816
|
-
size: `var(--kui-icon-size-30, ${D(
|
|
3816
|
+
size: `var(--kui-icon-size-30, ${D(Yr)})`
|
|
3817
3817
|
}, null, 8, ["color", "size"])
|
|
3818
3818
|
]),
|
|
3819
3819
|
_: 1
|
|
3820
3820
|
}, 8, ["text"])
|
|
3821
|
-
])) :
|
|
3821
|
+
])) : me("", !0)
|
|
3822
3822
|
])
|
|
3823
3823
|
]),
|
|
3824
|
-
"footer-actions":
|
|
3825
|
-
|
|
3824
|
+
"footer-actions": $(() => [
|
|
3825
|
+
ue(S, {
|
|
3826
3826
|
appearance: "tertiary",
|
|
3827
3827
|
class: "cancel-btn",
|
|
3828
3828
|
onClick: d
|
|
3829
3829
|
}, {
|
|
3830
|
-
default:
|
|
3830
|
+
default: $(() => [
|
|
3831
3831
|
Je(ie(D(t).t("csvExport.cancelButton")), 1)
|
|
3832
3832
|
]),
|
|
3833
3833
|
_: 1
|
|
3834
3834
|
}),
|
|
3835
|
-
|
|
3835
|
+
ue(io, {
|
|
3836
3836
|
class: "vitals-report-export-button",
|
|
3837
3837
|
filename: r,
|
|
3838
3838
|
headers: h.value.csvHeaders,
|
|
3839
3839
|
rows: h.value.rows
|
|
3840
3840
|
}, {
|
|
3841
|
-
default:
|
|
3842
|
-
|
|
3841
|
+
default: $(() => [
|
|
3842
|
+
ue(S, {
|
|
3843
3843
|
appearance: "primary",
|
|
3844
3844
|
"data-testid": "csv-download-button",
|
|
3845
3845
|
disabled: s.exportState.status !== "success" || !c.value
|
|
3846
3846
|
}, {
|
|
3847
|
-
default:
|
|
3847
|
+
default: $(() => [
|
|
3848
3848
|
Je(ie(D(t).t("csvExport.downloadButton")), 1)
|
|
3849
3849
|
]),
|
|
3850
3850
|
_: 1
|
|
@@ -3860,9 +3860,9 @@ const Ee = {
|
|
|
3860
3860
|
}
|
|
3861
3861
|
});
|
|
3862
3862
|
var Os = /* @__PURE__ */ ((s) => (s.VALIDATING = "VALIDATING", s.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", s.PENDING = "PENDING", s.SUCCESS = "SUCCESS", s.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", s.ERROR = "ERROR", s.STALE_IF_ERROR = "STALE_IF_ERROR", s))(Os || {});
|
|
3863
|
-
const
|
|
3863
|
+
const ra = (s) => s ? !!// TODO: revisit: currently only the first check ever matters?
|
|
3864
3864
|
(Object.keys(s)?.length || s.data?.length || s.data?.data?.length || !s.data?.data && typeof s.data == "object" && Object.keys(s?.data).length) : !1;
|
|
3865
|
-
function zs(s = Q({}), e, t, i =
|
|
3865
|
+
function zs(s = Q({}), e, t, i = ra) {
|
|
3866
3866
|
const n = Q(
|
|
3867
3867
|
"PENDING"
|
|
3868
3868
|
/* PENDING */
|
|
@@ -3899,7 +3899,7 @@ function zs(s = Q({}), e, t, i = sa) {
|
|
|
3899
3899
|
swrvState: Os
|
|
3900
3900
|
};
|
|
3901
3901
|
}
|
|
3902
|
-
const
|
|
3902
|
+
const vt = /* @__PURE__ */ ge({
|
|
3903
3903
|
__name: "QueryDataProvider",
|
|
3904
3904
|
props: {
|
|
3905
3905
|
context: {},
|
|
@@ -3926,11 +3926,11 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
3926
3926
|
refreshInterval: t.context.refreshInterval,
|
|
3927
3927
|
revalidateOnFocus: !1,
|
|
3928
3928
|
shouldRetryOnError: !1
|
|
3929
|
-
}), { state: d, swrvState: h } = zs(c, l, u), y = Q(null), v =
|
|
3930
|
-
return
|
|
3929
|
+
}), { state: d, swrvState: h } = zs(c, l, u), y = Q(null), v = w(() => d.value === h.ERROR || !!y.value), R = w(() => !t.queryReady || d.value === h.PENDING), _ = Q(), A = w(() => c.value ?? (t.queryReady && d.value === h.PENDING ? _.value : void 0));
|
|
3930
|
+
return $e([() => c.value, () => d.value], ([N, E]) => {
|
|
3931
3931
|
N && (E === "SUCCESS_HAS_DATA" || E === "SUCCESS") && N !== _.value && (_.value = N, i("chart-data", N));
|
|
3932
3932
|
}), (N, E) => {
|
|
3933
|
-
const S =
|
|
3933
|
+
const S = _e("KSkeleton"), O = _e("KEmptyState");
|
|
3934
3934
|
return (R.value || !D(c) && !v.value) && !A.value ? (z(), B(S, {
|
|
3935
3935
|
key: 0,
|
|
3936
3936
|
class: "chart-skeleton",
|
|
@@ -3940,25 +3940,25 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
3940
3940
|
"action-button-visible": !1,
|
|
3941
3941
|
"data-testid": "chart-empty-state"
|
|
3942
3942
|
}, pt({
|
|
3943
|
-
icon:
|
|
3943
|
+
icon: $(() => [
|
|
3944
3944
|
y.value?.type === "forbidden" ? (z(), B(D(cs), { key: 0 })) : (z(), B(D(ds), { key: 1 }))
|
|
3945
3945
|
]),
|
|
3946
|
-
title:
|
|
3947
|
-
|
|
3946
|
+
title: $(() => [
|
|
3947
|
+
ce("p", null, ie(y.value?.message || D(n).t("renderer.unexpectedError")), 1)
|
|
3948
3948
|
]),
|
|
3949
3949
|
_: 2
|
|
3950
3950
|
}, [
|
|
3951
3951
|
y.value?.details ? {
|
|
3952
3952
|
name: "default",
|
|
3953
|
-
fn:
|
|
3954
|
-
|
|
3953
|
+
fn: $(() => [
|
|
3954
|
+
ce("p", null, ie(y.value.details), 1)
|
|
3955
3955
|
]),
|
|
3956
3956
|
key: "0"
|
|
3957
3957
|
} : void 0
|
|
3958
|
-
]), 1024)) : A.value ? et(N.$slots, "default", { data: A.value }, void 0, void 0, 2) :
|
|
3958
|
+
]), 1024)) : A.value ? et(N.$slots, "default", { data: A.value }, void 0, void 0, 2) : me("", !0);
|
|
3959
3959
|
};
|
|
3960
3960
|
}
|
|
3961
|
-
}),
|
|
3961
|
+
}), oa = /* @__PURE__ */ ge({
|
|
3962
3962
|
__name: "SimpleChartRenderer",
|
|
3963
3963
|
props: {
|
|
3964
3964
|
query: {},
|
|
@@ -3974,23 +3974,23 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
3974
3974
|
zoomConfiguration: {}
|
|
3975
3975
|
},
|
|
3976
3976
|
setup(s) {
|
|
3977
|
-
const e = s, t =
|
|
3977
|
+
const e = s, t = w(() => e.chartOptions.type === "single_value"), i = w(() => e.chartOptions.type === "single_value" ? {
|
|
3978
3978
|
...e.chartOptions,
|
|
3979
3979
|
alignX: e.chartOptions.align_x ?? "left",
|
|
3980
3980
|
showTrend: e.query.granularity === "trend"
|
|
3981
3981
|
} : e.chartOptions);
|
|
3982
|
-
return (n, r) => (z(), B(
|
|
3982
|
+
return (n, r) => (z(), B(vt, {
|
|
3983
3983
|
context: s.context,
|
|
3984
3984
|
query: s.query,
|
|
3985
3985
|
"query-ready": s.queryReady,
|
|
3986
3986
|
"refresh-counter": s.refreshCounter
|
|
3987
3987
|
}, {
|
|
3988
|
-
default:
|
|
3989
|
-
|
|
3988
|
+
default: $(({ data: o }) => [
|
|
3989
|
+
ce("div", {
|
|
3990
3990
|
class: rt(["analytics-chart", { "single-value": t.value }]),
|
|
3991
|
-
style:
|
|
3991
|
+
style: Et(t.value ? void 0 : { height: `${s.height}px` })
|
|
3992
3992
|
}, [
|
|
3993
|
-
|
|
3993
|
+
ue(D(tn), {
|
|
3994
3994
|
"chart-data": o,
|
|
3995
3995
|
"chart-options": i.value,
|
|
3996
3996
|
"synthetics-data-key": t.value ? void 0 : s.chartOptions.synthetics_data_key
|
|
@@ -4000,12 +4000,12 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4000
4000
|
_: 1
|
|
4001
4001
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
4002
4002
|
}
|
|
4003
|
-
}),
|
|
4003
|
+
}), Ue = (s, e) => {
|
|
4004
4004
|
const t = s.__vccOpts || s;
|
|
4005
4005
|
for (const [i, n] of e)
|
|
4006
4006
|
t[i] = n;
|
|
4007
4007
|
return t;
|
|
4008
|
-
}, Qi = /* @__PURE__ */
|
|
4008
|
+
}, Qi = /* @__PURE__ */ Ue(oa, [["__scopeId", "data-v-22077b88"]]), aa = { class: "analytics-chart" }, la = /* @__PURE__ */ ge({
|
|
4009
4009
|
__name: "BaseAnalyticsChartRenderer",
|
|
4010
4010
|
props: {
|
|
4011
4011
|
query: {},
|
|
@@ -4023,7 +4023,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4023
4023
|
},
|
|
4024
4024
|
emits: ["edit-tile", "chart-data", "zoom-time-range", "view-requests", "select-chart-range"],
|
|
4025
4025
|
setup(s, { emit: e }) {
|
|
4026
|
-
const t = s, i = e, { i18n: n } = Ee.useI18n(), r =
|
|
4026
|
+
const t = s, i = e, { i18n: n } = Ee.useI18n(), r = w(() => ({
|
|
4027
4027
|
type: t.chartOptions.type,
|
|
4028
4028
|
stacked: t.chartOptions.stacked ?? !1,
|
|
4029
4029
|
chartDatasetColors: t.chartOptions.chart_dataset_colors,
|
|
@@ -4043,17 +4043,17 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4043
4043
|
i("chart-data", l);
|
|
4044
4044
|
};
|
|
4045
4045
|
return (l, u) => {
|
|
4046
|
-
const d =
|
|
4047
|
-
return z(), B(
|
|
4046
|
+
const d = _e("KDropdownItem");
|
|
4047
|
+
return z(), B(vt, {
|
|
4048
4048
|
context: s.context,
|
|
4049
4049
|
query: s.query,
|
|
4050
4050
|
"query-ready": s.queryReady,
|
|
4051
4051
|
"refresh-counter": s.refreshCounter,
|
|
4052
4052
|
onChartData: c
|
|
4053
4053
|
}, {
|
|
4054
|
-
default:
|
|
4055
|
-
|
|
4056
|
-
|
|
4054
|
+
default: $(({ data: h }) => [
|
|
4055
|
+
ce("div", aa, [
|
|
4056
|
+
ue(D(Yt), ns({
|
|
4057
4057
|
"active-metric": s.activeMetric,
|
|
4058
4058
|
"chart-data": h,
|
|
4059
4059
|
"chart-options": r.value,
|
|
@@ -4069,9 +4069,9 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4069
4069
|
}), pt({ _: 2 }, [
|
|
4070
4070
|
s.context.editable ? {
|
|
4071
4071
|
name: "menu-items",
|
|
4072
|
-
fn:
|
|
4073
|
-
|
|
4074
|
-
default:
|
|
4072
|
+
fn: $(() => [
|
|
4073
|
+
ue(d, { onClick: a }, {
|
|
4074
|
+
default: $(() => [
|
|
4075
4075
|
Je(ie(D(n).t("renderer.edit")), 1)
|
|
4076
4076
|
]),
|
|
4077
4077
|
_: 1
|
|
@@ -4086,7 +4086,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4086
4086
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]);
|
|
4087
4087
|
};
|
|
4088
4088
|
}
|
|
4089
|
-
}), oi = /* @__PURE__ */
|
|
4089
|
+
}), oi = /* @__PURE__ */ Ue(la, [["__scopeId", "data-v-5e3d0a14"]]), Xi = /* @__PURE__ */ ge({
|
|
4090
4090
|
__name: "BarChartRenderer",
|
|
4091
4091
|
props: {
|
|
4092
4092
|
query: {},
|
|
@@ -4112,10 +4112,10 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4112
4112
|
"refresh-counter": s.refreshCounter
|
|
4113
4113
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
|
|
4114
4114
|
}
|
|
4115
|
-
}),
|
|
4115
|
+
}), ua = { class: "analytics-chart" }, ca = {
|
|
4116
4116
|
key: 3,
|
|
4117
4117
|
class: "analytics-chart"
|
|
4118
|
-
},
|
|
4118
|
+
}, da = /* @__PURE__ */ ge({
|
|
4119
4119
|
__name: "ScatterChartRenderer",
|
|
4120
4120
|
props: {
|
|
4121
4121
|
query: {},
|
|
@@ -4132,22 +4132,22 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4132
4132
|
},
|
|
4133
4133
|
emits: ["chart-data", "query-complete"],
|
|
4134
4134
|
setup(s, { emit: e }) {
|
|
4135
|
-
const t = s, i = e, { i18n: n } = Ee.useI18n(), { issueRequestsQuery: r } = Ee.useIssueRequestsQuery(), o =
|
|
4136
|
-
const S = t.query, O = S.time_range ?? t.context.timeSpec,
|
|
4137
|
-
if (
|
|
4135
|
+
const t = s, i = e, { i18n: n } = Ee.useI18n(), { issueRequestsQuery: r } = Ee.useIssueRequestsQuery(), o = w(() => t.query.datasource === "requests"), a = w(() => {
|
|
4136
|
+
const S = t.query, O = S.time_range ?? t.context.timeSpec, U = O ? Rs(O) : void 0;
|
|
4137
|
+
if (!U)
|
|
4138
4138
|
return S;
|
|
4139
|
-
const W = js(
|
|
4139
|
+
const W = js(U);
|
|
4140
4140
|
let m;
|
|
4141
4141
|
return S.granularity && fi[S.granularity] >= fi[W] ? m = S.granularity : m = W, { ...S, granularity: m };
|
|
4142
4142
|
}), c = () => o.value && t.queryReady ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, l = Q(null), { data: u, error: d, isValidating: h } = fs(c, async () => {
|
|
4143
4143
|
const S = c(), O = t.query;
|
|
4144
4144
|
try {
|
|
4145
|
-
const
|
|
4146
|
-
return c() !== S ? void 0 : (l.value = null, sn(
|
|
4147
|
-
} catch (
|
|
4145
|
+
const U = await r(O, t.context);
|
|
4146
|
+
return c() !== S ? void 0 : (l.value = null, sn(U, jo(O)));
|
|
4147
|
+
} catch (U) {
|
|
4148
4148
|
if (c() !== S)
|
|
4149
4149
|
return;
|
|
4150
|
-
throw l.value = hs(
|
|
4150
|
+
throw l.value = hs(U), U;
|
|
4151
4151
|
} finally {
|
|
4152
4152
|
c() === S && i("query-complete");
|
|
4153
4153
|
}
|
|
@@ -4155,11 +4155,11 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4155
4155
|
refreshInterval: t.context.refreshInterval,
|
|
4156
4156
|
revalidateOnFocus: !1,
|
|
4157
4157
|
shouldRetryOnError: !1
|
|
4158
|
-
}), { state: y, swrvState: v } = zs(u, d, h), R = Q(), _ =
|
|
4159
|
-
|
|
4158
|
+
}), { state: y, swrvState: v } = zs(u, d, h), R = Q(), _ = w(() => u.value ?? R.value);
|
|
4159
|
+
$e(u, (S) => {
|
|
4160
4160
|
S && (R.value = S);
|
|
4161
4161
|
});
|
|
4162
|
-
const A =
|
|
4162
|
+
const A = w(() => y.value === v.ERROR || !!l.value), N = w(() => !A.value && (!t.queryReady || y.value === v.PENDING) && !_.value), E = w(() => ({
|
|
4163
4163
|
type: "scatter",
|
|
4164
4164
|
chartDatasetColors: t.chartOptions.chart_dataset_colors,
|
|
4165
4165
|
scatter: {
|
|
@@ -4177,8 +4177,8 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4177
4177
|
}
|
|
4178
4178
|
}));
|
|
4179
4179
|
return (S, O) => {
|
|
4180
|
-
const
|
|
4181
|
-
return o.value ? N.value ? (z(), B(
|
|
4180
|
+
const U = _e("KSkeleton"), W = _e("KEmptyState");
|
|
4181
|
+
return o.value ? N.value ? (z(), B(U, {
|
|
4182
4182
|
key: 1,
|
|
4183
4183
|
class: "chart-skeleton",
|
|
4184
4184
|
type: "table"
|
|
@@ -4187,30 +4187,30 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4187
4187
|
"action-button-visible": !1,
|
|
4188
4188
|
"data-testid": "scatter-chart-empty-state"
|
|
4189
4189
|
}, pt({
|
|
4190
|
-
icon:
|
|
4190
|
+
icon: $(() => [
|
|
4191
4191
|
l.value?.type === "forbidden" ? (z(), B(D(cs), { key: 0 })) : (z(), B(D(ds), { key: 1 }))
|
|
4192
4192
|
]),
|
|
4193
|
-
title:
|
|
4194
|
-
|
|
4193
|
+
title: $(() => [
|
|
4194
|
+
ce("p", null, ie(l.value?.message || D(n).t("renderer.unexpectedError")), 1)
|
|
4195
4195
|
]),
|
|
4196
4196
|
_: 2
|
|
4197
4197
|
}, [
|
|
4198
4198
|
l.value?.details ? {
|
|
4199
4199
|
name: "default",
|
|
4200
|
-
fn:
|
|
4201
|
-
|
|
4200
|
+
fn: $(() => [
|
|
4201
|
+
ce("p", null, ie(l.value.details), 1)
|
|
4202
4202
|
]),
|
|
4203
4203
|
key: "0"
|
|
4204
4204
|
} : void 0
|
|
4205
|
-
]), 1024)) : _.value ? (z(), se("div",
|
|
4206
|
-
|
|
4205
|
+
]), 1024)) : _.value ? (z(), se("div", ca, [
|
|
4206
|
+
ue(D(Yt), {
|
|
4207
4207
|
"chart-data": _.value,
|
|
4208
4208
|
"chart-options": E.value,
|
|
4209
4209
|
"legend-position": "bottom",
|
|
4210
4210
|
"synthetics-data-key": s.chartOptions.synthetics_data_key,
|
|
4211
4211
|
"tooltip-title": ""
|
|
4212
4212
|
}, null, 8, ["chart-data", "chart-options", "synthetics-data-key"])
|
|
4213
|
-
])) :
|
|
4213
|
+
])) : me("", !0) : (z(), B(vt, {
|
|
4214
4214
|
key: 0,
|
|
4215
4215
|
context: s.context,
|
|
4216
4216
|
query: a.value,
|
|
@@ -4219,9 +4219,9 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4219
4219
|
onChartData: O[0] || (O[0] = (m) => i("chart-data", m)),
|
|
4220
4220
|
onQueryComplete: O[1] || (O[1] = (m) => i("query-complete"))
|
|
4221
4221
|
}, {
|
|
4222
|
-
default:
|
|
4223
|
-
|
|
4224
|
-
|
|
4222
|
+
default: $(({ data: m }) => [
|
|
4223
|
+
ce("div", ua, [
|
|
4224
|
+
ue(D(Yt), {
|
|
4225
4225
|
"chart-data": m,
|
|
4226
4226
|
"chart-options": E.value,
|
|
4227
4227
|
"legend-position": "bottom",
|
|
@@ -4234,7 +4234,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4234
4234
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
4235
4235
|
};
|
|
4236
4236
|
}
|
|
4237
|
-
}),
|
|
4237
|
+
}), ha = /* @__PURE__ */ Ue(da, [["__scopeId", "data-v-e823be94"]]), Vi = /* @__PURE__ */ ge({
|
|
4238
4238
|
__name: "TimeseriesChartRenderer",
|
|
4239
4239
|
props: {
|
|
4240
4240
|
query: {},
|
|
@@ -4267,7 +4267,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4267
4267
|
onZoomTimeRange: n[1] || (n[1] = (r) => t("zoom-time-range", r))
|
|
4268
4268
|
}, null, 8, ["active-metric", "chart-options", "context", "explore-link", "height", "query", "query-ready", "refresh-counter", "requests-link", "zoom-configuration"]));
|
|
4269
4269
|
}
|
|
4270
|
-
}),
|
|
4270
|
+
}), fa = /* @__PURE__ */ ge({
|
|
4271
4271
|
__name: "GoldenSignalsRenderer",
|
|
4272
4272
|
props: {
|
|
4273
4273
|
query: {},
|
|
@@ -4283,7 +4283,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4283
4283
|
zoomConfiguration: {}
|
|
4284
4284
|
},
|
|
4285
4285
|
setup(s) {
|
|
4286
|
-
const e = s, t =
|
|
4286
|
+
const e = s, t = w(() => {
|
|
4287
4287
|
const n = e.query?.datasource;
|
|
4288
4288
|
if (n && n !== "api_usage" && n !== "basic")
|
|
4289
4289
|
throw new Error(`Invalid datasource value: ${n}`);
|
|
@@ -4298,30 +4298,30 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4298
4298
|
queryReady: e.queryReady,
|
|
4299
4299
|
refreshCounter: e.refreshCounter
|
|
4300
4300
|
};
|
|
4301
|
-
}), i =
|
|
4301
|
+
}), i = w(() => !!(e.chartOptions.chart_title || e.headerDescription));
|
|
4302
4302
|
return (n, r) => (z(), se("div", {
|
|
4303
4303
|
class: rt(["metric-card-tile-wrapper", { titled: i.value }])
|
|
4304
4304
|
}, [
|
|
4305
|
-
|
|
4306
|
-
default:
|
|
4307
|
-
|
|
4305
|
+
ue(D(an), Fs($s(t.value)), {
|
|
4306
|
+
default: $(() => [
|
|
4307
|
+
ue(D(ln))
|
|
4308
4308
|
]),
|
|
4309
4309
|
_: 1
|
|
4310
4310
|
}, 16)
|
|
4311
4311
|
], 2));
|
|
4312
4312
|
}
|
|
4313
|
-
}),
|
|
4313
|
+
}), ma = /* @__PURE__ */ Ue(fa, [["__scopeId", "data-v-3eda5028"]]), pa = {
|
|
4314
4314
|
class: "fallback-entity-link",
|
|
4315
4315
|
"data-testid": "entity-link-parent"
|
|
4316
|
-
}, Zi = /* @__PURE__ */
|
|
4316
|
+
}, Zi = /* @__PURE__ */ ge({
|
|
4317
4317
|
__name: "FallbackEntityLink",
|
|
4318
4318
|
props: {
|
|
4319
4319
|
entityLinkData: {}
|
|
4320
4320
|
},
|
|
4321
4321
|
setup(s) {
|
|
4322
|
-
return (e, t) => (z(), se("div",
|
|
4322
|
+
return (e, t) => (z(), se("div", pa, ie(s.entityLinkData.label), 1));
|
|
4323
4323
|
}
|
|
4324
|
-
}),
|
|
4324
|
+
}), ga = { key: 0 }, ya = { key: 1 }, va = /* @__PURE__ */ ge({
|
|
4325
4325
|
__name: "TopNTableRenderer",
|
|
4326
4326
|
props: {
|
|
4327
4327
|
query: {},
|
|
@@ -4345,7 +4345,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4345
4345
|
return Zi;
|
|
4346
4346
|
}
|
|
4347
4347
|
return Zi;
|
|
4348
|
-
}), n =
|
|
4348
|
+
}), n = w(() => !!e.chartOptions.entity_link || !!Object.keys(e.chartOptions.entity_links || {}).length), r = (l) => {
|
|
4349
4349
|
const u = e.chartOptions.entity_links;
|
|
4350
4350
|
return u && (u[l] || Object.entries(u).find(([d]) => d.toLowerCase() === l.toLowerCase())?.[1]) || "";
|
|
4351
4351
|
}, o = (l) => {
|
|
@@ -4356,26 +4356,26 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4356
4356
|
if (u)
|
|
4357
4357
|
if (l.id.includes(":")) {
|
|
4358
4358
|
const [d, h] = l.id.split(":");
|
|
4359
|
-
return u.replace(
|
|
4359
|
+
return u.replace(mo, d).replace(Fi, h);
|
|
4360
4360
|
} else
|
|
4361
4361
|
return u.replace(Fi, l.id);
|
|
4362
4362
|
return "";
|
|
4363
4363
|
};
|
|
4364
|
-
return (l, u) => (z(), B(
|
|
4364
|
+
return (l, u) => (z(), B(vt, {
|
|
4365
4365
|
context: s.context,
|
|
4366
4366
|
query: s.query,
|
|
4367
4367
|
"query-ready": s.queryReady,
|
|
4368
4368
|
"refresh-counter": s.refreshCounter
|
|
4369
4369
|
}, {
|
|
4370
|
-
default:
|
|
4371
|
-
|
|
4370
|
+
default: $(({ data: d }) => [
|
|
4371
|
+
ue(D(nn), {
|
|
4372
4372
|
"column-options": s.chartOptions.column_options,
|
|
4373
4373
|
data: d,
|
|
4374
4374
|
"synthetics-data-key": s.chartOptions.synthetics_data_key
|
|
4375
4375
|
}, pt({ _: 2 }, [
|
|
4376
4376
|
n.value ? {
|
|
4377
4377
|
name: "name",
|
|
4378
|
-
fn:
|
|
4378
|
+
fn: $(({ record: h }) => [
|
|
4379
4379
|
!h.isEmpty && a(h) ? (z(), B(D(i), {
|
|
4380
4380
|
key: 0,
|
|
4381
4381
|
"entity-link-data": {
|
|
@@ -4385,7 +4385,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4385
4385
|
},
|
|
4386
4386
|
"external-link": c(h)
|
|
4387
4387
|
}, null, 8, ["entity-link-data", "external-link"])) : (z(), se(Vt, { key: 1 }, [
|
|
4388
|
-
h.name === "empty" ? (z(), se("i",
|
|
4388
|
+
h.name === "empty" ? (z(), se("i", ga, ie(h.name), 1)) : (z(), se("span", ya, ie(h.name), 1))
|
|
4389
4389
|
], 64))
|
|
4390
4390
|
]),
|
|
4391
4391
|
key: "0"
|
|
@@ -4395,7 +4395,63 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4395
4395
|
_: 1
|
|
4396
4396
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
4397
4397
|
}
|
|
4398
|
-
}),
|
|
4398
|
+
}), _a = /* @__PURE__ */ ge({
|
|
4399
|
+
__name: "TopTalkersRenderer",
|
|
4400
|
+
props: {
|
|
4401
|
+
query: {},
|
|
4402
|
+
context: {},
|
|
4403
|
+
queryReady: { type: Boolean },
|
|
4404
|
+
chartOptions: {},
|
|
4405
|
+
height: {},
|
|
4406
|
+
refreshCounter: {},
|
|
4407
|
+
activeMetric: {},
|
|
4408
|
+
headerDescription: {},
|
|
4409
|
+
requestsLink: {},
|
|
4410
|
+
exploreLink: {},
|
|
4411
|
+
zoomConfiguration: {}
|
|
4412
|
+
},
|
|
4413
|
+
emits: ["query-complete"],
|
|
4414
|
+
setup(s, { emit: e }) {
|
|
4415
|
+
const t = s, i = e, n = w(() => t.chartOptions.columns.map((l) => ({
|
|
4416
|
+
dimension: l.dimension,
|
|
4417
|
+
label: l.label
|
|
4418
|
+
}))), r = (l) => ({
|
|
4419
|
+
...t.query,
|
|
4420
|
+
dimensions: [l.dimension],
|
|
4421
|
+
// The query filters apply to every column, and the column filters narrow them further.
|
|
4422
|
+
filters: [...t.query.filters ?? [], ...l.filters ?? []]
|
|
4423
|
+
}), o = w(() => new Map(n.value.map((l, u) => [l, r(t.chartOptions.columns[u])]))), a = /* @__PURE__ */ new Set(), c = (l) => {
|
|
4424
|
+
a.add(l), a.size === n.value.length && (a.clear(), i("query-complete"));
|
|
4425
|
+
};
|
|
4426
|
+
return $e([o, () => t.refreshCounter], () => a.clear()), (l, u) => (z(), B(D(rn), {
|
|
4427
|
+
"column-options": s.chartOptions.column_options,
|
|
4428
|
+
columns: n.value,
|
|
4429
|
+
"size-metric": s.chartOptions.size_metric
|
|
4430
|
+
}, {
|
|
4431
|
+
column: $(({ column: d }) => [
|
|
4432
|
+
ue(vt, {
|
|
4433
|
+
context: s.context,
|
|
4434
|
+
query: o.value.get(d),
|
|
4435
|
+
"query-ready": s.queryReady,
|
|
4436
|
+
"refresh-counter": s.refreshCounter,
|
|
4437
|
+
onQueryComplete: (h) => c(d)
|
|
4438
|
+
}, {
|
|
4439
|
+
default: $(({ data: h }) => [
|
|
4440
|
+
ue(D(on), {
|
|
4441
|
+
"column-options": s.chartOptions.column_options,
|
|
4442
|
+
data: h,
|
|
4443
|
+
dimension: d.dimension,
|
|
4444
|
+
label: d.label,
|
|
4445
|
+
"size-metric": s.chartOptions.size_metric
|
|
4446
|
+
}, null, 8, ["column-options", "data", "dimension", "label", "size-metric"])
|
|
4447
|
+
]),
|
|
4448
|
+
_: 2
|
|
4449
|
+
}, 1032, ["context", "query", "query-ready", "refresh-counter", "onQueryComplete"])
|
|
4450
|
+
]),
|
|
4451
|
+
_: 1
|
|
4452
|
+
}, 8, ["column-options", "columns", "size-metric"]));
|
|
4453
|
+
}
|
|
4454
|
+
}), wa = (s) => s.records.map((e) => {
|
|
4399
4455
|
const t = { ...e };
|
|
4400
4456
|
return Object.entries(e).forEach(([i, n]) => {
|
|
4401
4457
|
if (n === null)
|
|
@@ -4413,7 +4469,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4413
4469
|
key: i,
|
|
4414
4470
|
label: s(n) ? t(n) : i
|
|
4415
4471
|
};
|
|
4416
|
-
}),
|
|
4472
|
+
}), ba = {
|
|
4417
4473
|
/** @deprecated Use `platform_usage`. */
|
|
4418
4474
|
platform: Ji,
|
|
4419
4475
|
platform_usage: Ji
|
|
@@ -4447,15 +4503,15 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4447
4503
|
}
|
|
4448
4504
|
}, s);
|
|
4449
4505
|
return u.meta.columns?.length && r?.(u.meta.columns), {
|
|
4450
|
-
data:
|
|
4506
|
+
data: wa(u),
|
|
4451
4507
|
cursor: u.meta.cursor,
|
|
4452
4508
|
hasMore: !!u.meta.cursor
|
|
4453
4509
|
};
|
|
4454
|
-
},
|
|
4510
|
+
}, xa = {
|
|
4455
4511
|
/** @deprecated Use `platform_usage`. */
|
|
4456
4512
|
platform: es,
|
|
4457
4513
|
platform_usage: es
|
|
4458
|
-
},
|
|
4514
|
+
}, Ea = /* @__PURE__ */ ge({
|
|
4459
4515
|
__name: "TableDataGridRenderer",
|
|
4460
4516
|
props: {
|
|
4461
4517
|
query: {},
|
|
@@ -4466,7 +4522,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4466
4522
|
},
|
|
4467
4523
|
emits: ["loading-change"],
|
|
4468
4524
|
setup(s, { emit: e }) {
|
|
4469
|
-
const t = s, i = e, n = Ae(He), r = lt(), { i18n: o } = Ee.useI18n(), a = new AbortController(), c = Q([]), l = Q(!1), u =
|
|
4525
|
+
const t = s, i = e, n = Ae(He), r = lt(), { i18n: o } = Ee.useI18n(), a = new AbortController(), c = Q([]), l = Q(!1), u = w(() => t.height === void 0 ? void 0 : { height: `${t.height}px` }), d = w(() => ({
|
|
4470
4526
|
datasource: t.query.datasource,
|
|
4471
4527
|
query: {
|
|
4472
4528
|
columns: t.query.columns,
|
|
@@ -4475,7 +4531,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4475
4531
|
filters: t.query.filters,
|
|
4476
4532
|
page_size: t.query.page_size
|
|
4477
4533
|
}
|
|
4478
|
-
})), h =
|
|
4534
|
+
})), h = w(() => JSON.stringify({
|
|
4479
4535
|
refreshCounter: t.refreshCounter,
|
|
4480
4536
|
query: {
|
|
4481
4537
|
columns: t.query.columns,
|
|
@@ -4493,16 +4549,16 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4493
4549
|
at(() => {
|
|
4494
4550
|
a.abort();
|
|
4495
4551
|
});
|
|
4496
|
-
const y =
|
|
4552
|
+
const y = w(() => ba[t.query.datasource]({
|
|
4497
4553
|
// query.columns are optional in the API. If not provided, backend will return default columns.
|
|
4498
4554
|
// If query columns are not provided, fallback to using columns from the response metadata for header configuration.
|
|
4499
4555
|
columns: t.query.columns?.length ? t.query.columns : c.value,
|
|
4500
4556
|
translate: (_) => o.t(_),
|
|
4501
4557
|
canTranslate: (_) => o.te(_)
|
|
4502
|
-
})), v =
|
|
4558
|
+
})), v = w(() => async ({ cursor: _, pageSize: A }) => {
|
|
4503
4559
|
try {
|
|
4504
4560
|
await r.isReady();
|
|
4505
|
-
const N =
|
|
4561
|
+
const N = xa[d.value.datasource];
|
|
4506
4562
|
if (!N)
|
|
4507
4563
|
throw new Error(`No table data grid fetcher found for datasource: ${d.value.datasource}`);
|
|
4508
4564
|
const E = await N({
|
|
@@ -4525,12 +4581,12 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4525
4581
|
_.state === "error" && (l.value = !0), i("loading-change", _.state === "loading");
|
|
4526
4582
|
};
|
|
4527
4583
|
return (_, A) => {
|
|
4528
|
-
const N =
|
|
4584
|
+
const N = _e("KSkeleton");
|
|
4529
4585
|
return z(), se("div", {
|
|
4530
4586
|
class: "table-data-grid-renderer",
|
|
4531
|
-
style:
|
|
4587
|
+
style: Et(u.value)
|
|
4532
4588
|
}, [
|
|
4533
|
-
s.queryReady ? (z(), B(D(
|
|
4589
|
+
s.queryReady ? (z(), B(D(un), {
|
|
4534
4590
|
key: 1,
|
|
4535
4591
|
error: l.value,
|
|
4536
4592
|
fetcher: v.value,
|
|
@@ -4546,7 +4602,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4546
4602
|
], 4);
|
|
4547
4603
|
};
|
|
4548
4604
|
}
|
|
4549
|
-
}),
|
|
4605
|
+
}), Ca = /* @__PURE__ */ Ue(Ea, [["__scopeId", "data-v-c49ff2eb"]]), Ra = /* @__PURE__ */ ge({
|
|
4550
4606
|
__name: "DonutChartRenderer",
|
|
4551
4607
|
props: {
|
|
4552
4608
|
query: {},
|
|
@@ -4571,15 +4627,15 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4571
4627
|
"refresh-counter": s.refreshCounter
|
|
4572
4628
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
|
|
4573
4629
|
}
|
|
4574
|
-
}),
|
|
4630
|
+
}), ka = ["data-testid"], Ta = {
|
|
4575
4631
|
key: 0,
|
|
4576
4632
|
class: "tile-header"
|
|
4577
|
-
},
|
|
4633
|
+
}, Sa = { class: "badge-container" }, Da = { class: "badge-text" }, Oa = { class: "badge-text" }, za = {
|
|
4578
4634
|
key: 0,
|
|
4579
4635
|
class: "metric-selector-wrapper"
|
|
4580
|
-
},
|
|
4636
|
+
}, Ma = { key: 1 }, Na = ["data-testid"], Aa = ["data-testid"], Ia = ["data-testid"], La = { class: "delete-option" }, qa = ["data-testid"], Pa = /* @__PURE__ */ ge({
|
|
4581
4637
|
__name: "DashboardTile",
|
|
4582
|
-
props: /* @__PURE__ */
|
|
4638
|
+
props: /* @__PURE__ */ Ct({
|
|
4583
4639
|
context: {},
|
|
4584
4640
|
definition: {},
|
|
4585
4641
|
height: { default: () => yt },
|
|
@@ -4594,17 +4650,17 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4594
4650
|
refreshCounter: { default: 0 },
|
|
4595
4651
|
refreshCounterModifiers: {}
|
|
4596
4652
|
}),
|
|
4597
|
-
emits: /* @__PURE__ */
|
|
4653
|
+
emits: /* @__PURE__ */ Ct(["chart-data", "tile-loaded", "edit-tile", "duplicate-tile", "remove-tile", "tile-time-range-zoom", "tile-bounds-change"], ["update:refreshCounter"]),
|
|
4598
4654
|
setup(s, { expose: e, emit: t }) {
|
|
4599
4655
|
Zt((M) => ({
|
|
4600
|
-
|
|
4656
|
+
v92cdcd36: `${M.height}px`
|
|
4601
4657
|
}));
|
|
4602
4658
|
const i = parseInt(bs, 10), { zoomConfiguration: n } = Ee.useDashboardContext({
|
|
4603
|
-
context:
|
|
4604
|
-
preview:
|
|
4659
|
+
context: w(() => s.context),
|
|
4660
|
+
preview: w(() => s.preview)
|
|
4605
4661
|
}), r = os(s, "refreshCounter"), o = () => {
|
|
4606
4662
|
E.value = !0, r.value++;
|
|
4607
|
-
}, a = t, c = rs(() => import("./GeoMapRenderer-
|
|
4663
|
+
}, a = t, c = rs(() => import("./GeoMapRenderer-VT-W38ak.js")), l = Ae(He), u = lt(), { datasourceConfigMap: d, stripUnknownFilters: h } = ot(u), { i18n: y } = Ee.useI18n(), v = Q(), R = Q({ status: "loading" }), _ = Q(!1), A = Q(), N = Q(!1), E = Q(!0), S = w(() => s.definition.chart), O = w(() => "chart_title" in S.value ? S.value.chart_title : void 0), U = w(() => s.definition.header_description), W = w(() => S.value.type === "slottable"), m = w(() => Pe(s.definition) || Qt(s.definition) ? !1 : !("allow_csv_export" in S.value) || S.value.allow_csv_export !== !1), {
|
|
4608
4664
|
exploreLinkKebabMenu: f,
|
|
4609
4665
|
requestsLinkKebabMenu: g,
|
|
4610
4666
|
canShowKebabMenu: C,
|
|
@@ -4622,34 +4678,35 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4622
4678
|
definition: dt(() => s.definition),
|
|
4623
4679
|
context: Wt(dt(() => s.context))
|
|
4624
4680
|
}), { issueQuery: ne } = Ee.useIssueQuery();
|
|
4625
|
-
|
|
4681
|
+
$e(() => s.definition, async (M, Z) => {
|
|
4626
4682
|
await Jt(), A.value && (N.value = A.value.scrollWidth > A.value.clientWidth);
|
|
4627
4683
|
try {
|
|
4628
4684
|
JSON.stringify(M?.query) !== JSON.stringify(Z?.query) && (E.value = !0);
|
|
4629
4685
|
} catch {
|
|
4630
4686
|
}
|
|
4631
4687
|
}, { immediate: !0, deep: !0 });
|
|
4632
|
-
const
|
|
4688
|
+
const b = w(() => y.t("csvExport.defaultFilename")), T = w(() => !!f.value || m.value || !!s.context.editable), x = w(() => !s.hideActions && C.value && T.value), X = w(() => x.value && T.value && !s.isFullscreen), K = {
|
|
4633
4689
|
timeseries_line: Vi,
|
|
4634
4690
|
timeseries_bar: Vi,
|
|
4635
|
-
scatter:
|
|
4691
|
+
scatter: ha,
|
|
4636
4692
|
horizontal_bar: Xi,
|
|
4637
4693
|
vertical_bar: Xi,
|
|
4638
4694
|
gauge: Qi,
|
|
4639
|
-
donut:
|
|
4640
|
-
golden_signals:
|
|
4641
|
-
top_n:
|
|
4642
|
-
|
|
4695
|
+
donut: Ra,
|
|
4696
|
+
golden_signals: ma,
|
|
4697
|
+
top_n: va,
|
|
4698
|
+
top_talkers: _a,
|
|
4699
|
+
table: Ca,
|
|
4643
4700
|
slottable: void 0,
|
|
4644
4701
|
single_value: Qi,
|
|
4645
4702
|
choropleth_map: c
|
|
4646
|
-
},
|
|
4647
|
-
...
|
|
4648
|
-
...
|
|
4649
|
-
...
|
|
4650
|
-
...
|
|
4651
|
-
})),
|
|
4652
|
-
const M = K[s.definition.chart.type], Z = Pe(s.definition), xe = !!M?.emits?.includes("select-chart-range"), Xe = !!M?.emits?.includes("zoom-time-range"),
|
|
4703
|
+
}, de = w(() => ({
|
|
4704
|
+
...ye.value?.rendererEvents.supportsRequests ? { "select-chart-range": Qe } : {},
|
|
4705
|
+
...ye.value?.rendererEvents.supportsZoom ? { "zoom-time-range": We } : {},
|
|
4706
|
+
...ye.value?.rendererEvents.supportsBounds ? { "bounds-change": ze } : {},
|
|
4707
|
+
...ye.value?.rendererEvents.supportsLoadingChange ? { "loading-change": Ce } : {}
|
|
4708
|
+
})), ye = w(() => {
|
|
4709
|
+
const M = K[s.definition.chart.type], Z = Pe(s.definition), xe = !!M?.emits?.includes("select-chart-range"), Xe = !!M?.emits?.includes("zoom-time-range"), Ge = s.definition.chart.type === "choropleth_map", Ve = !!M?.emits?.includes("loading-change"), At = {
|
|
4653
4710
|
query: s.definition.query,
|
|
4654
4711
|
context: s.context,
|
|
4655
4712
|
queryReady: s.queryReady,
|
|
@@ -4659,7 +4716,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4659
4716
|
}, It = {
|
|
4660
4717
|
chartOptions: s.definition.chart,
|
|
4661
4718
|
activeMetric: V.value,
|
|
4662
|
-
headerDescription:
|
|
4719
|
+
headerDescription: U.value,
|
|
4663
4720
|
requestsLink: n.value.showRequestsAction ? oe.value : void 0,
|
|
4664
4721
|
exploreLink: n.value.showExploreAction ? we.value : void 0
|
|
4665
4722
|
};
|
|
@@ -4672,11 +4729,11 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4672
4729
|
rendererEvents: {
|
|
4673
4730
|
supportsRequests: xe,
|
|
4674
4731
|
supportsZoom: Xe,
|
|
4675
|
-
supportsBounds:
|
|
4732
|
+
supportsBounds: Ge,
|
|
4676
4733
|
supportsLoadingChange: Ve
|
|
4677
4734
|
}
|
|
4678
4735
|
};
|
|
4679
|
-
}), G =
|
|
4736
|
+
}), G = w(() => {
|
|
4680
4737
|
if (Pe(s.definition))
|
|
4681
4738
|
return null;
|
|
4682
4739
|
const M = s.definition.query, Z = M?.time_range;
|
|
@@ -4690,39 +4747,39 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4690
4747
|
return `${mi(Z.start, { short: !0, tz: xe })} - ${mi(Z.end, { short: !0, tz: xe })}`;
|
|
4691
4748
|
}
|
|
4692
4749
|
return null;
|
|
4693
|
-
}), Y =
|
|
4694
|
-
const M = s.definition.query, Z = M?.datasource, xe = Z ? d.value[Z]?.timeRangeOptions : void 0,
|
|
4695
|
-
return ks(
|
|
4696
|
-
}), ae =
|
|
4750
|
+
}), Y = w(() => {
|
|
4751
|
+
const M = s.definition.query, Z = M?.datasource, xe = Z ? d.value[Z]?.timeRangeOptions : void 0, Ge = (M && "time_range" in M ? M.time_range : void 0) ?? s.context.timeSpec;
|
|
4752
|
+
return ks(Ge, xe);
|
|
4753
|
+
}), ae = w(() => W.value ? !1 : [
|
|
4697
4754
|
!!O.value,
|
|
4698
4755
|
X.value,
|
|
4699
4756
|
!!G.value,
|
|
4700
4757
|
Y.value,
|
|
4701
|
-
|
|
4758
|
+
!!U.value,
|
|
4702
4759
|
s.showRefresh,
|
|
4703
4760
|
j.value
|
|
4704
|
-
].some(Boolean)), P =
|
|
4705
|
-
|
|
4761
|
+
].some(Boolean)), P = w(() => v.value ? Gt(v.value.meta.granularity_ms) : void 0), he = w(() => ["timeseries_line", "timeseries_bar"].includes(S.value.type)), fe = w(() => v.value?.meta.metric_names ?? []), V = Q();
|
|
4762
|
+
$e(fe, (M) => {
|
|
4706
4763
|
(!V.value || !M.includes(V.value)) && (V.value = M[0]);
|
|
4707
4764
|
}, { immediate: !0 });
|
|
4708
|
-
const te =
|
|
4765
|
+
const te = w(() => {
|
|
4709
4766
|
const M = S.value;
|
|
4710
|
-
return M.type !== "timeseries_line" ? !1 :
|
|
4711
|
-
}), j =
|
|
4767
|
+
return M.type !== "timeseries_line" ? !1 : fe.value.some((Z) => M.metric_axis_map?.[Z] === "right");
|
|
4768
|
+
}), j = w(() => he.value && !te.value && (v.value?.data.length ?? 0) > 0 && fe.value.length > 1 && Object.keys(v.value?.meta.display ?? {}).length > 0), Te = (M) => Object.hasOwn(xs.chartLabels, M), F = w(() => fe.value.map((M) => ({
|
|
4712
4769
|
value: M,
|
|
4713
4770
|
label: Te(M) ? y.t(`chartLabels.${M}`) : M
|
|
4714
|
-
}))), re =
|
|
4715
|
-
if (!Xt(s.definition) || !
|
|
4771
|
+
}))), re = w(() => {
|
|
4772
|
+
if (!Xt(s.definition) || !he.value || !s.queryReady || E.value)
|
|
4716
4773
|
return !1;
|
|
4717
4774
|
const M = s.definition.query.granularity;
|
|
4718
4775
|
return !M || !P.value ? !1 : M !== P.value;
|
|
4719
|
-
}), Fe =
|
|
4776
|
+
}), Fe = w(() => {
|
|
4720
4777
|
const M = Gt(v.value?.meta.granularity_ms ?? 0) ?? "unknown", Z = Xt(s.definition) ? s.definition.query.granularity ?? "unknown" : "unknown";
|
|
4721
4778
|
return y.t("query_aged_out_warning", {
|
|
4722
4779
|
currentGranularity: y.t(`granularities.${M}`),
|
|
4723
4780
|
savedGranularity: y.t(`granularities.${Z}`)
|
|
4724
4781
|
});
|
|
4725
|
-
}),
|
|
4782
|
+
}), Be = w(() => {
|
|
4726
4783
|
const M = [...s.context.filters, ...s.definition.query.filters ?? []], Z = "metrics" in s.definition.query ? s.definition.query.metrics : void 0, xe = s.definition.query.datasource ?? "api_usage";
|
|
4727
4784
|
return h.value({
|
|
4728
4785
|
datasource: xe,
|
|
@@ -4733,7 +4790,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4733
4790
|
a("edit-tile", s.definition);
|
|
4734
4791
|
}, Ke = () => {
|
|
4735
4792
|
a("duplicate-tile", s.definition);
|
|
4736
|
-
},
|
|
4793
|
+
}, ve = () => {
|
|
4737
4794
|
a("remove-tile", s.definition);
|
|
4738
4795
|
}, Oe = (M) => {
|
|
4739
4796
|
v.value = M, E.value = !1, a("chart-data", M), a("tile-loaded");
|
|
@@ -4748,11 +4805,11 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4748
4805
|
throw new Error("Cannot export data for a tile backed by the api-requests endpoint");
|
|
4749
4806
|
const M = s.definition.query.datasource?.startsWith("goap");
|
|
4750
4807
|
return l?.staticConfig?.increaseCsvExportLimit !== !1 && !M ? ne(s.definition.query, s.context, us) : v.value ? Promise.resolve(v.value) : new Promise((xe) => {
|
|
4751
|
-
const Xe =
|
|
4752
|
-
|
|
4808
|
+
const Xe = $e(v, (Ge) => {
|
|
4809
|
+
Ge && (xe(Ge), Xe());
|
|
4753
4810
|
});
|
|
4754
4811
|
});
|
|
4755
|
-
},
|
|
4812
|
+
}, _t = async () => {
|
|
4756
4813
|
_.value = !0, R.value = { status: "loading" };
|
|
4757
4814
|
try {
|
|
4758
4815
|
const M = await tt();
|
|
@@ -4760,7 +4817,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4760
4817
|
} catch (M) {
|
|
4761
4818
|
R.value = { status: "error", error: M };
|
|
4762
4819
|
}
|
|
4763
|
-
},
|
|
4820
|
+
}, We = (M) => {
|
|
4764
4821
|
const Z = {
|
|
4765
4822
|
tileId: s.tileId.toString(),
|
|
4766
4823
|
timeRange: M
|
|
@@ -4773,11 +4830,11 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4773
4830
|
};
|
|
4774
4831
|
a("tile-bounds-change", Z);
|
|
4775
4832
|
}, Qe = (M) => {
|
|
4776
|
-
const Z =
|
|
4833
|
+
const Z = Be.value, xe = be(M, Z);
|
|
4777
4834
|
we.value = I.value ? { href: J(xe) } : void 0, oe.value = k.value ? { href: le(H(M, Z)) } : void 0;
|
|
4778
4835
|
};
|
|
4779
4836
|
return e({ getExportData: tt }), (M, Z) => {
|
|
4780
|
-
const xe =
|
|
4837
|
+
const xe = _e("KTooltip"), Xe = _e("KBadge"), Ge = _e("KButton"), Ve = _e("KDropdownItem"), At = _e("KDropdown");
|
|
4781
4838
|
return z(), se("div", {
|
|
4782
4839
|
class: rt(["tile-boundary", {
|
|
4783
4840
|
editable: s.context.editable,
|
|
@@ -4785,15 +4842,15 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4785
4842
|
}]),
|
|
4786
4843
|
"data-testid": `tile-${s.tileId}`
|
|
4787
4844
|
}, [
|
|
4788
|
-
ae.value && !W.value ? (z(), se("div",
|
|
4789
|
-
|
|
4845
|
+
ae.value && !W.value ? (z(), se("div", Ta, [
|
|
4846
|
+
ue(xe, {
|
|
4790
4847
|
class: "title-tooltip",
|
|
4791
4848
|
disabled: !N.value,
|
|
4792
4849
|
"max-width": "500",
|
|
4793
4850
|
text: O.value
|
|
4794
4851
|
}, {
|
|
4795
|
-
default:
|
|
4796
|
-
|
|
4852
|
+
default: $(() => [
|
|
4853
|
+
ce("div", {
|
|
4797
4854
|
ref_key: "titleRef",
|
|
4798
4855
|
ref: A,
|
|
4799
4856
|
class: "title"
|
|
@@ -4801,7 +4858,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4801
4858
|
]),
|
|
4802
4859
|
_: 1
|
|
4803
4860
|
}, 8, ["disabled", "text"]),
|
|
4804
|
-
|
|
4861
|
+
ce("div", Sa, [
|
|
4805
4862
|
Y.value ? (z(), B(Xe, {
|
|
4806
4863
|
key: 0,
|
|
4807
4864
|
appearance: "warning",
|
|
@@ -4809,49 +4866,49 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4809
4866
|
tooltip: D(y).t("unsupported_time_range_warning"),
|
|
4810
4867
|
"tooltip-attributes": { maxWidth: "320px" }
|
|
4811
4868
|
}, {
|
|
4812
|
-
icon:
|
|
4813
|
-
|
|
4869
|
+
icon: $(() => [
|
|
4870
|
+
ue(D(pi), {
|
|
4814
4871
|
size: `var(--kui-icon-size-20, ${D(Ii)})`
|
|
4815
4872
|
}, null, 8, ["size"])
|
|
4816
4873
|
]),
|
|
4817
|
-
default:
|
|
4818
|
-
|
|
4874
|
+
default: $(() => [
|
|
4875
|
+
ce("span", Da, ie(D(y).t("unsupported_time_range_badge")), 1)
|
|
4819
4876
|
]),
|
|
4820
4877
|
_: 1
|
|
4821
|
-
}, 8, ["tooltip"])) :
|
|
4878
|
+
}, 8, ["tooltip"])) : me("", !0),
|
|
4822
4879
|
G.value ? (z(), B(Xe, {
|
|
4823
4880
|
key: 1,
|
|
4824
4881
|
"data-testid": "time-range-badge",
|
|
4825
4882
|
tooltip: re.value ? Fe.value : void 0,
|
|
4826
4883
|
"tooltip-attributes": { maxWidth: "320px" }
|
|
4827
4884
|
}, pt({
|
|
4828
|
-
default:
|
|
4829
|
-
|
|
4885
|
+
default: $(() => [
|
|
4886
|
+
ce("span", Oa, ie(G.value), 1)
|
|
4830
4887
|
]),
|
|
4831
4888
|
_: 2
|
|
4832
4889
|
}, [
|
|
4833
4890
|
re.value ? {
|
|
4834
4891
|
name: "icon",
|
|
4835
|
-
fn:
|
|
4836
|
-
|
|
4892
|
+
fn: $(() => [
|
|
4893
|
+
ue(D(pi), {
|
|
4837
4894
|
size: `var(--kui-icon-size-20, ${D(Ii)})`
|
|
4838
4895
|
}, null, 8, ["size"])
|
|
4839
4896
|
]),
|
|
4840
4897
|
key: "0"
|
|
4841
4898
|
} : void 0
|
|
4842
|
-
]), 1032, ["tooltip"])) :
|
|
4899
|
+
]), 1032, ["tooltip"])) : me("", !0)
|
|
4843
4900
|
]),
|
|
4844
|
-
j.value ? (z(), se("div",
|
|
4845
|
-
|
|
4901
|
+
j.value ? (z(), se("div", za, [
|
|
4902
|
+
ue(D(cn), {
|
|
4846
4903
|
modelValue: V.value,
|
|
4847
4904
|
"onUpdate:modelValue": Z[0] || (Z[0] = (It) => V.value = It),
|
|
4848
4905
|
class: "metric-selector",
|
|
4849
4906
|
"data-testid": "metric-selector",
|
|
4850
4907
|
options: F.value
|
|
4851
4908
|
}, null, 8, ["modelValue", "options"])
|
|
4852
|
-
])) :
|
|
4853
|
-
s.showRefresh ? (z(), se("div",
|
|
4854
|
-
|
|
4909
|
+
])) : me("", !0),
|
|
4910
|
+
s.showRefresh ? (z(), se("div", Ma, [
|
|
4911
|
+
ue(Ge, {
|
|
4855
4912
|
appearance: "secondary",
|
|
4856
4913
|
class: "refresh-button",
|
|
4857
4914
|
"data-testid": `tile-refresh-button-${s.tileId}`,
|
|
@@ -4860,7 +4917,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4860
4917
|
size: "small",
|
|
4861
4918
|
onClick: o
|
|
4862
4919
|
}, {
|
|
4863
|
-
default:
|
|
4920
|
+
default: $(() => [
|
|
4864
4921
|
E.value ? (z(), B(D(Qs), {
|
|
4865
4922
|
key: 0,
|
|
4866
4923
|
role: "button",
|
|
@@ -4875,12 +4932,12 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4875
4932
|
]),
|
|
4876
4933
|
_: 1
|
|
4877
4934
|
}, 8, ["data-testid", "disabled"])
|
|
4878
|
-
])) :
|
|
4879
|
-
|
|
4935
|
+
])) : me("", !0),
|
|
4936
|
+
U.value ? (z(), se("div", {
|
|
4880
4937
|
key: 2,
|
|
4881
4938
|
class: "header-description",
|
|
4882
4939
|
"data-testid": `tile-description-${s.tileId}`
|
|
4883
|
-
}, ie(
|
|
4940
|
+
}, ie(U.value), 9, Na)) : me("", !0),
|
|
4884
4941
|
x.value ? (z(), se("div", {
|
|
4885
4942
|
key: 3,
|
|
4886
4943
|
class: "tile-actions",
|
|
@@ -4893,61 +4950,61 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4893
4950
|
"data-testid": `edit-tile-${s.tileId}`,
|
|
4894
4951
|
size: `var(--kui-icon-size-40, ${D(Li)})`,
|
|
4895
4952
|
onClick: De
|
|
4896
|
-
}, null, 8, ["color", "data-testid", "size"])) :
|
|
4953
|
+
}, null, 8, ["color", "data-testid", "size"])) : me("", !0),
|
|
4897
4954
|
x.value && T.value && !s.isFullscreen ? (z(), B(At, {
|
|
4898
4955
|
key: 1,
|
|
4899
4956
|
class: "dropdown",
|
|
4900
4957
|
"data-testid": `chart-action-menu-${s.tileId}`,
|
|
4901
4958
|
"kpop-attributes": { placement: "bottom-end" }
|
|
4902
4959
|
}, {
|
|
4903
|
-
items:
|
|
4960
|
+
items: $(() => [
|
|
4904
4961
|
D(f) ? (z(), B(Ve, {
|
|
4905
4962
|
key: 0,
|
|
4906
4963
|
"data-testid": `chart-jump-to-explore-${s.tileId}`,
|
|
4907
4964
|
item: { label: D(y).t("jumpToExplore"), to: D(f) }
|
|
4908
|
-
}, null, 8, ["data-testid", "item"])) :
|
|
4965
|
+
}, null, 8, ["data-testid", "item"])) : me("", !0),
|
|
4909
4966
|
!D(Pe)(s.definition) && D(g) ? (z(), B(Ve, {
|
|
4910
4967
|
key: 1,
|
|
4911
4968
|
"data-testid": `chart-jump-to-requests-${s.tileId}`,
|
|
4912
4969
|
item: { label: D(y).t("jumpToRequests"), to: D(g) }
|
|
4913
|
-
}, null, 8, ["data-testid", "item"])) :
|
|
4970
|
+
}, null, 8, ["data-testid", "item"])) : me("", !0),
|
|
4914
4971
|
m.value ? (z(), B(Ve, {
|
|
4915
4972
|
key: 2,
|
|
4916
4973
|
class: "chart-export-button",
|
|
4917
4974
|
"data-testid": `chart-csv-export-${s.tileId}`,
|
|
4918
|
-
onClick:
|
|
4975
|
+
onClick: _t
|
|
4919
4976
|
}, {
|
|
4920
|
-
default:
|
|
4921
|
-
|
|
4977
|
+
default: $(() => [
|
|
4978
|
+
ce("span", {
|
|
4922
4979
|
class: "chart-export-trigger",
|
|
4923
4980
|
"data-testid": `csv-export-button-${s.tileId}`
|
|
4924
|
-
}, ie(D(y).t("csvExport.exportAsCsv")), 9,
|
|
4981
|
+
}, ie(D(y).t("csvExport.exportAsCsv")), 9, Ia)
|
|
4925
4982
|
]),
|
|
4926
4983
|
_: 1
|
|
4927
|
-
}, 8, ["data-testid"])) :
|
|
4984
|
+
}, 8, ["data-testid"])) : me("", !0),
|
|
4928
4985
|
s.context.editable ? (z(), B(Ve, {
|
|
4929
4986
|
key: 3,
|
|
4930
4987
|
"data-testid": `duplicate-tile-${s.tileId}`,
|
|
4931
4988
|
onClick: Ke
|
|
4932
4989
|
}, {
|
|
4933
|
-
default:
|
|
4990
|
+
default: $(() => [
|
|
4934
4991
|
Je(ie(D(y).t("renderer.duplicateTile")), 1)
|
|
4935
4992
|
]),
|
|
4936
4993
|
_: 1
|
|
4937
|
-
}, 8, ["data-testid"])) :
|
|
4994
|
+
}, 8, ["data-testid"])) : me("", !0),
|
|
4938
4995
|
s.context.editable ? (z(), B(Ve, {
|
|
4939
4996
|
key: 4,
|
|
4940
4997
|
"data-testid": `remove-tile-${s.tileId}`,
|
|
4941
|
-
onClick:
|
|
4998
|
+
onClick: ve
|
|
4942
4999
|
}, {
|
|
4943
|
-
default:
|
|
4944
|
-
|
|
5000
|
+
default: $(() => [
|
|
5001
|
+
ce("span", La, ie(D(y).t("renderer.delete")), 1)
|
|
4945
5002
|
]),
|
|
4946
5003
|
_: 1
|
|
4947
|
-
}, 8, ["data-testid"])) :
|
|
5004
|
+
}, 8, ["data-testid"])) : me("", !0)
|
|
4948
5005
|
]),
|
|
4949
|
-
default:
|
|
4950
|
-
|
|
5006
|
+
default: $(() => [
|
|
5007
|
+
ue(D(Zs), {
|
|
4951
5008
|
class: "kebab-action-menu",
|
|
4952
5009
|
color: `var(--kui-color-text-neutral, ${D(Kt)})`,
|
|
4953
5010
|
"data-testid": `kebab-action-menu-${s.tileId}`,
|
|
@@ -4955,29 +5012,29 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4955
5012
|
}, null, 8, ["color", "data-testid", "size"])
|
|
4956
5013
|
]),
|
|
4957
5014
|
_: 1
|
|
4958
|
-
}, 8, ["data-testid"])) :
|
|
4959
|
-
], 8,
|
|
4960
|
-
_.value ? (z(), B(
|
|
5015
|
+
}, 8, ["data-testid"])) : me("", !0)
|
|
5016
|
+
], 8, Aa)) : me("", !0),
|
|
5017
|
+
_.value ? (z(), B(na, {
|
|
4961
5018
|
key: 4,
|
|
4962
5019
|
"data-testid": `csv-export-modal-${s.tileId}`,
|
|
4963
5020
|
"export-state": R.value,
|
|
4964
|
-
filename:
|
|
5021
|
+
filename: b.value,
|
|
4965
5022
|
onCloseModal: Me
|
|
4966
|
-
}, null, 8, ["data-testid", "export-state", "filename"])) :
|
|
4967
|
-
])) :
|
|
4968
|
-
|
|
5023
|
+
}, null, 8, ["data-testid", "export-state", "filename"])) : me("", !0)
|
|
5024
|
+
])) : me("", !0),
|
|
5025
|
+
ce("div", {
|
|
4969
5026
|
class: rt(["tile-content", `type-${s.tileType}-${S.value.type}`]),
|
|
4970
5027
|
"data-testid": `tile-content-${s.tileId}`
|
|
4971
5028
|
}, [
|
|
4972
|
-
|
|
5029
|
+
ye.value ? (z(), B(as(ye.value.component), ns({ key: 0 }, ye.value.rendererProps, Us(de.value), {
|
|
4973
5030
|
onChartData: Oe,
|
|
4974
5031
|
onQueryComplete: pe
|
|
4975
|
-
}), null, 16)) :
|
|
4976
|
-
], 10,
|
|
4977
|
-
], 10,
|
|
5032
|
+
}), null, 16)) : me("", !0)
|
|
5033
|
+
], 10, qa)
|
|
5034
|
+
], 10, ka);
|
|
4978
5035
|
};
|
|
4979
5036
|
}
|
|
4980
|
-
}), Ms = /* @__PURE__ */
|
|
5037
|
+
}), Ms = /* @__PURE__ */ Ue(Pa, [["__scopeId", "data-v-79d3966f"]]), Ha = (s, e) => {
|
|
4981
5038
|
let t = 0;
|
|
4982
5039
|
const i = /* @__PURE__ */ new Map();
|
|
4983
5040
|
e.forEach((r) => {
|
|
@@ -4988,7 +5045,7 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
4988
5045
|
for (let r = 0; r < t; r++)
|
|
4989
5046
|
i.get(r) ? n.push("auto") : n.push(`${s}px`);
|
|
4990
5047
|
return n;
|
|
4991
|
-
},
|
|
5048
|
+
}, Fa = /* @__PURE__ */ ge({
|
|
4992
5049
|
__name: "GridLayout",
|
|
4993
5050
|
props: {
|
|
4994
5051
|
tileHeight: {
|
|
@@ -5016,12 +5073,12 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
5016
5073
|
!Array.isArray(a) || !a.length || (i.value = a[0].contentRect.width);
|
|
5017
5074
|
});
|
|
5018
5075
|
});
|
|
5019
|
-
|
|
5076
|
+
Mt(() => {
|
|
5020
5077
|
t.value && n.observe(t.value);
|
|
5021
5078
|
}), at(() => {
|
|
5022
5079
|
t.value && n.unobserve(t.value);
|
|
5023
5080
|
});
|
|
5024
|
-
const r =
|
|
5081
|
+
const r = w(() => Ha(e.tileHeight, e.tiles).join(" ")), o = w(() => e.tiles.map((a, c) => ({
|
|
5025
5082
|
key: `tile-${c}`,
|
|
5026
5083
|
tile: a,
|
|
5027
5084
|
style: {
|
|
@@ -5041,17 +5098,17 @@ const Mt = /* @__PURE__ */ _e({
|
|
|
5041
5098
|
class: rt(["grid-cell", {
|
|
5042
5099
|
"empty-cell": !l.tile
|
|
5043
5100
|
}]),
|
|
5044
|
-
style:
|
|
5101
|
+
style: Et(l.style)
|
|
5045
5102
|
}, [
|
|
5046
5103
|
et(a.$slots, "tile", {
|
|
5047
|
-
style:
|
|
5104
|
+
style: Et(l.style),
|
|
5048
5105
|
tile: l.tile
|
|
5049
5106
|
}, void 0, !0)
|
|
5050
5107
|
], 6))), 128))
|
|
5051
5108
|
], 512));
|
|
5052
5109
|
}
|
|
5053
|
-
}),
|
|
5054
|
-
function
|
|
5110
|
+
}), $a = /* @__PURE__ */ Ue(Fa, [["__scopeId", "data-v-374ba32b"]]);
|
|
5111
|
+
function Ua(s, e, t, i, n) {
|
|
5055
5112
|
const r = (...o) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + n + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(s, o));
|
|
5056
5113
|
return r.prototype = e.prototype, r;
|
|
5057
5114
|
}
|
|
@@ -5887,26 +5944,26 @@ class q {
|
|
|
5887
5944
|
const Ne = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
|
|
5888
5945
|
class qe {
|
|
5889
5946
|
}
|
|
5890
|
-
function
|
|
5947
|
+
function Tt(s, e) {
|
|
5891
5948
|
s.touches.length > 1 || (s.cancelable && s.preventDefault(), p.simulateMouseEvent(s.changedTouches[0], e));
|
|
5892
5949
|
}
|
|
5893
5950
|
function Ns(s, e) {
|
|
5894
5951
|
s.cancelable && s.preventDefault(), p.simulateMouseEvent(s, e);
|
|
5895
5952
|
}
|
|
5896
|
-
function Tt(s) {
|
|
5897
|
-
qe.touchHandled || (qe.touchHandled = !0, kt(s, "mousedown"));
|
|
5898
|
-
}
|
|
5899
5953
|
function St(s) {
|
|
5900
|
-
qe.touchHandled
|
|
5954
|
+
qe.touchHandled || (qe.touchHandled = !0, Tt(s, "mousedown"));
|
|
5901
5955
|
}
|
|
5902
5956
|
function Dt(s) {
|
|
5957
|
+
qe.touchHandled && Tt(s, "mousemove");
|
|
5958
|
+
}
|
|
5959
|
+
function Ot(s) {
|
|
5903
5960
|
if (!qe.touchHandled)
|
|
5904
5961
|
return;
|
|
5905
5962
|
qe.pointerLeaveTimeout && (window.clearTimeout(qe.pointerLeaveTimeout), delete qe.pointerLeaveTimeout);
|
|
5906
5963
|
const e = !!q.dragElement;
|
|
5907
|
-
|
|
5964
|
+
Tt(s, "mouseup"), e || Tt(s, "click"), qe.touchHandled = !1;
|
|
5908
5965
|
}
|
|
5909
|
-
function
|
|
5966
|
+
function zt(s) {
|
|
5910
5967
|
s.pointerType !== "mouse" && s.target.releasePointerCapture(s.pointerId);
|
|
5911
5968
|
}
|
|
5912
5969
|
function ts(s) {
|
|
@@ -5924,15 +5981,15 @@ class Nt {
|
|
|
5924
5981
|
/** @internal */
|
|
5925
5982
|
_init() {
|
|
5926
5983
|
const e = this.el = document.createElement("div");
|
|
5927
|
-
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Nt.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), Ne && (this.el.addEventListener("touchstart",
|
|
5984
|
+
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Nt.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), Ne && (this.el.addEventListener("touchstart", St), this.el.addEventListener("pointerdown", zt)), this;
|
|
5928
5985
|
}
|
|
5929
5986
|
/** call this when resize handle needs to be removed and cleaned up */
|
|
5930
5987
|
destroy() {
|
|
5931
|
-
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), Ne && (this.el.removeEventListener("touchstart",
|
|
5988
|
+
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), Ne && (this.el.removeEventListener("touchstart", St), this.el.removeEventListener("pointerdown", zt)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
|
|
5932
5989
|
}
|
|
5933
5990
|
/** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
|
|
5934
5991
|
_mouseDown(e) {
|
|
5935
|
-
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Ne && (this.el.addEventListener("touchmove",
|
|
5992
|
+
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Ne && (this.el.addEventListener("touchmove", Dt), this.el.addEventListener("touchend", Ot)), e.stopPropagation(), e.preventDefault();
|
|
5936
5993
|
}
|
|
5937
5994
|
/** @internal */
|
|
5938
5995
|
_mouseMove(e) {
|
|
@@ -5941,7 +5998,7 @@ class Nt {
|
|
|
5941
5998
|
}
|
|
5942
5999
|
/** @internal */
|
|
5943
6000
|
_mouseUp(e) {
|
|
5944
|
-
this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Ne && (this.el.removeEventListener("touchmove",
|
|
6001
|
+
this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Ne && (this.el.removeEventListener("touchmove", Dt), this.el.removeEventListener("touchend", Ot)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
|
|
5945
6002
|
}
|
|
5946
6003
|
/** @internal call when keys are being pressed - use Esc to cancel */
|
|
5947
6004
|
_keyEvent(e) {
|
|
@@ -6131,7 +6188,7 @@ class ft extends ai {
|
|
|
6131
6188
|
}
|
|
6132
6189
|
}
|
|
6133
6190
|
ft._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
|
|
6134
|
-
const
|
|
6191
|
+
const Ba = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
|
|
6135
6192
|
class mt extends ai {
|
|
6136
6193
|
constructor(e, t = {}) {
|
|
6137
6194
|
super(), this.el = e, this.option = t, this.dragTransform = {
|
|
@@ -6151,12 +6208,12 @@ class mt extends ai {
|
|
|
6151
6208
|
}
|
|
6152
6209
|
enable() {
|
|
6153
6210
|
this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
|
|
6154
|
-
e.addEventListener("mousedown", this._mouseDown), Ne && (e.addEventListener("touchstart",
|
|
6211
|
+
e.addEventListener("mousedown", this._mouseDown), Ne && (e.addEventListener("touchstart", St), e.addEventListener("pointerdown", zt));
|
|
6155
6212
|
}), this.el.classList.remove("ui-draggable-disabled"));
|
|
6156
6213
|
}
|
|
6157
6214
|
disable(e = !1) {
|
|
6158
6215
|
this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
|
|
6159
|
-
t.removeEventListener("mousedown", this._mouseDown), Ne && (t.removeEventListener("touchstart",
|
|
6216
|
+
t.removeEventListener("mousedown", this._mouseDown), Ne && (t.removeEventListener("touchstart", St), t.removeEventListener("pointerdown", zt));
|
|
6160
6217
|
}), e || this.el.classList.add("ui-draggable-disabled"));
|
|
6161
6218
|
}
|
|
6162
6219
|
destroy() {
|
|
@@ -6168,7 +6225,7 @@ class mt extends ai {
|
|
|
6168
6225
|
/** @internal call when mouse goes down before a dragstart happens */
|
|
6169
6226
|
_mouseDown(e) {
|
|
6170
6227
|
if (!q.mouseHandled)
|
|
6171
|
-
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(
|
|
6228
|
+
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Ba) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete q.dragElement, delete q.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), Ne && (e.currentTarget.addEventListener("touchmove", Dt), e.currentTarget.addEventListener("touchend", Ot)), e.preventDefault(), document.activeElement && document.activeElement.blur(), q.mouseHandled = !0), !0;
|
|
6172
6229
|
}
|
|
6173
6230
|
/** @internal method to call actual drag event */
|
|
6174
6231
|
_callDrag(e) {
|
|
@@ -6197,7 +6254,7 @@ class mt extends ai {
|
|
|
6197
6254
|
}
|
|
6198
6255
|
/** @internal call when the mouse gets released to drop the item at current location */
|
|
6199
6256
|
_mouseUp(e) {
|
|
6200
|
-
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Ne && e.currentTarget && (e.currentTarget.removeEventListener("touchmove",
|
|
6257
|
+
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), Ne && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Dt, !0), e.currentTarget.removeEventListener("touchend", Ot, !0)), this.dragging) {
|
|
6201
6258
|
delete this.dragging, delete this.el.gridstackNode?._origRotate, document.removeEventListener("keydown", this._keyEvent), q.dropElement?.el === this.el.parentElement && delete q.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
|
|
6202
6259
|
const t = p.initEvent(e, { target: this.el, type: "dragstop" });
|
|
6203
6260
|
this.option.stop && this.option.stop(t), this.triggerEvent("dragstop", t), q.dropElement && q.dropElement.drop(e);
|
|
@@ -6275,7 +6332,7 @@ class mt extends ai {
|
|
|
6275
6332
|
}
|
|
6276
6333
|
}
|
|
6277
6334
|
mt.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
|
|
6278
|
-
class
|
|
6335
|
+
class Wa extends ai {
|
|
6279
6336
|
constructor(e, t = {}) {
|
|
6280
6337
|
super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
|
|
6281
6338
|
}
|
|
@@ -6366,13 +6423,13 @@ class li {
|
|
|
6366
6423
|
return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
|
|
6367
6424
|
}
|
|
6368
6425
|
setupDroppable(e) {
|
|
6369
|
-
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new
|
|
6426
|
+
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Wa(this.el, e), this;
|
|
6370
6427
|
}
|
|
6371
6428
|
cleanDroppable() {
|
|
6372
6429
|
return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
|
|
6373
6430
|
}
|
|
6374
6431
|
}
|
|
6375
|
-
class
|
|
6432
|
+
class Ga {
|
|
6376
6433
|
resizable(e, t, i, n) {
|
|
6377
6434
|
return this._getDDElements(e, t).forEach((r) => {
|
|
6378
6435
|
if (t === "disable" || t === "enable")
|
|
@@ -6451,7 +6508,7 @@ class Ua {
|
|
|
6451
6508
|
return n.length ? n.map((o) => o.ddElement || (i ? li.init(o) : null)).filter((o) => o) : [];
|
|
6452
6509
|
}
|
|
6453
6510
|
}
|
|
6454
|
-
const Re = new
|
|
6511
|
+
const Re = new Ga();
|
|
6455
6512
|
class L {
|
|
6456
6513
|
/**
|
|
6457
6514
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
@@ -7654,7 +7711,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
7654
7711
|
}
|
|
7655
7712
|
// legacy method removed
|
|
7656
7713
|
commit() {
|
|
7657
|
-
return
|
|
7714
|
+
return Ua(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
|
|
7658
7715
|
}
|
|
7659
7716
|
}
|
|
7660
7717
|
L.renderCB = (s, e) => {
|
|
@@ -7664,7 +7721,7 @@ L.resizeToContentParent = ".grid-stack-item-content";
|
|
|
7664
7721
|
L.Utils = p;
|
|
7665
7722
|
L.Engine = Le;
|
|
7666
7723
|
L.GDRev = "11.5.1";
|
|
7667
|
-
const
|
|
7724
|
+
const Ya = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], ja = { class: "grid-stack-item-content" }, Ka = /* @__PURE__ */ ge({
|
|
7668
7725
|
__name: "DraggableGridLayout",
|
|
7669
7726
|
props: {
|
|
7670
7727
|
tiles: {},
|
|
@@ -7694,7 +7751,7 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7694
7751
|
o.value.delete(`${R.el?.getAttribute("data-id")}`);
|
|
7695
7752
|
}), n("update-tiles", Array.from(o.value.values()));
|
|
7696
7753
|
};
|
|
7697
|
-
|
|
7754
|
+
Mt(() => {
|
|
7698
7755
|
r.value && (a = L.init({
|
|
7699
7756
|
margin: 5,
|
|
7700
7757
|
column: i.columns,
|
|
@@ -7711,7 +7768,7 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7711
7768
|
v && a.removeWidget(v);
|
|
7712
7769
|
}
|
|
7713
7770
|
};
|
|
7714
|
-
return
|
|
7771
|
+
return $e(() => i.tiles.length, async (y, v) => {
|
|
7715
7772
|
if (y > v && a) {
|
|
7716
7773
|
const R = i.tiles.slice(v);
|
|
7717
7774
|
for (const _ of R)
|
|
@@ -7741,13 +7798,13 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7741
7798
|
"gs-x": R.layout.position.col,
|
|
7742
7799
|
"gs-y": R.layout.position.row
|
|
7743
7800
|
}, [
|
|
7744
|
-
|
|
7801
|
+
ce("div", ja, [
|
|
7745
7802
|
et(y.$slots, "tile", { tile: R }, void 0, !0)
|
|
7746
7803
|
])
|
|
7747
|
-
], 8,
|
|
7804
|
+
], 8, Ya))), 128))
|
|
7748
7805
|
], 512));
|
|
7749
7806
|
}
|
|
7750
|
-
}),
|
|
7807
|
+
}), Qa = /* @__PURE__ */ Ue(Ka, [["__scopeId", "data-v-0b128fad"]]), Xa = (s) => {
|
|
7751
7808
|
const e = {
|
|
7752
7809
|
position: {
|
|
7753
7810
|
col: 0,
|
|
@@ -7771,81 +7828,81 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7771
7828
|
definition: i,
|
|
7772
7829
|
layout: e
|
|
7773
7830
|
};
|
|
7774
|
-
},
|
|
7831
|
+
}, Va = {
|
|
7775
7832
|
key: 0,
|
|
7776
7833
|
class: "fullscreen-header"
|
|
7777
|
-
},
|
|
7834
|
+
}, Za = {
|
|
7778
7835
|
key: 0,
|
|
7779
7836
|
class: "tile-container slottable-tile"
|
|
7780
|
-
},
|
|
7837
|
+
}, Ja = /* @__PURE__ */ ge({
|
|
7781
7838
|
__name: "DashboardRenderer",
|
|
7782
|
-
props: /* @__PURE__ */
|
|
7839
|
+
props: /* @__PURE__ */ Ct({
|
|
7783
7840
|
context: {},
|
|
7784
7841
|
preview: { type: Boolean, default: !1 }
|
|
7785
7842
|
}, {
|
|
7786
7843
|
modelValue: { required: !0 },
|
|
7787
7844
|
modelModifiers: {}
|
|
7788
7845
|
}),
|
|
7789
|
-
emits: /* @__PURE__ */
|
|
7846
|
+
emits: /* @__PURE__ */ Ct(["edit-tile", "tile-time-range-zoom", "tiles-loaded"], ["update:modelValue"]),
|
|
7790
7847
|
setup(s, { expose: e, emit: t }) {
|
|
7791
|
-
Zt((
|
|
7848
|
+
Zt((b) => ({
|
|
7792
7849
|
b355756c: u.value
|
|
7793
7850
|
}));
|
|
7794
7851
|
const i = t, n = os(s, "modelValue"), { i18n: r } = Ee.useI18n(), o = Q(0), a = Q(null), c = Q(), l = Q(), u = Q("scale(1)"), d = /* @__PURE__ */ new Set(), h = Ae(He);
|
|
7795
7852
|
h || (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/dashboard-renderer/README.md#requirements")), Ee.useRequestQueue();
|
|
7796
|
-
const { exportPdf: y, exportState: v } = Ee.useExportPdf(l), R = (
|
|
7797
|
-
d.add(
|
|
7853
|
+
const { exportPdf: y, exportState: v } = Ee.useExportPdf(l), R = (b) => {
|
|
7854
|
+
d.add(b.id);
|
|
7798
7855
|
const T = N.value.filter((x) => !S(x)).length;
|
|
7799
7856
|
d.size >= T && i("tiles-loaded", !0);
|
|
7800
|
-
}, _ =
|
|
7857
|
+
}, _ = w(() => {
|
|
7801
7858
|
const T = `renderer.trendRange.${ne.value.type === "absolute" ? "custom" : ne.value.time_range}`;
|
|
7802
7859
|
return r.te(T) ? r.t(T) : "";
|
|
7803
|
-
}), A = (
|
|
7804
|
-
const x =
|
|
7805
|
-
return x !== 0 ? x :
|
|
7806
|
-
}, N =
|
|
7807
|
-
if (be.value && !
|
|
7860
|
+
}), A = (b, T) => {
|
|
7861
|
+
const x = b.layout.position.row - T.layout.position.row;
|
|
7862
|
+
return x !== 0 ? x : b.layout.position.col - T.layout.position.col;
|
|
7863
|
+
}, N = w(() => n.value.tiles.map((b) => {
|
|
7864
|
+
if (be.value && !b.id && console.warn(
|
|
7808
7865
|
"No id provided for tile. One will be generated automatically,",
|
|
7809
7866
|
"however tracking changes to this tile may not work as expected.",
|
|
7810
|
-
|
|
7811
|
-
),
|
|
7867
|
+
b
|
|
7868
|
+
), b.type === "slottable")
|
|
7812
7869
|
return {
|
|
7813
|
-
layout:
|
|
7814
|
-
type:
|
|
7815
|
-
id:
|
|
7870
|
+
layout: b.layout,
|
|
7871
|
+
type: b.type,
|
|
7872
|
+
id: b.id ?? crypto.randomUUID()
|
|
7816
7873
|
};
|
|
7817
|
-
let T =
|
|
7818
|
-
const x =
|
|
7874
|
+
let T = b.definition;
|
|
7875
|
+
const x = b.type ?? "chart", X = Lo(T, _.value);
|
|
7819
7876
|
return X !== T.header_description && (T = {
|
|
7820
7877
|
...T,
|
|
7821
7878
|
header_description: X
|
|
7822
7879
|
}), {
|
|
7823
|
-
layout:
|
|
7880
|
+
layout: b.layout,
|
|
7824
7881
|
meta: T,
|
|
7825
7882
|
type: x,
|
|
7826
7883
|
// Add a unique key to each tile internally.
|
|
7827
|
-
id:
|
|
7884
|
+
id: b.id ?? crypto.randomUUID()
|
|
7828
7885
|
};
|
|
7829
|
-
})), E = (
|
|
7830
|
-
i("edit-tile",
|
|
7831
|
-
}, S = (
|
|
7832
|
-
if (
|
|
7833
|
-
return
|
|
7834
|
-
const T =
|
|
7886
|
+
})), E = (b) => {
|
|
7887
|
+
i("edit-tile", b);
|
|
7888
|
+
}, S = (b) => b.type === "slottable" ? !0 : b.meta?.chart.type === "slottable", O = (b) => b.type === "slottable", U = (b) => {
|
|
7889
|
+
if (b.type === "slottable")
|
|
7890
|
+
return b.id;
|
|
7891
|
+
const T = b.meta?.chart;
|
|
7835
7892
|
return T && O(T) ? T.id : void 0;
|
|
7836
|
-
}, W = (
|
|
7893
|
+
}, W = (b) => {
|
|
7837
7894
|
try {
|
|
7838
|
-
const T =
|
|
7895
|
+
const T = Xa(b);
|
|
7839
7896
|
n.value.tiles.push(JSON.parse(JSON.stringify(T)));
|
|
7840
7897
|
} catch (T) {
|
|
7841
7898
|
console.warn(T);
|
|
7842
7899
|
}
|
|
7843
|
-
}, m = (
|
|
7844
|
-
a.value && a.value.removeWidget(
|
|
7900
|
+
}, m = (b) => {
|
|
7901
|
+
a.value && a.value.removeWidget(b.id), d.delete(b.id);
|
|
7845
7902
|
}, f = () => {
|
|
7846
7903
|
d.clear(), o.value++;
|
|
7847
|
-
}, g = (
|
|
7848
|
-
const T =
|
|
7904
|
+
}, g = (b) => {
|
|
7905
|
+
const T = b.map((x) => x.type === "slottable" ? {
|
|
7849
7906
|
id: x.id,
|
|
7850
7907
|
type: x.type,
|
|
7851
7908
|
layout: x.layout
|
|
@@ -7858,14 +7915,14 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7858
7915
|
n.value.tiles = T.sort(A);
|
|
7859
7916
|
}, C = async () => {
|
|
7860
7917
|
if (u.value = "scale(1)", await Jt(), l.value) {
|
|
7861
|
-
const { availWidth:
|
|
7918
|
+
const { availWidth: b, availHeight: T } = window.screen, { width: x, height: X } = l.value.getBoundingClientRect(), K = Math.min(T / X, b / x);
|
|
7862
7919
|
u.value = `scale(${K})`;
|
|
7863
7920
|
}
|
|
7864
7921
|
}, k = () => {
|
|
7865
7922
|
c.value && (document.fullscreenElement ? document.exitFullscreen() : c.value.requestFullscreen());
|
|
7866
7923
|
}, I = Q(!1), oe = () => {
|
|
7867
7924
|
I.value = document.fullscreenElement !== null, I.value && C();
|
|
7868
|
-
}, we =
|
|
7925
|
+
}, we = w(() => n.value.preset_filters ?? []), {
|
|
7869
7926
|
editable: be,
|
|
7870
7927
|
enrichedContext: J,
|
|
7871
7928
|
queryReady: le,
|
|
@@ -7873,32 +7930,32 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7873
7930
|
timeSpec: ne
|
|
7874
7931
|
} = Ee.useDashboardContext({
|
|
7875
7932
|
globalFilters: we,
|
|
7876
|
-
context:
|
|
7933
|
+
context: w(() => s.context),
|
|
7877
7934
|
isFullscreen: I,
|
|
7878
|
-
preview:
|
|
7935
|
+
preview: w(() => s.preview)
|
|
7879
7936
|
});
|
|
7880
7937
|
return e({
|
|
7881
7938
|
refresh: f,
|
|
7882
7939
|
toggleFullscreen: k,
|
|
7883
7940
|
exportPdf: y,
|
|
7884
7941
|
pdfExportState: v
|
|
7885
|
-
}), (
|
|
7886
|
-
const x =
|
|
7942
|
+
}), (b, T) => {
|
|
7943
|
+
const x = _e("KAlert");
|
|
7887
7944
|
return z(), se("div", {
|
|
7888
7945
|
ref_key: "dashboardContainer",
|
|
7889
7946
|
ref: c,
|
|
7890
7947
|
class: rt(["kong-ui-public-dashboard-renderer", { "is-fullscreen": I.value }]),
|
|
7891
7948
|
onFullscreenchange: oe
|
|
7892
7949
|
}, [
|
|
7893
|
-
|
|
7950
|
+
ce("div", {
|
|
7894
7951
|
ref_key: "layoutContainer",
|
|
7895
7952
|
ref: l,
|
|
7896
7953
|
class: "layout"
|
|
7897
7954
|
}, [
|
|
7898
|
-
D(h) && I.value ? (z(), se("div",
|
|
7899
|
-
et(
|
|
7900
|
-
])) :
|
|
7901
|
-
D(h) ? (z(), B(as(D(be) && !I.value ?
|
|
7955
|
+
D(h) && I.value ? (z(), se("div", Va, [
|
|
7956
|
+
et(b.$slots, "fullscreenHeader", {}, void 0, !0)
|
|
7957
|
+
])) : me("", !0),
|
|
7958
|
+
D(h) ? (z(), B(as(D(be) && !I.value ? Qa : $a), {
|
|
7902
7959
|
key: 2,
|
|
7903
7960
|
ref_key: "gridLayoutRef",
|
|
7904
7961
|
ref: a,
|
|
@@ -7907,9 +7964,9 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7907
7964
|
tiles: N.value,
|
|
7908
7965
|
onUpdateTiles: g
|
|
7909
7966
|
}, {
|
|
7910
|
-
tile:
|
|
7911
|
-
S(X) ? (z(), se("div",
|
|
7912
|
-
et(
|
|
7967
|
+
tile: $(({ tile: X }) => [
|
|
7968
|
+
S(X) ? (z(), se("div", Za, [
|
|
7969
|
+
et(b.$slots, U(X), {}, void 0, !0)
|
|
7913
7970
|
])) : (z(), B(Ms, {
|
|
7914
7971
|
key: I.value ? `${X.id}-tile` : `${X.id}-tile-fullscreen`,
|
|
7915
7972
|
"refresh-counter": o.value,
|
|
@@ -7936,7 +7993,7 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7936
7993
|
key: 1,
|
|
7937
7994
|
appearance: "danger"
|
|
7938
7995
|
}, {
|
|
7939
|
-
default:
|
|
7996
|
+
default: $(() => [
|
|
7940
7997
|
Je(ie(D(r).t("renderer.noQueryBridge")), 1)
|
|
7941
7998
|
]),
|
|
7942
7999
|
_: 1
|
|
@@ -7945,7 +8002,7 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7945
8002
|
], 34);
|
|
7946
8003
|
};
|
|
7947
8004
|
}
|
|
7948
|
-
}),
|
|
8005
|
+
}), ml = /* @__PURE__ */ Ue(Ja, [["__scopeId", "data-v-b6240c23"]]), pl = /* @__PURE__ */ ge({
|
|
7949
8006
|
__name: "DashboardTilePreview",
|
|
7950
8007
|
props: {
|
|
7951
8008
|
context: {},
|
|
@@ -7964,10 +8021,10 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7964
8021
|
}, { i18n: u } = Ee.useI18n(), { enrichedContext: d, queryReady: h } = Ee.useDashboardContext({
|
|
7965
8022
|
globalFilters: dt(() => s.globalFilters),
|
|
7966
8023
|
context: dt(() => s.context),
|
|
7967
|
-
preview:
|
|
7968
|
-
}), y =
|
|
8024
|
+
preview: w(() => s.preview)
|
|
8025
|
+
}), y = w(() => Pe(s.definition)), v = w(() => y.value ? "columns" in s.definition.query && !s.definition.query.columns?.length : !("metrics" in s.definition.query) || !s.definition.query.metrics || s.definition.query.metrics.length === 0), R = Q(yt);
|
|
7969
8026
|
let _;
|
|
7970
|
-
|
|
8027
|
+
Mt(() => {
|
|
7971
8028
|
const E = i.value?.parentElement;
|
|
7972
8029
|
E && (R.value = E.getBoundingClientRect().height, _ = new ResizeObserver(([S]) => {
|
|
7973
8030
|
const { height: O } = S.contentRect;
|
|
@@ -7981,7 +8038,7 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7981
8038
|
},
|
|
7982
8039
|
getExportData: () => n.value?.getExportData()
|
|
7983
8040
|
}), (E, S) => {
|
|
7984
|
-
const O =
|
|
8041
|
+
const O = _e("KEmptyState");
|
|
7985
8042
|
return z(), se("div", {
|
|
7986
8043
|
ref_key: "root",
|
|
7987
8044
|
ref: i,
|
|
@@ -7992,18 +8049,18 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
7992
8049
|
"action-button-visible": !1,
|
|
7993
8050
|
"data-testid": "chart-not-configured-empty-state"
|
|
7994
8051
|
}, {
|
|
7995
|
-
title:
|
|
7996
|
-
|
|
8052
|
+
title: $(() => [
|
|
8053
|
+
ce("p", null, ie(D(u).t("renderer.not_configured.title")), 1)
|
|
7997
8054
|
]),
|
|
7998
|
-
default:
|
|
7999
|
-
|
|
8055
|
+
default: $(() => [
|
|
8056
|
+
ce("p", null, ie(D(u).t("renderer.not_configured.description")), 1)
|
|
8000
8057
|
]),
|
|
8001
8058
|
_: 1
|
|
8002
8059
|
})) : (z(), B(Ms, {
|
|
8003
8060
|
key: 1,
|
|
8004
8061
|
ref: "dashboard-tile",
|
|
8005
8062
|
"refresh-counter": A.value,
|
|
8006
|
-
"onUpdate:refreshCounter": S[0] || (S[0] = (
|
|
8063
|
+
"onUpdate:refreshCounter": S[0] || (S[0] = (U) => A.value = U),
|
|
8007
8064
|
context: {
|
|
8008
8065
|
...D(d),
|
|
8009
8066
|
editable: !1
|
|
@@ -8022,7 +8079,7 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
8022
8079
|
], 512);
|
|
8023
8080
|
};
|
|
8024
8081
|
}
|
|
8025
|
-
}),
|
|
8082
|
+
}), el = (s) => {
|
|
8026
8083
|
if (s.type !== "chart")
|
|
8027
8084
|
return s;
|
|
8028
8085
|
const e = s.definition?.query;
|
|
@@ -8033,7 +8090,7 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
8033
8090
|
return;
|
|
8034
8091
|
}
|
|
8035
8092
|
return s;
|
|
8036
|
-
},
|
|
8093
|
+
}, tl = (s) => {
|
|
8037
8094
|
if (s.type !== "chart" || Pe(s.definition))
|
|
8038
8095
|
return s;
|
|
8039
8096
|
const e = s.definition?.query;
|
|
@@ -8050,7 +8107,7 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
8050
8107
|
query: t
|
|
8051
8108
|
}
|
|
8052
8109
|
};
|
|
8053
|
-
},
|
|
8110
|
+
}, il = (s, e = ni) => {
|
|
8054
8111
|
if (!s.length)
|
|
8055
8112
|
return [];
|
|
8056
8113
|
let t = 0, i = 0, n = 0;
|
|
@@ -8072,36 +8129,36 @@ const Ba = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Wa = { cl
|
|
|
8072
8129
|
r.push(l), i += a, n = Math.max(n, c);
|
|
8073
8130
|
}
|
|
8074
8131
|
return r;
|
|
8075
|
-
},
|
|
8132
|
+
}, gl = (s, e) => {
|
|
8076
8133
|
if (e) {
|
|
8077
|
-
const n = s.tiles.map(
|
|
8134
|
+
const n = s.tiles.map(tl);
|
|
8078
8135
|
return {
|
|
8079
8136
|
...s,
|
|
8080
8137
|
tiles: n
|
|
8081
8138
|
};
|
|
8082
8139
|
}
|
|
8083
|
-
const t = s.tiles.map(
|
|
8140
|
+
const t = s.tiles.map(el).filter((n) => n !== void 0), i = il(t, s.columns);
|
|
8084
8141
|
return {
|
|
8085
8142
|
...s,
|
|
8086
8143
|
tiles: i
|
|
8087
8144
|
};
|
|
8088
8145
|
};
|
|
8089
8146
|
export {
|
|
8090
|
-
|
|
8147
|
+
mo as C,
|
|
8091
8148
|
ni as D,
|
|
8092
8149
|
Fi as E,
|
|
8093
|
-
|
|
8094
|
-
|
|
8150
|
+
vo as F,
|
|
8151
|
+
$a as G,
|
|
8095
8152
|
He as I,
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8153
|
+
po as T,
|
|
8154
|
+
vt as _,
|
|
8155
|
+
na as a,
|
|
8099
8156
|
yt as b,
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8157
|
+
go as c,
|
|
8158
|
+
ml as d,
|
|
8159
|
+
pl as e,
|
|
8160
|
+
yo as f,
|
|
8161
|
+
gl as g,
|
|
8105
8162
|
Rs as h,
|
|
8106
8163
|
ks as i,
|
|
8107
8164
|
Ts as l
|