@kong-ui-public/dashboard-renderer 8.12.0 → 8.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{GeoMapRenderer-RHTs5klO.js → GeoMapRenderer-BLA2uZXF.js} +1 -1
- package/dist/dashboard-renderer.es.js +1 -1
- package/dist/dashboard-renderer.umd.js +2 -2
- package/dist/{index-zjfp5EyV.js → index-Dd_Bn3Eb.js} +151 -149
- package/dist/style.css +1 -1
- package/dist/types/components/DashboardRenderer.vue.d.ts.map +1 -1
- package/package.json +17 -17
|
@@ -4,16 +4,16 @@ var Nt = (a) => {
|
|
|
4
4
|
};
|
|
5
5
|
var qi = (a, e, t) => e in a ? Mi(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
|
|
6
6
|
var Lt = (a, e, t) => qi(a, typeof e != "symbol" ? e + "" : e, t), dt = (a, e, t) => e.has(a) || Nt("Cannot " + t);
|
|
7
|
-
var _ = (a, e, t) => (dt(a, e, "read from private field"), t ? t.call(a) : e.get(a)), U = (a, e, t) => e.has(a) ? Nt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t),
|
|
7
|
+
var _ = (a, e, t) => (dt(a, e, "read from private field"), t ? t.call(a) : e.get(a)), U = (a, e, t) => e.has(a) ? Nt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t), $ = (a, e, t, i) => (dt(a, e, "write to private field"), i ? i.call(a, t) : e.set(a, t), t), K = (a, e, t) => (dt(a, e, "access private method"), t);
|
|
8
8
|
var ze = (a, e, t, i) => ({
|
|
9
9
|
set _(s) {
|
|
10
|
-
|
|
10
|
+
$(a, e, s, t);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
13
|
return _(a, e, i);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { ref as A, watchEffect as Xt, inject as me, provide as Pi, toRaw as
|
|
16
|
+
import { ref as A, watchEffect as Xt, inject as me, provide as Pi, toRaw as $i, computed as v, isRef as Bi, isReactive as Fi, toRef as Ye, hasInjectionContext as At, onMounted as rt, watch as Ne, onUnmounted as Pe, getCurrentInstance as Gi, defineComponent as J, resolveComponent as le, unref as E, openBlock as R, createBlock as L, createSlots as nt, withCtx as M, createElementVNode as ee, toDisplayString as te, renderSlot as Le, createCommentVNode as X, normalizeStyle as je, normalizeClass as Se, createVNode as ge, mergeProps as Zt, createTextVNode as ot, createElementBlock as G, normalizeProps as Ui, guardReactiveProps as Wi, defineAsyncComponent as Jt, Fragment as pt, useCssVars as yt, useModel as ei, readonly as ct, nextTick as vt, resolveDynamicComponent as ti, toHandlers as Ki, mergeModels as Xe, renderList as ii, useTemplateRef as Ot } from "vue";
|
|
17
17
|
import { msToGranularity as ft, TimePeriods as Qi, TIMEFRAME_LOOKUP as Vi, formatTime as Ht, EXPORT_RECORD_LIMIT as Yi } from "@kong-ui-public/analytics-utilities";
|
|
18
18
|
import { handleQueryError as ji, SimpleChart as Xi, AnalyticsChart as Zi, TopNTable as Ji, CsvExportModal as es } from "@kong-ui-public/analytics-chart";
|
|
19
19
|
import ts from "swrv";
|
|
@@ -133,7 +133,7 @@ function Cs() {
|
|
|
133
133
|
// Translation component <i18n-t>
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const $e = 170, bt = 6, ye = "analytics-query-provider", It = "{entity-id}", Rs = "{cp-id}", ks = "{timeframe}", Ts = 30 * 1e3, Ss = 3e5, Ds = 36e5;
|
|
137
137
|
function zs() {
|
|
138
138
|
const a = me(ye);
|
|
139
139
|
return {
|
|
@@ -183,9 +183,9 @@ var ri = { exports: {} };
|
|
|
183
183
|
}, n.prototype.emit = function(l, h, u, f, g, p) {
|
|
184
184
|
var y = t ? t + l : l;
|
|
185
185
|
if (!this._events[y]) return !1;
|
|
186
|
-
var m = this._events[y],
|
|
186
|
+
var m = this._events[y], T = arguments.length, k, w;
|
|
187
187
|
if (m.fn) {
|
|
188
|
-
switch (m.once && this.removeListener(l, m.fn, void 0, !0),
|
|
188
|
+
switch (m.once && this.removeListener(l, m.fn, void 0, !0), T) {
|
|
189
189
|
case 1:
|
|
190
190
|
return m.fn.call(m.context), !0;
|
|
191
191
|
case 2:
|
|
@@ -199,13 +199,13 @@ var ri = { exports: {} };
|
|
|
199
199
|
case 6:
|
|
200
200
|
return m.fn.call(m.context, h, u, f, g, p), !0;
|
|
201
201
|
}
|
|
202
|
-
for (w = 1,
|
|
203
|
-
|
|
204
|
-
m.fn.apply(m.context,
|
|
202
|
+
for (w = 1, k = new Array(T - 1); w < T; w++)
|
|
203
|
+
k[w - 1] = arguments[w];
|
|
204
|
+
m.fn.apply(m.context, k);
|
|
205
205
|
} else {
|
|
206
206
|
var O = m.length, I;
|
|
207
207
|
for (w = 0; w < O; w++)
|
|
208
|
-
switch (m[w].once && this.removeListener(l, m[w].fn, void 0, !0),
|
|
208
|
+
switch (m[w].once && this.removeListener(l, m[w].fn, void 0, !0), T) {
|
|
209
209
|
case 1:
|
|
210
210
|
m[w].fn.call(m[w].context);
|
|
211
211
|
break;
|
|
@@ -219,9 +219,9 @@ var ri = { exports: {} };
|
|
|
219
219
|
m[w].fn.call(m[w].context, h, u, f);
|
|
220
220
|
break;
|
|
221
221
|
default:
|
|
222
|
-
if (!
|
|
223
|
-
|
|
224
|
-
m[w].fn.apply(m[w].context,
|
|
222
|
+
if (!k) for (I = 1, k = new Array(T - 1); I < T; I++)
|
|
223
|
+
k[I - 1] = arguments[I];
|
|
224
|
+
m[w].fn.apply(m[w].context, k);
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
return !0;
|
|
@@ -238,7 +238,7 @@ var ri = { exports: {} };
|
|
|
238
238
|
if (p.fn)
|
|
239
239
|
p.fn === h && (!f || p.once) && (!u || p.context === u) && o(this, g);
|
|
240
240
|
else {
|
|
241
|
-
for (var y = 0, m = [],
|
|
241
|
+
for (var y = 0, m = [], T = p.length; y < T; y++)
|
|
242
242
|
(p[y].fn !== h || f && !p[y].once || u && p[y].context !== u) && m.push(p[y]);
|
|
243
243
|
m.length ? this._events[g] = m.length === 1 ? m[0] : m : o(this, g);
|
|
244
244
|
}
|
|
@@ -360,7 +360,7 @@ class Ms {
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
re = new WeakMap();
|
|
363
|
-
var xe, Ce, ve, He, Re, Ie, ne,
|
|
363
|
+
var xe, Ce, ve, He, Re, Ie, ne, ke, Z, Me, oe, Te, pe, qe, st, N, oi, ai, li, ui, hi, Ke, gt, mt, Qe, di, Ve;
|
|
364
364
|
class qs extends As {
|
|
365
365
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
366
366
|
constructor(t) {
|
|
@@ -374,12 +374,12 @@ class qs extends As {
|
|
|
374
374
|
U(this, Re);
|
|
375
375
|
U(this, Ie, 0);
|
|
376
376
|
U(this, ne);
|
|
377
|
-
U(this,
|
|
377
|
+
U(this, ke);
|
|
378
378
|
U(this, Z);
|
|
379
379
|
U(this, Me);
|
|
380
380
|
U(this, oe, 0);
|
|
381
381
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
382
|
-
U(this,
|
|
382
|
+
U(this, Te);
|
|
383
383
|
U(this, pe);
|
|
384
384
|
U(this, qe);
|
|
385
385
|
// Use to assign a unique identifier to a promise function, if not explicitly specified
|
|
@@ -402,15 +402,15 @@ class qs extends As {
|
|
|
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})`);
|
|
403
403
|
if (t.interval === void 0 || !(Number.isFinite(t.interval) && t.interval >= 0))
|
|
404
404
|
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s = t.interval) == null ? void 0 : s.toString()) ?? ""}\` (${typeof t.interval})`);
|
|
405
|
-
|
|
405
|
+
$(this, xe, t.carryoverConcurrencyCount), $(this, Ce, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), $(this, He, t.intervalCap), $(this, Re, t.interval), $(this, Z, new t.queueClass()), $(this, Me, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, $(this, qe, t.throwOnTimeout === !0), $(this, pe, t.autoStart === !1);
|
|
406
406
|
}
|
|
407
407
|
get concurrency() {
|
|
408
|
-
return _(this,
|
|
408
|
+
return _(this, Te);
|
|
409
409
|
}
|
|
410
410
|
set concurrency(t) {
|
|
411
411
|
if (!(typeof t == "number" && t >= 1))
|
|
412
412
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
|
|
413
|
-
|
|
413
|
+
$(this, Te, t), K(this, N, Qe).call(this);
|
|
414
414
|
}
|
|
415
415
|
/**
|
|
416
416
|
Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
|
|
@@ -485,19 +485,19 @@ class qs extends As {
|
|
|
485
485
|
Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
|
|
486
486
|
*/
|
|
487
487
|
start() {
|
|
488
|
-
return _(this, pe) ? (
|
|
488
|
+
return _(this, pe) ? ($(this, pe, !1), K(this, N, Qe).call(this), this) : this;
|
|
489
489
|
}
|
|
490
490
|
/**
|
|
491
491
|
Put queue execution on hold.
|
|
492
492
|
*/
|
|
493
493
|
pause() {
|
|
494
|
-
|
|
494
|
+
$(this, pe, !0);
|
|
495
495
|
}
|
|
496
496
|
/**
|
|
497
497
|
Clear the queue.
|
|
498
498
|
*/
|
|
499
499
|
clear() {
|
|
500
|
-
|
|
500
|
+
$(this, Z, new (_(this, Me))());
|
|
501
501
|
}
|
|
502
502
|
/**
|
|
503
503
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -552,29 +552,29 @@ class qs extends As {
|
|
|
552
552
|
return _(this, pe);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
xe = new WeakMap(), Ce = new WeakMap(), ve = new WeakMap(), He = new WeakMap(), Re = new WeakMap(), Ie = new WeakMap(), ne = new WeakMap(),
|
|
555
|
+
xe = new WeakMap(), Ce = new WeakMap(), ve = new WeakMap(), He = new WeakMap(), Re = new WeakMap(), Ie = new WeakMap(), ne = new WeakMap(), ke = new WeakMap(), Z = new WeakMap(), Me = new WeakMap(), oe = new WeakMap(), Te = new WeakMap(), pe = new WeakMap(), qe = new WeakMap(), st = new WeakMap(), N = new WeakSet(), oi = function() {
|
|
556
556
|
return _(this, Ce) || _(this, ve) < _(this, He);
|
|
557
557
|
}, ai = function() {
|
|
558
|
-
return _(this, oe) < _(this,
|
|
558
|
+
return _(this, oe) < _(this, Te);
|
|
559
559
|
}, li = function() {
|
|
560
560
|
ze(this, oe)._--, K(this, N, Ke).call(this), this.emit("next");
|
|
561
561
|
}, ui = function() {
|
|
562
|
-
K(this, N, mt).call(this), K(this, N, gt).call(this),
|
|
562
|
+
K(this, N, mt).call(this), K(this, N, gt).call(this), $(this, ke, void 0);
|
|
563
563
|
}, hi = function() {
|
|
564
564
|
const t = Date.now();
|
|
565
565
|
if (_(this, ne) === void 0) {
|
|
566
566
|
const i = _(this, Ie) - t;
|
|
567
567
|
if (i < 0)
|
|
568
|
-
|
|
568
|
+
$(this, ve, _(this, xe) ? _(this, oe) : 0);
|
|
569
569
|
else
|
|
570
|
-
return _(this,
|
|
570
|
+
return _(this, ke) === void 0 && $(this, ke, setTimeout(() => {
|
|
571
571
|
K(this, N, ui).call(this);
|
|
572
572
|
}, i)), !0;
|
|
573
573
|
}
|
|
574
574
|
return !1;
|
|
575
575
|
}, Ke = function() {
|
|
576
576
|
if (_(this, Z).size === 0)
|
|
577
|
-
return _(this, ne) && clearInterval(_(this, ne)),
|
|
577
|
+
return _(this, ne) && clearInterval(_(this, ne)), $(this, ne, void 0), this.emit("empty"), _(this, oe) === 0 && this.emit("idle"), !1;
|
|
578
578
|
if (!_(this, pe)) {
|
|
579
579
|
const t = !_(this, N, hi);
|
|
580
580
|
if (_(this, N, oi) && _(this, N, ai)) {
|
|
@@ -584,11 +584,11 @@ xe = new WeakMap(), Ce = new WeakMap(), ve = new WeakMap(), He = new WeakMap(),
|
|
|
584
584
|
}
|
|
585
585
|
return !1;
|
|
586
586
|
}, gt = function() {
|
|
587
|
-
_(this, Ce) || _(this, ne) !== void 0 || (
|
|
587
|
+
_(this, Ce) || _(this, ne) !== void 0 || ($(this, ne, setInterval(() => {
|
|
588
588
|
K(this, N, mt).call(this);
|
|
589
|
-
}, _(this, Re))),
|
|
589
|
+
}, _(this, Re))), $(this, Ie, Date.now() + _(this, Re)));
|
|
590
590
|
}, mt = function() {
|
|
591
|
-
_(this, ve) === 0 && _(this, oe) === 0 && _(this, ne) && (clearInterval(_(this, ne)),
|
|
591
|
+
_(this, ve) === 0 && _(this, oe) === 0 && _(this, ne) && (clearInterval(_(this, ne)), $(this, ne, void 0)), $(this, ve, _(this, xe) ? _(this, oe) : 0), K(this, N, Qe).call(this);
|
|
592
592
|
}, /**
|
|
593
593
|
Executes all queued functions until it reaches the limit.
|
|
594
594
|
*/
|
|
@@ -634,23 +634,23 @@ const Ps = () => {
|
|
|
634
634
|
* (c) 2025 Eduardo San Martin Morote
|
|
635
635
|
* @license MIT
|
|
636
636
|
*/
|
|
637
|
-
const
|
|
637
|
+
const $s = typeof window < "u";
|
|
638
638
|
let Pt;
|
|
639
639
|
process.env.NODE_ENV;
|
|
640
|
-
const
|
|
640
|
+
const $t = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
641
641
|
/* istanbul ignore next */
|
|
642
642
|
Symbol()
|
|
643
643
|
);
|
|
644
|
-
var
|
|
644
|
+
var Bt;
|
|
645
645
|
(function(a) {
|
|
646
646
|
a.direct = "direct", a.patchObject = "patch object", a.patchFunction = "patch function";
|
|
647
|
-
})(
|
|
647
|
+
})(Bt || (Bt = {}));
|
|
648
648
|
process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
649
649
|
/* istanbul ignore next */
|
|
650
650
|
Symbol()
|
|
651
651
|
);
|
|
652
652
|
function wt(a) {
|
|
653
|
-
const e =
|
|
653
|
+
const e = $i(a), t = {};
|
|
654
654
|
for (const i in e) {
|
|
655
655
|
const s = e[i];
|
|
656
656
|
s.effect ? t[i] = // ...
|
|
@@ -659,12 +659,12 @@ function wt(a) {
|
|
|
659
659
|
set(r) {
|
|
660
660
|
a[i] = r;
|
|
661
661
|
}
|
|
662
|
-
}) : (
|
|
662
|
+
}) : (Bi(s) || Fi(s)) && (t[i] = // ---
|
|
663
663
|
Ye(a, i));
|
|
664
664
|
}
|
|
665
665
|
return t;
|
|
666
666
|
}
|
|
667
|
-
const
|
|
667
|
+
const Bs = [
|
|
668
668
|
"basic",
|
|
669
669
|
"api_usage",
|
|
670
670
|
"llm_usage",
|
|
@@ -686,7 +686,7 @@ function Fs({
|
|
|
686
686
|
const f = v(() => d.analytics && d.percentiles), g = v(() => {
|
|
687
687
|
const z = t.value.chart.type;
|
|
688
688
|
return ["golden_signals", "gauge"].includes(z) ? !1 : z === "top_n" ? e.value.editable || e.value.showTileActions : !0;
|
|
689
|
-
}), p = v(() => r.value && t.value.query && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "platform" && f.value && !u.value), y = v(() => s.value && t.value.query &&
|
|
689
|
+
}), p = v(() => r.value && t.value.query && t.value.query.datasource !== "llm_usage" && t.value.query.datasource !== "platform" && f.value && !u.value), y = v(() => s.value && t.value.query && Bs.includes(t.value.query.datasource) && f.value && !u.value), m = v(() => i.value ? ft(i.value.meta.granularity_ms) : void 0), T = v(() => {
|
|
690
690
|
var he;
|
|
691
691
|
const z = [...e.value.filters, ...t.value.query.filters ?? []], q = t.value.query.metrics, W = ((he = t.value.query) == null ? void 0 : he.datasource) ?? "api_usage";
|
|
692
692
|
return h.value({
|
|
@@ -694,22 +694,22 @@ function Fs({
|
|
|
694
694
|
filters: z,
|
|
695
695
|
metrics: q
|
|
696
696
|
});
|
|
697
|
-
}),
|
|
697
|
+
}), k = v(() => {
|
|
698
698
|
if (!y.value || !g.value)
|
|
699
699
|
return "";
|
|
700
|
-
const z =
|
|
700
|
+
const z = T.value, q = t.value.query.time_range || e.value.timeSpec, W = Ee(q, z);
|
|
701
701
|
return V(W);
|
|
702
702
|
}), w = v(() => {
|
|
703
703
|
if (!p.value || !g.value)
|
|
704
704
|
return "";
|
|
705
|
-
const z =
|
|
705
|
+
const z = T.value, q = I(
|
|
706
706
|
t.value.query.time_range || e.value.timeSpec,
|
|
707
707
|
z
|
|
708
708
|
);
|
|
709
709
|
return O(q);
|
|
710
710
|
}), O = (z) => p.value ? `${r.value}?q=${JSON.stringify(z)}` : "", I = (z, q) => {
|
|
711
|
-
var D, H,
|
|
712
|
-
const W = (H = (D = i.value) == null ? void 0 : D.meta) != null && H.start ? new Date(i.value.meta.start) : void 0, he = (P = (
|
|
711
|
+
var D, H, B, P;
|
|
712
|
+
const W = (H = (D = i.value) == null ? void 0 : D.meta) != null && H.start ? new Date(i.value.meta.start) : void 0, he = (P = (B = i.value) == null ? void 0 : B.meta) != null && P.end ? new Date(i.value.meta.end) : void 0;
|
|
713
713
|
return {
|
|
714
714
|
filter: q,
|
|
715
715
|
timeframe: {
|
|
@@ -743,7 +743,7 @@ function Fs({
|
|
|
743
743
|
return Ne([p, y], ([z, q]) => {
|
|
744
744
|
z && (o.value = { href: "" }), q && (n.value = { href: "" });
|
|
745
745
|
}), {
|
|
746
|
-
exploreLinkKebabMenu:
|
|
746
|
+
exploreLinkKebabMenu: k,
|
|
747
747
|
requestsLinkKebabMenu: w,
|
|
748
748
|
canShowKebabMenu: g,
|
|
749
749
|
canGenerateRequestsLink: p,
|
|
@@ -809,16 +809,16 @@ function Us({
|
|
|
809
809
|
var p, y, m;
|
|
810
810
|
let { tz: d, refreshInterval: l, editable: h, showTileActions: u } = a.value;
|
|
811
811
|
const f = [...a.value.filters ?? [], ...e.value];
|
|
812
|
-
if (d || (d = new Intl.DateTimeFormat().resolvedOptions().timeZone), l === void 0 && (l =
|
|
813
|
-
let
|
|
812
|
+
if (d || (d = new Intl.DateTimeFormat().resolvedOptions().timeZone), l === void 0 && (l = Ts), t.value) {
|
|
813
|
+
let T = !1;
|
|
814
814
|
if (r.value.type === "relative")
|
|
815
|
-
|
|
815
|
+
T = ["15m", "1h", "6h", "12h", "24h"].includes(r.value.time_range);
|
|
816
816
|
else {
|
|
817
817
|
const O = r.value.start.getTime(), I = r.value.end.getTime();
|
|
818
|
-
|
|
818
|
+
T = Math.abs(I - O) <= 864e5;
|
|
819
819
|
}
|
|
820
|
-
const
|
|
821
|
-
r.value.type === "absolute" && r.value.end.getTime() <
|
|
820
|
+
const k = (/* @__PURE__ */ new Date()).getTime();
|
|
821
|
+
r.value.type === "absolute" && r.value.end.getTime() < k || r.value.type === "relative" && ["previous_week", "previous_month"].includes(r.value.time_range) ? l = 0 : T ? l = Ss : l = Ds;
|
|
822
822
|
}
|
|
823
823
|
(h === void 0 || i.value) && (h = !1), u === void 0 && (u = !0);
|
|
824
824
|
const g = !i.value && !!((m = (y = (p = Gi()) == null ? void 0 : p.vnode) == null ? void 0 : y.props) != null && m.onTileTimeRangeZoom);
|
|
@@ -870,12 +870,12 @@ const ae = {
|
|
|
870
870
|
revalidateOnFocus: !1,
|
|
871
871
|
shouldRetryOnError: !1
|
|
872
872
|
}), { state: u, swrvState: f } = ms(d, l, h), g = A(null), p = v(() => u.value === f.ERROR || !!g.value), y = v(() => !t.queryReady || u.value === f.PENDING);
|
|
873
|
-
return Ne([() => d.value, () => u.value], ([m,
|
|
874
|
-
m && (
|
|
875
|
-
}), (m,
|
|
873
|
+
return Ne([() => d.value, () => u.value], ([m, T]) => {
|
|
874
|
+
m && (T === "SUCCESS_HAS_DATA" || T === "SUCCESS") && i("chart-data", m);
|
|
875
|
+
}), (m, T) => {
|
|
876
876
|
var O;
|
|
877
|
-
const
|
|
878
|
-
return y.value || !E(d) && !p.value ? (R(), L(
|
|
877
|
+
const k = le("KSkeleton"), w = le("KEmptyState");
|
|
878
|
+
return y.value || !E(d) && !p.value ? (R(), L(k, {
|
|
879
879
|
key: 0,
|
|
880
880
|
class: "chart-skeleton",
|
|
881
881
|
type: "table"
|
|
@@ -1313,10 +1313,10 @@ const ae = {
|
|
|
1313
1313
|
}), g = v(() => async ({ cursor: y, pageSize: m }) => {
|
|
1314
1314
|
try {
|
|
1315
1315
|
await r.isReady();
|
|
1316
|
-
const
|
|
1317
|
-
if (!
|
|
1316
|
+
const T = er[u.value.datasource];
|
|
1317
|
+
if (!T)
|
|
1318
1318
|
throw new Error(`No table data grid fetcher found for datasource: ${u.value.datasource}`);
|
|
1319
|
-
const
|
|
1319
|
+
const k = await T({
|
|
1320
1320
|
abortController: n,
|
|
1321
1321
|
context: t.context,
|
|
1322
1322
|
cursor: y,
|
|
@@ -1328,15 +1328,15 @@ const ae = {
|
|
|
1328
1328
|
stripUnknownFilters: r.stripUnknownFilters,
|
|
1329
1329
|
tabularQueryFn: s == null ? void 0 : s.tabularQueryFn
|
|
1330
1330
|
});
|
|
1331
|
-
return l.value = !1,
|
|
1332
|
-
} catch (
|
|
1333
|
-
throw l.value = !0,
|
|
1331
|
+
return l.value = !1, k;
|
|
1332
|
+
} catch (T) {
|
|
1333
|
+
throw l.value = !0, T;
|
|
1334
1334
|
}
|
|
1335
1335
|
}), p = (y) => {
|
|
1336
1336
|
y.state === "error" && (l.value = !0), i("loading-change", y.state === "loading");
|
|
1337
1337
|
};
|
|
1338
1338
|
return (y, m) => {
|
|
1339
|
-
const
|
|
1339
|
+
const T = le("KSkeleton");
|
|
1340
1340
|
return R(), G("div", {
|
|
1341
1341
|
class: "table-data-grid-renderer",
|
|
1342
1342
|
style: je(h.value)
|
|
@@ -1349,7 +1349,7 @@ const ae = {
|
|
|
1349
1349
|
"page-size": a.query.page_size,
|
|
1350
1350
|
"refresh-key": a.refreshCounter,
|
|
1351
1351
|
onState: p
|
|
1352
|
-
}, null, 8, ["error", "fetcher", "headers", "page-size", "refresh-key"])) : (R(), L(
|
|
1352
|
+
}, null, 8, ["error", "fetcher", "headers", "page-size", "refresh-key"])) : (R(), L(T, {
|
|
1353
1353
|
key: 0,
|
|
1354
1354
|
"data-testid": "table-skeleton",
|
|
1355
1355
|
type: "table"
|
|
@@ -1387,7 +1387,7 @@ const ae = {
|
|
|
1387
1387
|
props: /* @__PURE__ */ Xe({
|
|
1388
1388
|
context: {},
|
|
1389
1389
|
definition: {},
|
|
1390
|
-
height: { default:
|
|
1390
|
+
height: { default: $e },
|
|
1391
1391
|
isFullscreen: { type: Boolean },
|
|
1392
1392
|
hideActions: { type: Boolean, default: !1 },
|
|
1393
1393
|
hideZoomActions: { type: Boolean, default: !1 },
|
|
@@ -1402,23 +1402,23 @@ const ae = {
|
|
|
1402
1402
|
emits: /* @__PURE__ */ Xe(["chart-data", "edit-tile", "duplicate-tile", "remove-tile", "tile-time-range-zoom", "tile-bounds-change"], ["update:refreshCounter"]),
|
|
1403
1403
|
setup(a, { expose: e, emit: t }) {
|
|
1404
1404
|
yt((x) => ({
|
|
1405
|
-
|
|
1405
|
+
v12c7630b: `${x.height}px`
|
|
1406
1406
|
}));
|
|
1407
1407
|
const i = parseInt(ci, 10), s = a, r = ei(a, "refreshCounter"), o = () => {
|
|
1408
|
-
|
|
1409
|
-
}, n = t, d = Jt(() => import("./GeoMapRenderer-
|
|
1408
|
+
k.value = !0, r.value++;
|
|
1409
|
+
}, n = t, d = Jt(() => import("./GeoMapRenderer-BLA2uZXF.js")), l = me(ye), h = at(), { stripUnknownFilters: u } = wt(h), { i18n: f } = ae.useI18n(), g = A(), p = A({ status: "loading" }), y = A(!1), m = A(), T = A(!1), k = A(!0), w = v(() => s.tileType === "table"), O = v(() => s.definition), I = v(() => s.definition), Q = v(() => O.value.chart), Ee = v(() => "chart_title" in Q.value ? Q.value.chart_title : void 0), V = v(() => {
|
|
1410
1410
|
var x;
|
|
1411
1411
|
return w.value ? (x = I.value) == null ? void 0 : x.config.title : Ee.value;
|
|
1412
1412
|
}), z = v(() => !w.value && "description" in Q.value ? Q.value.description : void 0), q = v(() => w.value ? "table" : Q.value.type), W = v(() => !w.value && Q.value.type === "slottable"), he = v(() => w.value ? !1 : !("allow_csv_export" in Q.value) || Q.value.allow_csv_export !== !1), {
|
|
1413
1413
|
exploreLinkKebabMenu: D,
|
|
1414
1414
|
requestsLinkKebabMenu: H,
|
|
1415
|
-
canShowKebabMenu:
|
|
1415
|
+
canShowKebabMenu: B,
|
|
1416
1416
|
canGenerateRequestsLink: P,
|
|
1417
1417
|
canGenerateExploreLink: ie,
|
|
1418
|
-
requestsLinkZoomActions:
|
|
1418
|
+
requestsLinkZoomActions: Be,
|
|
1419
1419
|
exploreLinkZoomActions: Fe,
|
|
1420
1420
|
buildExploreQuery: Ge,
|
|
1421
|
-
buildExploreLink:
|
|
1421
|
+
buildExploreLink: kt,
|
|
1422
1422
|
buildRequestLink: Ue,
|
|
1423
1423
|
buildRequestsQueryZoomActions: mi
|
|
1424
1424
|
} = ae.useContextLinks({
|
|
@@ -1428,13 +1428,13 @@ const ae = {
|
|
|
1428
1428
|
context: ct(Ye(s, "context"))
|
|
1429
1429
|
}), { issueQuery: pi } = ae.useIssueQuery();
|
|
1430
1430
|
Ne(() => s.definition, async (x, S) => {
|
|
1431
|
-
await vt(), m.value && (
|
|
1431
|
+
await vt(), m.value && (T.value = m.value.scrollWidth > m.value.clientWidth);
|
|
1432
1432
|
try {
|
|
1433
|
-
JSON.stringify(x == null ? void 0 : x.query) !== JSON.stringify(S == null ? void 0 : S.query) && (
|
|
1433
|
+
JSON.stringify(x == null ? void 0 : x.query) !== JSON.stringify(S == null ? void 0 : S.query) && (k.value = !0);
|
|
1434
1434
|
} catch {
|
|
1435
1435
|
}
|
|
1436
1436
|
}, { immediate: !0, deep: !0 });
|
|
1437
|
-
const yi = v(() => f.t("csvExport.defaultFilename")), ut = v(() => w.value ? s.context.editable : !!D.value || he.value || s.context.editable), vi = v(() => !w.value &&
|
|
1437
|
+
const yi = v(() => f.t("csvExport.defaultFilename")), ut = v(() => w.value ? s.context.editable : !!D.value || he.value || s.context.editable), vi = v(() => !w.value && B.value && ut.value), _i = v(() => w.value && s.context.editable), We = v(() => !s.hideActions && (vi.value || _i.value)), bi = v(() => We.value && ut.value && !s.isFullscreen), wi = v(() => !w.value && Q.value.type === "golden_signals" && !!z.value), Ei = {
|
|
1438
1438
|
timeseries_line: Ut,
|
|
1439
1439
|
timeseries_bar: Ut,
|
|
1440
1440
|
horizontal_bar: Gt,
|
|
@@ -1482,7 +1482,7 @@ const ae = {
|
|
|
1482
1482
|
chartOptions: x.chart,
|
|
1483
1483
|
height: s.height - i * 2,
|
|
1484
1484
|
refreshCounter: r.value,
|
|
1485
|
-
requestsLink: s.hideZoomActions ? void 0 :
|
|
1485
|
+
requestsLink: s.hideZoomActions ? void 0 : Be.value,
|
|
1486
1486
|
exploreLink: s.hideZoomActions ? void 0 : Fe.value
|
|
1487
1487
|
},
|
|
1488
1488
|
rendererEvents: {
|
|
@@ -1507,14 +1507,14 @@ const ae = {
|
|
|
1507
1507
|
return `${Ht(S.start, { short: !0, tz: Y })} - ${Ht(S.end, { short: !0, tz: Y })}`;
|
|
1508
1508
|
}
|
|
1509
1509
|
return null;
|
|
1510
|
-
}),
|
|
1510
|
+
}), Tt = v(() => W.value ? !1 : [
|
|
1511
1511
|
!!V.value,
|
|
1512
1512
|
bi.value,
|
|
1513
1513
|
!!ht.value,
|
|
1514
1514
|
wi.value,
|
|
1515
1515
|
s.showRefresh
|
|
1516
1516
|
].some(Boolean)), St = v(() => g.value ? ft(g.value.meta.granularity_ms) : void 0), Ci = v(() => !w.value && ["timeseries_line", "timeseries_bar"].includes(Q.value.type)), Dt = v(() => {
|
|
1517
|
-
if (!Ci.value || !s.queryReady ||
|
|
1517
|
+
if (!Ci.value || !s.queryReady || k.value)
|
|
1518
1518
|
return !1;
|
|
1519
1519
|
const x = O.value.query.granularity;
|
|
1520
1520
|
return !x || !St.value ? !1 : x !== St.value;
|
|
@@ -1525,7 +1525,7 @@ const ae = {
|
|
|
1525
1525
|
currentGranularity: f.t(`granularities.${x}`),
|
|
1526
1526
|
savedGranularity: f.t(`granularities.${S}`)
|
|
1527
1527
|
});
|
|
1528
|
-
}),
|
|
1528
|
+
}), ki = v(() => {
|
|
1529
1529
|
if (w.value)
|
|
1530
1530
|
return [];
|
|
1531
1531
|
const x = [...s.context.filters, ...O.value.query.filters ?? []], S = O.value.query.metrics, F = O.value.query.datasource ?? "api_usage";
|
|
@@ -1534,16 +1534,16 @@ const ae = {
|
|
|
1534
1534
|
filters: x,
|
|
1535
1535
|
metrics: S
|
|
1536
1536
|
});
|
|
1537
|
-
}),
|
|
1537
|
+
}), Ti = () => {
|
|
1538
1538
|
n("edit-tile", s.definition);
|
|
1539
1539
|
}, Si = () => {
|
|
1540
1540
|
n("duplicate-tile", s.definition);
|
|
1541
1541
|
}, Di = () => {
|
|
1542
1542
|
n("remove-tile", s.definition);
|
|
1543
1543
|
}, zi = (x) => {
|
|
1544
|
-
g.value = x,
|
|
1544
|
+
g.value = x, k.value = !1, n("chart-data", x);
|
|
1545
1545
|
}, Ni = (x) => {
|
|
1546
|
-
|
|
1546
|
+
k.value = x;
|
|
1547
1547
|
}, Li = () => {
|
|
1548
1548
|
y.value = !1;
|
|
1549
1549
|
}, zt = () => {
|
|
@@ -1575,22 +1575,22 @@ const ae = {
|
|
|
1575
1575
|
};
|
|
1576
1576
|
n("tile-bounds-change", S);
|
|
1577
1577
|
}, Ii = (x) => {
|
|
1578
|
-
const S =
|
|
1579
|
-
Fe.value = ie.value ? { href:
|
|
1578
|
+
const S = ki.value, F = Ge(x, S);
|
|
1579
|
+
Fe.value = ie.value ? { href: kt(F) } : void 0, Be.value = P.value ? { href: Ue(mi(x, S)) } : void 0;
|
|
1580
1580
|
};
|
|
1581
1581
|
return e({ getExportData: zt }), (x, S) => {
|
|
1582
1582
|
const F = le("KTooltip"), Y = le("KBadge"), De = le("KButton"), de = le("KDropdownItem"), we = le("KDropdown");
|
|
1583
1583
|
return R(), G("div", {
|
|
1584
1584
|
class: Se(["tile-boundary", {
|
|
1585
1585
|
editable: a.context.editable,
|
|
1586
|
-
headless: !
|
|
1586
|
+
headless: !Tt.value
|
|
1587
1587
|
}]),
|
|
1588
1588
|
"data-testid": `tile-${a.tileId}`
|
|
1589
1589
|
}, [
|
|
1590
|
-
|
|
1590
|
+
Tt.value && !W.value ? (R(), G("div", or, [
|
|
1591
1591
|
ge(F, {
|
|
1592
1592
|
class: "title-tooltip",
|
|
1593
|
-
disabled: !
|
|
1593
|
+
disabled: !T.value,
|
|
1594
1594
|
"max-width": "500",
|
|
1595
1595
|
text: V.value
|
|
1596
1596
|
}, {
|
|
@@ -1618,7 +1618,9 @@ const ae = {
|
|
|
1618
1618
|
Dt.value ? {
|
|
1619
1619
|
name: "icon",
|
|
1620
1620
|
fn: M(() => [
|
|
1621
|
-
ge(E(os), {
|
|
1621
|
+
ge(E(os), {
|
|
1622
|
+
size: `var(--kui-icon-size-20, ${E(sr)})`
|
|
1623
|
+
}, null, 8, ["size"])
|
|
1622
1624
|
]),
|
|
1623
1625
|
key: "0"
|
|
1624
1626
|
} : void 0
|
|
@@ -1629,21 +1631,21 @@ const ae = {
|
|
|
1629
1631
|
appearance: "secondary",
|
|
1630
1632
|
class: "refresh-button",
|
|
1631
1633
|
"data-testid": `tile-refresh-button-${a.tileId}`,
|
|
1632
|
-
disabled:
|
|
1634
|
+
disabled: k.value,
|
|
1633
1635
|
icon: "",
|
|
1634
1636
|
size: "small",
|
|
1635
1637
|
onClick: o
|
|
1636
1638
|
}, {
|
|
1637
1639
|
default: M(() => [
|
|
1638
|
-
|
|
1640
|
+
k.value ? (R(), L(E(as), {
|
|
1639
1641
|
key: 0,
|
|
1640
1642
|
role: "button",
|
|
1641
|
-
size: E(Vt)
|
|
1643
|
+
size: `var(--kui-icon-size-60, ${E(Vt)})`,
|
|
1642
1644
|
tabindex: "0"
|
|
1643
1645
|
}, null, 8, ["size"])) : (R(), L(E(ls), {
|
|
1644
1646
|
key: 1,
|
|
1645
1647
|
role: "button",
|
|
1646
|
-
size: E(Vt)
|
|
1648
|
+
size: `var(--kui-icon-size-60, ${E(Vt)})`,
|
|
1647
1649
|
tabindex: "0"
|
|
1648
1650
|
}, null, 8, ["size"]))
|
|
1649
1651
|
]),
|
|
@@ -1658,10 +1660,10 @@ const ae = {
|
|
|
1658
1660
|
We.value && a.context.editable && !a.isFullscreen ? (R(), L(E(us), {
|
|
1659
1661
|
key: 0,
|
|
1660
1662
|
class: "edit-icon",
|
|
1661
|
-
color: E(Kt)
|
|
1663
|
+
color: `var(--kui-color-text-neutral, ${E(Kt)})`,
|
|
1662
1664
|
"data-testid": `edit-tile-${a.tileId}`,
|
|
1663
|
-
size: E(Qt)
|
|
1664
|
-
onClick:
|
|
1665
|
+
size: `var(--kui-icon-size-40, ${E(Qt)})`,
|
|
1666
|
+
onClick: Ti
|
|
1665
1667
|
}, null, 8, ["color", "data-testid", "size"])) : X("", !0),
|
|
1666
1668
|
We.value && ut.value && !a.isFullscreen ? (R(), L(we, {
|
|
1667
1669
|
key: 1,
|
|
@@ -1718,9 +1720,9 @@ const ae = {
|
|
|
1718
1720
|
default: M(() => [
|
|
1719
1721
|
ge(E(hs), {
|
|
1720
1722
|
class: "kebab-action-menu",
|
|
1721
|
-
color: E(Kt)
|
|
1723
|
+
color: `var(--kui-color-text-neutral, ${E(Kt)})`,
|
|
1722
1724
|
"data-testid": `kebab-action-menu-${a.tileId}`,
|
|
1723
|
-
size: E(Qt)
|
|
1725
|
+
size: `var(--kui-icon-size-40, ${E(Qt)})`
|
|
1724
1726
|
}, null, 8, ["color", "data-testid", "size"])
|
|
1725
1727
|
]),
|
|
1726
1728
|
_: 1
|
|
@@ -1747,7 +1749,7 @@ const ae = {
|
|
|
1747
1749
|
], 10, nr);
|
|
1748
1750
|
};
|
|
1749
1751
|
}
|
|
1750
|
-
}), fi = /* @__PURE__ */ _e(mr, [["__scopeId", "data-v-
|
|
1752
|
+
}), fi = /* @__PURE__ */ _e(mr, [["__scopeId", "data-v-af28753b"]]), pr = (a, e) => {
|
|
1751
1753
|
let t = 0;
|
|
1752
1754
|
const i = /* @__PURE__ */ new Map();
|
|
1753
1755
|
e.forEach((r) => {
|
|
@@ -1764,7 +1766,7 @@ const ae = {
|
|
|
1764
1766
|
tileHeight: {
|
|
1765
1767
|
type: Number,
|
|
1766
1768
|
required: !1,
|
|
1767
|
-
default: () =>
|
|
1769
|
+
default: () => $e
|
|
1768
1770
|
},
|
|
1769
1771
|
columns: {
|
|
1770
1772
|
type: Number,
|
|
@@ -3365,8 +3367,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3365
3367
|
this.engine.nodes.forEach((m) => {
|
|
3366
3368
|
y = Math.max(y, m.y + m.h);
|
|
3367
3369
|
}), p.forEach((m) => {
|
|
3368
|
-
const
|
|
3369
|
-
|
|
3370
|
+
const T = m.el;
|
|
3371
|
+
T && (m._removeDOM ? (T && T.remove(), delete m._removeDOM) : this._writePosAttr(T, m));
|
|
3370
3372
|
}), this._updateStyles(!1, y);
|
|
3371
3373
|
}
|
|
3372
3374
|
}), this._updateStyles(!1, 0), t.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((p) => this._prepareElement(p)), delete this.engine._loading, this.batchUpdate(!1)), t.children) {
|
|
@@ -3447,8 +3449,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3447
3449
|
t.column === "auto" && (d = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
|
|
3448
3450
|
let l = r.el.querySelector(".grid-stack-item-content"), h, u;
|
|
3449
3451
|
if (s && (this._removeDD(r.el), u = { ...r, x: 0, y: 0 }, c.removeInternalForSave(u), delete u.subGridOpts, r.content && (u.content = r.content, delete r.content), b.addRemoveCB ? h = b.addRemoveCB(this.el, u, !0, !1) : (h = c.createDiv(["grid-stack-item"]), h.appendChild(l), l = c.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
|
|
3450
|
-
const m = d ? t.column : r.w,
|
|
3451
|
-
|
|
3452
|
+
const m = d ? t.column : r.w, T = r.h + i.h, k = r.el.style;
|
|
3453
|
+
k.transition = "none", this.update(r.el, { w: m, h: T }), setTimeout(() => k.transition = null);
|
|
3452
3454
|
}
|
|
3453
3455
|
const f = r.subGrid = b.addGrid(l, t);
|
|
3454
3456
|
return i != null && i._moving && (f._isTemp = !0), d && (f._autoColumn = !0), s && f.makeWidget(h, u), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
|
|
@@ -4426,8 +4428,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4426
4428
|
return;
|
|
4427
4429
|
const m = i.position.top - s._prevYPix;
|
|
4428
4430
|
s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position, m);
|
|
4429
|
-
const
|
|
4430
|
-
n.x = Math.round(
|
|
4431
|
+
const T = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : l), k = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : u);
|
|
4432
|
+
n.x = Math.round(T / r), n.y = Math.round(k / o);
|
|
4431
4433
|
const w = this._extraDragRow;
|
|
4432
4434
|
if (this.engine.collide(s, n)) {
|
|
4433
4435
|
const O = this.getRow();
|
|
@@ -4440,8 +4442,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4440
4442
|
} else if (t.type === "resize") {
|
|
4441
4443
|
if (n.x < 0 || (c.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - l) / r), n.h = Math.round((i.size.height - u) / o), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
|
|
4442
4444
|
return;
|
|
4443
|
-
const m = i.position.left + l,
|
|
4444
|
-
n.x = Math.round(m / r), n.y = Math.round(
|
|
4445
|
+
const m = i.position.left + l, T = i.position.top + u;
|
|
4446
|
+
n.x = Math.round(m / r), n.y = Math.round(T / o), d = !0;
|
|
4445
4447
|
}
|
|
4446
4448
|
s._event = t, s._lastTried = n;
|
|
4447
4449
|
const y = {
|
|
@@ -4485,7 +4487,7 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4485
4487
|
__name: "DraggableGridLayout",
|
|
4486
4488
|
props: {
|
|
4487
4489
|
tiles: {},
|
|
4488
|
-
tileHeight: { default:
|
|
4490
|
+
tileHeight: { default: $e },
|
|
4489
4491
|
columns: { default: bt }
|
|
4490
4492
|
},
|
|
4491
4493
|
emits: ["update-tiles"],
|
|
@@ -4566,7 +4568,7 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4566
4568
|
], 8, xr))), 128))
|
|
4567
4569
|
], 512));
|
|
4568
4570
|
}
|
|
4569
|
-
}),
|
|
4571
|
+
}), kr = /* @__PURE__ */ _e(Rr, [["__scopeId", "data-v-1fdec94c"]]), Tr = (a) => a.type === "slottable", Sr = (a) => {
|
|
4570
4572
|
const e = a.meta, t = {
|
|
4571
4573
|
...e.config,
|
|
4572
4574
|
title: e.config.title ? `Copy of ${e.config.title}` : ""
|
|
@@ -4587,7 +4589,7 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4587
4589
|
}
|
|
4588
4590
|
};
|
|
4589
4591
|
}, Dr = (a) => {
|
|
4590
|
-
const e = a.meta, t =
|
|
4592
|
+
const e = a.meta, t = Tr(e.chart) ? { ...e.chart } : {
|
|
4591
4593
|
...e.chart,
|
|
4592
4594
|
chart_title: e.chart.chart_title ? `Copy of ${e.chart.chart_title}` : ""
|
|
4593
4595
|
};
|
|
@@ -4624,24 +4626,24 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4624
4626
|
emits: /* @__PURE__ */ Xe(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
|
|
4625
4627
|
setup(a, { expose: e, emit: t }) {
|
|
4626
4628
|
yt((D) => ({
|
|
4627
|
-
|
|
4629
|
+
v3094ce86: h.value
|
|
4628
4630
|
}));
|
|
4629
4631
|
const i = t, s = ei(a, "modelValue"), { i18n: r } = ae.useI18n(), o = A(0), n = A(null), d = A(), l = A(), h = A("scale(1)"), u = me(ye);
|
|
4630
4632
|
u || (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")), ae.useRequestQueue();
|
|
4631
4633
|
const f = (D, H) => {
|
|
4632
|
-
const
|
|
4633
|
-
return
|
|
4634
|
+
const B = D.layout.position.row - H.layout.position.row;
|
|
4635
|
+
return B !== 0 ? B : D.layout.position.col - H.layout.position.col;
|
|
4634
4636
|
}, g = v(() => s.value.tiles.map((D) => {
|
|
4635
4637
|
var ie;
|
|
4636
4638
|
let H = D.definition;
|
|
4637
|
-
const
|
|
4638
|
-
if (
|
|
4639
|
-
const
|
|
4639
|
+
const B = D.type ?? "chart", P = H.chart;
|
|
4640
|
+
if (B === "chart" && "description" in P) {
|
|
4641
|
+
const Be = H, Fe = (ie = P.description) == null ? void 0 : ie.replace(ks, () => {
|
|
4640
4642
|
const { timeSpec: Ge } = W.value, Ue = `renderer.trendRange.${Ge.type === "absolute" ? "custom" : Ge.time_range}`;
|
|
4641
4643
|
return r.te(Ue) ? r.t(Ue) : "";
|
|
4642
4644
|
});
|
|
4643
4645
|
H = {
|
|
4644
|
-
|
|
4646
|
+
...Be,
|
|
4645
4647
|
chart: {
|
|
4646
4648
|
...P,
|
|
4647
4649
|
description: Fe
|
|
@@ -4655,16 +4657,16 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4655
4657
|
), {
|
|
4656
4658
|
layout: D.layout,
|
|
4657
4659
|
meta: H,
|
|
4658
|
-
type:
|
|
4660
|
+
type: B,
|
|
4659
4661
|
// Add a unique key to each tile internally.
|
|
4660
4662
|
id: D.id ?? crypto.randomUUID()
|
|
4661
4663
|
};
|
|
4662
4664
|
})), p = (D) => {
|
|
4663
4665
|
i("edit-tile", D);
|
|
4664
|
-
}, y = (D) => D.type === "chart" && D.meta.chart.type === "slottable", m = (D) => D.type === "slottable",
|
|
4666
|
+
}, y = (D) => D.type === "chart" && D.meta.chart.type === "slottable", m = (D) => D.type === "slottable", T = (D) => {
|
|
4665
4667
|
const H = D.meta.chart;
|
|
4666
4668
|
return m(H) ? H.id : void 0;
|
|
4667
|
-
},
|
|
4669
|
+
}, k = (D) => {
|
|
4668
4670
|
try {
|
|
4669
4671
|
const H = D.type === "table" ? Sr(D) : Dr(D);
|
|
4670
4672
|
s.value.tiles.push(JSON.parse(JSON.stringify(H)));
|
|
@@ -4676,16 +4678,16 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4676
4678
|
}, O = () => {
|
|
4677
4679
|
o.value++;
|
|
4678
4680
|
}, I = (D) => {
|
|
4679
|
-
const H = D.map((
|
|
4680
|
-
id:
|
|
4681
|
-
type:
|
|
4682
|
-
layout:
|
|
4683
|
-
definition:
|
|
4681
|
+
const H = D.map((B) => ({
|
|
4682
|
+
id: B.id,
|
|
4683
|
+
type: B.type,
|
|
4684
|
+
layout: B.layout,
|
|
4685
|
+
definition: B.meta
|
|
4684
4686
|
}));
|
|
4685
4687
|
s.value.tiles = H.sort(f);
|
|
4686
4688
|
}, Q = async () => {
|
|
4687
4689
|
if (h.value = "scale(1)", await vt(), l.value) {
|
|
4688
|
-
const { availWidth: D, availHeight: H } = window.screen, { width:
|
|
4690
|
+
const { availWidth: D, availHeight: H } = window.screen, { width: B, height: P } = l.value.getBoundingClientRect(), ie = Math.min(H / P, D / B);
|
|
4689
4691
|
h.value = `scale(${ie})`;
|
|
4690
4692
|
}
|
|
4691
4693
|
}, Ee = () => {
|
|
@@ -4702,7 +4704,7 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4702
4704
|
refresh: O,
|
|
4703
4705
|
toggleFullscreen: Ee
|
|
4704
4706
|
}), (D, H) => {
|
|
4705
|
-
const
|
|
4707
|
+
const B = le("KAlert");
|
|
4706
4708
|
return R(), G("div", {
|
|
4707
4709
|
ref_key: "dashboardContainer",
|
|
4708
4710
|
ref: d,
|
|
@@ -4717,7 +4719,7 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4717
4719
|
E(u) && V.value ? (R(), G("div", zr, [
|
|
4718
4720
|
Le(D.$slots, "fullscreenHeader", {}, void 0, !0)
|
|
4719
4721
|
])) : X("", !0),
|
|
4720
|
-
E(u) ? (R(), L(ti(E(W).editable && !V.value ?
|
|
4722
|
+
E(u) ? (R(), L(ti(E(W).editable && !V.value ? kr : vr), {
|
|
4721
4723
|
key: 2,
|
|
4722
4724
|
ref_key: "gridLayoutRef",
|
|
4723
4725
|
ref: n,
|
|
@@ -4728,7 +4730,7 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4728
4730
|
}, {
|
|
4729
4731
|
tile: M(({ tile: P }) => [
|
|
4730
4732
|
y(P) ? (R(), G("div", Nr, [
|
|
4731
|
-
Le(D.$slots,
|
|
4733
|
+
Le(D.$slots, T(P), {}, void 0, !0)
|
|
4732
4734
|
])) : (R(), L(fi, {
|
|
4733
4735
|
key: V.value ? `${P.id}-tile` : `${P.id}-tile-fullscreen`,
|
|
4734
4736
|
"refresh-counter": o.value,
|
|
@@ -4736,21 +4738,21 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4736
4738
|
class: "tile-container",
|
|
4737
4739
|
context: E(W),
|
|
4738
4740
|
definition: P.meta,
|
|
4739
|
-
height: P.layout.size.rows * (s.value.tile_height || E(
|
|
4741
|
+
height: P.layout.size.rows * (s.value.tile_height || E($e)) + parseInt(E(ci), 10),
|
|
4740
4742
|
"hide-actions": !E(W).showTileActions,
|
|
4741
4743
|
"hide-zoom-actions": !E(W).showTileZoomActions,
|
|
4742
4744
|
"is-fullscreen": V.value,
|
|
4743
4745
|
"query-ready": E(he),
|
|
4744
4746
|
"tile-id": P.id,
|
|
4745
4747
|
"tile-type": P.type,
|
|
4746
|
-
onDuplicateTile: (ie) =>
|
|
4748
|
+
onDuplicateTile: (ie) => k(P),
|
|
4747
4749
|
onEditTile: (ie) => p(P),
|
|
4748
4750
|
onRemoveTile: (ie) => w(P),
|
|
4749
4751
|
onTileTimeRangeZoom: H[1] || (H[1] = (ie) => i("tile-time-range-zoom", ie))
|
|
4750
4752
|
}, null, 8, ["refresh-counter", "context", "definition", "height", "hide-actions", "hide-zoom-actions", "is-fullscreen", "query-ready", "tile-id", "tile-type", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
|
|
4751
4753
|
]),
|
|
4752
4754
|
_: 3
|
|
4753
|
-
}, 40, ["columns", "tile-height", "tiles"])) : (R(), L(
|
|
4755
|
+
}, 40, ["columns", "tile-height", "tiles"])) : (R(), L(B, {
|
|
4754
4756
|
key: 1,
|
|
4755
4757
|
appearance: "danger"
|
|
4756
4758
|
}, {
|
|
@@ -4763,7 +4765,7 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4763
4765
|
], 34);
|
|
4764
4766
|
};
|
|
4765
4767
|
}
|
|
4766
|
-
}), Qr = /* @__PURE__ */ _e(Lr, [["__scopeId", "data-v-
|
|
4768
|
+
}), Qr = /* @__PURE__ */ _e(Lr, [["__scopeId", "data-v-50b17902"]]), Vr = /* @__PURE__ */ J({
|
|
4767
4769
|
__name: "DashboardTilePreview",
|
|
4768
4770
|
props: {
|
|
4769
4771
|
context: {},
|
|
@@ -4773,25 +4775,25 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4773
4775
|
},
|
|
4774
4776
|
emits: ["chart-data", "tile-time-range-zoom", "tile-bounds-change"],
|
|
4775
4777
|
setup(a, { expose: e, emit: t }) {
|
|
4776
|
-
const i = Ot("root"), s = Ot("dashboard-tile"), r = crypto.randomUUID(), o = t, n = (
|
|
4777
|
-
o("tile-time-range-zoom",
|
|
4778
|
-
}, d = (
|
|
4779
|
-
o("chart-data",
|
|
4780
|
-
}, l = (
|
|
4781
|
-
o("tile-bounds-change",
|
|
4778
|
+
const i = Ot("root"), s = Ot("dashboard-tile"), r = crypto.randomUUID(), o = t, n = (k) => {
|
|
4779
|
+
o("tile-time-range-zoom", k);
|
|
4780
|
+
}, d = (k) => {
|
|
4781
|
+
o("chart-data", k);
|
|
4782
|
+
}, l = (k) => {
|
|
4783
|
+
o("tile-bounds-change", k);
|
|
4782
4784
|
}, { i18n: h } = ae.useI18n(), { internalContext: u, queryReady: f } = ae.useDashboardInternalContext({
|
|
4783
4785
|
globalFilters: Ye(() => a.globalFilters),
|
|
4784
4786
|
context: Ye(() => a.context),
|
|
4785
4787
|
preview: v(() => a.preview)
|
|
4786
|
-
}), g = v(() => !("metrics" in a.definition.query) || !a.definition.query.metrics || a.definition.query.metrics.length === 0), p = A(
|
|
4788
|
+
}), g = v(() => !("metrics" in a.definition.query) || !a.definition.query.metrics || a.definition.query.metrics.length === 0), p = A($e);
|
|
4787
4789
|
let y;
|
|
4788
4790
|
rt(() => {
|
|
4789
4791
|
var w;
|
|
4790
|
-
const
|
|
4791
|
-
|
|
4792
|
+
const k = (w = i.value) == null ? void 0 : w.parentElement;
|
|
4793
|
+
k && (p.value = k.getBoundingClientRect().height, y = new ResizeObserver(([O]) => {
|
|
4792
4794
|
const { height: I } = O.contentRect;
|
|
4793
4795
|
p.value = I;
|
|
4794
|
-
}), y.observe(
|
|
4796
|
+
}), y.observe(k));
|
|
4795
4797
|
}), Pe(() => y == null ? void 0 : y.disconnect());
|
|
4796
4798
|
const m = A(0);
|
|
4797
4799
|
return e({
|
|
@@ -4799,10 +4801,10 @@ const xr = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Cr = { cl
|
|
|
4799
4801
|
m.value++;
|
|
4800
4802
|
},
|
|
4801
4803
|
getExportData: () => {
|
|
4802
|
-
var
|
|
4803
|
-
return (
|
|
4804
|
+
var k;
|
|
4805
|
+
return (k = s.value) == null ? void 0 : k.getExportData();
|
|
4804
4806
|
}
|
|
4805
|
-
}), (
|
|
4807
|
+
}), (k, w) => {
|
|
4806
4808
|
const O = le("KEmptyState");
|
|
4807
4809
|
return R(), G("div", {
|
|
4808
4810
|
ref_key: "root",
|
|
@@ -4915,10 +4917,10 @@ export {
|
|
|
4915
4917
|
Ds as F,
|
|
4916
4918
|
vr as G,
|
|
4917
4919
|
ye as I,
|
|
4918
|
-
|
|
4920
|
+
ks as T,
|
|
4919
4921
|
Et as _,
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
+
$e as a,
|
|
4923
|
+
Ts as b,
|
|
4922
4924
|
Qr as c,
|
|
4923
4925
|
Vr as d,
|
|
4924
4926
|
Ss as e,
|