@kong-ui-public/dashboard-renderer 8.12.25 → 8.12.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/{GeoMapRenderer-xglakGvT.js → GeoMapRenderer-CAII3s7u.js} +1 -1
- package/dist/dashboard-renderer.es.js +1 -1
- package/dist/dashboard-renderer.umd.js +4 -4
- package/dist/{index-DaM2QumG.js → index-CYAKF_Ri.js} +288 -308
- package/dist/style.css +1 -1
- package/dist/types/components/DashboardRenderer.vue.d.ts +8 -8
- package/dist/types/components/DashboardTile.vue.d.ts +12 -12
- package/dist/types/composables/useContextLinks.d.ts.map +1 -1
- package/dist/types/utils/table-data-grid-renderer.d.ts +20 -30
- package/dist/types/utils/table-data-grid-renderer.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var $i = Object.defineProperty;
|
|
2
2
|
var Lt = (o) => {
|
|
3
3
|
throw TypeError(o);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var At = (o, e, t) =>
|
|
5
|
+
var Bi = (o, e, t) => e in o ? $i(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
6
|
+
var At = (o, e, t) => Bi(o, typeof e != "symbol" ? e + "" : e, t), dt = (o, e, t) => e.has(o) || Lt("Cannot " + t);
|
|
7
7
|
var _ = (o, e, t) => (dt(o, e, "read from private field"), t ? t.call(o) : e.get(o)), U = (o, e, t) => e.has(o) ? Lt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(o) : e.set(o, t), $ = (o, e, t, i) => (dt(o, e, "write to private field"), i ? i.call(o, t) : e.set(o, t), t), Q = (o, e, t) => (dt(o, e, "access private method"), t);
|
|
8
8
|
var Le = (o, e, t, i) => ({
|
|
9
9
|
set _(s) {
|
|
@@ -13,28 +13,28 @@ var Le = (o, e, t, i) => ({
|
|
|
13
13
|
return _(o, e, i);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { ref as A, watchEffect as
|
|
17
|
-
import { msToGranularity as ct, TimePeriods as
|
|
18
|
-
import { handleQueryError as
|
|
19
|
-
import
|
|
16
|
+
import { ref as A, watchEffect as ti, inject as me, provide as Fi, toRaw as Gi, computed as w, isRef as Ui, isReactive as Wi, toRef as Ae, hasInjectionContext as Ot, onMounted as nt, watch as Oe, onUnmounted as Ge, getCurrentInstance as Ki, defineComponent as ee, resolveComponent as he, unref as C, openBlock as x, createBlock as O, createSlots as ot, withCtx as M, createElementVNode as se, toDisplayString as J, renderSlot as He, createCommentVNode as X, normalizeStyle as Xe, normalizeClass as ze, createVNode as ge, mergeProps as ii, createTextVNode as mt, createElementBlock as B, normalizeProps as Qi, guardReactiveProps as Vi, defineAsyncComponent as si, Fragment as pt, useCssVars as yt, useModel as ri, readonly as Ht, nextTick as vt, resolveDynamicComponent as ni, toHandlers as Yi, mergeModels as Ze, renderList as oi, useTemplateRef as It } from "vue";
|
|
17
|
+
import { isPlatformDatasource as ai, msToGranularity as ct, TimePeriods as ji, TIMEFRAME_LOOKUP as Xi, formatTime as qt, EXPORT_RECORD_LIMIT as Zi } from "@kong-ui-public/analytics-utilities";
|
|
18
|
+
import { handleQueryError as Ji, SimpleChart as es, AnalyticsChart as ts, TopNTable as is, CsvExportModal as ss } from "@kong-ui-public/analytics-chart";
|
|
19
|
+
import rs from "swrv";
|
|
20
20
|
import "axios";
|
|
21
|
-
import { createI18n as
|
|
21
|
+
import { createI18n as ns, i18nTComponent as os } from "@kong-ui-public/i18n";
|
|
22
22
|
import { useAnalyticsConfigStore as _t, useDatasourceConfigStore as Ue } from "@kong-ui-public/analytics-config-store";
|
|
23
|
-
import { VisibilityOffIcon as
|
|
24
|
-
import { MetricsProvider as
|
|
25
|
-
import { TableDataGrid as
|
|
26
|
-
var
|
|
27
|
-
const
|
|
23
|
+
import { VisibilityOffIcon as as, WarningOutlineIcon as ls, WarningIcon as us, ProgressIcon as hs, RefreshIcon as ds, EditIcon as cs, MoreIcon as fs } from "@kong/icons";
|
|
24
|
+
import { MetricsProvider as gs, MetricsConsumer as ms } from "@kong-ui-public/analytics-metric-provider";
|
|
25
|
+
import { TableDataGrid as ps } from "@kong-ui-public/table-data-grid";
|
|
26
|
+
var li = /* @__PURE__ */ ((o) => (o.VALIDATING = "VALIDATING", o.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", o.PENDING = "PENDING", o.SUCCESS = "SUCCESS", o.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", o.ERROR = "ERROR", o.STALE_IF_ERROR = "STALE_IF_ERROR", o))(li || {});
|
|
27
|
+
const ys = (o) => {
|
|
28
28
|
var e, t, i, s, r;
|
|
29
29
|
return o ? !!// TODO: revisit: currently only the first check ever matters?
|
|
30
30
|
((e = Object.keys(o)) != null && e.length || (t = o.data) != null && t.length || (s = (i = o.data) == null ? void 0 : i.data) != null && s.length || !((r = o.data) != null && r.data) && typeof o.data == "object" && Object.keys(o == null ? void 0 : o.data).length) : !1;
|
|
31
31
|
};
|
|
32
|
-
function
|
|
32
|
+
function vs(o = A({}), e, t, i = ys) {
|
|
33
33
|
const s = A(
|
|
34
34
|
"PENDING"
|
|
35
35
|
/* PENDING */
|
|
36
36
|
);
|
|
37
|
-
return
|
|
37
|
+
return ti(() => {
|
|
38
38
|
const r = i(o.value);
|
|
39
39
|
if (o.value && r && t.value) {
|
|
40
40
|
s.value = "VALIDATING_HAS_DATA";
|
|
@@ -63,10 +63,10 @@ function ms(o = A({}), e, t, i = gs) {
|
|
|
63
63
|
o.value === void 0 && e && (s.value = "ERROR");
|
|
64
64
|
}), {
|
|
65
65
|
state: s,
|
|
66
|
-
swrvState:
|
|
66
|
+
swrvState: li
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const _s = {
|
|
70
70
|
not_configured: {
|
|
71
71
|
title: "Chart is not fully configured",
|
|
72
72
|
description: "Begin by choosing at least one metric"
|
|
@@ -85,10 +85,10 @@ const ps = {
|
|
|
85
85
|
remove: "Remove",
|
|
86
86
|
delete: "Delete",
|
|
87
87
|
as_of_today: "As of today"
|
|
88
|
-
},
|
|
88
|
+
}, bs = {
|
|
89
89
|
defaultFilename: "Chart export",
|
|
90
90
|
exportAsCsv: "Export as CSV"
|
|
91
|
-
},
|
|
91
|
+
}, ws = {
|
|
92
92
|
control_plane: "Control plane",
|
|
93
93
|
data_plane_node_version: "Data plane node version",
|
|
94
94
|
env: "Environment",
|
|
@@ -103,7 +103,7 @@ const ps = {
|
|
|
103
103
|
status_code: "Status code",
|
|
104
104
|
team: "Team",
|
|
105
105
|
name: "Name"
|
|
106
|
-
},
|
|
106
|
+
}, Es = "Explore", xs = "View requests", Cs = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", Rs = {
|
|
107
107
|
daily: "1 day",
|
|
108
108
|
fiveMinutely: "5 minutes",
|
|
109
109
|
hourly: "1 hour",
|
|
@@ -116,34 +116,34 @@ const ps = {
|
|
|
116
116
|
twoHourly: "2 hours",
|
|
117
117
|
weekly: "1 week",
|
|
118
118
|
unknown: "Unknown"
|
|
119
|
-
},
|
|
120
|
-
renderer:
|
|
121
|
-
csvExport:
|
|
122
|
-
chartLabels:
|
|
123
|
-
jumpToExplore:
|
|
124
|
-
jumpToRequests:
|
|
125
|
-
query_aged_out_warning:
|
|
126
|
-
granularities:
|
|
119
|
+
}, ks = {
|
|
120
|
+
renderer: _s,
|
|
121
|
+
csvExport: bs,
|
|
122
|
+
chartLabels: ws,
|
|
123
|
+
jumpToExplore: Es,
|
|
124
|
+
jumpToRequests: xs,
|
|
125
|
+
query_aged_out_warning: Cs,
|
|
126
|
+
granularities: Rs
|
|
127
127
|
};
|
|
128
|
-
function
|
|
129
|
-
const o =
|
|
128
|
+
function Ts() {
|
|
129
|
+
const o = ns("en-us", ks);
|
|
130
130
|
return {
|
|
131
131
|
i18n: o,
|
|
132
|
-
i18nT:
|
|
132
|
+
i18nT: os(o)
|
|
133
133
|
// Translation component <i18n-t>
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
const We = 170, bt = 6, _e = "analytics-query-provider", Mt = "{entity-id}",
|
|
137
|
-
function
|
|
136
|
+
const We = 170, bt = 6, _e = "analytics-query-provider", Mt = "{entity-id}", Ss = "{cp-id}", Ds = "{timeframe}", zs = 30 * 1e3, Ns = 3e5, Ls = 36e5;
|
|
137
|
+
function As() {
|
|
138
138
|
const o = me(_e);
|
|
139
139
|
return {
|
|
140
140
|
evaluateFeatureFlag: (t, i) => o ? o.evaluateFeatureFlagFn(t, i) : i
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Os(o) {
|
|
144
144
|
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
145
145
|
}
|
|
146
|
-
var
|
|
146
|
+
var ui = { exports: {} };
|
|
147
147
|
(function(o) {
|
|
148
148
|
var e = Object.prototype.hasOwnProperty, t = "~";
|
|
149
149
|
function i() {
|
|
@@ -247,24 +247,24 @@ var oi = { exports: {} };
|
|
|
247
247
|
var h;
|
|
248
248
|
return u ? (h = t ? t + u : u, this._events[h] && a(this, h)) : (this._events = new i(), this._eventsCount = 0), this;
|
|
249
249
|
}, n.prototype.off = n.prototype.removeListener, n.prototype.addListener = n.prototype.on, n.prefixed = t, n.EventEmitter = n, o.exports = n;
|
|
250
|
-
})(
|
|
251
|
-
var
|
|
252
|
-
const
|
|
253
|
-
class
|
|
250
|
+
})(ui);
|
|
251
|
+
var Hs = ui.exports;
|
|
252
|
+
const Is = /* @__PURE__ */ Os(Hs);
|
|
253
|
+
class hi extends Error {
|
|
254
254
|
constructor(e) {
|
|
255
255
|
super(e), this.name = "TimeoutError";
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
class
|
|
258
|
+
class qs extends Error {
|
|
259
259
|
constructor(e) {
|
|
260
260
|
super(), this.name = "AbortError", this.message = e;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
const Pt = (o) => globalThis.DOMException === void 0 ? new
|
|
263
|
+
const Pt = (o) => globalThis.DOMException === void 0 ? new qs(o) : new DOMException(o), $t = (o) => {
|
|
264
264
|
const e = o.reason === void 0 ? Pt("This operation was aborted.") : o.reason;
|
|
265
265
|
return e instanceof Error ? e : Pt(e);
|
|
266
266
|
};
|
|
267
|
-
function
|
|
267
|
+
function Ms(o, e) {
|
|
268
268
|
const {
|
|
269
269
|
milliseconds: t,
|
|
270
270
|
fallback: i,
|
|
@@ -285,7 +285,7 @@ function Hs(o, e) {
|
|
|
285
285
|
o.then(h, l);
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
|
-
const f = new
|
|
288
|
+
const f = new hi();
|
|
289
289
|
a = r.setTimeout.call(void 0, () => {
|
|
290
290
|
if (i) {
|
|
291
291
|
try {
|
|
@@ -310,7 +310,7 @@ function Hs(o, e) {
|
|
|
310
310
|
r.clearTimeout.call(void 0, a), a = void 0;
|
|
311
311
|
}, u;
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function Ps(o, e, t) {
|
|
314
314
|
let i = 0, s = o.length;
|
|
315
315
|
for (; s > 0; ) {
|
|
316
316
|
const r = Math.trunc(s / 2);
|
|
@@ -320,7 +320,7 @@ function Is(o, e, t) {
|
|
|
320
320
|
return i;
|
|
321
321
|
}
|
|
322
322
|
var ne;
|
|
323
|
-
class
|
|
323
|
+
class $s {
|
|
324
324
|
constructor() {
|
|
325
325
|
U(this, ne, []);
|
|
326
326
|
}
|
|
@@ -338,7 +338,7 @@ class qs {
|
|
|
338
338
|
_(this, ne).push(i);
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
|
-
const s =
|
|
341
|
+
const s = Ps(_(this, ne), i, (r, a) => a.priority - r.priority);
|
|
342
342
|
_(this, ne).splice(s, 0, i);
|
|
343
343
|
}
|
|
344
344
|
setPriority(e, t) {
|
|
@@ -360,8 +360,8 @@ class qs {
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
ne = new WeakMap();
|
|
363
|
-
var Re, ke, be, Pe, Te, $e, oe, Se, Z, Be, ae, De, ve, Fe, rt, L,
|
|
364
|
-
class
|
|
363
|
+
var Re, ke, be, Pe, Te, $e, oe, Se, Z, Be, ae, De, ve, Fe, rt, L, di, ci, fi, gi, mi, Ve, ft, gt, Ye, pi, je;
|
|
364
|
+
class Bs extends Is {
|
|
365
365
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
366
366
|
constructor(t) {
|
|
367
367
|
var i, s;
|
|
@@ -396,7 +396,7 @@ class Ms extends As {
|
|
|
396
396
|
interval: 0,
|
|
397
397
|
concurrency: Number.POSITIVE_INFINITY,
|
|
398
398
|
autoStart: !0,
|
|
399
|
-
queueClass:
|
|
399
|
+
queueClass: $s,
|
|
400
400
|
...t
|
|
401
401
|
}, !(typeof t.intervalCap == "number" && t.intervalCap >= 1))
|
|
402
402
|
throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${((i = t.intervalCap) == null ? void 0 : i.toString()) ?? ""}\` (${typeof t.intervalCap})`);
|
|
@@ -463,17 +463,17 @@ class Ms extends As {
|
|
|
463
463
|
try {
|
|
464
464
|
(a = i.signal) == null || a.throwIfAborted(), Le(this, be)._++;
|
|
465
465
|
let n = t({ signal: i.signal });
|
|
466
|
-
i.timeout && (n =
|
|
466
|
+
i.timeout && (n = Ms(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, Q(this, L, pi).call(this, i.signal)]));
|
|
467
467
|
const d = await n;
|
|
468
468
|
s(d), this.emit("completed", d);
|
|
469
469
|
} catch (n) {
|
|
470
|
-
if (n instanceof
|
|
470
|
+
if (n instanceof hi && !i.throwOnTimeout) {
|
|
471
471
|
s();
|
|
472
472
|
return;
|
|
473
473
|
}
|
|
474
474
|
r(n), this.emit("error", n);
|
|
475
475
|
} finally {
|
|
476
|
-
Q(this, L,
|
|
476
|
+
Q(this, L, fi).call(this);
|
|
477
477
|
}
|
|
478
478
|
}, i), this.emit("add"), Q(this, L, Ve).call(this);
|
|
479
479
|
});
|
|
@@ -552,15 +552,15 @@ class Ms extends As {
|
|
|
552
552
|
return _(this, ve);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
Re = new WeakMap(), ke = new WeakMap(), be = new WeakMap(), Pe = new WeakMap(), Te = new WeakMap(), $e = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), Z = new WeakMap(), Be = new WeakMap(), ae = new WeakMap(), De = new WeakMap(), ve = new WeakMap(), Fe = new WeakMap(), rt = new WeakMap(), L = new WeakSet(),
|
|
555
|
+
Re = new WeakMap(), ke = new WeakMap(), be = new WeakMap(), Pe = new WeakMap(), Te = new WeakMap(), $e = new WeakMap(), oe = new WeakMap(), Se = new WeakMap(), Z = new WeakMap(), Be = new WeakMap(), ae = new WeakMap(), De = new WeakMap(), ve = new WeakMap(), Fe = new WeakMap(), rt = new WeakMap(), L = new WeakSet(), di = function() {
|
|
556
556
|
return _(this, ke) || _(this, be) < _(this, Pe);
|
|
557
|
-
},
|
|
557
|
+
}, ci = function() {
|
|
558
558
|
return _(this, ae) < _(this, De);
|
|
559
|
-
},
|
|
559
|
+
}, fi = function() {
|
|
560
560
|
Le(this, ae)._--, Q(this, L, Ve).call(this), this.emit("next");
|
|
561
|
-
},
|
|
561
|
+
}, gi = function() {
|
|
562
562
|
Q(this, L, gt).call(this), Q(this, L, ft).call(this), $(this, Se, void 0);
|
|
563
|
-
},
|
|
563
|
+
}, mi = function() {
|
|
564
564
|
const t = Date.now();
|
|
565
565
|
if (_(this, oe) === void 0) {
|
|
566
566
|
const i = _(this, $e) - t;
|
|
@@ -568,7 +568,7 @@ Re = new WeakMap(), ke = new WeakMap(), be = new WeakMap(), Pe = new WeakMap(),
|
|
|
568
568
|
$(this, be, _(this, Re) ? _(this, ae) : 0);
|
|
569
569
|
else
|
|
570
570
|
return _(this, Se) === void 0 && $(this, Se, setTimeout(() => {
|
|
571
|
-
Q(this, L,
|
|
571
|
+
Q(this, L, gi).call(this);
|
|
572
572
|
}, i)), !0;
|
|
573
573
|
}
|
|
574
574
|
return !1;
|
|
@@ -576,8 +576,8 @@ Re = new WeakMap(), ke = new WeakMap(), be = new WeakMap(), Pe = new WeakMap(),
|
|
|
576
576
|
if (_(this, Z).size === 0)
|
|
577
577
|
return _(this, oe) && clearInterval(_(this, oe)), $(this, oe, void 0), this.emit("empty"), _(this, ae) === 0 && this.emit("idle"), !1;
|
|
578
578
|
if (!_(this, ve)) {
|
|
579
|
-
const t = !_(this, L,
|
|
580
|
-
if (_(this, L,
|
|
579
|
+
const t = !_(this, L, mi);
|
|
580
|
+
if (_(this, L, di) && _(this, L, ci)) {
|
|
581
581
|
const i = _(this, Z).dequeue();
|
|
582
582
|
return i ? (this.emit("active"), i(), t && Q(this, L, ft).call(this), !0) : !1;
|
|
583
583
|
}
|
|
@@ -595,7 +595,7 @@ Executes all queued functions until it reaches the limit.
|
|
|
595
595
|
Ye = function() {
|
|
596
596
|
for (; Q(this, L, Ve).call(this); )
|
|
597
597
|
;
|
|
598
|
-
},
|
|
598
|
+
}, pi = async function(t) {
|
|
599
599
|
return new Promise((i, s) => {
|
|
600
600
|
t.addEventListener("abort", () => {
|
|
601
601
|
s(t.reason);
|
|
@@ -609,7 +609,7 @@ Ye = function() {
|
|
|
609
609
|
this.on(t, r);
|
|
610
610
|
});
|
|
611
611
|
};
|
|
612
|
-
const
|
|
612
|
+
const Fs = () => {
|
|
613
613
|
const o = _t(), e = me(_e);
|
|
614
614
|
if (!e)
|
|
615
615
|
return;
|
|
@@ -617,7 +617,7 @@ const Ps = () => {
|
|
|
617
617
|
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.");
|
|
618
618
|
return;
|
|
619
619
|
}
|
|
620
|
-
const t = new
|
|
620
|
+
const t = new Bs({
|
|
621
621
|
carryoverConcurrencyCount: !0,
|
|
622
622
|
concurrency: o.maxParallelRequests,
|
|
623
623
|
interval: o.requestInterval,
|
|
@@ -627,14 +627,14 @@ const Ps = () => {
|
|
|
627
627
|
queryFnOverride: !0,
|
|
628
628
|
queryFn: (s, r) => t.add(() => e.queryFn(s, r), { throwOnTimeout: !0 })
|
|
629
629
|
};
|
|
630
|
-
|
|
630
|
+
Fi(_e, i);
|
|
631
631
|
};
|
|
632
632
|
/*!
|
|
633
633
|
* pinia v3.0.4
|
|
634
634
|
* (c) 2025 Eduardo San Martin Morote
|
|
635
635
|
* @license MIT
|
|
636
636
|
*/
|
|
637
|
-
const
|
|
637
|
+
const Gs = typeof window < "u";
|
|
638
638
|
let Bt;
|
|
639
639
|
process.env.NODE_ENV;
|
|
640
640
|
const Ft = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
@@ -650,7 +650,7 @@ process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
|
650
650
|
Symbol()
|
|
651
651
|
);
|
|
652
652
|
function Ie(o) {
|
|
653
|
-
const e =
|
|
653
|
+
const e = Gi(o), t = {};
|
|
654
654
|
for (const i in e) {
|
|
655
655
|
const s = e[i];
|
|
656
656
|
s.effect ? t[i] = // ...
|
|
@@ -659,20 +659,21 @@ function Ie(o) {
|
|
|
659
659
|
set(r) {
|
|
660
660
|
o[i] = r;
|
|
661
661
|
}
|
|
662
|
-
}) : (
|
|
662
|
+
}) : (Ui(s) || Wi(s)) && (t[i] = // ---
|
|
663
663
|
Ae(o, i));
|
|
664
664
|
}
|
|
665
665
|
return t;
|
|
666
666
|
}
|
|
667
|
-
const le = (o) => (o == null ? void 0 : o.chart.type) === "table",
|
|
667
|
+
const le = (o) => (o == null ? void 0 : o.chart.type) === "table", Us = [
|
|
668
668
|
"basic",
|
|
669
669
|
"api_usage",
|
|
670
670
|
"llm_usage",
|
|
671
671
|
"agentic_usage",
|
|
672
672
|
"platform",
|
|
673
|
+
"platform_usage",
|
|
673
674
|
void 0
|
|
674
|
-
],
|
|
675
|
-
function
|
|
675
|
+
], Ws = (o) => Us.includes(o);
|
|
676
|
+
function Ks({
|
|
676
677
|
queryBridge: o,
|
|
677
678
|
context: e,
|
|
678
679
|
definition: t,
|
|
@@ -686,7 +687,7 @@ function Gs({
|
|
|
686
687
|
const g = w(() => d.analytics && d.percentiles), p = w(() => {
|
|
687
688
|
const D = t.value.chart.type;
|
|
688
689
|
return ["golden_signals", "gauge"].includes(D) ? !1 : D === "top_n" ? e.value.editable || e.value.showTileActions : !0;
|
|
689
|
-
}), y = w(() => r.value && t.value.query && !f.value && t.value.query.datasource !== "llm_usage" && t.value.query.datasource
|
|
690
|
+
}), y = w(() => r.value && t.value.query && !f.value && t.value.query.datasource !== "llm_usage" && !ai(t.value.query.datasource) && g.value && !l.value), m = w(() => s.value && t.value.query && Ws(t.value.query.datasource) && g.value && !l.value), T = w(() => i.value ? ct(i.value.meta.granularity_ms) : void 0), R = w(() => {
|
|
690
691
|
var N;
|
|
691
692
|
const D = t.value, H = [...e.value.filters, ...D.query.filters ?? []], V = "metrics" in D.query ? D.query.metrics : void 0, z = ((N = D.query) == null ? void 0 : N.datasource) ?? "api_usage";
|
|
692
693
|
return h.value({
|
|
@@ -768,7 +769,7 @@ function Gs({
|
|
|
768
769
|
buildRequestLink: q
|
|
769
770
|
};
|
|
770
771
|
}
|
|
771
|
-
function
|
|
772
|
+
function Qs() {
|
|
772
773
|
const o = me(_e), e = Ue(), { stripUnknownFilters: t } = Ie(e);
|
|
773
774
|
let i = null;
|
|
774
775
|
return Ge(() => {
|
|
@@ -811,7 +812,7 @@ function Us() {
|
|
|
811
812
|
return o.queryFn(y, d);
|
|
812
813
|
} };
|
|
813
814
|
}
|
|
814
|
-
function
|
|
815
|
+
function Vs({
|
|
815
816
|
context: o,
|
|
816
817
|
globalFilters: e = A([]),
|
|
817
818
|
isFullscreen: t = A(!1),
|
|
@@ -824,7 +825,7 @@ function Ws({
|
|
|
824
825
|
var T, R, v;
|
|
825
826
|
let { tz: l, refreshInterval: f, editable: g, showTileActions: p } = o.value;
|
|
826
827
|
const y = [...o.value.filters ?? [], ...e.value];
|
|
827
|
-
if (l || (l = new Intl.DateTimeFormat().resolvedOptions().timeZone), f === void 0 && (f =
|
|
828
|
+
if (l || (l = new Intl.DateTimeFormat().resolvedOptions().timeZone), f === void 0 && (f = zs), t.value) {
|
|
828
829
|
let I = !1;
|
|
829
830
|
if (d.value.type === "relative")
|
|
830
831
|
I = ["15m", "1h", "6h", "12h", "24h"].includes(d.value.time_range);
|
|
@@ -833,10 +834,10 @@ function Ws({
|
|
|
833
834
|
I = Math.abs(W - ie) <= 864e5;
|
|
834
835
|
}
|
|
835
836
|
const q = (/* @__PURE__ */ new Date()).getTime();
|
|
836
|
-
d.value.type === "absolute" && d.value.end.getTime() < q || d.value.type === "relative" && ["previous_week", "previous_month"].includes(d.value.time_range) ? f = 0 : I ? f =
|
|
837
|
+
d.value.type === "absolute" && d.value.end.getTime() < q || d.value.type === "relative" && ["previous_week", "previous_month"].includes(d.value.time_range) ? f = 0 : I ? f = Ns : f = Ls;
|
|
837
838
|
}
|
|
838
839
|
(g === void 0 || i.value) && (g = !1), p === void 0 && (p = !0);
|
|
839
|
-
const m = !i.value && !!((v = (R = (T =
|
|
840
|
+
const m = !i.value && !!((v = (R = (T = Ki()) == null ? void 0 : T.vnode) == null ? void 0 : R.props) != null && v.onTileTimeRangeZoom);
|
|
840
841
|
return {
|
|
841
842
|
filters: y,
|
|
842
843
|
tz: l,
|
|
@@ -854,12 +855,12 @@ function Ws({
|
|
|
854
855
|
};
|
|
855
856
|
}
|
|
856
857
|
const ue = {
|
|
857
|
-
useContextLinks:
|
|
858
|
-
useDashboardInternalContext:
|
|
859
|
-
useEvaluateFeatureFlag:
|
|
860
|
-
useI18n:
|
|
861
|
-
useIssueQuery:
|
|
862
|
-
useRequestQueue:
|
|
858
|
+
useContextLinks: Ks,
|
|
859
|
+
useDashboardInternalContext: Vs,
|
|
860
|
+
useEvaluateFeatureFlag: As,
|
|
861
|
+
useI18n: Ts,
|
|
862
|
+
useIssueQuery: Qs,
|
|
863
|
+
useRequestQueue: Fs
|
|
863
864
|
}, wt = /* @__PURE__ */ ee({
|
|
864
865
|
__name: "QueryDataProvider",
|
|
865
866
|
props: {
|
|
@@ -871,7 +872,7 @@ const ue = {
|
|
|
871
872
|
},
|
|
872
873
|
emits: ["chart-data", "query-complete"],
|
|
873
874
|
setup(o, { emit: e }) {
|
|
874
|
-
const t = o, i = e, { i18n: s } = ue.useI18n(), { issueQuery: r } = ue.useIssueQuery(), a = me(_e), n = () => t.queryReady && a ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, { data: d, error: u, isValidating: h } =
|
|
875
|
+
const t = o, i = e, { i18n: s } = ue.useI18n(), { issueQuery: r } = ue.useIssueQuery(), a = me(_e), n = () => t.queryReady && a ? JSON.stringify([t.query, t.context, t.refreshCounter]) : null, { data: d, error: u, isValidating: h } = rs(n, async () => {
|
|
875
876
|
const R = n();
|
|
876
877
|
try {
|
|
877
878
|
const v = await r(t.query, t.context, t.limitOverride);
|
|
@@ -879,7 +880,7 @@ const ue = {
|
|
|
879
880
|
} catch (v) {
|
|
880
881
|
if (n() !== R)
|
|
881
882
|
return;
|
|
882
|
-
throw g.value =
|
|
883
|
+
throw g.value = Ji(v), v;
|
|
883
884
|
} finally {
|
|
884
885
|
n() === R && i("query-complete");
|
|
885
886
|
}
|
|
@@ -887,7 +888,7 @@ const ue = {
|
|
|
887
888
|
refreshInterval: t.context.refreshInterval,
|
|
888
889
|
revalidateOnFocus: !1,
|
|
889
890
|
shouldRetryOnError: !1
|
|
890
|
-
}), { state: l, swrvState: f } =
|
|
891
|
+
}), { state: l, swrvState: f } = vs(d, u, h), g = A(null), p = w(() => l.value === f.ERROR || !!g.value), y = w(() => !t.queryReady || l.value === f.PENDING), m = A(), T = w(() => d.value ?? (t.queryReady && l.value === f.PENDING ? m.value : void 0));
|
|
891
892
|
return Oe([() => d.value, () => l.value], ([R, v]) => {
|
|
892
893
|
R && (v === "SUCCESS_HAS_DATA" || v === "SUCCESS") && R !== m.value && (m.value = R, i("chart-data", R));
|
|
893
894
|
}), (R, v) => {
|
|
@@ -905,7 +906,7 @@ const ue = {
|
|
|
905
906
|
icon: M(() => {
|
|
906
907
|
var ie;
|
|
907
908
|
return [
|
|
908
|
-
((ie = g.value) == null ? void 0 : ie.type) === "forbidden" ? (x(), O(C(
|
|
909
|
+
((ie = g.value) == null ? void 0 : ie.type) === "forbidden" ? (x(), O(C(as), { key: 0 })) : (x(), O(C(ls), { key: 1 }))
|
|
909
910
|
];
|
|
910
911
|
}),
|
|
911
912
|
title: M(() => {
|
|
@@ -929,7 +930,7 @@ const ue = {
|
|
|
929
930
|
}) : X("", !0);
|
|
930
931
|
};
|
|
931
932
|
}
|
|
932
|
-
}),
|
|
933
|
+
}), Ys = /* @__PURE__ */ ee({
|
|
933
934
|
__name: "SimpleChartRenderer",
|
|
934
935
|
props: {
|
|
935
936
|
query: {},
|
|
@@ -954,7 +955,7 @@ const ue = {
|
|
|
954
955
|
class: ze(["analytics-chart", { "single-value": t.value }]),
|
|
955
956
|
style: Xe(t.value ? void 0 : { height: `${o.height}px` })
|
|
956
957
|
}, [
|
|
957
|
-
ge(C(
|
|
958
|
+
ge(C(es), {
|
|
958
959
|
"chart-data": r,
|
|
959
960
|
"chart-options": o.chartOptions,
|
|
960
961
|
"synthetics-data-key": t.value ? void 0 : o.chartOptions.synthetics_data_key
|
|
@@ -969,7 +970,7 @@ const ue = {
|
|
|
969
970
|
for (const [i, s] of e)
|
|
970
971
|
t[i] = s;
|
|
971
972
|
return t;
|
|
972
|
-
}, Ut = /* @__PURE__ */ we(
|
|
973
|
+
}, Ut = /* @__PURE__ */ we(Ys, [["__scopeId", "data-v-2cbfac70"]]), js = { class: "analytics-chart" }, Xs = /* @__PURE__ */ ee({
|
|
973
974
|
__name: "BaseAnalyticsChartRenderer",
|
|
974
975
|
props: {
|
|
975
976
|
query: {},
|
|
@@ -1005,8 +1006,8 @@ const ue = {
|
|
|
1005
1006
|
onChartData: d
|
|
1006
1007
|
}, {
|
|
1007
1008
|
default: M(({ data: f }) => [
|
|
1008
|
-
se("div",
|
|
1009
|
-
ge(C(
|
|
1009
|
+
se("div", js, [
|
|
1010
|
+
ge(C(ts), ii({
|
|
1010
1011
|
"chart-data": f,
|
|
1011
1012
|
"chart-options": r.value,
|
|
1012
1013
|
"explore-link": o.exploreLink,
|
|
@@ -1038,7 +1039,7 @@ const ue = {
|
|
|
1038
1039
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]);
|
|
1039
1040
|
};
|
|
1040
1041
|
}
|
|
1041
|
-
}), Et = /* @__PURE__ */ we(
|
|
1042
|
+
}), Et = /* @__PURE__ */ we(Xs, [["__scopeId", "data-v-e1e7f610"]]), Wt = /* @__PURE__ */ ee({
|
|
1042
1043
|
__name: "BarChartRenderer",
|
|
1043
1044
|
props: {
|
|
1044
1045
|
query: {},
|
|
@@ -1089,7 +1090,7 @@ const ue = {
|
|
|
1089
1090
|
onZoomTimeRange: s[1] || (s[1] = (r) => t("zoom-time-range", r))
|
|
1090
1091
|
}, null, 8, ["chart-options", "context", "explore-link", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
|
|
1091
1092
|
}
|
|
1092
|
-
}),
|
|
1093
|
+
}), Zs = /* @__PURE__ */ ee({
|
|
1093
1094
|
__name: "GoldenSignalsRenderer",
|
|
1094
1095
|
props: {
|
|
1095
1096
|
query: {},
|
|
@@ -1122,15 +1123,15 @@ const ue = {
|
|
|
1122
1123
|
return (i, s) => (x(), B("div", {
|
|
1123
1124
|
class: ze(["metric-card-tile-wrapper", { titled: !!e.chartOptions.chart_title }])
|
|
1124
1125
|
}, [
|
|
1125
|
-
ge(C(
|
|
1126
|
+
ge(C(gs), Qi(Vi(t.value)), {
|
|
1126
1127
|
default: M(() => [
|
|
1127
|
-
ge(C(
|
|
1128
|
+
ge(C(ms))
|
|
1128
1129
|
]),
|
|
1129
1130
|
_: 1
|
|
1130
1131
|
}, 16)
|
|
1131
1132
|
], 2));
|
|
1132
1133
|
}
|
|
1133
|
-
}),
|
|
1134
|
+
}), Js = /* @__PURE__ */ we(Zs, [["__scopeId", "data-v-b77f52b8"]]), er = {
|
|
1134
1135
|
class: "fallback-entity-link",
|
|
1135
1136
|
"data-testid": "entity-link-parent"
|
|
1136
1137
|
}, Qt = /* @__PURE__ */ ee({
|
|
@@ -1139,9 +1140,9 @@ const ue = {
|
|
|
1139
1140
|
entityLinkData: {}
|
|
1140
1141
|
},
|
|
1141
1142
|
setup(o) {
|
|
1142
|
-
return (e, t) => (x(), B("div",
|
|
1143
|
+
return (e, t) => (x(), B("div", er, J(o.entityLinkData.label), 1));
|
|
1143
1144
|
}
|
|
1144
|
-
}),
|
|
1145
|
+
}), tr = { key: 0 }, ir = { key: 1 }, sr = /* @__PURE__ */ ee({
|
|
1145
1146
|
__name: "TopNTableRenderer",
|
|
1146
1147
|
props: {
|
|
1147
1148
|
query: {},
|
|
@@ -1154,7 +1155,7 @@ const ue = {
|
|
|
1154
1155
|
exploreLink: {}
|
|
1155
1156
|
},
|
|
1156
1157
|
setup(o) {
|
|
1157
|
-
const e = o, t = me(_e), i =
|
|
1158
|
+
const e = o, t = me(_e), i = si(async () => {
|
|
1158
1159
|
if (t != null && t.fetchComponent)
|
|
1159
1160
|
try {
|
|
1160
1161
|
return await t.fetchComponent("EntityLink");
|
|
@@ -1175,7 +1176,7 @@ const ue = {
|
|
|
1175
1176
|
if (h)
|
|
1176
1177
|
if (u.id.includes(":")) {
|
|
1177
1178
|
const [l, f] = u.id.split(":");
|
|
1178
|
-
return h.replace(
|
|
1179
|
+
return h.replace(Ss, l).replace(Mt, f);
|
|
1179
1180
|
} else
|
|
1180
1181
|
return h.replace(Mt, u.id);
|
|
1181
1182
|
return "";
|
|
@@ -1187,7 +1188,7 @@ const ue = {
|
|
|
1187
1188
|
"refresh-counter": o.refreshCounter
|
|
1188
1189
|
}, {
|
|
1189
1190
|
default: M(({ data: l }) => [
|
|
1190
|
-
ge(C(
|
|
1191
|
+
ge(C(is), {
|
|
1191
1192
|
data: l,
|
|
1192
1193
|
"synthetics-data-key": o.chartOptions.synthetics_data_key
|
|
1193
1194
|
}, ot({ _: 2 }, [
|
|
@@ -1203,7 +1204,7 @@ const ue = {
|
|
|
1203
1204
|
},
|
|
1204
1205
|
"external-link": d(f)
|
|
1205
1206
|
}, null, 8, ["entity-link-data", "external-link"])) : (x(), B(pt, { key: 1 }, [
|
|
1206
|
-
f.name === "empty" ? (x(), B("i",
|
|
1207
|
+
f.name === "empty" ? (x(), B("i", tr, J(f.name), 1)) : (x(), B("span", ir, J(f.name), 1))
|
|
1207
1208
|
], 64))
|
|
1208
1209
|
]),
|
|
1209
1210
|
key: "0"
|
|
@@ -1213,7 +1214,7 @@ const ue = {
|
|
|
1213
1214
|
_: 1
|
|
1214
1215
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
1215
1216
|
}
|
|
1216
|
-
}),
|
|
1217
|
+
}), rr = (o) => o.records.map((e) => {
|
|
1217
1218
|
const t = { ...e };
|
|
1218
1219
|
return Object.entries(e).forEach(([i, s]) => {
|
|
1219
1220
|
var a, n, d;
|
|
@@ -1222,81 +1223,60 @@ const ue = {
|
|
|
1222
1223
|
const r = (d = (n = (a = o.meta.display) == null ? void 0 : a[i]) == null ? void 0 : n[String(s)]) == null ? void 0 : d.name;
|
|
1223
1224
|
r && (t[i] = r);
|
|
1224
1225
|
}), t;
|
|
1225
|
-
}),
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
...d.filters ?? [],
|
|
1280
|
-
...e.filters
|
|
1281
|
-
],
|
|
1282
|
-
queryFields: d.entity === void 0 ? void 0 : [d.entity]
|
|
1283
|
-
}), h = await n({
|
|
1284
|
-
datasource: s.datasource,
|
|
1285
|
-
query: {
|
|
1286
|
-
columns: d.columns,
|
|
1287
|
-
cursor: t === void 0 ? d.cursor : String(t),
|
|
1288
|
-
entity: d.entity,
|
|
1289
|
-
filters: u,
|
|
1290
|
-
page_size: i
|
|
1291
|
-
}
|
|
1292
|
-
}, o);
|
|
1293
|
-
return (l = h.meta.columns) != null && l.length && (r == null || r(h.meta.columns)), {
|
|
1294
|
-
data: tr(h),
|
|
1295
|
-
cursor: h.meta.cursor,
|
|
1296
|
-
hasMore: !!h.meta.cursor
|
|
1297
|
-
};
|
|
1298
|
-
}
|
|
1299
|
-
}, rr = /* @__PURE__ */ ee({
|
|
1226
|
+
}), Vt = ({
|
|
1227
|
+
canTranslate: o,
|
|
1228
|
+
columns: e,
|
|
1229
|
+
translate: t
|
|
1230
|
+
}) => e.map((i) => {
|
|
1231
|
+
const s = `chartLabels.${i}`;
|
|
1232
|
+
return {
|
|
1233
|
+
key: i,
|
|
1234
|
+
label: o(s) ? t(s) : i
|
|
1235
|
+
};
|
|
1236
|
+
}), nr = {
|
|
1237
|
+
/** @deprecated Use `platform_usage`. */
|
|
1238
|
+
platform: Vt,
|
|
1239
|
+
platform_usage: Vt
|
|
1240
|
+
}, Yt = async ({
|
|
1241
|
+
abortController: o,
|
|
1242
|
+
context: e,
|
|
1243
|
+
cursor: t,
|
|
1244
|
+
pageSize: i,
|
|
1245
|
+
query: s,
|
|
1246
|
+
onResponseColumns: r,
|
|
1247
|
+
stripUnknownFilters: a,
|
|
1248
|
+
tabularQueryFn: n
|
|
1249
|
+
}) => {
|
|
1250
|
+
var l;
|
|
1251
|
+
if (!n)
|
|
1252
|
+
throw new Error("AnalyticsBridge.tabularQueryFn is not defined");
|
|
1253
|
+
const d = s.query, u = a({
|
|
1254
|
+
datasource: s.datasource,
|
|
1255
|
+
filters: [
|
|
1256
|
+
...d.filters ?? [],
|
|
1257
|
+
...e.filters
|
|
1258
|
+
],
|
|
1259
|
+
queryFields: d.entity === void 0 ? void 0 : [d.entity]
|
|
1260
|
+
}), h = await n({
|
|
1261
|
+
datasource: s.datasource,
|
|
1262
|
+
query: {
|
|
1263
|
+
columns: d.columns,
|
|
1264
|
+
cursor: t === void 0 ? d.cursor : String(t),
|
|
1265
|
+
entity: d.entity,
|
|
1266
|
+
filters: u,
|
|
1267
|
+
page_size: i
|
|
1268
|
+
}
|
|
1269
|
+
}, o);
|
|
1270
|
+
return (l = h.meta.columns) != null && l.length && (r == null || r(h.meta.columns)), {
|
|
1271
|
+
data: rr(h),
|
|
1272
|
+
cursor: h.meta.cursor,
|
|
1273
|
+
hasMore: !!h.meta.cursor
|
|
1274
|
+
};
|
|
1275
|
+
}, or = {
|
|
1276
|
+
/** @deprecated Use `platform_usage`. */
|
|
1277
|
+
platform: Yt,
|
|
1278
|
+
platform_usage: Yt
|
|
1279
|
+
}, ar = /* @__PURE__ */ ee({
|
|
1300
1280
|
__name: "TableDataGridRenderer",
|
|
1301
1281
|
props: {
|
|
1302
1282
|
query: {},
|
|
@@ -1336,7 +1316,7 @@ const ue = {
|
|
|
1336
1316
|
});
|
|
1337
1317
|
const g = w(() => {
|
|
1338
1318
|
var m;
|
|
1339
|
-
return
|
|
1319
|
+
return nr[t.query.datasource]({
|
|
1340
1320
|
// query.columns are optional in the API. If not provided, backend will return default columns.
|
|
1341
1321
|
// If query columns are not provided, fallback to using columns from the response metadata for header configuration.
|
|
1342
1322
|
columns: (m = t.query.columns) != null && m.length ? t.query.columns : d.value,
|
|
@@ -1346,7 +1326,7 @@ const ue = {
|
|
|
1346
1326
|
}), p = w(() => async ({ cursor: m, pageSize: T }) => {
|
|
1347
1327
|
try {
|
|
1348
1328
|
await r.isReady();
|
|
1349
|
-
const R =
|
|
1329
|
+
const R = or[l.value.datasource];
|
|
1350
1330
|
if (!R)
|
|
1351
1331
|
throw new Error(`No table data grid fetcher found for datasource: ${l.value.datasource}`);
|
|
1352
1332
|
const v = await R({
|
|
@@ -1374,7 +1354,7 @@ const ue = {
|
|
|
1374
1354
|
class: "table-data-grid-renderer",
|
|
1375
1355
|
style: Xe(h.value)
|
|
1376
1356
|
}, [
|
|
1377
|
-
o.queryReady ? (x(), O(C(
|
|
1357
|
+
o.queryReady ? (x(), O(C(ps), {
|
|
1378
1358
|
key: 1,
|
|
1379
1359
|
error: u.value,
|
|
1380
1360
|
fetcher: p.value,
|
|
@@ -1390,7 +1370,7 @@ const ue = {
|
|
|
1390
1370
|
], 4);
|
|
1391
1371
|
};
|
|
1392
1372
|
}
|
|
1393
|
-
}),
|
|
1373
|
+
}), lr = /* @__PURE__ */ we(ar, [["__scopeId", "data-v-c49ff2eb"]]), jt = "#6c7489", ur = "12px", Xt = "20px", Zt = "32px", yi = "20px", hr = /* @__PURE__ */ ee({
|
|
1394
1374
|
__name: "DonutChartRenderer",
|
|
1395
1375
|
props: {
|
|
1396
1376
|
query: {},
|
|
@@ -1412,10 +1392,10 @@ const ue = {
|
|
|
1412
1392
|
"refresh-counter": o.refreshCounter
|
|
1413
1393
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
|
|
1414
1394
|
}
|
|
1415
|
-
}),
|
|
1395
|
+
}), dr = ["data-testid"], cr = {
|
|
1416
1396
|
key: 0,
|
|
1417
1397
|
class: "tile-header"
|
|
1418
|
-
},
|
|
1398
|
+
}, fr = { class: "badge-container" }, gr = { class: "badge-text" }, mr = { key: 0 }, pr = ["data-testid"], yr = ["data-testid"], vr = { class: "delete-option" }, _r = ["data-testid"], br = ["data-testid"], wr = /* @__PURE__ */ ee({
|
|
1419
1399
|
__name: "DashboardTile",
|
|
1420
1400
|
props: /* @__PURE__ */ Ze({
|
|
1421
1401
|
context: {},
|
|
@@ -1435,11 +1415,11 @@ const ue = {
|
|
|
1435
1415
|
emits: /* @__PURE__ */ Ze(["chart-data", "edit-tile", "duplicate-tile", "remove-tile", "tile-time-range-zoom", "tile-bounds-change"], ["update:refreshCounter"]),
|
|
1436
1416
|
setup(o, { expose: e, emit: t }) {
|
|
1437
1417
|
yt((E) => ({
|
|
1438
|
-
|
|
1418
|
+
v0e0bc7ee: `${E.height}px`
|
|
1439
1419
|
}));
|
|
1440
|
-
const i = parseInt(
|
|
1420
|
+
const i = parseInt(yi, 10), s = o, r = ri(o, "refreshCounter"), a = () => {
|
|
1441
1421
|
R.value = !0, r.value++;
|
|
1442
|
-
}, n = t, d =
|
|
1422
|
+
}, n = t, d = si(() => import("./GeoMapRenderer-CAII3s7u.js")), u = me(_e), h = Ue(), { stripUnknownFilters: l } = Ie(h), { i18n: f } = ue.useI18n(), g = A(), p = A({ status: "loading" }), y = A(!1), m = A(), T = A(!1), R = A(!0), v = w(() => s.definition.chart), I = w(() => "chart_title" in v.value ? v.value.chart_title : void 0), q = w(() => "description" in v.value ? v.value.description : void 0), te = w(() => v.value.type === "slottable"), ie = w(() => le(s.definition) ? !1 : !("allow_csv_export" in v.value) || v.value.allow_csv_export !== !1), {
|
|
1443
1423
|
exploreLinkKebabMenu: W,
|
|
1444
1424
|
requestsLinkKebabMenu: pe,
|
|
1445
1425
|
canShowKebabMenu: D,
|
|
@@ -1464,36 +1444,36 @@ const ue = {
|
|
|
1464
1444
|
} catch {
|
|
1465
1445
|
}
|
|
1466
1446
|
}, { immediate: !0, deep: !0 });
|
|
1467
|
-
const Ke = w(() => f.t("csvExport.defaultFilename")), Qe = w(() => !!W.value || ie.value || s.context.editable), Ee = w(() => !s.hideActions && D.value && Qe.value),
|
|
1447
|
+
const Ke = w(() => f.t("csvExport.defaultFilename")), Qe = w(() => !!W.value || ie.value || s.context.editable), Ee = w(() => !s.hideActions && D.value && Qe.value), bi = w(() => Ee.value && Qe.value && !s.isFullscreen), wi = w(() => v.value.type === "golden_signals" && !!q.value), Ei = {
|
|
1468
1448
|
timeseries_line: Kt,
|
|
1469
1449
|
timeseries_bar: Kt,
|
|
1470
1450
|
horizontal_bar: Wt,
|
|
1471
1451
|
vertical_bar: Wt,
|
|
1472
1452
|
gauge: Ut,
|
|
1473
|
-
donut:
|
|
1474
|
-
golden_signals:
|
|
1475
|
-
top_n:
|
|
1476
|
-
table:
|
|
1453
|
+
donut: hr,
|
|
1454
|
+
golden_signals: Js,
|
|
1455
|
+
top_n: sr,
|
|
1456
|
+
table: lr,
|
|
1477
1457
|
slottable: void 0,
|
|
1478
1458
|
single_value: Ut,
|
|
1479
1459
|
choropleth_map: d
|
|
1480
|
-
},
|
|
1460
|
+
}, xi = w(() => {
|
|
1481
1461
|
var E, S, G, K;
|
|
1482
1462
|
return {
|
|
1483
|
-
...(E = xe.value) != null && E.rendererEvents.supportsRequests ? { "select-chart-range":
|
|
1484
|
-
...(S = xe.value) != null && S.rendererEvents.supportsZoom ? { "zoom-time-range":
|
|
1485
|
-
...(G = xe.value) != null && G.rendererEvents.supportsBounds ? { "bounds-change":
|
|
1486
|
-
...(K = xe.value) != null && K.rendererEvents.supportsLoadingChange ? { "loading-change":
|
|
1463
|
+
...(E = xe.value) != null && E.rendererEvents.supportsRequests ? { "select-chart-range": qi } : {},
|
|
1464
|
+
...(S = xe.value) != null && S.rendererEvents.supportsZoom ? { "zoom-time-range": Hi } : {},
|
|
1465
|
+
...(G = xe.value) != null && G.rendererEvents.supportsBounds ? { "bounds-change": Ii } : {},
|
|
1466
|
+
...(K = xe.value) != null && K.rendererEvents.supportsLoadingChange ? { "loading-change": Li } : {}
|
|
1487
1467
|
};
|
|
1488
1468
|
}), xe = w(() => {
|
|
1489
1469
|
var Dt, zt, Nt;
|
|
1490
|
-
const E = s.definition, S =
|
|
1470
|
+
const E = s.definition, S = Ei[E.chart.type], G = le(E), K = !!((Dt = S == null ? void 0 : S.emits) != null && Dt.includes("select-chart-range")), Ne = !!((zt = S == null ? void 0 : S.emits) != null && zt.includes("zoom-time-range")), ye = E.chart.type === "choropleth_map", Ce = !!((Nt = S == null ? void 0 : S.emits) != null && Nt.includes("loading-change")), Mi = {
|
|
1491
1471
|
query: E.query,
|
|
1492
1472
|
context: s.context,
|
|
1493
1473
|
queryReady: s.queryReady,
|
|
1494
1474
|
height: s.height - i * 2,
|
|
1495
1475
|
refreshCounter: r.value
|
|
1496
|
-
},
|
|
1476
|
+
}, Pi = {
|
|
1497
1477
|
chartOptions: E.chart,
|
|
1498
1478
|
requestsLink: s.hideZoomActions ? void 0 : z.value,
|
|
1499
1479
|
exploreLink: s.hideZoomActions ? void 0 : N.value
|
|
@@ -1501,8 +1481,8 @@ const ue = {
|
|
|
1501
1481
|
return S && {
|
|
1502
1482
|
component: S,
|
|
1503
1483
|
rendererProps: {
|
|
1504
|
-
...
|
|
1505
|
-
...G ? {} :
|
|
1484
|
+
...Mi,
|
|
1485
|
+
...G ? {} : Pi
|
|
1506
1486
|
},
|
|
1507
1487
|
rendererEvents: {
|
|
1508
1488
|
supportsRequests: K,
|
|
@@ -1516,10 +1496,10 @@ const ue = {
|
|
|
1516
1496
|
if (le(s.definition))
|
|
1517
1497
|
return null;
|
|
1518
1498
|
const E = s.definition.query, S = E == null ? void 0 : E.time_range;
|
|
1519
|
-
if ((E == null ? void 0 : E.datasource)
|
|
1499
|
+
if (ai(E == null ? void 0 : E.datasource) && !((G = E.dimensions) != null && G.includes("time")))
|
|
1520
1500
|
return f.t("renderer.as_of_today");
|
|
1521
1501
|
if ((S == null ? void 0 : S.type) === "relative") {
|
|
1522
|
-
const K =
|
|
1502
|
+
const K = ji.get(Xi[S.time_range]);
|
|
1523
1503
|
return K ? K.display : (console.warn("Did not recognize the given relative time range:", S.time_range), S.time_range);
|
|
1524
1504
|
} else if ((S == null ? void 0 : S.type) === "absolute") {
|
|
1525
1505
|
const K = S.tz || "Etc/UTC";
|
|
@@ -1528,52 +1508,52 @@ const ue = {
|
|
|
1528
1508
|
return null;
|
|
1529
1509
|
}), Rt = w(() => te.value ? !1 : [
|
|
1530
1510
|
!!I.value,
|
|
1531
|
-
|
|
1511
|
+
bi.value,
|
|
1532
1512
|
!!ht.value,
|
|
1533
|
-
|
|
1513
|
+
wi.value,
|
|
1534
1514
|
s.showRefresh
|
|
1535
|
-
].some(Boolean)), kt = w(() => g.value ? ct(g.value.meta.granularity_ms) : void 0),
|
|
1536
|
-
if (le(s.definition) || !
|
|
1515
|
+
].some(Boolean)), kt = w(() => g.value ? ct(g.value.meta.granularity_ms) : void 0), Ci = w(() => ["timeseries_line", "timeseries_bar"].includes(v.value.type)), Tt = w(() => {
|
|
1516
|
+
if (le(s.definition) || !Ci.value || !s.queryReady || R.value)
|
|
1537
1517
|
return !1;
|
|
1538
1518
|
const E = s.definition.query.granularity;
|
|
1539
1519
|
return !E || !kt.value ? !1 : E !== kt.value;
|
|
1540
|
-
}),
|
|
1520
|
+
}), Ri = w(() => {
|
|
1541
1521
|
var G;
|
|
1542
1522
|
const E = ct(((G = g.value) == null ? void 0 : G.meta.granularity_ms) ?? 0) ?? "unknown", S = le(s.definition) ? "unknown" : s.definition.query.granularity ?? "unknown";
|
|
1543
1523
|
return f.t("query_aged_out_warning", {
|
|
1544
1524
|
currentGranularity: f.t(`granularities.${E}`),
|
|
1545
1525
|
savedGranularity: f.t(`granularities.${S}`)
|
|
1546
1526
|
});
|
|
1547
|
-
}),
|
|
1527
|
+
}), ki = w(() => {
|
|
1548
1528
|
const E = s.definition, S = [...s.context.filters, ...E.query.filters ?? []], G = "metrics" in E.query ? E.query.metrics : void 0, K = E.query.datasource ?? "api_usage";
|
|
1549
1529
|
return l.value({
|
|
1550
1530
|
datasource: K,
|
|
1551
1531
|
filters: S,
|
|
1552
1532
|
queryFields: G
|
|
1553
1533
|
});
|
|
1554
|
-
}),
|
|
1534
|
+
}), Ti = () => {
|
|
1555
1535
|
n("edit-tile", s.definition);
|
|
1556
|
-
},
|
|
1536
|
+
}, Si = () => {
|
|
1557
1537
|
n("duplicate-tile", s.definition);
|
|
1558
|
-
},
|
|
1538
|
+
}, Di = () => {
|
|
1559
1539
|
n("remove-tile", s.definition);
|
|
1560
|
-
},
|
|
1540
|
+
}, zi = (E) => {
|
|
1561
1541
|
g.value = E, R.value = !1, n("chart-data", E);
|
|
1562
|
-
},
|
|
1542
|
+
}, Ni = () => {
|
|
1563
1543
|
R.value = !1;
|
|
1564
|
-
},
|
|
1544
|
+
}, Li = (E) => {
|
|
1565
1545
|
R.value = E;
|
|
1566
|
-
},
|
|
1546
|
+
}, Ai = () => {
|
|
1567
1547
|
y.value = !1;
|
|
1568
1548
|
}, St = () => {
|
|
1569
1549
|
var G, K;
|
|
1570
1550
|
const E = (G = s.definition.query.datasource) == null ? void 0 : G.startsWith("goap");
|
|
1571
|
-
return ((K = u == null ? void 0 : u.staticConfig) == null ? void 0 : K.increaseCsvExportLimit) !== !1 && !E ? ut(s.definition.query, s.context,
|
|
1551
|
+
return ((K = u == null ? void 0 : u.staticConfig) == null ? void 0 : K.increaseCsvExportLimit) !== !1 && !E ? ut(s.definition.query, s.context, Zi) : g.value ? Promise.resolve(g.value) : new Promise((Ne) => {
|
|
1572
1552
|
const ye = Oe(g, (Ce) => {
|
|
1573
1553
|
Ce && (Ne(Ce), ye());
|
|
1574
1554
|
});
|
|
1575
1555
|
});
|
|
1576
|
-
},
|
|
1556
|
+
}, Oi = async () => {
|
|
1577
1557
|
y.value = !0, p.value = { status: "loading" };
|
|
1578
1558
|
try {
|
|
1579
1559
|
const E = await St();
|
|
@@ -1581,20 +1561,20 @@ const ue = {
|
|
|
1581
1561
|
} catch (E) {
|
|
1582
1562
|
p.value = { status: "error", error: E };
|
|
1583
1563
|
}
|
|
1584
|
-
},
|
|
1564
|
+
}, Hi = (E) => {
|
|
1585
1565
|
const S = {
|
|
1586
1566
|
tileId: s.tileId.toString(),
|
|
1587
1567
|
timeRange: E
|
|
1588
1568
|
};
|
|
1589
1569
|
n("tile-time-range-zoom", S);
|
|
1590
|
-
},
|
|
1570
|
+
}, Ii = (E) => {
|
|
1591
1571
|
const S = {
|
|
1592
1572
|
tileId: s.tileId.toString(),
|
|
1593
1573
|
bounds: E
|
|
1594
1574
|
};
|
|
1595
1575
|
n("tile-bounds-change", S);
|
|
1596
|
-
},
|
|
1597
|
-
const S =
|
|
1576
|
+
}, qi = (E) => {
|
|
1577
|
+
const S = ki.value, G = F(E, S);
|
|
1598
1578
|
N.value = V.value ? { href: P(G) } : void 0, z.value = H.value ? { href: Y(lt(E, S)) } : void 0;
|
|
1599
1579
|
};
|
|
1600
1580
|
return e({ getExportData: St }), (E, S) => {
|
|
@@ -1606,7 +1586,7 @@ const ue = {
|
|
|
1606
1586
|
}]),
|
|
1607
1587
|
"data-testid": `tile-${o.tileId}`
|
|
1608
1588
|
}, [
|
|
1609
|
-
Rt.value && !te.value ? (x(), B("div",
|
|
1589
|
+
Rt.value && !te.value ? (x(), B("div", cr, [
|
|
1610
1590
|
ge(G, {
|
|
1611
1591
|
class: "title-tooltip",
|
|
1612
1592
|
disabled: !T.value,
|
|
@@ -1622,30 +1602,30 @@ const ue = {
|
|
|
1622
1602
|
]),
|
|
1623
1603
|
_: 1
|
|
1624
1604
|
}, 8, ["disabled", "text"]),
|
|
1625
|
-
se("div",
|
|
1605
|
+
se("div", fr, [
|
|
1626
1606
|
ht.value ? (x(), O(K, {
|
|
1627
1607
|
key: 0,
|
|
1628
1608
|
"data-testid": "time-range-badge",
|
|
1629
|
-
tooltip: Tt.value ?
|
|
1609
|
+
tooltip: Tt.value ? Ri.value : void 0,
|
|
1630
1610
|
"tooltip-attributes": { maxWidth: "320px" }
|
|
1631
1611
|
}, ot({
|
|
1632
1612
|
default: M(() => [
|
|
1633
|
-
se("span",
|
|
1613
|
+
se("span", gr, J(ht.value), 1)
|
|
1634
1614
|
]),
|
|
1635
1615
|
_: 2
|
|
1636
1616
|
}, [
|
|
1637
1617
|
Tt.value ? {
|
|
1638
1618
|
name: "icon",
|
|
1639
1619
|
fn: M(() => [
|
|
1640
|
-
ge(C(
|
|
1641
|
-
size: `var(--kui-icon-size-20, ${C(
|
|
1620
|
+
ge(C(us), {
|
|
1621
|
+
size: `var(--kui-icon-size-20, ${C(ur)})`
|
|
1642
1622
|
}, null, 8, ["size"])
|
|
1643
1623
|
]),
|
|
1644
1624
|
key: "0"
|
|
1645
1625
|
} : void 0
|
|
1646
1626
|
]), 1032, ["tooltip"])) : X("", !0)
|
|
1647
1627
|
]),
|
|
1648
|
-
o.showRefresh ? (x(), B("div",
|
|
1628
|
+
o.showRefresh ? (x(), B("div", mr, [
|
|
1649
1629
|
ge(Ne, {
|
|
1650
1630
|
appearance: "secondary",
|
|
1651
1631
|
class: "refresh-button",
|
|
@@ -1656,15 +1636,15 @@ const ue = {
|
|
|
1656
1636
|
onClick: a
|
|
1657
1637
|
}, {
|
|
1658
1638
|
default: M(() => [
|
|
1659
|
-
R.value ? (x(), O(C(
|
|
1639
|
+
R.value ? (x(), O(C(hs), {
|
|
1660
1640
|
key: 0,
|
|
1661
1641
|
role: "button",
|
|
1662
|
-
size: `var(--kui-icon-size-60, ${C(
|
|
1642
|
+
size: `var(--kui-icon-size-60, ${C(Zt)})`,
|
|
1663
1643
|
tabindex: "0"
|
|
1664
|
-
}, null, 8, ["size"])) : (x(), O(C(
|
|
1644
|
+
}, null, 8, ["size"])) : (x(), O(C(ds), {
|
|
1665
1645
|
key: 1,
|
|
1666
1646
|
role: "button",
|
|
1667
|
-
size: `var(--kui-icon-size-60, ${C(
|
|
1647
|
+
size: `var(--kui-icon-size-60, ${C(Zt)})`,
|
|
1668
1648
|
tabindex: "0"
|
|
1669
1649
|
}, null, 8, ["size"]))
|
|
1670
1650
|
]),
|
|
@@ -1676,13 +1656,13 @@ const ue = {
|
|
|
1676
1656
|
class: "tile-actions",
|
|
1677
1657
|
"data-testid": `tile-actions-${o.tileId}`
|
|
1678
1658
|
}, [
|
|
1679
|
-
Ee.value && o.context.editable && !o.isFullscreen ? (x(), O(C(
|
|
1659
|
+
Ee.value && o.context.editable && !o.isFullscreen ? (x(), O(C(cs), {
|
|
1680
1660
|
key: 0,
|
|
1681
1661
|
class: "edit-icon",
|
|
1682
|
-
color: `var(--kui-color-text-neutral, ${C(
|
|
1662
|
+
color: `var(--kui-color-text-neutral, ${C(jt)})`,
|
|
1683
1663
|
"data-testid": `edit-tile-${o.tileId}`,
|
|
1684
|
-
size: `var(--kui-icon-size-40, ${C(
|
|
1685
|
-
onClick:
|
|
1664
|
+
size: `var(--kui-icon-size-40, ${C(Xt)})`,
|
|
1665
|
+
onClick: Ti
|
|
1686
1666
|
}, null, 8, ["color", "data-testid", "size"])) : X("", !0),
|
|
1687
1667
|
Ee.value && Qe.value && !o.isFullscreen ? (x(), O(Ce, {
|
|
1688
1668
|
key: 1,
|
|
@@ -1705,20 +1685,20 @@ const ue = {
|
|
|
1705
1685
|
key: 2,
|
|
1706
1686
|
class: "chart-export-button",
|
|
1707
1687
|
"data-testid": `chart-csv-export-${o.tileId}`,
|
|
1708
|
-
onClick:
|
|
1688
|
+
onClick: Oi
|
|
1709
1689
|
}, {
|
|
1710
1690
|
default: M(() => [
|
|
1711
1691
|
se("span", {
|
|
1712
1692
|
class: "chart-export-trigger",
|
|
1713
1693
|
"data-testid": `csv-export-button-${o.tileId}`
|
|
1714
|
-
}, J(C(f).t("csvExport.exportAsCsv")), 9,
|
|
1694
|
+
}, J(C(f).t("csvExport.exportAsCsv")), 9, yr)
|
|
1715
1695
|
]),
|
|
1716
1696
|
_: 1
|
|
1717
1697
|
}, 8, ["data-testid"])) : X("", !0),
|
|
1718
1698
|
o.context.editable ? (x(), O(ye, {
|
|
1719
1699
|
key: 3,
|
|
1720
1700
|
"data-testid": `duplicate-tile-${o.tileId}`,
|
|
1721
|
-
onClick:
|
|
1701
|
+
onClick: Si
|
|
1722
1702
|
}, {
|
|
1723
1703
|
default: M(() => [
|
|
1724
1704
|
mt(J(C(f).t("renderer.duplicateTile")), 1)
|
|
@@ -1728,50 +1708,50 @@ const ue = {
|
|
|
1728
1708
|
o.context.editable ? (x(), O(ye, {
|
|
1729
1709
|
key: 4,
|
|
1730
1710
|
"data-testid": `remove-tile-${o.tileId}`,
|
|
1731
|
-
onClick:
|
|
1711
|
+
onClick: Di
|
|
1732
1712
|
}, {
|
|
1733
1713
|
default: M(() => [
|
|
1734
|
-
se("span",
|
|
1714
|
+
se("span", vr, J(C(f).t("renderer.delete")), 1)
|
|
1735
1715
|
]),
|
|
1736
1716
|
_: 1
|
|
1737
1717
|
}, 8, ["data-testid"])) : X("", !0)
|
|
1738
1718
|
]),
|
|
1739
1719
|
default: M(() => [
|
|
1740
|
-
ge(C(
|
|
1720
|
+
ge(C(fs), {
|
|
1741
1721
|
class: "kebab-action-menu",
|
|
1742
|
-
color: `var(--kui-color-text-neutral, ${C(
|
|
1722
|
+
color: `var(--kui-color-text-neutral, ${C(jt)})`,
|
|
1743
1723
|
"data-testid": `kebab-action-menu-${o.tileId}`,
|
|
1744
|
-
size: `var(--kui-icon-size-40, ${C(
|
|
1724
|
+
size: `var(--kui-icon-size-40, ${C(Xt)})`
|
|
1745
1725
|
}, null, 8, ["color", "data-testid", "size"])
|
|
1746
1726
|
]),
|
|
1747
1727
|
_: 1
|
|
1748
1728
|
}, 8, ["data-testid"])) : X("", !0)
|
|
1749
|
-
], 8,
|
|
1729
|
+
], 8, pr)) : q.value ? (x(), B("div", {
|
|
1750
1730
|
key: 2,
|
|
1751
1731
|
class: "header-description",
|
|
1752
1732
|
"data-testid": `tile-description-${o.tileId}`
|
|
1753
|
-
}, J(q.value), 9,
|
|
1754
|
-
y.value ? (x(), O(C(
|
|
1733
|
+
}, J(q.value), 9, _r)) : X("", !0),
|
|
1734
|
+
y.value ? (x(), O(C(ss), {
|
|
1755
1735
|
key: 3,
|
|
1756
1736
|
"data-testid": `csv-export-modal-${o.tileId}`,
|
|
1757
1737
|
"export-state": p.value,
|
|
1758
1738
|
filename: Ke.value,
|
|
1759
|
-
onCloseModal:
|
|
1739
|
+
onCloseModal: Ai
|
|
1760
1740
|
}, null, 8, ["data-testid", "export-state", "filename"])) : X("", !0)
|
|
1761
1741
|
])) : X("", !0),
|
|
1762
1742
|
se("div", {
|
|
1763
1743
|
class: ze(["tile-content", `type-${o.tileType}-${v.value.type}`]),
|
|
1764
1744
|
"data-testid": `tile-content-${o.tileId}`
|
|
1765
1745
|
}, [
|
|
1766
|
-
xe.value ? (x(), O(
|
|
1767
|
-
onChartData:
|
|
1768
|
-
onQueryComplete:
|
|
1746
|
+
xe.value ? (x(), O(ni(xe.value.component), ii({ key: 0 }, xe.value.rendererProps, Yi(xi.value), {
|
|
1747
|
+
onChartData: zi,
|
|
1748
|
+
onQueryComplete: Ni
|
|
1769
1749
|
}), null, 16)) : X("", !0)
|
|
1770
|
-
], 10,
|
|
1771
|
-
], 10,
|
|
1750
|
+
], 10, br)
|
|
1751
|
+
], 10, dr);
|
|
1772
1752
|
};
|
|
1773
1753
|
}
|
|
1774
|
-
}),
|
|
1754
|
+
}), vi = /* @__PURE__ */ we(wr, [["__scopeId", "data-v-11e7c65e"]]), Er = (o, e) => {
|
|
1775
1755
|
let t = 0;
|
|
1776
1756
|
const i = /* @__PURE__ */ new Map();
|
|
1777
1757
|
e.forEach((r) => {
|
|
@@ -1782,7 +1762,7 @@ const ue = {
|
|
|
1782
1762
|
for (let r = 0; r < t; r++)
|
|
1783
1763
|
i.get(r) ? s.push("auto") : s.push(`${o}px`);
|
|
1784
1764
|
return s;
|
|
1785
|
-
},
|
|
1765
|
+
}, xr = /* @__PURE__ */ ee({
|
|
1786
1766
|
__name: "GridLayout",
|
|
1787
1767
|
props: {
|
|
1788
1768
|
tileHeight: {
|
|
@@ -1815,7 +1795,7 @@ const ue = {
|
|
|
1815
1795
|
}), Ge(() => {
|
|
1816
1796
|
t.value && s.unobserve(t.value);
|
|
1817
1797
|
});
|
|
1818
|
-
const r = w(() =>
|
|
1798
|
+
const r = w(() => Er(e.tileHeight, e.tiles).join(" ")), a = w(() => e.tiles.map((n, d) => ({
|
|
1819
1799
|
key: `tile-${d}`,
|
|
1820
1800
|
tile: n,
|
|
1821
1801
|
style: {
|
|
@@ -1830,7 +1810,7 @@ const ue = {
|
|
|
1830
1810
|
ref: t,
|
|
1831
1811
|
class: "kong-ui-public-grid-layout"
|
|
1832
1812
|
}, [
|
|
1833
|
-
(x(!0), B(pt, null,
|
|
1813
|
+
(x(!0), B(pt, null, oi(a.value, (u) => (x(), B("div", {
|
|
1834
1814
|
key: u.key,
|
|
1835
1815
|
class: ze(["grid-cell", {
|
|
1836
1816
|
"empty-cell": !u.tile
|
|
@@ -1844,8 +1824,8 @@ const ue = {
|
|
|
1844
1824
|
], 6))), 128))
|
|
1845
1825
|
], 512));
|
|
1846
1826
|
}
|
|
1847
|
-
}),
|
|
1848
|
-
function
|
|
1827
|
+
}), Cr = /* @__PURE__ */ we(xr, [["__scopeId", "data-v-0271a8b9"]]);
|
|
1828
|
+
function Rr(o, e, t, i, s) {
|
|
1849
1829
|
const r = (...a) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(o, a));
|
|
1850
1830
|
return r.prototype = e.prototype, r;
|
|
1851
1831
|
}
|
|
@@ -2690,7 +2670,7 @@ class fe {
|
|
|
2690
2670
|
function Je(o, e) {
|
|
2691
2671
|
o.touches.length > 1 || (o.cancelable && o.preventDefault(), c.simulateMouseEvent(o.changedTouches[0], e));
|
|
2692
2672
|
}
|
|
2693
|
-
function
|
|
2673
|
+
function _i(o, e) {
|
|
2694
2674
|
o.cancelable && o.preventDefault(), c.simulateMouseEvent(o, e);
|
|
2695
2675
|
}
|
|
2696
2676
|
function et(o) {
|
|
@@ -2709,12 +2689,12 @@ function it(o) {
|
|
|
2709
2689
|
function st(o) {
|
|
2710
2690
|
o.pointerType !== "mouse" && o.target.releasePointerCapture(o.pointerId);
|
|
2711
2691
|
}
|
|
2712
|
-
function
|
|
2713
|
-
k.dragElement && o.pointerType !== "mouse" &&
|
|
2692
|
+
function Jt(o) {
|
|
2693
|
+
k.dragElement && o.pointerType !== "mouse" && _i(o, "mouseenter");
|
|
2714
2694
|
}
|
|
2715
|
-
function
|
|
2695
|
+
function ei(o) {
|
|
2716
2696
|
k.dragElement && o.pointerType !== "mouse" && (fe.pointerLeaveTimeout = window.setTimeout(() => {
|
|
2717
|
-
delete fe.pointerLeaveTimeout,
|
|
2697
|
+
delete fe.pointerLeaveTimeout, _i(o, "mouseleave");
|
|
2718
2698
|
}, 10));
|
|
2719
2699
|
}
|
|
2720
2700
|
class at {
|
|
@@ -2932,7 +2912,7 @@ class qe extends xt {
|
|
|
2932
2912
|
}
|
|
2933
2913
|
}
|
|
2934
2914
|
qe._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
|
|
2935
|
-
const
|
|
2915
|
+
const kr = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
|
|
2936
2916
|
class Me extends xt {
|
|
2937
2917
|
constructor(e, t = {}) {
|
|
2938
2918
|
var r;
|
|
@@ -2970,7 +2950,7 @@ class Me extends xt {
|
|
|
2970
2950
|
/** @internal call when mouse goes down before a dragstart happens */
|
|
2971
2951
|
_mouseDown(e) {
|
|
2972
2952
|
if (!k.mouseHandled)
|
|
2973
|
-
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(
|
|
2953
|
+
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(kr) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete k.dragElement, delete k.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), de && (e.currentTarget.addEventListener("touchmove", tt), e.currentTarget.addEventListener("touchend", it)), e.preventDefault(), document.activeElement && document.activeElement.blur(), k.mouseHandled = !0), !0;
|
|
2974
2954
|
}
|
|
2975
2955
|
/** @internal method to call actual drag event */
|
|
2976
2956
|
_callDrag(e) {
|
|
@@ -3083,7 +3063,7 @@ class Me extends xt {
|
|
|
3083
3063
|
}
|
|
3084
3064
|
}
|
|
3085
3065
|
Me.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
|
|
3086
|
-
class
|
|
3066
|
+
class Tr extends xt {
|
|
3087
3067
|
constructor(e, t = {}) {
|
|
3088
3068
|
super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
|
|
3089
3069
|
}
|
|
@@ -3094,10 +3074,10 @@ class Cr extends xt {
|
|
|
3094
3074
|
super.off(e);
|
|
3095
3075
|
}
|
|
3096
3076
|
enable() {
|
|
3097
|
-
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), de && (this.el.addEventListener("pointerenter",
|
|
3077
|
+
this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), de && (this.el.addEventListener("pointerenter", Jt), this.el.addEventListener("pointerleave", ei)));
|
|
3098
3078
|
}
|
|
3099
3079
|
disable(e = !1) {
|
|
3100
|
-
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), de && (this.el.removeEventListener("pointerenter",
|
|
3080
|
+
this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), de && (this.el.removeEventListener("pointerenter", Jt), this.el.removeEventListener("pointerleave", ei)));
|
|
3101
3081
|
}
|
|
3102
3082
|
destroy() {
|
|
3103
3083
|
this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
|
|
@@ -3175,13 +3155,13 @@ class Ct {
|
|
|
3175
3155
|
return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
|
|
3176
3156
|
}
|
|
3177
3157
|
setupDroppable(e) {
|
|
3178
|
-
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new
|
|
3158
|
+
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Tr(this.el, e), this;
|
|
3179
3159
|
}
|
|
3180
3160
|
cleanDroppable() {
|
|
3181
3161
|
return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
|
|
3182
3162
|
}
|
|
3183
3163
|
}
|
|
3184
|
-
class
|
|
3164
|
+
class Sr {
|
|
3185
3165
|
resizable(e, t, i, s) {
|
|
3186
3166
|
return this._getDDElements(e, t).forEach((r) => {
|
|
3187
3167
|
if (t === "disable" || t === "enable")
|
|
@@ -3270,7 +3250,7 @@ class Rr {
|
|
|
3270
3250
|
* Copyright (c) 2021-2024 Alain Dumesny
|
|
3271
3251
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
3272
3252
|
*/
|
|
3273
|
-
const j = new
|
|
3253
|
+
const j = new Sr();
|
|
3274
3254
|
class b {
|
|
3275
3255
|
/**
|
|
3276
3256
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
@@ -4495,7 +4475,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4495
4475
|
}
|
|
4496
4476
|
// legacy method removed
|
|
4497
4477
|
commit() {
|
|
4498
|
-
return
|
|
4478
|
+
return Rr(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
|
|
4499
4479
|
}
|
|
4500
4480
|
}
|
|
4501
4481
|
b.renderCB = (o, e) => {
|
|
@@ -4505,7 +4485,7 @@ b.resizeToContentParent = ".grid-stack-item-content";
|
|
|
4505
4485
|
b.Utils = c;
|
|
4506
4486
|
b.Engine = ce;
|
|
4507
4487
|
b.GDRev = "11.5.1";
|
|
4508
|
-
const
|
|
4488
|
+
const Dr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], zr = { class: "grid-stack-item-content" }, Nr = /* @__PURE__ */ ee({
|
|
4509
4489
|
__name: "DraggableGridLayout",
|
|
4510
4490
|
props: {
|
|
4511
4491
|
tiles: {},
|
|
@@ -4564,7 +4544,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4564
4544
|
h: m.layout.size.rows
|
|
4565
4545
|
});
|
|
4566
4546
|
}
|
|
4567
|
-
}),
|
|
4547
|
+
}), ti(() => {
|
|
4568
4548
|
i.tiles.forEach((g) => {
|
|
4569
4549
|
a.value.set(`${g.id}`, g);
|
|
4570
4550
|
});
|
|
@@ -4573,7 +4553,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4573
4553
|
ref: r,
|
|
4574
4554
|
class: "grid-stack"
|
|
4575
4555
|
}, [
|
|
4576
|
-
(x(!0), B(pt, null,
|
|
4556
|
+
(x(!0), B(pt, null, oi(i.tiles, (y) => (x(), B("div", {
|
|
4577
4557
|
key: y.id,
|
|
4578
4558
|
class: "grid-stack-item",
|
|
4579
4559
|
"data-id": `${y.id}`,
|
|
@@ -4584,13 +4564,13 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4584
4564
|
"gs-x": y.layout.position.col,
|
|
4585
4565
|
"gs-y": y.layout.position.row
|
|
4586
4566
|
}, [
|
|
4587
|
-
se("div",
|
|
4567
|
+
se("div", zr, [
|
|
4588
4568
|
He(g.$slots, "tile", { tile: y }, void 0, !0)
|
|
4589
4569
|
])
|
|
4590
|
-
], 8,
|
|
4570
|
+
], 8, Dr))), 128))
|
|
4591
4571
|
], 512));
|
|
4592
4572
|
}
|
|
4593
|
-
}),
|
|
4573
|
+
}), Lr = /* @__PURE__ */ we(Nr, [["__scopeId", "data-v-1fdec94c"]]), Ar = (o) => {
|
|
4594
4574
|
const e = {
|
|
4595
4575
|
...o.meta,
|
|
4596
4576
|
chart: { ...o.meta.chart }
|
|
@@ -4607,13 +4587,13 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4607
4587
|
size: o.layout.size
|
|
4608
4588
|
}
|
|
4609
4589
|
};
|
|
4610
|
-
},
|
|
4590
|
+
}, Or = {
|
|
4611
4591
|
key: 0,
|
|
4612
4592
|
class: "fullscreen-header"
|
|
4613
|
-
},
|
|
4593
|
+
}, Hr = {
|
|
4614
4594
|
key: 0,
|
|
4615
4595
|
class: "tile-container slottable-tile"
|
|
4616
|
-
},
|
|
4596
|
+
}, Ir = /* @__PURE__ */ ee({
|
|
4617
4597
|
__name: "DashboardRenderer",
|
|
4618
4598
|
props: /* @__PURE__ */ Ze({
|
|
4619
4599
|
context: {},
|
|
@@ -4627,7 +4607,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4627
4607
|
yt((z) => ({
|
|
4628
4608
|
v39442668: h.value
|
|
4629
4609
|
}));
|
|
4630
|
-
const i = t, s =
|
|
4610
|
+
const i = t, s = ri(o, "modelValue"), { i18n: r } = ue.useI18n(), a = A(0), n = A(null), d = A(), u = A(), h = A("scale(1)"), l = me(_e);
|
|
4631
4611
|
l || (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")), ue.useRequestQueue();
|
|
4632
4612
|
const f = (z, N) => {
|
|
4633
4613
|
const F = z.layout.position.row - N.layout.position.row;
|
|
@@ -4637,7 +4617,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4637
4617
|
let N = z.definition;
|
|
4638
4618
|
const F = z.type ?? "chart", P = N.chart;
|
|
4639
4619
|
if (F === "chart" && "description" in P) {
|
|
4640
|
-
const lt = N, ut = (Y = P.description) == null ? void 0 : Y.replace(
|
|
4620
|
+
const lt = N, ut = (Y = P.description) == null ? void 0 : Y.replace(Ds, () => {
|
|
4641
4621
|
const { timeSpec: Ke } = H.value, Ee = `renderer.trendRange.${Ke.type === "absolute" ? "custom" : Ke.time_range}`;
|
|
4642
4622
|
return r.te(Ee) ? r.t(Ee) : "";
|
|
4643
4623
|
});
|
|
@@ -4667,7 +4647,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4667
4647
|
return m(N) ? N.id : void 0;
|
|
4668
4648
|
}, R = (z) => {
|
|
4669
4649
|
try {
|
|
4670
|
-
const N =
|
|
4650
|
+
const N = Ar(z);
|
|
4671
4651
|
s.value.tiles.push(JSON.parse(JSON.stringify(N)));
|
|
4672
4652
|
} catch (N) {
|
|
4673
4653
|
console.warn(N);
|
|
@@ -4715,10 +4695,10 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4715
4695
|
ref: u,
|
|
4716
4696
|
class: "layout"
|
|
4717
4697
|
}, [
|
|
4718
|
-
C(l) && W.value ? (x(), B("div",
|
|
4698
|
+
C(l) && W.value ? (x(), B("div", Or, [
|
|
4719
4699
|
He(z.$slots, "fullscreenHeader", {}, void 0, !0)
|
|
4720
4700
|
])) : X("", !0),
|
|
4721
|
-
C(l) ? (x(), O(
|
|
4701
|
+
C(l) ? (x(), O(ni(C(H).editable && !W.value ? Lr : Cr), {
|
|
4722
4702
|
key: 2,
|
|
4723
4703
|
ref_key: "gridLayoutRef",
|
|
4724
4704
|
ref: n,
|
|
@@ -4728,16 +4708,16 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4728
4708
|
onUpdateTiles: q
|
|
4729
4709
|
}, {
|
|
4730
4710
|
tile: M(({ tile: P }) => [
|
|
4731
|
-
y(P) ? (x(), B("div",
|
|
4711
|
+
y(P) ? (x(), B("div", Hr, [
|
|
4732
4712
|
He(z.$slots, T(P), {}, void 0, !0)
|
|
4733
|
-
])) : (x(), O(
|
|
4713
|
+
])) : (x(), O(vi, {
|
|
4734
4714
|
key: W.value ? `${P.id}-tile` : `${P.id}-tile-fullscreen`,
|
|
4735
4715
|
"refresh-counter": a.value,
|
|
4736
4716
|
"onUpdate:refreshCounter": N[0] || (N[0] = (Y) => a.value = Y),
|
|
4737
4717
|
class: "tile-container",
|
|
4738
4718
|
context: C(H),
|
|
4739
4719
|
definition: P.meta,
|
|
4740
|
-
height: P.layout.size.rows * (s.value.tile_height || C(We)) + parseInt(C(
|
|
4720
|
+
height: P.layout.size.rows * (s.value.tile_height || C(We)) + parseInt(C(yi), 10),
|
|
4741
4721
|
"hide-actions": !C(H).showTileActions,
|
|
4742
4722
|
"hide-zoom-actions": !C(H).showTileZoomActions,
|
|
4743
4723
|
"is-fullscreen": W.value,
|
|
@@ -4764,7 +4744,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4764
4744
|
], 34);
|
|
4765
4745
|
};
|
|
4766
4746
|
}
|
|
4767
|
-
}),
|
|
4747
|
+
}), Xr = /* @__PURE__ */ we(Ir, [["__scopeId", "data-v-33404a87"]]), Zr = /* @__PURE__ */ ee({
|
|
4768
4748
|
__name: "DashboardTilePreview",
|
|
4769
4749
|
props: {
|
|
4770
4750
|
context: {},
|
|
@@ -4825,7 +4805,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4825
4805
|
se("p", null, J(C(h).t("renderer.not_configured.description")), 1)
|
|
4826
4806
|
]),
|
|
4827
4807
|
_: 1
|
|
4828
|
-
})) : (x(), O(
|
|
4808
|
+
})) : (x(), O(vi, {
|
|
4829
4809
|
key: 1,
|
|
4830
4810
|
ref: "dashboard-tile",
|
|
4831
4811
|
"refresh-counter": T.value,
|
|
@@ -4847,7 +4827,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4847
4827
|
], 512);
|
|
4848
4828
|
};
|
|
4849
4829
|
}
|
|
4850
|
-
}),
|
|
4830
|
+
}), qr = (o) => {
|
|
4851
4831
|
var t;
|
|
4852
4832
|
const e = (t = o.definition) == null ? void 0 : t.query;
|
|
4853
4833
|
if (!e)
|
|
@@ -4857,7 +4837,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4857
4837
|
return;
|
|
4858
4838
|
}
|
|
4859
4839
|
return o;
|
|
4860
|
-
},
|
|
4840
|
+
}, Mr = (o) => {
|
|
4861
4841
|
var i;
|
|
4862
4842
|
if (le(o.definition))
|
|
4863
4843
|
return o;
|
|
@@ -4875,7 +4855,7 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4875
4855
|
query: t
|
|
4876
4856
|
}
|
|
4877
4857
|
};
|
|
4878
|
-
},
|
|
4858
|
+
}, Pr = (o, e = bt) => {
|
|
4879
4859
|
var a, n, d, u, h;
|
|
4880
4860
|
if (!o.length)
|
|
4881
4861
|
return [];
|
|
@@ -4898,33 +4878,33 @@ const kr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Tr = { cl
|
|
|
4898
4878
|
r.push(p), i += f, s = Math.max(s, g);
|
|
4899
4879
|
}
|
|
4900
4880
|
return r;
|
|
4901
|
-
},
|
|
4881
|
+
}, Jr = (o, e) => {
|
|
4902
4882
|
if (e) {
|
|
4903
|
-
const s = o.tiles.map(
|
|
4883
|
+
const s = o.tiles.map(Mr);
|
|
4904
4884
|
return {
|
|
4905
4885
|
...o,
|
|
4906
4886
|
tiles: s
|
|
4907
4887
|
};
|
|
4908
4888
|
}
|
|
4909
|
-
const t = o.tiles.map(
|
|
4889
|
+
const t = o.tiles.map(qr).filter((s) => s !== void 0), i = Pr(t, o.columns);
|
|
4910
4890
|
return {
|
|
4911
4891
|
...o,
|
|
4912
4892
|
tiles: i
|
|
4913
4893
|
};
|
|
4914
4894
|
};
|
|
4915
4895
|
export {
|
|
4916
|
-
|
|
4896
|
+
Ss as C,
|
|
4917
4897
|
bt as D,
|
|
4918
4898
|
Mt as E,
|
|
4919
|
-
|
|
4920
|
-
|
|
4899
|
+
Ls as F,
|
|
4900
|
+
Cr as G,
|
|
4921
4901
|
_e as I,
|
|
4922
|
-
|
|
4902
|
+
Ds as T,
|
|
4923
4903
|
wt as _,
|
|
4924
4904
|
We as a,
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4905
|
+
zs as b,
|
|
4906
|
+
Xr as c,
|
|
4907
|
+
Zr as d,
|
|
4908
|
+
Ns as e,
|
|
4909
|
+
Jr as f
|
|
4930
4910
|
};
|