@kong-ui-public/dashboard-renderer 7.6.13 → 7.6.14
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-B9ELIHrp.js → GeoMapRenderer-BifWCeUK.js} +1 -1
- package/dist/dashboard-renderer.es.js +1 -1
- package/dist/dashboard-renderer.umd.js +2 -2
- package/dist/{index-Dvjj5Eg5.js → index-DBLhgDhV.js} +377 -388
- package/dist/types/components/QueryDataProvider.vue.d.ts +2 -2
- package/dist/types/components/QueryDataProvider.vue.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -3,33 +3,33 @@ var _t = (d) => {
|
|
|
3
3
|
throw TypeError(d);
|
|
4
4
|
};
|
|
5
5
|
var li = (d, e, t) => e in d ? ai(d, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : d[e] = t;
|
|
6
|
-
var bt = (d, e, t) => li(d, typeof e != "symbol" ? e + "" : e, t),
|
|
7
|
-
var _ = (d, e, t) => (
|
|
6
|
+
var bt = (d, e, t) => li(d, typeof e != "symbol" ? e + "" : e, t), it = (d, e, t) => e.has(d) || _t("Cannot " + t);
|
|
7
|
+
var _ = (d, e, t) => (it(d, e, "read from private field"), t ? t.call(d) : e.get(d)), F = (d, e, t) => e.has(d) ? _t("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(d) : e.set(d, t), M = (d, e, t, i) => (it(d, e, "write to private field"), i ? i.call(d, t) : e.set(d, t), t), G = (d, e, t) => (it(d, e, "access private method"), t);
|
|
8
8
|
var ze = (d, e, t, i) => ({
|
|
9
9
|
set _(s) {
|
|
10
|
-
|
|
10
|
+
M(d, e, s, t);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
13
|
return _(d, e, i);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { ref as
|
|
17
|
-
import { msToGranularity as
|
|
16
|
+
import { ref as L, watchEffect as Mt, inject as ye, provide as hi, onMounted as at, computed as k, watch as Ve, onUnmounted as lt, defineComponent as J, resolveComponent as me, createBlock as N, renderSlot as Se, createCommentVNode as Q, unref as x, openBlock as C, createSlots as Qe, withCtx as $, createElementVNode as oe, toDisplayString as ne, useCssVars as Ye, normalizeClass as je, createVNode as ue, mergeProps as It, createTextVNode as ht, createElementBlock as V, normalizeProps as ui, guardReactiveProps as di, defineAsyncComponent as qt, readonly as st, toRef as wt, nextTick as ut, resolveDynamicComponent as Pt, toHandlers as ci, Fragment as $t, renderList as Ft, normalizeStyle as Et, mergeModels as xt, useModel as fi, getCurrentInstance as gi } from "vue";
|
|
17
|
+
import { msToGranularity as rt, getFieldDataSources as Gt, stripUnknownFilters as mi, Timeframe as pi, TimePeriods as Bt, TIMEFRAME_LOOKUP as yi, formatTime as Ct, EXPORT_RECORD_LIMIT as vi } from "@kong-ui-public/analytics-utilities";
|
|
18
18
|
import { handleQueryError as _i, SimpleChart as bi, AnalyticsChart as wi, TopNTable as Ei, CsvExportModal as xi } from "@kong-ui-public/analytics-chart";
|
|
19
19
|
import Ci from "swrv";
|
|
20
20
|
import "axios";
|
|
21
21
|
import { createI18n as Ri, i18nTComponent as ki } from "@kong-ui-public/i18n";
|
|
22
22
|
import { useAnalyticsConfigStore as dt } from "@kong-ui-public/analytics-config-store";
|
|
23
|
-
import { VisibilityOffIcon as Ti,
|
|
24
|
-
import { MetricsProvider as
|
|
23
|
+
import { VisibilityOffIcon as Ti, WarningOutlineIcon as zi, WarningIcon as Si, EditIcon as Di, MoreIcon as Ni } from "@kong/icons";
|
|
24
|
+
import { MetricsProvider as Li, MetricsConsumer as Ai } from "@kong-ui-public/analytics-metric-provider";
|
|
25
25
|
var Ut = /* @__PURE__ */ ((d) => (d.VALIDATING = "VALIDATING", d.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", d.PENDING = "PENDING", d.SUCCESS = "SUCCESS", d.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", d.ERROR = "ERROR", d.STALE_IF_ERROR = "STALE_IF_ERROR", d))(Ut || {});
|
|
26
|
-
const
|
|
26
|
+
const Oi = (d) => {
|
|
27
27
|
var e, t, i, s, r;
|
|
28
28
|
return d ? !!// TODO: revisit: currently only the first check ever matters?
|
|
29
29
|
((e = Object.keys(d)) != null && e.length || (t = d.data) != null && t.length || (s = (i = d.data) == null ? void 0 : i.data) != null && s.length || !((r = d.data) != null && r.data) && typeof d.data == "object" && Object.keys(d == null ? void 0 : d.data).length) : !1;
|
|
30
30
|
};
|
|
31
|
-
function Hi(d =
|
|
32
|
-
const s =
|
|
31
|
+
function Hi(d = L({}), e, t, i = Oi) {
|
|
32
|
+
const s = L(
|
|
33
33
|
"PENDING"
|
|
34
34
|
/* PENDING */
|
|
35
35
|
);
|
|
@@ -65,7 +65,7 @@ function Hi(d = N({}), e, t, i = Ai) {
|
|
|
65
65
|
swrvState: Ut
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const Mi = {
|
|
69
69
|
noQueryBridge: "No query bridge provided. Unable to render dashboard.",
|
|
70
70
|
trendRange: {
|
|
71
71
|
"24h": "Last 24-hour summary",
|
|
@@ -78,10 +78,10 @@ const Oi = {
|
|
|
78
78
|
fullscreen: "Fullscreen",
|
|
79
79
|
remove: "Remove",
|
|
80
80
|
delete: "Delete"
|
|
81
|
-
},
|
|
81
|
+
}, Ii = {
|
|
82
82
|
defaultFilename: "Chart export",
|
|
83
83
|
exportAsCsv: "Export as CSV"
|
|
84
|
-
},
|
|
84
|
+
}, qi = "Explore", Pi = "View requests", $i = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", Fi = {
|
|
85
85
|
daily: "1 day",
|
|
86
86
|
fiveMinutely: "5 minutes",
|
|
87
87
|
hourly: "1 hour",
|
|
@@ -94,30 +94,30 @@ const Oi = {
|
|
|
94
94
|
twoHourly: "2 hours",
|
|
95
95
|
weekly: "1 week",
|
|
96
96
|
unknown: "Unknown"
|
|
97
|
-
},
|
|
98
|
-
renderer:
|
|
99
|
-
csvExport:
|
|
100
|
-
jumpToExplore:
|
|
101
|
-
jumpToRequests:
|
|
102
|
-
query_aged_out_warning:
|
|
103
|
-
granularities:
|
|
97
|
+
}, Gi = {
|
|
98
|
+
renderer: Mi,
|
|
99
|
+
csvExport: Ii,
|
|
100
|
+
jumpToExplore: qi,
|
|
101
|
+
jumpToRequests: Pi,
|
|
102
|
+
query_aged_out_warning: $i,
|
|
103
|
+
granularities: Fi
|
|
104
104
|
};
|
|
105
|
-
function
|
|
106
|
-
const d = Ri("en-us",
|
|
105
|
+
function Bi() {
|
|
106
|
+
const d = Ri("en-us", Gi);
|
|
107
107
|
return {
|
|
108
108
|
i18n: d,
|
|
109
109
|
i18nT: ki(d)
|
|
110
110
|
// Translation component <i18n-t>
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
|
-
const
|
|
114
|
-
function
|
|
113
|
+
const Xe = 170, Wt = 6, pe = "analytics-query-provider", Rt = "{entity-id}", Ui = "{cp-id}", Wi = "{timeframe}", Ki = 30 * 1e3, Vi = 3e5, Qi = 36e5;
|
|
114
|
+
function Yi() {
|
|
115
115
|
const d = ye(pe);
|
|
116
116
|
return {
|
|
117
117
|
evaluateFeatureFlag: (t, i) => d ? d.evaluateFeatureFlagFn(t, i) : i
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function ji(d) {
|
|
121
121
|
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
122
122
|
}
|
|
123
123
|
var Kt = { exports: {} };
|
|
@@ -160,9 +160,9 @@ var Kt = { exports: {} };
|
|
|
160
160
|
}, n.prototype.emit = function(h, u, a, f, m, g) {
|
|
161
161
|
var y = t ? t + h : h;
|
|
162
162
|
if (!this._events[y]) return !1;
|
|
163
|
-
var p = this._events[y],
|
|
163
|
+
var p = this._events[y], z = arguments.length, I, S;
|
|
164
164
|
if (p.fn) {
|
|
165
|
-
switch (p.once && this.removeListener(h, p.fn, void 0, !0),
|
|
165
|
+
switch (p.once && this.removeListener(h, p.fn, void 0, !0), z) {
|
|
166
166
|
case 1:
|
|
167
167
|
return p.fn.call(p.context), !0;
|
|
168
168
|
case 2:
|
|
@@ -176,29 +176,29 @@ var Kt = { exports: {} };
|
|
|
176
176
|
case 6:
|
|
177
177
|
return p.fn.call(p.context, u, a, f, m, g), !0;
|
|
178
178
|
}
|
|
179
|
-
for (
|
|
180
|
-
I[
|
|
179
|
+
for (S = 1, I = new Array(z - 1); S < z; S++)
|
|
180
|
+
I[S - 1] = arguments[S];
|
|
181
181
|
p.fn.apply(p.context, I);
|
|
182
182
|
} else {
|
|
183
183
|
var ee = p.length, B;
|
|
184
|
-
for (
|
|
185
|
-
switch (p[
|
|
184
|
+
for (S = 0; S < ee; S++)
|
|
185
|
+
switch (p[S].once && this.removeListener(h, p[S].fn, void 0, !0), z) {
|
|
186
186
|
case 1:
|
|
187
|
-
p[
|
|
187
|
+
p[S].fn.call(p[S].context);
|
|
188
188
|
break;
|
|
189
189
|
case 2:
|
|
190
|
-
p[
|
|
190
|
+
p[S].fn.call(p[S].context, u);
|
|
191
191
|
break;
|
|
192
192
|
case 3:
|
|
193
|
-
p[
|
|
193
|
+
p[S].fn.call(p[S].context, u, a);
|
|
194
194
|
break;
|
|
195
195
|
case 4:
|
|
196
|
-
p[
|
|
196
|
+
p[S].fn.call(p[S].context, u, a, f);
|
|
197
197
|
break;
|
|
198
198
|
default:
|
|
199
|
-
if (!I) for (B = 1, I = new Array(
|
|
199
|
+
if (!I) for (B = 1, I = new Array(z - 1); B < z; B++)
|
|
200
200
|
I[B - 1] = arguments[B];
|
|
201
|
-
p[
|
|
201
|
+
p[S].fn.apply(p[S].context, I);
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
return !0;
|
|
@@ -215,7 +215,7 @@ var Kt = { exports: {} };
|
|
|
215
215
|
if (g.fn)
|
|
216
216
|
g.fn === u && (!f || g.once) && (!a || g.context === a) && o(this, m);
|
|
217
217
|
else {
|
|
218
|
-
for (var y = 0, p = [],
|
|
218
|
+
for (var y = 0, p = [], z = g.length; y < z; y++)
|
|
219
219
|
(g[y].fn !== u || f && !g[y].once || a && g[y].context !== a) && p.push(g[y]);
|
|
220
220
|
p.length ? this._events[m] = p.length === 1 ? p[0] : p : o(this, m);
|
|
221
221
|
}
|
|
@@ -225,23 +225,23 @@ var Kt = { exports: {} };
|
|
|
225
225
|
return h ? (u = t ? t + h : h, this._events[u] && o(this, u)) : (this._events = new i(), this._eventsCount = 0), this;
|
|
226
226
|
}, n.prototype.off = n.prototype.removeListener, n.prototype.addListener = n.prototype.on, n.prefixed = t, n.EventEmitter = n, d.exports = n;
|
|
227
227
|
})(Kt);
|
|
228
|
-
var
|
|
229
|
-
const
|
|
228
|
+
var Xi = Kt.exports;
|
|
229
|
+
const Zi = /* @__PURE__ */ ji(Xi);
|
|
230
230
|
class Vt extends Error {
|
|
231
231
|
constructor(e) {
|
|
232
232
|
super(e), this.name = "TimeoutError";
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
class
|
|
235
|
+
class Ji extends Error {
|
|
236
236
|
constructor(e) {
|
|
237
237
|
super(), this.name = "AbortError", this.message = e;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
const kt = (d) => globalThis.DOMException === void 0 ? new
|
|
240
|
+
const kt = (d) => globalThis.DOMException === void 0 ? new Ji(d) : new DOMException(d), Tt = (d) => {
|
|
241
241
|
const e = d.reason === void 0 ? kt("This operation was aborted.") : d.reason;
|
|
242
242
|
return e instanceof Error ? e : kt(e);
|
|
243
243
|
};
|
|
244
|
-
function
|
|
244
|
+
function es(d, e) {
|
|
245
245
|
const {
|
|
246
246
|
milliseconds: t,
|
|
247
247
|
fallback: i,
|
|
@@ -287,7 +287,7 @@ function Ji(d, e) {
|
|
|
287
287
|
r.clearTimeout.call(void 0, o), o = void 0;
|
|
288
288
|
}, h;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function ts(d, e, t) {
|
|
291
291
|
let i = 0, s = d.length;
|
|
292
292
|
for (; s > 0; ) {
|
|
293
293
|
const r = Math.trunc(s / 2);
|
|
@@ -297,7 +297,7 @@ function es(d, e, t) {
|
|
|
297
297
|
return i;
|
|
298
298
|
}
|
|
299
299
|
var ie;
|
|
300
|
-
class
|
|
300
|
+
class is {
|
|
301
301
|
constructor() {
|
|
302
302
|
F(this, ie, []);
|
|
303
303
|
}
|
|
@@ -315,7 +315,7 @@ class ts {
|
|
|
315
315
|
_(this, ie).push(i);
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
|
-
const s =
|
|
318
|
+
const s = ts(_(this, ie), i, (r, o) => o.priority - r.priority);
|
|
319
319
|
_(this, ie).splice(s, 0, i);
|
|
320
320
|
}
|
|
321
321
|
setPriority(e, t) {
|
|
@@ -337,13 +337,13 @@ class ts {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
ie = new WeakMap();
|
|
340
|
-
var we, Ee, ge, Le, xe, Ae, se, Ce, K,
|
|
341
|
-
class
|
|
340
|
+
var we, Ee, ge, Le, xe, Ae, se, Ce, K, Oe, re, Re, de, He, Ke, T, Qt, Yt, jt, Xt, Zt, qe, nt, ot, Pe, Jt, $e;
|
|
341
|
+
class ss extends Zi {
|
|
342
342
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
343
343
|
constructor(t) {
|
|
344
344
|
var i, s;
|
|
345
345
|
super();
|
|
346
|
-
F(this,
|
|
346
|
+
F(this, T);
|
|
347
347
|
F(this, we);
|
|
348
348
|
F(this, Ee);
|
|
349
349
|
F(this, ge, 0);
|
|
@@ -353,12 +353,12 @@ class is extends Xi {
|
|
|
353
353
|
F(this, se);
|
|
354
354
|
F(this, Ce);
|
|
355
355
|
F(this, K);
|
|
356
|
-
F(this,
|
|
356
|
+
F(this, Oe);
|
|
357
357
|
F(this, re, 0);
|
|
358
358
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
359
359
|
F(this, Re);
|
|
360
360
|
F(this, de);
|
|
361
|
-
F(this,
|
|
361
|
+
F(this, He);
|
|
362
362
|
// Use to assign a unique identifier to a promise function, if not explicitly specified
|
|
363
363
|
F(this, Ke, 1n);
|
|
364
364
|
/**
|
|
@@ -373,13 +373,13 @@ class is extends Xi {
|
|
|
373
373
|
interval: 0,
|
|
374
374
|
concurrency: Number.POSITIVE_INFINITY,
|
|
375
375
|
autoStart: !0,
|
|
376
|
-
queueClass:
|
|
376
|
+
queueClass: is,
|
|
377
377
|
...t
|
|
378
378
|
}, !(typeof t.intervalCap == "number" && t.intervalCap >= 1))
|
|
379
379
|
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})`);
|
|
380
380
|
if (t.interval === void 0 || !(Number.isFinite(t.interval) && t.interval >= 0))
|
|
381
381
|
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s = t.interval) == null ? void 0 : s.toString()) ?? ""}\` (${typeof t.interval})`);
|
|
382
|
-
|
|
382
|
+
M(this, we, t.carryoverConcurrencyCount), M(this, Ee, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), M(this, Le, t.intervalCap), M(this, xe, t.interval), M(this, K, new t.queueClass()), M(this, Oe, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, M(this, He, t.throwOnTimeout === !0), M(this, de, t.autoStart === !1);
|
|
383
383
|
}
|
|
384
384
|
get concurrency() {
|
|
385
385
|
return _(this, Re);
|
|
@@ -387,7 +387,7 @@ class is extends Xi {
|
|
|
387
387
|
set concurrency(t) {
|
|
388
388
|
if (!(typeof t == "number" && t >= 1))
|
|
389
389
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
|
|
390
|
-
|
|
390
|
+
M(this, Re, t), G(this, T, Pe).call(this);
|
|
391
391
|
}
|
|
392
392
|
/**
|
|
393
393
|
Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
|
|
@@ -431,7 +431,7 @@ class is extends Xi {
|
|
|
431
431
|
async add(t, i = {}) {
|
|
432
432
|
return i.id ?? (i.id = (ze(this, Ke)._++).toString()), i = {
|
|
433
433
|
timeout: this.timeout,
|
|
434
|
-
throwOnTimeout: _(this,
|
|
434
|
+
throwOnTimeout: _(this, He),
|
|
435
435
|
...i
|
|
436
436
|
}, new Promise((s, r) => {
|
|
437
437
|
_(this, K).enqueue(async () => {
|
|
@@ -440,7 +440,7 @@ class is extends Xi {
|
|
|
440
440
|
try {
|
|
441
441
|
(o = i.signal) == null || o.throwIfAborted();
|
|
442
442
|
let n = t({ signal: i.signal });
|
|
443
|
-
i.timeout && (n =
|
|
443
|
+
i.timeout && (n = es(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, G(this, T, Jt).call(this, i.signal)]));
|
|
444
444
|
const l = await n;
|
|
445
445
|
s(l), this.emit("completed", l);
|
|
446
446
|
} catch (n) {
|
|
@@ -450,9 +450,9 @@ class is extends Xi {
|
|
|
450
450
|
}
|
|
451
451
|
r(n), this.emit("error", n);
|
|
452
452
|
} finally {
|
|
453
|
-
G(this,
|
|
453
|
+
G(this, T, jt).call(this);
|
|
454
454
|
}
|
|
455
|
-
}, i), this.emit("add"), G(this,
|
|
455
|
+
}, i), this.emit("add"), G(this, T, qe).call(this);
|
|
456
456
|
});
|
|
457
457
|
}
|
|
458
458
|
async addAll(t, i) {
|
|
@@ -462,19 +462,19 @@ class is extends Xi {
|
|
|
462
462
|
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.)
|
|
463
463
|
*/
|
|
464
464
|
start() {
|
|
465
|
-
return _(this, de) ? (
|
|
465
|
+
return _(this, de) ? (M(this, de, !1), G(this, T, Pe).call(this), this) : this;
|
|
466
466
|
}
|
|
467
467
|
/**
|
|
468
468
|
Put queue execution on hold.
|
|
469
469
|
*/
|
|
470
470
|
pause() {
|
|
471
|
-
|
|
471
|
+
M(this, de, !0);
|
|
472
472
|
}
|
|
473
473
|
/**
|
|
474
474
|
Clear the queue.
|
|
475
475
|
*/
|
|
476
476
|
clear() {
|
|
477
|
-
|
|
477
|
+
M(this, K, new (_(this, Oe))());
|
|
478
478
|
}
|
|
479
479
|
/**
|
|
480
480
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -482,7 +482,7 @@ class is extends Xi {
|
|
|
482
482
|
@returns A promise that settles when the queue becomes empty.
|
|
483
483
|
*/
|
|
484
484
|
async onEmpty() {
|
|
485
|
-
_(this, K).size !== 0 && await G(this,
|
|
485
|
+
_(this, K).size !== 0 && await G(this, T, $e).call(this, "empty");
|
|
486
486
|
}
|
|
487
487
|
/**
|
|
488
488
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -492,7 +492,7 @@ class is extends Xi {
|
|
|
492
492
|
Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation.
|
|
493
493
|
*/
|
|
494
494
|
async onSizeLessThan(t) {
|
|
495
|
-
_(this, K).size < t || await G(this,
|
|
495
|
+
_(this, K).size < t || await G(this, T, $e).call(this, "next", () => _(this, K).size < t);
|
|
496
496
|
}
|
|
497
497
|
/**
|
|
498
498
|
The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
|
|
@@ -500,7 +500,7 @@ class is extends Xi {
|
|
|
500
500
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
501
501
|
*/
|
|
502
502
|
async onIdle() {
|
|
503
|
-
_(this, re) === 0 && _(this, K).size === 0 || await G(this,
|
|
503
|
+
_(this, re) === 0 && _(this, K).size === 0 || await G(this, T, $e).call(this, "idle");
|
|
504
504
|
}
|
|
505
505
|
/**
|
|
506
506
|
Size of the queue, the number of queued items waiting to run.
|
|
@@ -529,48 +529,48 @@ class is extends Xi {
|
|
|
529
529
|
return _(this, de);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
we = new WeakMap(), Ee = new WeakMap(), ge = new WeakMap(), Le = new WeakMap(), xe = new WeakMap(), Ae = new WeakMap(), se = new WeakMap(), Ce = new WeakMap(), K = new WeakMap(),
|
|
532
|
+
we = new WeakMap(), Ee = new WeakMap(), ge = new WeakMap(), Le = new WeakMap(), xe = new WeakMap(), Ae = new WeakMap(), se = new WeakMap(), Ce = new WeakMap(), K = new WeakMap(), Oe = new WeakMap(), re = new WeakMap(), Re = new WeakMap(), de = new WeakMap(), He = new WeakMap(), Ke = new WeakMap(), T = new WeakSet(), Qt = function() {
|
|
533
533
|
return _(this, Ee) || _(this, ge) < _(this, Le);
|
|
534
534
|
}, Yt = function() {
|
|
535
535
|
return _(this, re) < _(this, Re);
|
|
536
536
|
}, jt = function() {
|
|
537
|
-
ze(this, re)._--, G(this,
|
|
537
|
+
ze(this, re)._--, G(this, T, qe).call(this), this.emit("next");
|
|
538
538
|
}, Xt = function() {
|
|
539
|
-
G(this,
|
|
539
|
+
G(this, T, ot).call(this), G(this, T, nt).call(this), M(this, Ce, void 0);
|
|
540
540
|
}, Zt = function() {
|
|
541
541
|
const t = Date.now();
|
|
542
542
|
if (_(this, se) === void 0) {
|
|
543
543
|
const i = _(this, Ae) - t;
|
|
544
544
|
if (i < 0)
|
|
545
|
-
|
|
545
|
+
M(this, ge, _(this, we) ? _(this, re) : 0);
|
|
546
546
|
else
|
|
547
|
-
return _(this, Ce) === void 0 &&
|
|
548
|
-
G(this,
|
|
547
|
+
return _(this, Ce) === void 0 && M(this, Ce, setTimeout(() => {
|
|
548
|
+
G(this, T, Xt).call(this);
|
|
549
549
|
}, i)), !0;
|
|
550
550
|
}
|
|
551
551
|
return !1;
|
|
552
552
|
}, qe = function() {
|
|
553
553
|
if (_(this, K).size === 0)
|
|
554
|
-
return _(this, se) && clearInterval(_(this, se)),
|
|
554
|
+
return _(this, se) && clearInterval(_(this, se)), M(this, se, void 0), this.emit("empty"), _(this, re) === 0 && this.emit("idle"), !1;
|
|
555
555
|
if (!_(this, de)) {
|
|
556
|
-
const t = !_(this,
|
|
557
|
-
if (_(this,
|
|
556
|
+
const t = !_(this, T, Zt);
|
|
557
|
+
if (_(this, T, Qt) && _(this, T, Yt)) {
|
|
558
558
|
const i = _(this, K).dequeue();
|
|
559
|
-
return i ? (this.emit("active"), i(), t && G(this,
|
|
559
|
+
return i ? (this.emit("active"), i(), t && G(this, T, nt).call(this), !0) : !1;
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
return !1;
|
|
563
|
+
}, nt = function() {
|
|
564
|
+
_(this, Ee) || _(this, se) !== void 0 || (M(this, se, setInterval(() => {
|
|
565
|
+
G(this, T, ot).call(this);
|
|
566
|
+
}, _(this, xe))), M(this, Ae, Date.now() + _(this, xe)));
|
|
563
567
|
}, ot = function() {
|
|
564
|
-
_(this,
|
|
565
|
-
G(this, z, at).call(this);
|
|
566
|
-
}, _(this, xe))), O(this, Ae, Date.now() + _(this, xe)));
|
|
567
|
-
}, at = function() {
|
|
568
|
-
_(this, ge) === 0 && _(this, re) === 0 && _(this, se) && (clearInterval(_(this, se)), O(this, se, void 0)), O(this, ge, _(this, we) ? _(this, re) : 0), G(this, z, Pe).call(this);
|
|
568
|
+
_(this, ge) === 0 && _(this, re) === 0 && _(this, se) && (clearInterval(_(this, se)), M(this, se, void 0)), M(this, ge, _(this, we) ? _(this, re) : 0), G(this, T, Pe).call(this);
|
|
569
569
|
}, /**
|
|
570
570
|
Executes all queued functions until it reaches the limit.
|
|
571
571
|
*/
|
|
572
572
|
Pe = function() {
|
|
573
|
-
for (; G(this,
|
|
573
|
+
for (; G(this, T, qe).call(this); )
|
|
574
574
|
;
|
|
575
575
|
}, Jt = async function(t) {
|
|
576
576
|
return new Promise((i, s) => {
|
|
@@ -586,7 +586,7 @@ Pe = function() {
|
|
|
586
586
|
this.on(t, r);
|
|
587
587
|
});
|
|
588
588
|
};
|
|
589
|
-
const
|
|
589
|
+
const rs = () => {
|
|
590
590
|
const d = dt(), e = ye(pe);
|
|
591
591
|
if (!e)
|
|
592
592
|
return;
|
|
@@ -594,7 +594,7 @@ const ss = () => {
|
|
|
594
594
|
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.");
|
|
595
595
|
return;
|
|
596
596
|
}
|
|
597
|
-
const t = new
|
|
597
|
+
const t = new ss({
|
|
598
598
|
carryoverConcurrencyCount: !0,
|
|
599
599
|
concurrency: d.maxParallelRequests,
|
|
600
600
|
interval: d.requestInterval,
|
|
@@ -606,70 +606,70 @@ const ss = () => {
|
|
|
606
606
|
};
|
|
607
607
|
hi(pe, i);
|
|
608
608
|
};
|
|
609
|
-
function
|
|
609
|
+
function ns({
|
|
610
610
|
queryBridge: d,
|
|
611
611
|
context: e,
|
|
612
612
|
definition: t,
|
|
613
613
|
chartData: i
|
|
614
614
|
}) {
|
|
615
|
-
const { evaluateFeatureFlag: s } = ce.useEvaluateFeatureFlag(), r =
|
|
616
|
-
|
|
617
|
-
var
|
|
618
|
-
r.value = await ((
|
|
615
|
+
const { evaluateFeatureFlag: s } = ce.useEvaluateFeatureFlag(), r = L(""), o = L(""), n = L(void 0), l = L(void 0), h = s("analytics-chart-zoom-actions", !0), u = dt();
|
|
616
|
+
at(async () => {
|
|
617
|
+
var R, A;
|
|
618
|
+
r.value = await ((R = d == null ? void 0 : d.exploreBaseUrl) == null ? void 0 : R.call(d)) ?? "", o.value = await ((A = d == null ? void 0 : d.requestsBaseUrl) == null ? void 0 : A.call(d)) ?? "";
|
|
619
619
|
});
|
|
620
|
-
const a =
|
|
620
|
+
const a = k(() => u.analytics && u.percentiles), f = k(() => !["golden_signals", "top_n", "gauge"].includes(t.value.chart.type)), m = k(() => h && o.value && t.value.query && t.value.query.datasource !== "llm_usage" && a.value), g = k(() => r.value && t.value.query && ["basic", "api_usage", "llm_usage", void 0].includes(t.value.query.datasource) && a.value), y = k(() => i.value ? rt(i.value.meta.granularity_ms) : void 0), p = k(() => {
|
|
621
621
|
var Y;
|
|
622
|
-
const
|
|
623
|
-
return
|
|
624
|
-
}),
|
|
622
|
+
const R = [...e.value.filters, ...t.value.query.filters ?? []], A = ((Y = t.value.query) == null ? void 0 : Y.datasource) ?? "api_usage";
|
|
623
|
+
return R.filter((U) => Gt(U.field).some((E) => A === E));
|
|
624
|
+
}), z = k(() => {
|
|
625
625
|
if (!g.value || !f.value)
|
|
626
626
|
return "";
|
|
627
|
-
const
|
|
627
|
+
const R = p.value, A = t.value.query.time_range || e.value.timeSpec, Y = _e(A, R);
|
|
628
628
|
return be(Y);
|
|
629
|
-
}), I =
|
|
629
|
+
}), I = k(() => {
|
|
630
630
|
if (!m.value || !f.value)
|
|
631
631
|
return "";
|
|
632
|
-
const
|
|
632
|
+
const R = p.value, A = ee(
|
|
633
633
|
t.value.query.time_range || e.value.timeSpec,
|
|
634
|
-
|
|
634
|
+
R
|
|
635
635
|
);
|
|
636
|
-
return
|
|
637
|
-
}),
|
|
636
|
+
return S(A);
|
|
637
|
+
}), S = (R) => m.value ? `${o.value}?q=${JSON.stringify(R)}` : "", ee = (R, A) => {
|
|
638
638
|
var Y, U;
|
|
639
639
|
return {
|
|
640
|
-
filter:
|
|
640
|
+
filter: A,
|
|
641
641
|
timeframe: {
|
|
642
|
-
timePeriodsKey:
|
|
643
|
-
start:
|
|
644
|
-
end:
|
|
642
|
+
timePeriodsKey: R.type === "relative" ? R.time_range : "custom",
|
|
643
|
+
start: R.type === "absolute" ? (Y = i.value) == null ? void 0 : Y.meta.start_ms : void 0,
|
|
644
|
+
end: R.type === "absolute" ? (U = i.value) == null ? void 0 : U.meta.end_ms : void 0
|
|
645
645
|
}
|
|
646
646
|
};
|
|
647
|
-
}, B = (
|
|
648
|
-
filter:
|
|
647
|
+
}, B = (R, A) => ({
|
|
648
|
+
filter: A,
|
|
649
649
|
timeframe: {
|
|
650
|
-
timePeriodsKey:
|
|
651
|
-
start:
|
|
652
|
-
end:
|
|
650
|
+
timePeriodsKey: R.type === "relative" ? R.time_range : "custom",
|
|
651
|
+
start: R.type === "absolute" ? R.start : void 0,
|
|
652
|
+
end: R.type === "absolute" ? R.end : void 0
|
|
653
653
|
}
|
|
654
|
-
}), _e = (
|
|
654
|
+
}), _e = (R, A) => {
|
|
655
655
|
const Y = t.value.query.dimensions ?? [];
|
|
656
656
|
return {
|
|
657
|
-
filters:
|
|
657
|
+
filters: A,
|
|
658
658
|
metrics: t.value.query.metrics ?? [],
|
|
659
659
|
dimensions: Y,
|
|
660
|
-
time_range:
|
|
660
|
+
time_range: R,
|
|
661
661
|
granularity: t.value.query.granularity || y.value
|
|
662
662
|
};
|
|
663
|
-
}, be = (
|
|
663
|
+
}, be = (R) => {
|
|
664
664
|
if (!g.value)
|
|
665
665
|
return "";
|
|
666
|
-
const
|
|
667
|
-
return `${r.value}?q=${JSON.stringify(
|
|
666
|
+
const A = ["api_usage", "llm_usage"].includes(t.value.query.datasource) ? t.value.query.datasource : "api_usage";
|
|
667
|
+
return `${r.value}?q=${JSON.stringify(R)}&d=${A}&c=${t.value.chart.type}`;
|
|
668
668
|
};
|
|
669
|
-
return Ve([m, g], ([
|
|
670
|
-
|
|
669
|
+
return Ve([m, g], ([R, A]) => {
|
|
670
|
+
R && (n.value = { href: "" }), A && (l.value = { href: "" });
|
|
671
671
|
}), {
|
|
672
|
-
exploreLinkKebabMenu:
|
|
672
|
+
exploreLinkKebabMenu: z,
|
|
673
673
|
requestsLinkKebabMenu: I,
|
|
674
674
|
canShowKebabMenu: f,
|
|
675
675
|
canGenerateRequestsLink: m,
|
|
@@ -679,16 +679,16 @@ function rs({
|
|
|
679
679
|
buildExploreQuery: _e,
|
|
680
680
|
buildRequestsQueryZoomActions: B,
|
|
681
681
|
buildExploreLink: be,
|
|
682
|
-
buildRequestLink:
|
|
682
|
+
buildRequestLink: S
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
const
|
|
685
|
+
const os = (d, e, t) => {
|
|
686
686
|
const i = [];
|
|
687
687
|
return e && i.push(...e), i.push(...mi(d, t)), i;
|
|
688
688
|
};
|
|
689
|
-
function
|
|
689
|
+
function as() {
|
|
690
690
|
const d = ye(pe), e = new AbortController();
|
|
691
|
-
return
|
|
691
|
+
return lt(() => {
|
|
692
692
|
e.abort();
|
|
693
693
|
}), { issueQuery: async (i, s, r) => {
|
|
694
694
|
if (!d)
|
|
@@ -697,7 +697,7 @@ function os() {
|
|
|
697
697
|
datasource: o,
|
|
698
698
|
limit: n,
|
|
699
699
|
...l
|
|
700
|
-
} = i, h = o || "basic", u =
|
|
700
|
+
} = i, h = o || "basic", u = os(h, i.filters, s.filters);
|
|
701
701
|
let a = i.time_range;
|
|
702
702
|
a ? a.tz || (a = {
|
|
703
703
|
...a,
|
|
@@ -719,11 +719,11 @@ function os() {
|
|
|
719
719
|
} };
|
|
720
720
|
}
|
|
721
721
|
const ce = {
|
|
722
|
-
useContextLinks:
|
|
723
|
-
useEvaluateFeatureFlag:
|
|
724
|
-
useI18n:
|
|
725
|
-
useIssueQuery:
|
|
726
|
-
useRequestQueue:
|
|
722
|
+
useContextLinks: ns,
|
|
723
|
+
useEvaluateFeatureFlag: Yi,
|
|
724
|
+
useI18n: Bi,
|
|
725
|
+
useIssueQuery: as,
|
|
726
|
+
useRequestQueue: rs
|
|
727
727
|
}, ct = /* @__PURE__ */ J({
|
|
728
728
|
__name: "QueryDataProvider",
|
|
729
729
|
props: {
|
|
@@ -747,53 +747,42 @@ const ce = {
|
|
|
747
747
|
refreshInterval: t.context.refreshInterval,
|
|
748
748
|
revalidateOnFocus: !1,
|
|
749
749
|
shouldRetryOnError: !1
|
|
750
|
-
}), { state: u, swrvState: a } = Hi(n, l, h), f =
|
|
750
|
+
}), { state: u, swrvState: a } = Hi(n, l, h), f = L(null), m = k(() => u.value === a.ERROR || !!f.value), g = k(() => !t.queryReady || u.value === a.PENDING);
|
|
751
751
|
return Ve(n, (y) => {
|
|
752
752
|
y && i("chart-data", y);
|
|
753
753
|
}), (y, p) => {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
return g.value || !x(n) && !m.value ? (C(), M(S, {
|
|
754
|
+
const z = me("KSkeleton"), I = me("KEmptyState");
|
|
755
|
+
return g.value || !x(n) && !m.value ? (C(), N(z, {
|
|
757
756
|
key: 0,
|
|
758
757
|
class: "chart-skeleton",
|
|
759
758
|
type: "table"
|
|
760
|
-
})) : m.value &&
|
|
759
|
+
})) : m.value && f.value ? (C(), N(I, {
|
|
761
760
|
key: 1,
|
|
762
761
|
"action-button-visible": !1,
|
|
763
|
-
"data-testid": "chart-
|
|
764
|
-
}, {
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
]),
|
|
768
|
-
icon: q(() => [
|
|
769
|
-
le(x(Ti))
|
|
762
|
+
"data-testid": "chart-empty-state"
|
|
763
|
+
}, Qe({
|
|
764
|
+
icon: $(() => [
|
|
765
|
+
f.value.type === "forbidden" ? (C(), N(x(Ti), { key: 0 })) : (C(), N(x(zi), { key: 1 }))
|
|
770
766
|
]),
|
|
771
|
-
|
|
772
|
-
})) : m.value && f.value ? (C(), M(I, {
|
|
773
|
-
key: 2,
|
|
774
|
-
"action-button-visible": !1,
|
|
775
|
-
"data-testid": "chart-empty-state",
|
|
776
|
-
"icon-variant": "error"
|
|
777
|
-
}, Ye({
|
|
778
|
-
title: q(() => [
|
|
767
|
+
title: $(() => [
|
|
779
768
|
oe("p", null, ne(f.value.message), 1)
|
|
780
769
|
]),
|
|
781
770
|
_: 2
|
|
782
771
|
}, [
|
|
783
772
|
f.value.details ? {
|
|
784
773
|
name: "default",
|
|
785
|
-
fn:
|
|
774
|
+
fn: $(() => [
|
|
786
775
|
oe("p", null, ne(f.value.details), 1)
|
|
787
776
|
]),
|
|
788
777
|
key: "0"
|
|
789
778
|
} : void 0
|
|
790
779
|
]), 1024)) : x(n) ? Se(y.$slots, "default", {
|
|
791
|
-
key:
|
|
780
|
+
key: 2,
|
|
792
781
|
data: x(n)
|
|
793
782
|
}) : Q("", !0);
|
|
794
783
|
};
|
|
795
784
|
}
|
|
796
|
-
}),
|
|
785
|
+
}), ls = /* @__PURE__ */ J({
|
|
797
786
|
__name: "SimpleChartRenderer",
|
|
798
787
|
props: {
|
|
799
788
|
query: {},
|
|
@@ -806,21 +795,21 @@ const ce = {
|
|
|
806
795
|
exploreLink: {}
|
|
807
796
|
},
|
|
808
797
|
setup(d) {
|
|
809
|
-
|
|
798
|
+
Ye((i) => ({
|
|
810
799
|
"088169ae": `${i.height}px`
|
|
811
800
|
}));
|
|
812
|
-
const e = d, t =
|
|
813
|
-
return (i, s) => (C(),
|
|
801
|
+
const e = d, t = k(() => e.chartOptions.type === "single_value");
|
|
802
|
+
return (i, s) => (C(), N(ct, {
|
|
814
803
|
context: i.context,
|
|
815
804
|
query: i.query,
|
|
816
805
|
"query-ready": i.queryReady,
|
|
817
806
|
"refresh-counter": i.refreshCounter
|
|
818
807
|
}, {
|
|
819
|
-
default:
|
|
808
|
+
default: $(({ data: r }) => [
|
|
820
809
|
oe("div", {
|
|
821
|
-
class:
|
|
810
|
+
class: je(["analytics-chart", { "single-value": t.value }])
|
|
822
811
|
}, [
|
|
823
|
-
|
|
812
|
+
ue(x(bi), {
|
|
824
813
|
"chart-data": r,
|
|
825
814
|
"chart-options": i.chartOptions,
|
|
826
815
|
"synthetics-data-key": t.value ? void 0 : i.chartOptions.synthetics_data_key
|
|
@@ -835,7 +824,7 @@ const ce = {
|
|
|
835
824
|
for (const [i, s] of e)
|
|
836
825
|
t[i] = s;
|
|
837
826
|
return t;
|
|
838
|
-
}, zt = /* @__PURE__ */ ve(
|
|
827
|
+
}, zt = /* @__PURE__ */ ve(ls, [["__scopeId", "data-v-1e9ff912"]]), hs = { class: "analytics-chart" }, us = /* @__PURE__ */ J({
|
|
839
828
|
__name: "BaseAnalyticsChartRenderer",
|
|
840
829
|
props: {
|
|
841
830
|
query: {},
|
|
@@ -850,28 +839,28 @@ const ce = {
|
|
|
850
839
|
},
|
|
851
840
|
emits: ["edit-tile", "chart-data", "zoom-time-range", "view-requests", "select-chart-range"],
|
|
852
841
|
setup(d, { emit: e }) {
|
|
853
|
-
const t = d, i = e, { i18n: s } = ce.useI18n(), { evaluateFeatureFlag: r } = ce.useEvaluateFeatureFlag(), o = r("ma-4135-allow-zooming-all-dashboard-tiles", !1), n =
|
|
842
|
+
const t = d, i = e, { i18n: s } = ce.useI18n(), { evaluateFeatureFlag: r } = ce.useEvaluateFeatureFlag(), o = r("ma-4135-allow-zooming-all-dashboard-tiles", !1), n = k(() => ({
|
|
854
843
|
type: t.chartOptions.type,
|
|
855
844
|
stacked: t.chartOptions.stacked ?? !1,
|
|
856
845
|
chartDatasetColors: t.chartOptions.chart_dataset_colors,
|
|
857
846
|
threshold: t.chartOptions.threshold
|
|
858
|
-
})), l =
|
|
847
|
+
})), l = k(() => o ? t.context.zoomable : t.context.zoomable && !t.query.time_range), h = () => {
|
|
859
848
|
i("edit-tile");
|
|
860
849
|
}, u = (a) => {
|
|
861
850
|
i("chart-data", a);
|
|
862
851
|
};
|
|
863
852
|
return (a, f) => {
|
|
864
853
|
const m = me("KDropdownItem");
|
|
865
|
-
return C(),
|
|
854
|
+
return C(), N(ct, {
|
|
866
855
|
context: a.context,
|
|
867
856
|
query: a.query,
|
|
868
857
|
"query-ready": a.queryReady,
|
|
869
858
|
"refresh-counter": a.refreshCounter,
|
|
870
859
|
onChartData: u
|
|
871
860
|
}, {
|
|
872
|
-
default:
|
|
873
|
-
oe("div",
|
|
874
|
-
|
|
861
|
+
default: $(({ data: g }) => [
|
|
862
|
+
oe("div", hs, [
|
|
863
|
+
ue(x(wi), It({
|
|
875
864
|
"chart-data": g,
|
|
876
865
|
"chart-options": n.value,
|
|
877
866
|
"explore-link": a.exploreLink,
|
|
@@ -883,13 +872,13 @@ const ce = {
|
|
|
883
872
|
}, a.extraProps, {
|
|
884
873
|
onSelectChartRange: f[0] || (f[0] = (y) => i("select-chart-range", y)),
|
|
885
874
|
onZoomTimeRange: f[1] || (f[1] = (y) => i("zoom-time-range", y))
|
|
886
|
-
}),
|
|
875
|
+
}), Qe({ _: 2 }, [
|
|
887
876
|
a.context.editable ? {
|
|
888
877
|
name: "menu-items",
|
|
889
|
-
fn:
|
|
890
|
-
|
|
891
|
-
default:
|
|
892
|
-
|
|
878
|
+
fn: $(() => [
|
|
879
|
+
ue(m, { onClick: h }, {
|
|
880
|
+
default: $(() => [
|
|
881
|
+
ht(ne(x(s).t("renderer.edit")), 1)
|
|
893
882
|
]),
|
|
894
883
|
_: 1
|
|
895
884
|
})
|
|
@@ -903,7 +892,7 @@ const ce = {
|
|
|
903
892
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]);
|
|
904
893
|
};
|
|
905
894
|
}
|
|
906
|
-
}), ft = /* @__PURE__ */ ve(
|
|
895
|
+
}), ft = /* @__PURE__ */ ve(us, [["__scopeId", "data-v-965790dd"]]), St = /* @__PURE__ */ J({
|
|
907
896
|
__name: "BarChartRenderer",
|
|
908
897
|
props: {
|
|
909
898
|
query: {},
|
|
@@ -916,7 +905,7 @@ const ce = {
|
|
|
916
905
|
exploreLink: {}
|
|
917
906
|
},
|
|
918
907
|
setup(d) {
|
|
919
|
-
return (e, t) => (C(),
|
|
908
|
+
return (e, t) => (C(), N(ft, {
|
|
920
909
|
"chart-options": e.chartOptions,
|
|
921
910
|
context: e.context,
|
|
922
911
|
"extra-props": { showAnnotations: !1 },
|
|
@@ -941,7 +930,7 @@ const ce = {
|
|
|
941
930
|
emits: ["zoom-time-range", "select-chart-range"],
|
|
942
931
|
setup(d, { emit: e }) {
|
|
943
932
|
const t = e;
|
|
944
|
-
return (i, s) => (C(),
|
|
933
|
+
return (i, s) => (C(), N(ft, {
|
|
945
934
|
"chart-options": i.chartOptions,
|
|
946
935
|
context: i.context,
|
|
947
936
|
"explore-link": i.exploreLink,
|
|
@@ -954,7 +943,7 @@ const ce = {
|
|
|
954
943
|
onZoomTimeRange: s[1] || (s[1] = (r) => t("zoom-time-range", r))
|
|
955
944
|
}, null, 8, ["chart-options", "context", "explore-link", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
|
|
956
945
|
}
|
|
957
|
-
}),
|
|
946
|
+
}), ds = { class: "metric-card-tile-wrapper" }, cs = /* @__PURE__ */ J({
|
|
958
947
|
__name: "GoldenSignalsRenderer",
|
|
959
948
|
props: {
|
|
960
949
|
query: {},
|
|
@@ -967,7 +956,7 @@ const ce = {
|
|
|
967
956
|
exploreLink: {}
|
|
968
957
|
},
|
|
969
958
|
setup(d) {
|
|
970
|
-
const e = d, t =
|
|
959
|
+
const e = d, t = k(() => {
|
|
971
960
|
const s = e.context.timeSpec;
|
|
972
961
|
if (s.type === "absolute")
|
|
973
962
|
return new pi({
|
|
@@ -986,7 +975,7 @@ const ce = {
|
|
|
986
975
|
if (!r)
|
|
987
976
|
throw new Error("Unknown time range");
|
|
988
977
|
return r;
|
|
989
|
-
}), i =
|
|
978
|
+
}), i = k(() => {
|
|
990
979
|
var r, o;
|
|
991
980
|
const s = (r = e.query) == null ? void 0 : r.datasource;
|
|
992
981
|
if (s && s !== "api_usage" && s !== "basic")
|
|
@@ -1004,16 +993,16 @@ const ce = {
|
|
|
1004
993
|
refreshCounter: e.refreshCounter
|
|
1005
994
|
};
|
|
1006
995
|
});
|
|
1007
|
-
return (s, r) => (C(), V("div",
|
|
1008
|
-
|
|
1009
|
-
default:
|
|
1010
|
-
|
|
996
|
+
return (s, r) => (C(), V("div", ds, [
|
|
997
|
+
ue(x(Li), ui(di(i.value)), {
|
|
998
|
+
default: $(() => [
|
|
999
|
+
ue(x(Ai))
|
|
1011
1000
|
]),
|
|
1012
1001
|
_: 1
|
|
1013
1002
|
}, 16)
|
|
1014
1003
|
]));
|
|
1015
1004
|
}
|
|
1016
|
-
}),
|
|
1005
|
+
}), fs = /* @__PURE__ */ ve(cs, [["__scopeId", "data-v-7e1b1cc1"]]), Nt = "#6c7489", gs = "12px", Lt = "20px", ei = "20px", ms = {
|
|
1017
1006
|
class: "fallback-entity-link",
|
|
1018
1007
|
"data-testid": "entity-link-parent"
|
|
1019
1008
|
}, At = /* @__PURE__ */ J({
|
|
@@ -1022,9 +1011,9 @@ const ce = {
|
|
|
1022
1011
|
entityLinkData: {}
|
|
1023
1012
|
},
|
|
1024
1013
|
setup(d) {
|
|
1025
|
-
return (e, t) => (C(), V("div",
|
|
1014
|
+
return (e, t) => (C(), V("div", ms, ne(e.entityLinkData.label), 1));
|
|
1026
1015
|
}
|
|
1027
|
-
}),
|
|
1016
|
+
}), ps = /* @__PURE__ */ J({
|
|
1028
1017
|
__name: "TopNTableRenderer",
|
|
1029
1018
|
props: {
|
|
1030
1019
|
query: {},
|
|
@@ -1050,26 +1039,26 @@ const ce = {
|
|
|
1050
1039
|
if ((o = e.chartOptions) != null && o.entity_link)
|
|
1051
1040
|
if (r.id.includes(":")) {
|
|
1052
1041
|
const [n, l] = r.id.split(":");
|
|
1053
|
-
return e.chartOptions.entity_link.replace(
|
|
1042
|
+
return e.chartOptions.entity_link.replace(Ui, n).replace(Rt, l);
|
|
1054
1043
|
} else
|
|
1055
1044
|
return e.chartOptions.entity_link.replace(Rt, r.id);
|
|
1056
1045
|
return "";
|
|
1057
1046
|
};
|
|
1058
|
-
return (r, o) => (C(),
|
|
1047
|
+
return (r, o) => (C(), N(ct, {
|
|
1059
1048
|
context: r.context,
|
|
1060
1049
|
query: r.query,
|
|
1061
1050
|
"query-ready": r.queryReady,
|
|
1062
1051
|
"refresh-counter": r.refreshCounter
|
|
1063
1052
|
}, {
|
|
1064
|
-
default:
|
|
1065
|
-
|
|
1053
|
+
default: $(({ data: n }) => [
|
|
1054
|
+
ue(x(Ei), {
|
|
1066
1055
|
data: n,
|
|
1067
1056
|
"synthetics-data-key": r.chartOptions.synthetics_data_key
|
|
1068
|
-
},
|
|
1057
|
+
}, Qe({ _: 2 }, [
|
|
1069
1058
|
e.chartOptions.entity_link ? {
|
|
1070
1059
|
name: "name",
|
|
1071
|
-
fn:
|
|
1072
|
-
|
|
1060
|
+
fn: $(({ record: l }) => [
|
|
1061
|
+
ue(x(i), {
|
|
1073
1062
|
"entity-link-data": {
|
|
1074
1063
|
id: l.id,
|
|
1075
1064
|
label: l.name,
|
|
@@ -1085,7 +1074,7 @@ const ce = {
|
|
|
1085
1074
|
_: 1
|
|
1086
1075
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
1087
1076
|
}
|
|
1088
|
-
}),
|
|
1077
|
+
}), ys = /* @__PURE__ */ J({
|
|
1089
1078
|
__name: "DonutChartRenderer",
|
|
1090
1079
|
props: {
|
|
1091
1080
|
query: {},
|
|
@@ -1098,7 +1087,7 @@ const ce = {
|
|
|
1098
1087
|
exploreLink: {}
|
|
1099
1088
|
},
|
|
1100
1089
|
setup(d) {
|
|
1101
|
-
return (e, t) => (C(),
|
|
1090
|
+
return (e, t) => (C(), N(ft, {
|
|
1102
1091
|
"chart-options": e.chartOptions,
|
|
1103
1092
|
context: e.context,
|
|
1104
1093
|
height: e.height,
|
|
@@ -1107,15 +1096,15 @@ const ce = {
|
|
|
1107
1096
|
"refresh-counter": e.refreshCounter
|
|
1108
1097
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
|
|
1109
1098
|
}
|
|
1110
|
-
}),
|
|
1099
|
+
}), vs = ["data-testid"], _s = {
|
|
1111
1100
|
key: 0,
|
|
1112
1101
|
class: "tile-header"
|
|
1113
|
-
},
|
|
1102
|
+
}, bs = ["data-testid"], ws = { class: "badge-text" }, Es = ["data-testid"], xs = { class: "delete-option" }, Cs = ["data-testid"], Rs = ["data-testid"], ks = /* @__PURE__ */ J({
|
|
1114
1103
|
__name: "DashboardTile",
|
|
1115
1104
|
props: {
|
|
1116
1105
|
definition: {},
|
|
1117
1106
|
context: {},
|
|
1118
|
-
height: { default:
|
|
1107
|
+
height: { default: Xe },
|
|
1119
1108
|
isFullscreen: { type: Boolean },
|
|
1120
1109
|
queryReady: { type: Boolean },
|
|
1121
1110
|
refreshCounter: {},
|
|
@@ -1123,51 +1112,51 @@ const ce = {
|
|
|
1123
1112
|
},
|
|
1124
1113
|
emits: ["edit-tile", "duplicate-tile", "remove-tile", "tile-time-range-zoom"],
|
|
1125
1114
|
setup(d, { emit: e }) {
|
|
1126
|
-
|
|
1115
|
+
Ye((v) => ({
|
|
1127
1116
|
"0b59d877": `${v.height}px`
|
|
1128
1117
|
}));
|
|
1129
|
-
const t = parseInt(ei, 10), i = d, s = e, r = qt(() => import("./GeoMapRenderer-
|
|
1118
|
+
const t = parseInt(ei, 10), i = d, s = e, r = qt(() => import("./GeoMapRenderer-BifWCeUK.js")), o = ye(pe), n = o == null ? void 0 : o.evaluateFeatureFlagFn("analytics-chart-zoom-actions", !1), { i18n: l } = ce.useI18n(), h = L(), u = L({ status: "loading" }), a = L(!1), f = L(), m = L(!1), g = L(!0), {
|
|
1130
1119
|
exploreLinkKebabMenu: y,
|
|
1131
1120
|
requestsLinkKebabMenu: p,
|
|
1132
|
-
canShowKebabMenu:
|
|
1121
|
+
canShowKebabMenu: z,
|
|
1133
1122
|
canGenerateRequestsLink: I,
|
|
1134
|
-
canGenerateExploreLink:
|
|
1123
|
+
canGenerateExploreLink: S,
|
|
1135
1124
|
requestsLinkZoomActions: ee,
|
|
1136
1125
|
exploreLinkZoomActions: B,
|
|
1137
1126
|
buildExploreQuery: _e,
|
|
1138
1127
|
buildExploreLink: be,
|
|
1139
|
-
buildRequestLink:
|
|
1140
|
-
buildRequestsQueryZoomActions:
|
|
1128
|
+
buildRequestLink: R,
|
|
1129
|
+
buildRequestsQueryZoomActions: A
|
|
1141
1130
|
} = ce.useContextLinks({
|
|
1142
1131
|
queryBridge: o,
|
|
1143
|
-
chartData:
|
|
1144
|
-
definition:
|
|
1145
|
-
context:
|
|
1132
|
+
chartData: st(h),
|
|
1133
|
+
definition: st(wt(i, "definition")),
|
|
1134
|
+
context: st(wt(i, "context"))
|
|
1146
1135
|
}), { issueQuery: Y } = ce.useIssueQuery();
|
|
1147
1136
|
Ve(() => i.definition, async () => {
|
|
1148
1137
|
await ut(), f.value && (m.value = f.value.scrollWidth > f.value.clientWidth), g.value = !0;
|
|
1149
1138
|
}, { immediate: !0, deep: !0 });
|
|
1150
|
-
const U =
|
|
1139
|
+
const U = k(() => l.t("csvExport.defaultFilename")), Me = k(() => z.value && (E.value || i.context.editable) || !!j.value), E = k(() => !!y.value || ("allow_csv_export" in i.definition.chart ? i.definition.chart.allow_csv_export : !0) || i.context.editable), D = {
|
|
1151
1140
|
timeseries_line: Dt,
|
|
1152
1141
|
timeseries_bar: Dt,
|
|
1153
1142
|
horizontal_bar: St,
|
|
1154
1143
|
vertical_bar: St,
|
|
1155
1144
|
gauge: zt,
|
|
1156
|
-
donut:
|
|
1157
|
-
golden_signals:
|
|
1158
|
-
top_n:
|
|
1145
|
+
donut: ys,
|
|
1146
|
+
golden_signals: fs,
|
|
1147
|
+
top_n: ps,
|
|
1159
1148
|
slottable: void 0,
|
|
1160
1149
|
single_value: zt,
|
|
1161
1150
|
choropleth_map: r
|
|
1162
|
-
},
|
|
1163
|
-
var v,
|
|
1151
|
+
}, O = k(() => {
|
|
1152
|
+
var v, q;
|
|
1164
1153
|
return {
|
|
1165
1154
|
...(v = H.value) != null && v.rendererEvents.supportsRequests ? { "select-chart-range": ni } : {},
|
|
1166
|
-
...(
|
|
1155
|
+
...(q = H.value) != null && q.rendererEvents.supportsZoom ? { "zoom-time-range": ri } : {}
|
|
1167
1156
|
};
|
|
1168
|
-
}), H =
|
|
1157
|
+
}), H = k(() => {
|
|
1169
1158
|
var te, X;
|
|
1170
|
-
const v = D[i.definition.chart.type],
|
|
1159
|
+
const v = D[i.definition.chart.type], q = !!((te = v == null ? void 0 : v.emits) != null && te.includes("select-chart-range")), P = !!((X = v == null ? void 0 : v.emits) != null && X.includes("zoom-time-range"));
|
|
1171
1160
|
return v && {
|
|
1172
1161
|
component: v,
|
|
1173
1162
|
rendererProps: {
|
|
@@ -1181,43 +1170,43 @@ const ce = {
|
|
|
1181
1170
|
exploreLink: B.value
|
|
1182
1171
|
},
|
|
1183
1172
|
rendererEvents: {
|
|
1184
|
-
supportsRequests:
|
|
1185
|
-
supportsZoom:
|
|
1173
|
+
supportsRequests: q,
|
|
1174
|
+
supportsZoom: P
|
|
1186
1175
|
}
|
|
1187
1176
|
};
|
|
1188
|
-
}), j =
|
|
1189
|
-
var
|
|
1190
|
-
const v = (
|
|
1177
|
+
}), j = k(() => {
|
|
1178
|
+
var q;
|
|
1179
|
+
const v = (q = i.definition.query) == null ? void 0 : q.time_range;
|
|
1191
1180
|
if ((v == null ? void 0 : v.type) === "relative") {
|
|
1192
|
-
const
|
|
1193
|
-
return
|
|
1181
|
+
const P = Bt.get(yi[v.time_range]);
|
|
1182
|
+
return P ? P.display : (console.warn("Did not recognize the given relative time range:", v.time_range), v.time_range);
|
|
1194
1183
|
} else if ((v == null ? void 0 : v.type) === "absolute") {
|
|
1195
|
-
const
|
|
1196
|
-
return `${Ct(v.start, { short: !0, tz:
|
|
1184
|
+
const P = v.tz || "Etc/UTC";
|
|
1185
|
+
return `${Ct(v.start, { short: !0, tz: P })} - ${Ct(v.end, { short: !0, tz: P })}`;
|
|
1197
1186
|
}
|
|
1198
1187
|
return null;
|
|
1199
|
-
}), fe =
|
|
1200
|
-
var
|
|
1188
|
+
}), fe = k(() => h.value ? rt(h.value.meta.granularity_ms) : void 0), Ie = k(() => ["timeseries_line", "timeseries_bar"].includes(i.definition.chart.type)), ke = k(() => {
|
|
1189
|
+
var q, P;
|
|
1201
1190
|
if (!Ie.value || !i.queryReady || g.value)
|
|
1202
1191
|
return !1;
|
|
1203
|
-
const v = (
|
|
1192
|
+
const v = (P = (q = i.definition) == null ? void 0 : q.query) == null ? void 0 : P.granularity;
|
|
1204
1193
|
return !v || !fe.value ? !1 : v !== fe.value;
|
|
1205
|
-
}), Te =
|
|
1206
|
-
var
|
|
1207
|
-
const v =
|
|
1194
|
+
}), Te = k(() => {
|
|
1195
|
+
var P, te, X;
|
|
1196
|
+
const v = rt(((P = h.value) == null ? void 0 : P.meta.granularity_ms) ?? 0) ?? "unknown", q = ((X = (te = i.definition) == null ? void 0 : te.query) == null ? void 0 : X.granularity) ?? "unknown";
|
|
1208
1197
|
return l.t("query_aged_out_warning", {
|
|
1209
1198
|
currentGranularity: l.t(`granularities.${v}`),
|
|
1210
|
-
savedGranularity: l.t(`granularities.${
|
|
1199
|
+
savedGranularity: l.t(`granularities.${q}`)
|
|
1211
1200
|
});
|
|
1212
|
-
}),
|
|
1213
|
-
var
|
|
1214
|
-
const v = [...i.context.filters, ...i.definition.query.filters ?? []],
|
|
1215
|
-
return v.filter((X) => Gt(X.field).some((oi) =>
|
|
1201
|
+
}), Je = k(() => {
|
|
1202
|
+
var P, te;
|
|
1203
|
+
const v = [...i.context.filters, ...i.definition.query.filters ?? []], q = ((te = (P = i.definition) == null ? void 0 : P.query) == null ? void 0 : te.datasource) ?? "api_usage";
|
|
1204
|
+
return v.filter((X) => Gt(X.field).some((oi) => q === oi));
|
|
1216
1205
|
}), pt = () => {
|
|
1217
1206
|
s("edit-tile", i.definition);
|
|
1218
|
-
},
|
|
1207
|
+
}, et = () => {
|
|
1219
1208
|
s("duplicate-tile", i.definition);
|
|
1220
|
-
},
|
|
1209
|
+
}, tt = () => {
|
|
1221
1210
|
s("remove-tile", i.definition);
|
|
1222
1211
|
}, yt = (v) => {
|
|
1223
1212
|
h.value = v, g.value = !1;
|
|
@@ -1230,29 +1219,29 @@ const ce = {
|
|
|
1230
1219
|
u.value = { status: "error", error: v };
|
|
1231
1220
|
});
|
|
1232
1221
|
}, ri = (v) => {
|
|
1233
|
-
const
|
|
1222
|
+
const q = {
|
|
1234
1223
|
tileId: i.tileId.toString(),
|
|
1235
1224
|
timeRange: v
|
|
1236
1225
|
};
|
|
1237
|
-
s("tile-time-range-zoom",
|
|
1226
|
+
s("tile-time-range-zoom", q);
|
|
1238
1227
|
}, ni = (v) => {
|
|
1239
|
-
const
|
|
1240
|
-
ee.value = I.value ? { href:
|
|
1228
|
+
const q = Je.value, P = A(v, q), te = _e(v, q);
|
|
1229
|
+
ee.value = I.value ? { href: R(P) } : void 0, B.value = S.value ? { href: be(te) } : void 0;
|
|
1241
1230
|
};
|
|
1242
|
-
return (v,
|
|
1243
|
-
const
|
|
1231
|
+
return (v, q) => {
|
|
1232
|
+
const P = me("KTooltip"), te = me("KBadge"), X = me("KDropdownItem"), vt = me("KDropdown");
|
|
1244
1233
|
return C(), V("div", {
|
|
1245
|
-
class:
|
|
1234
|
+
class: je(["tile-boundary", { editable: v.context.editable }]),
|
|
1246
1235
|
"data-testid": `tile-${v.tileId}`
|
|
1247
1236
|
}, [
|
|
1248
|
-
v.definition.chart.type !== "slottable" ? (C(), V("div",
|
|
1249
|
-
|
|
1237
|
+
v.definition.chart.type !== "slottable" ? (C(), V("div", _s, [
|
|
1238
|
+
ue(P, {
|
|
1250
1239
|
class: "title-tooltip",
|
|
1251
1240
|
disabled: !m.value,
|
|
1252
1241
|
"max-width": "500",
|
|
1253
1242
|
text: v.definition.chart.chart_title
|
|
1254
1243
|
}, {
|
|
1255
|
-
default:
|
|
1244
|
+
default: $(() => [
|
|
1256
1245
|
oe("div", {
|
|
1257
1246
|
ref_key: "titleRef",
|
|
1258
1247
|
ref: f,
|
|
@@ -1266,26 +1255,26 @@ const ce = {
|
|
|
1266
1255
|
class: "tile-actions",
|
|
1267
1256
|
"data-testid": `tile-actions-${v.tileId}`
|
|
1268
1257
|
}, [
|
|
1269
|
-
j.value ? (C(),
|
|
1258
|
+
j.value ? (C(), N(te, {
|
|
1270
1259
|
key: 0,
|
|
1271
1260
|
"data-testid": "time-range-badge",
|
|
1272
1261
|
tooltip: ke.value ? Te.value : void 0,
|
|
1273
1262
|
"tooltip-attributes": { maxWidth: "320px" }
|
|
1274
|
-
},
|
|
1275
|
-
default:
|
|
1276
|
-
oe("span",
|
|
1263
|
+
}, Qe({
|
|
1264
|
+
default: $(() => [
|
|
1265
|
+
oe("span", ws, ne(j.value), 1)
|
|
1277
1266
|
]),
|
|
1278
1267
|
_: 2
|
|
1279
1268
|
}, [
|
|
1280
1269
|
ke.value ? {
|
|
1281
1270
|
name: "icon",
|
|
1282
|
-
fn:
|
|
1283
|
-
|
|
1271
|
+
fn: $(() => [
|
|
1272
|
+
ue(x(Si), { size: x(gs) }, null, 8, ["size"])
|
|
1284
1273
|
]),
|
|
1285
1274
|
key: "0"
|
|
1286
1275
|
} : void 0
|
|
1287
1276
|
]), 1032, ["tooltip"])) : Q("", !0),
|
|
1288
|
-
x(
|
|
1277
|
+
x(z) && v.context.editable && !v.isFullscreen ? (C(), N(x(Di), {
|
|
1289
1278
|
key: 1,
|
|
1290
1279
|
class: "edit-icon",
|
|
1291
1280
|
color: x(Nt),
|
|
@@ -1293,60 +1282,60 @@ const ce = {
|
|
|
1293
1282
|
size: x(Lt),
|
|
1294
1283
|
onClick: pt
|
|
1295
1284
|
}, null, 8, ["color", "data-testid", "size"])) : Q("", !0),
|
|
1296
|
-
x(
|
|
1285
|
+
x(z) && E.value && !v.isFullscreen ? (C(), N(vt, {
|
|
1297
1286
|
key: 2,
|
|
1298
1287
|
class: "dropdown",
|
|
1299
1288
|
"data-testid": `chart-action-menu-${v.tileId}`,
|
|
1300
1289
|
"kpop-attributes": { placement: "bottom-end" }
|
|
1301
1290
|
}, {
|
|
1302
|
-
items:
|
|
1303
|
-
x(y) ? (C(),
|
|
1291
|
+
items: $(() => [
|
|
1292
|
+
x(y) ? (C(), N(X, {
|
|
1304
1293
|
key: 0,
|
|
1305
1294
|
"data-testid": `chart-jump-to-explore-${v.tileId}`,
|
|
1306
1295
|
item: { label: x(l).t("jumpToExplore"), to: x(y) }
|
|
1307
1296
|
}, null, 8, ["data-testid", "item"])) : Q("", !0),
|
|
1308
|
-
x(n) && x(p) ? (C(),
|
|
1297
|
+
x(n) && x(p) ? (C(), N(X, {
|
|
1309
1298
|
key: 1,
|
|
1310
1299
|
"data-testid": `chart-jump-to-requests-${v.tileId}`,
|
|
1311
1300
|
item: { label: x(l).t("jumpToRequests"), to: x(p) }
|
|
1312
1301
|
}, null, 8, ["data-testid", "item"])) : Q("", !0),
|
|
1313
|
-
!("allow_csv_export" in v.definition.chart) || v.definition.chart.allow_csv_export ? (C(),
|
|
1302
|
+
!("allow_csv_export" in v.definition.chart) || v.definition.chart.allow_csv_export ? (C(), N(X, {
|
|
1314
1303
|
key: 2,
|
|
1315
1304
|
class: "chart-export-button",
|
|
1316
1305
|
"data-testid": `chart-csv-export-${v.tileId}`,
|
|
1317
1306
|
onClick: si
|
|
1318
1307
|
}, {
|
|
1319
|
-
default:
|
|
1308
|
+
default: $(() => [
|
|
1320
1309
|
oe("span", {
|
|
1321
1310
|
class: "chart-export-trigger",
|
|
1322
1311
|
"data-testid": `csv-export-button-${v.tileId}`
|
|
1323
|
-
}, ne(x(l).t("csvExport.exportAsCsv")), 9,
|
|
1312
|
+
}, ne(x(l).t("csvExport.exportAsCsv")), 9, Es)
|
|
1324
1313
|
]),
|
|
1325
1314
|
_: 1
|
|
1326
1315
|
}, 8, ["data-testid"])) : Q("", !0),
|
|
1327
|
-
v.context.editable ? (C(),
|
|
1316
|
+
v.context.editable ? (C(), N(X, {
|
|
1328
1317
|
key: 3,
|
|
1329
1318
|
"data-testid": `duplicate-tile-${v.tileId}`,
|
|
1330
|
-
onClick:
|
|
1319
|
+
onClick: et
|
|
1331
1320
|
}, {
|
|
1332
|
-
default:
|
|
1333
|
-
|
|
1321
|
+
default: $(() => [
|
|
1322
|
+
ht(ne(x(l).t("renderer.duplicateTile")), 1)
|
|
1334
1323
|
]),
|
|
1335
1324
|
_: 1
|
|
1336
1325
|
}, 8, ["data-testid"])) : Q("", !0),
|
|
1337
|
-
v.context.editable ? (C(),
|
|
1326
|
+
v.context.editable ? (C(), N(X, {
|
|
1338
1327
|
key: 4,
|
|
1339
1328
|
"data-testid": `remove-tile-${v.tileId}`,
|
|
1340
|
-
onClick:
|
|
1329
|
+
onClick: tt
|
|
1341
1330
|
}, {
|
|
1342
|
-
default:
|
|
1343
|
-
oe("span",
|
|
1331
|
+
default: $(() => [
|
|
1332
|
+
oe("span", xs, ne(x(l).t("renderer.delete")), 1)
|
|
1344
1333
|
]),
|
|
1345
1334
|
_: 1
|
|
1346
1335
|
}, 8, ["data-testid"])) : Q("", !0)
|
|
1347
1336
|
]),
|
|
1348
|
-
default:
|
|
1349
|
-
|
|
1337
|
+
default: $(() => [
|
|
1338
|
+
ue(x(Ni), {
|
|
1350
1339
|
class: "kebab-action-menu",
|
|
1351
1340
|
color: x(Nt),
|
|
1352
1341
|
"data-testid": `kebab-action-menu-${v.tileId}`,
|
|
@@ -1355,12 +1344,12 @@ const ce = {
|
|
|
1355
1344
|
]),
|
|
1356
1345
|
_: 1
|
|
1357
1346
|
}, 8, ["data-testid"])) : Q("", !0)
|
|
1358
|
-
], 8,
|
|
1347
|
+
], 8, bs)) : "description" in v.definition.chart ? (C(), V("div", {
|
|
1359
1348
|
key: 1,
|
|
1360
1349
|
class: "header-description",
|
|
1361
1350
|
"data-testid": `tile-description-${v.tileId}`
|
|
1362
|
-
}, ne(v.definition.chart.description), 9,
|
|
1363
|
-
a.value ? (C(),
|
|
1351
|
+
}, ne(v.definition.chart.description), 9, Cs)) : Q("", !0),
|
|
1352
|
+
a.value ? (C(), N(x(xi), {
|
|
1364
1353
|
key: 2,
|
|
1365
1354
|
"data-testid": `csv-export-modal-${v.tileId}`,
|
|
1366
1355
|
"export-state": u.value,
|
|
@@ -1372,12 +1361,12 @@ const ce = {
|
|
|
1372
1361
|
class: "tile-content",
|
|
1373
1362
|
"data-testid": `tile-content-${v.tileId}`
|
|
1374
1363
|
}, [
|
|
1375
|
-
H.value ? (C(),
|
|
1376
|
-
], 8,
|
|
1377
|
-
], 10,
|
|
1364
|
+
H.value ? (C(), N(Pt(H.value.component), It({ key: 0 }, H.value.rendererProps, ci(O.value), { onChartData: yt }), null, 16)) : Q("", !0)
|
|
1365
|
+
], 8, Rs)
|
|
1366
|
+
], 10, vs);
|
|
1378
1367
|
};
|
|
1379
1368
|
}
|
|
1380
|
-
}),
|
|
1369
|
+
}), Ts = /* @__PURE__ */ ve(ks, [["__scopeId", "data-v-3751379a"]]), zs = (d, e) => {
|
|
1381
1370
|
let t = 0;
|
|
1382
1371
|
const i = /* @__PURE__ */ new Map();
|
|
1383
1372
|
e.forEach((r) => {
|
|
@@ -1388,13 +1377,13 @@ const ce = {
|
|
|
1388
1377
|
for (let r = 0; r < t; r++)
|
|
1389
1378
|
i.get(r) ? s.push("auto") : s.push(`${d}px`);
|
|
1390
1379
|
return s;
|
|
1391
|
-
},
|
|
1380
|
+
}, Ss = /* @__PURE__ */ J({
|
|
1392
1381
|
__name: "GridLayout",
|
|
1393
1382
|
props: {
|
|
1394
1383
|
tileHeight: {
|
|
1395
1384
|
type: Number,
|
|
1396
1385
|
required: !1,
|
|
1397
|
-
default: () =>
|
|
1386
|
+
default: () => Xe
|
|
1398
1387
|
},
|
|
1399
1388
|
tiles: {
|
|
1400
1389
|
type: Array,
|
|
@@ -1402,21 +1391,21 @@ const ce = {
|
|
|
1402
1391
|
}
|
|
1403
1392
|
},
|
|
1404
1393
|
setup(d) {
|
|
1405
|
-
|
|
1394
|
+
Ye((n) => ({
|
|
1406
1395
|
"2a38e79e": x(Wt),
|
|
1407
1396
|
"4cc71de6": r.value
|
|
1408
1397
|
}));
|
|
1409
|
-
const e = d, t =
|
|
1398
|
+
const e = d, t = L(null), i = L(0), s = new ResizeObserver((n) => {
|
|
1410
1399
|
window.requestAnimationFrame(() => {
|
|
1411
1400
|
!Array.isArray(n) || !n.length || (i.value = n[0].contentRect.width);
|
|
1412
1401
|
});
|
|
1413
1402
|
});
|
|
1414
|
-
|
|
1403
|
+
at(() => {
|
|
1415
1404
|
t.value && s.observe(t.value);
|
|
1416
|
-
}),
|
|
1405
|
+
}), lt(() => {
|
|
1417
1406
|
t.value && s.unobserve(t.value);
|
|
1418
1407
|
});
|
|
1419
|
-
const r =
|
|
1408
|
+
const r = k(() => zs(e.tileHeight, e.tiles).join(" ")), o = k(() => e.tiles.map((n, l) => ({
|
|
1420
1409
|
key: `tile-${l}`,
|
|
1421
1410
|
tile: n,
|
|
1422
1411
|
style: {
|
|
@@ -1433,7 +1422,7 @@ const ce = {
|
|
|
1433
1422
|
}, [
|
|
1434
1423
|
(C(!0), V($t, null, Ft(o.value, (h) => (C(), V("div", {
|
|
1435
1424
|
key: h.key,
|
|
1436
|
-
class:
|
|
1425
|
+
class: je(["grid-cell", {
|
|
1437
1426
|
"empty-cell": !h.tile
|
|
1438
1427
|
}]),
|
|
1439
1428
|
style: Et(h.style)
|
|
@@ -1445,8 +1434,8 @@ const ce = {
|
|
|
1445
1434
|
], 6))), 128))
|
|
1446
1435
|
], 512));
|
|
1447
1436
|
}
|
|
1448
|
-
}),
|
|
1449
|
-
function
|
|
1437
|
+
}), Ds = /* @__PURE__ */ ve(Ss, [["__scopeId", "data-v-354b7177"]]);
|
|
1438
|
+
function Ns(d, e, t, i, s) {
|
|
1450
1439
|
const r = (...o) => (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(d, o));
|
|
1451
1440
|
return r.prototype = e.prototype, r;
|
|
1452
1441
|
}
|
|
@@ -1786,7 +1775,7 @@ class c {
|
|
|
1786
1775
|
return !(!e || e.w === e.h || e.locked || e.noResize || (t = e.grid) != null && t.opts.disableResize || e.minW && e.minW === e.maxW || e.minH && e.minH === e.maxH);
|
|
1787
1776
|
}
|
|
1788
1777
|
}
|
|
1789
|
-
class
|
|
1778
|
+
class le {
|
|
1790
1779
|
constructor(e = {}) {
|
|
1791
1780
|
this.addedNodes = [], this.removedNodes = [], this.defaultColumn = 12, this.column = e.column || this.defaultColumn, this.column > this.defaultColumn && (this.defaultColumn = this.column), this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
|
|
1792
1781
|
}
|
|
@@ -1964,7 +1953,7 @@ class he {
|
|
|
1964
1953
|
* @param resizing if out of bound, resize down or move into the grid to fit ?
|
|
1965
1954
|
*/
|
|
1966
1955
|
prepareNode(e, t) {
|
|
1967
|
-
e._id = e._id ??
|
|
1956
|
+
e._id = e._id ?? le._idSeq++;
|
|
1968
1957
|
const i = e.id;
|
|
1969
1958
|
if (i) {
|
|
1970
1959
|
let r = 1;
|
|
@@ -2059,7 +2048,7 @@ class he {
|
|
|
2059
2048
|
if (t.pack = !0, !this.maxRow)
|
|
2060
2049
|
return this.moveNode(e, t);
|
|
2061
2050
|
let i;
|
|
2062
|
-
const s = new
|
|
2051
|
+
const s = new le({
|
|
2063
2052
|
column: this.column,
|
|
2064
2053
|
float: this.float,
|
|
2065
2054
|
nodes: this.nodes.map((o) => o._id === e._id ? (i = { ...o }, i) : { ...o })
|
|
@@ -2081,7 +2070,7 @@ class he {
|
|
|
2081
2070
|
willItFit(e) {
|
|
2082
2071
|
if (delete e._willFitPos, !this.maxRow)
|
|
2083
2072
|
return !0;
|
|
2084
|
-
const t = new
|
|
2073
|
+
const t = new le({
|
|
2085
2074
|
column: this.column,
|
|
2086
2075
|
float: this.float,
|
|
2087
2076
|
nodes: this.nodes.map((s) => ({ ...s }))
|
|
@@ -2217,7 +2206,7 @@ class he {
|
|
|
2217
2206
|
return e.forEach((r, o) => {
|
|
2218
2207
|
if (r._id === void 0) {
|
|
2219
2208
|
const n = r.id ? this.nodes.find((l) => l.id === r.id) : void 0;
|
|
2220
|
-
r._id = (n == null ? void 0 : n._id) ??
|
|
2209
|
+
r._id = (n == null ? void 0 : n._id) ?? le._idSeq++;
|
|
2221
2210
|
}
|
|
2222
2211
|
s[o] = { x: r.x, y: r.y, w: r.w, _id: r._id };
|
|
2223
2212
|
}), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
|
|
@@ -2228,7 +2217,7 @@ class he {
|
|
|
2228
2217
|
* @param column corresponding column index to save it under
|
|
2229
2218
|
*/
|
|
2230
2219
|
cacheOneLayout(e, t) {
|
|
2231
|
-
e._id = e._id ??
|
|
2220
|
+
e._id = e._id ?? le._idSeq++;
|
|
2232
2221
|
const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
|
|
2233
2222
|
(e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
|
|
2234
2223
|
const s = this.findCacheLayout(e, t);
|
|
@@ -2252,7 +2241,7 @@ class he {
|
|
|
2252
2241
|
return this;
|
|
2253
2242
|
}
|
|
2254
2243
|
}
|
|
2255
|
-
|
|
2244
|
+
le._idSeq = 0;
|
|
2256
2245
|
const Z = {
|
|
2257
2246
|
alwaysShowResizeHandle: "mobile",
|
|
2258
2247
|
animate: !0,
|
|
@@ -2286,7 +2275,7 @@ const Z = {
|
|
|
2286
2275
|
class w {
|
|
2287
2276
|
}
|
|
2288
2277
|
const ae = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
|
|
2289
|
-
class
|
|
2278
|
+
class he {
|
|
2290
2279
|
}
|
|
2291
2280
|
function Fe(d, e) {
|
|
2292
2281
|
d.touches.length > 1 || (d.cancelable && d.preventDefault(), c.simulateMouseEvent(d.changedTouches[0], e));
|
|
@@ -2295,37 +2284,37 @@ function ti(d, e) {
|
|
|
2295
2284
|
d.cancelable && d.preventDefault(), c.simulateMouseEvent(d, e);
|
|
2296
2285
|
}
|
|
2297
2286
|
function Ge(d) {
|
|
2298
|
-
|
|
2287
|
+
he.touchHandled || (he.touchHandled = !0, Fe(d, "mousedown"));
|
|
2299
2288
|
}
|
|
2300
2289
|
function Be(d) {
|
|
2301
|
-
|
|
2290
|
+
he.touchHandled && Fe(d, "mousemove");
|
|
2302
2291
|
}
|
|
2303
2292
|
function Ue(d) {
|
|
2304
|
-
if (!
|
|
2293
|
+
if (!he.touchHandled)
|
|
2305
2294
|
return;
|
|
2306
|
-
|
|
2295
|
+
he.pointerLeaveTimeout && (window.clearTimeout(he.pointerLeaveTimeout), delete he.pointerLeaveTimeout);
|
|
2307
2296
|
const e = !!w.dragElement;
|
|
2308
|
-
Fe(d, "mouseup"), e || Fe(d, "click"),
|
|
2297
|
+
Fe(d, "mouseup"), e || Fe(d, "click"), he.touchHandled = !1;
|
|
2309
2298
|
}
|
|
2310
2299
|
function We(d) {
|
|
2311
2300
|
d.pointerType !== "mouse" && d.target.releasePointerCapture(d.pointerId);
|
|
2312
2301
|
}
|
|
2313
|
-
function
|
|
2302
|
+
function Ot(d) {
|
|
2314
2303
|
w.dragElement && d.pointerType !== "mouse" && ti(d, "mouseenter");
|
|
2315
2304
|
}
|
|
2316
|
-
function
|
|
2317
|
-
w.dragElement && d.pointerType !== "mouse" && (
|
|
2318
|
-
delete
|
|
2305
|
+
function Ht(d) {
|
|
2306
|
+
w.dragElement && d.pointerType !== "mouse" && (he.pointerLeaveTimeout = window.setTimeout(() => {
|
|
2307
|
+
delete he.pointerLeaveTimeout, ti(d, "mouseleave");
|
|
2319
2308
|
}, 10));
|
|
2320
2309
|
}
|
|
2321
|
-
class
|
|
2310
|
+
class Ze {
|
|
2322
2311
|
constructor(e, t, i) {
|
|
2323
2312
|
this.host = e, this.dir = t, this.option = i, this.moving = !1, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this._init();
|
|
2324
2313
|
}
|
|
2325
2314
|
/** @internal */
|
|
2326
2315
|
_init() {
|
|
2327
2316
|
const e = this.el = document.createElement("div");
|
|
2328
|
-
return e.classList.add("ui-resizable-handle"), e.classList.add(`${
|
|
2317
|
+
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Ze.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), ae && (this.el.addEventListener("touchstart", Ge), this.el.addEventListener("pointerdown", We)), this;
|
|
2329
2318
|
}
|
|
2330
2319
|
/** call this when resize handle needs to be removed and cleaned up */
|
|
2331
2320
|
destroy() {
|
|
@@ -2354,7 +2343,7 @@ class Je {
|
|
|
2354
2343
|
return this.option[e] && this.option[e](t), this;
|
|
2355
2344
|
}
|
|
2356
2345
|
}
|
|
2357
|
-
|
|
2346
|
+
Ze.prefix = "ui-resizable-";
|
|
2358
2347
|
class gt {
|
|
2359
2348
|
constructor() {
|
|
2360
2349
|
this._eventRegister = {};
|
|
@@ -2453,7 +2442,7 @@ class De extends gt {
|
|
|
2453
2442
|
}
|
|
2454
2443
|
/** @internal */
|
|
2455
2444
|
_setupHandlers() {
|
|
2456
|
-
return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new
|
|
2445
|
+
return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new Ze(this.el, e, {
|
|
2457
2446
|
start: (t) => {
|
|
2458
2447
|
this._resizeStart(t);
|
|
2459
2448
|
},
|
|
@@ -2533,7 +2522,7 @@ class De extends gt {
|
|
|
2533
2522
|
}
|
|
2534
2523
|
}
|
|
2535
2524
|
De._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
|
|
2536
|
-
const
|
|
2525
|
+
const Ls = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
|
|
2537
2526
|
class Ne extends gt {
|
|
2538
2527
|
constructor(e, t = {}) {
|
|
2539
2528
|
var r;
|
|
@@ -2571,7 +2560,7 @@ class Ne extends gt {
|
|
|
2571
2560
|
/** @internal call when mouse goes down before a dragstart happens */
|
|
2572
2561
|
_mouseDown(e) {
|
|
2573
2562
|
if (!w.mouseHandled)
|
|
2574
|
-
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(
|
|
2563
|
+
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(Ls) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete w.dragElement, delete w.dropElement, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), ae && (e.currentTarget.addEventListener("touchmove", Be), e.currentTarget.addEventListener("touchend", Ue)), e.preventDefault(), document.activeElement && document.activeElement.blur(), w.mouseHandled = !0), !0;
|
|
2575
2564
|
}
|
|
2576
2565
|
/** @internal method to call actual drag event */
|
|
2577
2566
|
_callDrag(e) {
|
|
@@ -2684,7 +2673,7 @@ class Ne extends gt {
|
|
|
2684
2673
|
}
|
|
2685
2674
|
}
|
|
2686
2675
|
Ne.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
|
|
2687
|
-
class
|
|
2676
|
+
class As extends gt {
|
|
2688
2677
|
constructor(e, t = {}) {
|
|
2689
2678
|
super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
|
|
2690
2679
|
}
|
|
@@ -2695,10 +2684,10 @@ class Ls extends gt {
|
|
|
2695
2684
|
super.off(e);
|
|
2696
2685
|
}
|
|
2697
2686
|
enable() {
|
|
2698
|
-
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), ae && (this.el.addEventListener("pointerenter",
|
|
2687
|
+
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), ae && (this.el.addEventListener("pointerenter", Ot), this.el.addEventListener("pointerleave", Ht)));
|
|
2699
2688
|
}
|
|
2700
2689
|
disable(e = !1) {
|
|
2701
|
-
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), ae && (this.el.removeEventListener("pointerenter",
|
|
2690
|
+
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), ae && (this.el.removeEventListener("pointerenter", Ot), this.el.removeEventListener("pointerleave", Ht)));
|
|
2702
2691
|
}
|
|
2703
2692
|
destroy() {
|
|
2704
2693
|
this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
|
|
@@ -2776,13 +2765,13 @@ class mt {
|
|
|
2776
2765
|
return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
|
|
2777
2766
|
}
|
|
2778
2767
|
setupDroppable(e) {
|
|
2779
|
-
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new
|
|
2768
|
+
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new As(this.el, e), this;
|
|
2780
2769
|
}
|
|
2781
2770
|
cleanDroppable() {
|
|
2782
2771
|
return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
|
|
2783
2772
|
}
|
|
2784
2773
|
}
|
|
2785
|
-
class
|
|
2774
|
+
class Os {
|
|
2786
2775
|
resizable(e, t, i, s) {
|
|
2787
2776
|
return this._getDDElements(e, t).forEach((r) => {
|
|
2788
2777
|
if (t === "disable" || t === "enable")
|
|
@@ -2871,7 +2860,7 @@ class As {
|
|
|
2871
2860
|
* Copyright (c) 2021-2024 Alain Dumesny
|
|
2872
2861
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
2873
2862
|
*/
|
|
2874
|
-
const W = new
|
|
2863
|
+
const W = new Os();
|
|
2875
2864
|
class b {
|
|
2876
2865
|
/**
|
|
2877
2866
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
@@ -2979,8 +2968,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2979
2968
|
};
|
|
2980
2969
|
e.getAttribute("gs-animate") && (n.animate = c.toBool(e.getAttribute("gs-animate"))), t = c.defaults(t, n), this._initMargin(), this.checkDynamicColumn(), this.el.classList.add("gs-" + t.column), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
|
|
2981
2970
|
const l = this.el.closest("." + Z.itemClass), h = l == null ? void 0 : l.gridstackNode;
|
|
2982
|
-
h && (h.subGrid = this, this.parentGridNode = h, this.el.classList.add("grid-stack-nested"), h.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== Z.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = ae), this._styleSheetClass = "gs-id-" +
|
|
2983
|
-
const u = t.engineClass || b.engineClass ||
|
|
2971
|
+
h && (h.subGrid = this, this.parentGridNode = h, this.el.classList.add("grid-stack-nested"), h.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== Z.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = ae), this._styleSheetClass = "gs-id-" + le._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
|
|
2972
|
+
const u = t.engineClass || b.engineClass || le;
|
|
2984
2973
|
if (this.engine = new u({
|
|
2985
2974
|
column: this.getColumn(),
|
|
2986
2975
|
float: t.float,
|
|
@@ -2990,8 +2979,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2990
2979
|
this.engine.nodes.forEach((p) => {
|
|
2991
2980
|
y = Math.max(y, p.y + p.h);
|
|
2992
2981
|
}), g.forEach((p) => {
|
|
2993
|
-
const
|
|
2994
|
-
|
|
2982
|
+
const z = p.el;
|
|
2983
|
+
z && (p._removeDOM ? (z && z.remove(), delete p._removeDOM) : this._writePosAttr(z, p));
|
|
2995
2984
|
}), this._updateStyles(!1, y);
|
|
2996
2985
|
}
|
|
2997
2986
|
}), this._updateStyles(!1, 0), t.auto && (this.batchUpdate(), this.engine._loading = !0, this.getGridItems().forEach((g) => this._prepareElement(g)), delete this.engine._loading, this.batchUpdate(!1)), t.children) {
|
|
@@ -3072,8 +3061,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3072
3061
|
t.column === "auto" && (l = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
|
|
3073
3062
|
let h = r.el.querySelector(".grid-stack-item-content"), u, a;
|
|
3074
3063
|
if (s && (this._removeDD(r.el), a = { ...r, x: 0, y: 0 }, c.removeInternalForSave(a), delete a.subGridOpts, r.content && (a.content = r.content, delete r.content), b.addRemoveCB ? u = b.addRemoveCB(this.el, a, !0, !1) : (u = c.createDiv(["grid-stack-item"]), u.appendChild(h), h = c.createDiv(["grid-stack-item-content"], r.el)), this.prepareDragDrop(r.el)), i) {
|
|
3075
|
-
const p = l ? t.column : r.w,
|
|
3076
|
-
I.transition = "none", this.update(r.el, { w: p, h:
|
|
3064
|
+
const p = l ? t.column : r.w, z = r.h + i.h, I = r.el.style;
|
|
3065
|
+
I.transition = "none", this.update(r.el, { w: p, h: z }), setTimeout(() => I.transition = null);
|
|
3077
3066
|
}
|
|
3078
3067
|
const f = r.subGrid = b.addGrid(h, t);
|
|
3079
3068
|
return i != null && i._moving && (f._isTemp = !0), l && (f._autoColumn = !0), s && f.makeWidget(u, a), i && (i._moving ? window.setTimeout(() => c.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(r.el, r)), this.resizeToContentCheck(!1, r), f;
|
|
@@ -4051,22 +4040,22 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4051
4040
|
return;
|
|
4052
4041
|
const p = i.position.top - s._prevYPix;
|
|
4053
4042
|
s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && c.updateScrollPosition(e, i.position, p);
|
|
4054
|
-
const
|
|
4055
|
-
n.x = Math.round(
|
|
4056
|
-
const
|
|
4043
|
+
const z = i.position.left + (i.position.left > s._lastUiPosition.left ? -u : h), I = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : a);
|
|
4044
|
+
n.x = Math.round(z / r), n.y = Math.round(I / o);
|
|
4045
|
+
const S = this._extraDragRow;
|
|
4057
4046
|
if (this.engine.collide(s, n)) {
|
|
4058
4047
|
const ee = this.getRow();
|
|
4059
4048
|
let B = Math.max(0, n.y + s.h - ee);
|
|
4060
4049
|
this.opts.maxRow && ee + B > this.opts.maxRow && (B = Math.max(0, this.opts.maxRow - ee)), this._extraDragRow = B;
|
|
4061
4050
|
} else
|
|
4062
4051
|
this._extraDragRow = 0;
|
|
4063
|
-
if (this._extraDragRow !==
|
|
4052
|
+
if (this._extraDragRow !== S && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
|
|
4064
4053
|
return;
|
|
4065
4054
|
} else if (t.type === "resize") {
|
|
4066
4055
|
if (n.x < 0 || (c.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - h) / r), n.h = Math.round((i.size.height - a) / o), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
|
|
4067
4056
|
return;
|
|
4068
|
-
const p = i.position.left + h,
|
|
4069
|
-
n.x = Math.round(p / r), n.y = Math.round(
|
|
4057
|
+
const p = i.position.left + h, z = i.position.top + a;
|
|
4058
|
+
n.x = Math.round(p / r), n.y = Math.round(z / o), l = !0;
|
|
4070
4059
|
}
|
|
4071
4060
|
s._event = t, s._lastTried = n;
|
|
4072
4061
|
const y = {
|
|
@@ -4096,7 +4085,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
4096
4085
|
}
|
|
4097
4086
|
// legacy method removed
|
|
4098
4087
|
commit() {
|
|
4099
|
-
return
|
|
4088
|
+
return Ns(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
|
|
4100
4089
|
}
|
|
4101
4090
|
}
|
|
4102
4091
|
b.renderCB = (d, e) => {
|
|
@@ -4104,17 +4093,17 @@ b.renderCB = (d, e) => {
|
|
|
4104
4093
|
};
|
|
4105
4094
|
b.resizeToContentParent = ".grid-stack-item-content";
|
|
4106
4095
|
b.Utils = c;
|
|
4107
|
-
b.Engine =
|
|
4096
|
+
b.Engine = le;
|
|
4108
4097
|
b.GDRev = "11.5.1";
|
|
4109
|
-
const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"],
|
|
4098
|
+
const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Ms = { class: "grid-stack-item-content" }, Is = /* @__PURE__ */ J({
|
|
4110
4099
|
__name: "DraggableGridLayout",
|
|
4111
4100
|
props: {
|
|
4112
4101
|
tiles: {},
|
|
4113
|
-
tileHeight: { default:
|
|
4102
|
+
tileHeight: { default: Xe }
|
|
4114
4103
|
},
|
|
4115
4104
|
emits: ["update-tiles"],
|
|
4116
4105
|
setup(d, { expose: e, emit: t }) {
|
|
4117
|
-
const i = d, s = t, r =
|
|
4106
|
+
const i = d, s = t, r = L(null), o = L(new Map(i.tiles.map((m) => [`${m.id}`, m])));
|
|
4118
4107
|
let n = null;
|
|
4119
4108
|
const l = (m) => `[data-id="${m}"]`, h = (m) => m.map((g) => {
|
|
4120
4109
|
var p;
|
|
@@ -4137,7 +4126,7 @@ const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Os = { cl
|
|
|
4137
4126
|
o.value.delete(`${(p = y.el) == null ? void 0 : p.getAttribute("data-id")}`);
|
|
4138
4127
|
}), s("update-tiles", Array.from(o.value.values()));
|
|
4139
4128
|
};
|
|
4140
|
-
|
|
4129
|
+
at(() => {
|
|
4141
4130
|
r.value && (n = b.init({
|
|
4142
4131
|
margin: 10,
|
|
4143
4132
|
column: Wt,
|
|
@@ -4145,7 +4134,7 @@ const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Os = { cl
|
|
|
4145
4134
|
resizable: { handles: "se, sw" },
|
|
4146
4135
|
handle: ".tile-header"
|
|
4147
4136
|
}, r.value), n.on("change", u), n.on("added", u), n.on("removed", a));
|
|
4148
|
-
}),
|
|
4137
|
+
}), lt(() => {
|
|
4149
4138
|
n && n.destroy(!1);
|
|
4150
4139
|
});
|
|
4151
4140
|
const f = (m) => {
|
|
@@ -4184,19 +4173,19 @@ const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Os = { cl
|
|
|
4184
4173
|
"gs-x": y.layout.position.col,
|
|
4185
4174
|
"gs-y": y.layout.position.row
|
|
4186
4175
|
}, [
|
|
4187
|
-
oe("div",
|
|
4176
|
+
oe("div", Ms, [
|
|
4188
4177
|
Se(m.$slots, "tile", { tile: y }, void 0, !0)
|
|
4189
4178
|
])
|
|
4190
4179
|
], 8, Hs))), 128))
|
|
4191
4180
|
], 512));
|
|
4192
4181
|
}
|
|
4193
|
-
}),
|
|
4182
|
+
}), qs = /* @__PURE__ */ ve(Is, [["__scopeId", "data-v-a68d6821"]]), Ps = {
|
|
4194
4183
|
key: 0,
|
|
4195
4184
|
class: "fullscreen-header"
|
|
4196
|
-
},
|
|
4185
|
+
}, $s = {
|
|
4197
4186
|
key: 0,
|
|
4198
4187
|
class: "tile-container slottable-tile"
|
|
4199
|
-
},
|
|
4188
|
+
}, Fs = /* @__PURE__ */ J({
|
|
4200
4189
|
__name: "DashboardRenderer",
|
|
4201
4190
|
props: /* @__PURE__ */ xt({
|
|
4202
4191
|
context: {}
|
|
@@ -4206,22 +4195,22 @@ const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Os = { cl
|
|
|
4206
4195
|
}),
|
|
4207
4196
|
emits: /* @__PURE__ */ xt(["edit-tile", "tile-time-range-zoom"], ["update:modelValue"]),
|
|
4208
4197
|
setup(d, { expose: e, emit: t }) {
|
|
4209
|
-
|
|
4198
|
+
Ye((E) => ({
|
|
4210
4199
|
"82baf22a": a.value
|
|
4211
4200
|
}));
|
|
4212
|
-
const i = d, s = t, r = fi(d, "modelValue"), { i18n: o } = ce.useI18n(), n =
|
|
4201
|
+
const i = d, s = t, r = fi(d, "modelValue"), { i18n: o } = ce.useI18n(), n = L(0), l = L(null), h = L(), u = L(), a = L("scale(1)"), f = ye(pe);
|
|
4213
4202
|
f || (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")), ce.useRequestQueue();
|
|
4214
|
-
const m = dt(), g =
|
|
4203
|
+
const m = dt(), g = k(() => i.context.timeSpec ? i.context.timeSpec : {
|
|
4215
4204
|
type: "relative",
|
|
4216
4205
|
time_range: m.defaultQueryTimeForOrg
|
|
4217
|
-
}), y =
|
|
4218
|
-
const
|
|
4219
|
-
return
|
|
4220
|
-
},
|
|
4221
|
-
var
|
|
4206
|
+
}), y = k(() => !!i.context.timeSpec || !m.loading), p = (E, D) => {
|
|
4207
|
+
const O = E.layout.position.row - D.layout.position.row;
|
|
4208
|
+
return O !== 0 ? O : E.layout.position.col - D.layout.position.col;
|
|
4209
|
+
}, z = k(() => r.value.tiles.map((E) => {
|
|
4210
|
+
var O;
|
|
4222
4211
|
let D = E.definition;
|
|
4223
4212
|
if ("description" in D.chart) {
|
|
4224
|
-
const H = (
|
|
4213
|
+
const H = (O = D.chart.description) == null ? void 0 : O.replace(Wi, () => {
|
|
4225
4214
|
const fe = `renderer.trendRange.${g.value.type === "absolute" ? "custom" : g.value.time_range}`;
|
|
4226
4215
|
return o.te(fe) ? o.t(fe) : "";
|
|
4227
4216
|
});
|
|
@@ -4244,38 +4233,38 @@ const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Os = { cl
|
|
|
4244
4233
|
// Add a unique key to each tile internally.
|
|
4245
4234
|
id: E.id ?? crypto.randomUUID()
|
|
4246
4235
|
};
|
|
4247
|
-
})), I =
|
|
4236
|
+
})), I = k(() => {
|
|
4248
4237
|
var fe, Ie, ke;
|
|
4249
|
-
let { tz: E, refreshInterval: D, editable:
|
|
4238
|
+
let { tz: E, refreshInterval: D, editable: O } = i.context;
|
|
4250
4239
|
const H = [...i.context.filters ?? [], ...r.value.preset_filters ?? []];
|
|
4251
|
-
if (E || (E = new Intl.DateTimeFormat().resolvedOptions().timeZone), D === void 0 && (D =
|
|
4240
|
+
if (E || (E = new Intl.DateTimeFormat().resolvedOptions().timeZone), D === void 0 && (D = Ki), U.value) {
|
|
4252
4241
|
let Te = !1;
|
|
4253
4242
|
if (g.value.type === "relative")
|
|
4254
4243
|
Te = ["15m", "1h", "6h", "12h", "24h"].includes(g.value.time_range);
|
|
4255
4244
|
else {
|
|
4256
|
-
const
|
|
4257
|
-
Te = Math.abs(
|
|
4245
|
+
const et = g.value.start.getTime(), tt = g.value.end.getTime();
|
|
4246
|
+
Te = Math.abs(tt - et) <= 864e5;
|
|
4258
4247
|
}
|
|
4259
|
-
const
|
|
4260
|
-
g.value.type === "absolute" && g.value.end.getTime() <
|
|
4248
|
+
const Je = (/* @__PURE__ */ new Date()).getTime();
|
|
4249
|
+
g.value.type === "absolute" && g.value.end.getTime() < Je ? D = 0 : Te ? D = Vi : D = Qi;
|
|
4261
4250
|
}
|
|
4262
|
-
|
|
4251
|
+
O === void 0 && (O = !1);
|
|
4263
4252
|
const j = !!((ke = (Ie = (fe = gi()) == null ? void 0 : fe.vnode) == null ? void 0 : Ie.props) != null && ke.onTileTimeRangeZoom);
|
|
4264
4253
|
return {
|
|
4265
4254
|
filters: H,
|
|
4266
4255
|
tz: E,
|
|
4267
4256
|
timeSpec: g.value,
|
|
4268
4257
|
refreshInterval: D,
|
|
4269
|
-
editable:
|
|
4258
|
+
editable: O,
|
|
4270
4259
|
zoomable: j
|
|
4271
4260
|
};
|
|
4272
|
-
}),
|
|
4261
|
+
}), S = (E) => {
|
|
4273
4262
|
s("edit-tile", E);
|
|
4274
4263
|
}, ee = (E) => E.type === "slottable", B = (E) => {
|
|
4275
4264
|
const D = ee(E.meta.chart) ? { ...E.meta.chart } : {
|
|
4276
4265
|
...E.meta.chart,
|
|
4277
4266
|
chart_title: E.meta.chart.chart_title ? `Copy of ${E.meta.chart.chart_title}` : ""
|
|
4278
|
-
},
|
|
4267
|
+
}, O = {
|
|
4279
4268
|
id: crypto.randomUUID(),
|
|
4280
4269
|
type: "chart",
|
|
4281
4270
|
definition: {
|
|
@@ -4290,38 +4279,38 @@ const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Os = { cl
|
|
|
4290
4279
|
size: E.layout.size
|
|
4291
4280
|
}
|
|
4292
4281
|
};
|
|
4293
|
-
r.value.tiles.push(
|
|
4282
|
+
r.value.tiles.push(O);
|
|
4294
4283
|
}, _e = (E) => {
|
|
4295
4284
|
l.value && l.value.removeWidget(E.id);
|
|
4296
4285
|
}, be = () => {
|
|
4297
4286
|
n.value++;
|
|
4298
|
-
},
|
|
4299
|
-
const D = E.map((
|
|
4300
|
-
id:
|
|
4301
|
-
type:
|
|
4302
|
-
layout:
|
|
4303
|
-
definition:
|
|
4287
|
+
}, R = (E) => {
|
|
4288
|
+
const D = E.map((O) => ({
|
|
4289
|
+
id: O.id,
|
|
4290
|
+
type: O.type,
|
|
4291
|
+
layout: O.layout,
|
|
4292
|
+
definition: O.meta
|
|
4304
4293
|
}));
|
|
4305
4294
|
r.value.tiles = D.sort(p);
|
|
4306
|
-
},
|
|
4295
|
+
}, A = async () => {
|
|
4307
4296
|
if (a.value = "scale(1)", await ut(), u.value) {
|
|
4308
|
-
const { availWidth: E, availHeight: D } = window.screen, { width:
|
|
4297
|
+
const { availWidth: E, availHeight: D } = window.screen, { width: O, height: H } = u.value.getBoundingClientRect(), j = Math.min(D / H, E / O);
|
|
4309
4298
|
a.value = `scale(${j})`;
|
|
4310
4299
|
}
|
|
4311
4300
|
}, Y = () => {
|
|
4312
4301
|
h.value && (document.fullscreenElement ? document.exitFullscreen() : h.value.requestFullscreen());
|
|
4313
|
-
}, U =
|
|
4314
|
-
U.value = document.fullscreenElement !== null, U.value &&
|
|
4302
|
+
}, U = L(!1), Me = () => {
|
|
4303
|
+
U.value = document.fullscreenElement !== null, U.value && A();
|
|
4315
4304
|
};
|
|
4316
4305
|
return e({
|
|
4317
4306
|
refresh: be,
|
|
4318
4307
|
toggleFullscreen: Y
|
|
4319
4308
|
}), (E, D) => {
|
|
4320
|
-
const
|
|
4309
|
+
const O = me("KAlert");
|
|
4321
4310
|
return C(), V("div", {
|
|
4322
4311
|
ref_key: "dashboardContainer",
|
|
4323
4312
|
ref: h,
|
|
4324
|
-
class:
|
|
4313
|
+
class: je(["kong-ui-public-dashboard-renderer", { "is-fullscreen": U.value }]),
|
|
4325
4314
|
onFullscreenchange: Me
|
|
4326
4315
|
}, [
|
|
4327
4316
|
oe("div", {
|
|
@@ -4329,43 +4318,43 @@ const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Os = { cl
|
|
|
4329
4318
|
ref: u,
|
|
4330
4319
|
class: "layout"
|
|
4331
4320
|
}, [
|
|
4332
|
-
x(f) && U.value ? (C(), V("div",
|
|
4321
|
+
x(f) && U.value ? (C(), V("div", Ps, [
|
|
4333
4322
|
Se(E.$slots, "fullscreenHeader", {}, void 0, !0)
|
|
4334
4323
|
])) : Q("", !0),
|
|
4335
|
-
x(f) ? (C(),
|
|
4324
|
+
x(f) ? (C(), N(Pt(E.context.editable && !U.value ? qs : Ds), {
|
|
4336
4325
|
key: 2,
|
|
4337
4326
|
ref_key: "gridLayoutRef",
|
|
4338
4327
|
ref: l,
|
|
4339
4328
|
"tile-height": r.value.tile_height,
|
|
4340
|
-
tiles:
|
|
4341
|
-
onUpdateTiles:
|
|
4329
|
+
tiles: z.value,
|
|
4330
|
+
onUpdateTiles: R
|
|
4342
4331
|
}, {
|
|
4343
|
-
tile:
|
|
4344
|
-
H.meta.chart.type === "slottable" ? (C(), V("div",
|
|
4332
|
+
tile: $(({ tile: H }) => [
|
|
4333
|
+
H.meta.chart.type === "slottable" ? (C(), V("div", $s, [
|
|
4345
4334
|
Se(E.$slots, H.meta.chart.id, {}, void 0, !0)
|
|
4346
|
-
])) : (C(),
|
|
4335
|
+
])) : (C(), N(Ts, {
|
|
4347
4336
|
key: U.value ? `${H.id}-tile` : `${H.id}-tile-fullscreen`,
|
|
4348
4337
|
class: "tile-container",
|
|
4349
4338
|
context: I.value,
|
|
4350
4339
|
definition: H.meta,
|
|
4351
|
-
height: H.layout.size.rows * (r.value.tile_height || x(
|
|
4340
|
+
height: H.layout.size.rows * (r.value.tile_height || x(Xe)) + parseInt(x(ei), 10),
|
|
4352
4341
|
"is-fullscreen": U.value,
|
|
4353
4342
|
"query-ready": y.value,
|
|
4354
4343
|
"refresh-counter": n.value,
|
|
4355
4344
|
"tile-id": H.id,
|
|
4356
4345
|
onDuplicateTile: (j) => B(H),
|
|
4357
|
-
onEditTile: (j) =>
|
|
4346
|
+
onEditTile: (j) => S(H),
|
|
4358
4347
|
onRemoveTile: (j) => _e(H),
|
|
4359
4348
|
onTileTimeRangeZoom: D[0] || (D[0] = (j) => s("tile-time-range-zoom", j))
|
|
4360
4349
|
}, null, 8, ["context", "definition", "height", "is-fullscreen", "query-ready", "refresh-counter", "tile-id", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
|
|
4361
4350
|
]),
|
|
4362
4351
|
_: 3
|
|
4363
|
-
}, 40, ["tile-height", "tiles"])) : (C(),
|
|
4352
|
+
}, 40, ["tile-height", "tiles"])) : (C(), N(O, {
|
|
4364
4353
|
key: 1,
|
|
4365
4354
|
appearance: "danger"
|
|
4366
4355
|
}, {
|
|
4367
|
-
default:
|
|
4368
|
-
|
|
4356
|
+
default: $(() => [
|
|
4357
|
+
ht(ne(x(o).t("renderer.noQueryBridge")), 1)
|
|
4369
4358
|
]),
|
|
4370
4359
|
_: 1
|
|
4371
4360
|
}))
|
|
@@ -4373,18 +4362,18 @@ const Hs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], Os = { cl
|
|
|
4373
4362
|
], 34);
|
|
4374
4363
|
};
|
|
4375
4364
|
}
|
|
4376
|
-
}),
|
|
4365
|
+
}), Zs = /* @__PURE__ */ ve(Fs, [["__scopeId", "data-v-8d8a6181"]]);
|
|
4377
4366
|
export {
|
|
4378
|
-
|
|
4379
|
-
|
|
4367
|
+
Ui as C,
|
|
4368
|
+
Zs as D,
|
|
4380
4369
|
Rt as E,
|
|
4381
|
-
|
|
4382
|
-
|
|
4370
|
+
Vi as F,
|
|
4371
|
+
Ds as G,
|
|
4383
4372
|
pe as I,
|
|
4384
|
-
|
|
4373
|
+
Wi as T,
|
|
4385
4374
|
ct as _,
|
|
4386
|
-
|
|
4375
|
+
Xe as a,
|
|
4387
4376
|
Wt as b,
|
|
4388
|
-
|
|
4389
|
-
|
|
4377
|
+
Ki as c,
|
|
4378
|
+
Qi as d
|
|
4390
4379
|
};
|