@kong-ui-public/dashboard-renderer 7.0.13 → 7.0.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.
|
@@ -4,31 +4,31 @@ var ot = (c) => {
|
|
|
4
4
|
};
|
|
5
5
|
var Qt = (c, e, t) => e in c ? Xt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[e] = t;
|
|
6
6
|
var at = (c, e, t) => Qt(c, typeof e != "symbol" ? e + "" : e, t), Ge = (c, e, t) => e.has(c) || ot("Cannot " + t);
|
|
7
|
-
var _ = (c, e, t) => (Ge(c, e, "read from private field"), t ? t.call(c) : e.get(c)),
|
|
7
|
+
var _ = (c, e, t) => (Ge(c, e, "read from private field"), t ? t.call(c) : e.get(c)), $ = (c, e, t) => e.has(c) ? ot("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(c) : e.set(c, t), I = (c, e, t, i) => (Ge(c, e, "write to private field"), i ? i.call(c, t) : e.set(c, t), t), B = (c, e, t) => (Ge(c, e, "access private method"), t);
|
|
8
8
|
var we = (c, e, t, i) => ({
|
|
9
9
|
set _(s) {
|
|
10
|
-
|
|
10
|
+
I(c, e, s, t);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
13
|
return _(c, e, i);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { ref as G, watchEffect as Et, inject as _e, provide as Zt, defineComponent as j, onUnmounted as Ve, computed as N, watch as Ke, resolveComponent as he, createBlock as
|
|
16
|
+
import { ref as G, watchEffect as Et, inject as _e, provide as Zt, defineComponent as j, onUnmounted as Ve, computed as N, watch as Ke, resolveComponent as he, createBlock as M, renderSlot as Pe, createCommentVNode as Y, unref as k, openBlock as C, withCtx as q, createVNode as se, createTextVNode as Ee, toDisplayString as te, useCssVars as Ye, createElementVNode as ae, normalizeClass as je, mergeProps as xt, createSlots as Xe, createElementBlock as W, normalizeProps as Jt, guardReactiveProps as ei, defineAsyncComponent as ti, onMounted as Qe, nextTick as Ct, resolveDynamicComponent as Rt, toHandlers as ii, Fragment as Tt, renderList as zt, normalizeStyle as lt, mergeModels as ht, useModel as si, getCurrentInstance as ri } from "vue";
|
|
17
17
|
import { stripUnknownFilters as ni, Timeframe as oi, TimePeriods as Dt, TIMEFRAME_LOOKUP as ai, formatTime as dt, msToGranularity as Ue, getFieldDataSources as li } from "@kong-ui-public/analytics-utilities";
|
|
18
18
|
import { SimpleChart as hi, AnalyticsChart as di, TopNTable as ui, CsvExportModal as ci } from "@kong-ui-public/analytics-chart";
|
|
19
19
|
import fi from "swrv";
|
|
20
20
|
import "axios";
|
|
21
21
|
import { createI18n as gi, i18nTComponent as mi } from "@kong-ui-public/i18n";
|
|
22
22
|
import { useAnalyticsConfigStore as kt } from "@kong-ui-public/analytics-config-store";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
23
|
+
import { VisibilityOffIcon as pi, WarningIcon as yi, EditIcon as vi, MoreIcon as _i } from "@kong/icons";
|
|
24
|
+
import { MetricsProvider as bi, MetricsConsumer as wi } from "@kong-ui-public/analytics-metric-provider";
|
|
25
25
|
var St = /* @__PURE__ */ ((c) => (c.VALIDATING = "VALIDATING", c.VALIDATING_HAS_DATA = "VALIDATING_HAS_DATA", c.PENDING = "PENDING", c.SUCCESS = "SUCCESS", c.SUCCESS_HAS_DATA = "SUCCESS_HAS_DATA", c.ERROR = "ERROR", c.STALE_IF_ERROR = "STALE_IF_ERROR", c))(St || {});
|
|
26
|
-
const
|
|
26
|
+
const Ei = (c) => {
|
|
27
27
|
var e, t, i, s, r;
|
|
28
28
|
return c ? !!// TODO: revisit: currently only the first check ever matters?
|
|
29
29
|
((e = Object.keys(c)) != null && e.length || (t = c.data) != null && t.length || (s = (i = c.data) == null ? void 0 : i.data) != null && s.length || !((r = c.data) != null && r.data) && typeof c.data == "object" && Object.keys(c == null ? void 0 : c.data).length) : !1;
|
|
30
30
|
};
|
|
31
|
-
function
|
|
31
|
+
function xi(c = G({}), e, t, i = Ei) {
|
|
32
32
|
const s = G(
|
|
33
33
|
"PENDING"
|
|
34
34
|
/* PENDING */
|
|
@@ -65,7 +65,7 @@ function Ei(c = G({}), e, t, i = wi) {
|
|
|
65
65
|
swrvState: St
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
const
|
|
68
|
+
const Ci = {
|
|
69
69
|
noQueryBridge: "No query bridge provided. Unable to render dashboard.",
|
|
70
70
|
trendRange: {
|
|
71
71
|
"24h": "Last 24-hour summary",
|
|
@@ -76,14 +76,14 @@ const xi = {
|
|
|
76
76
|
duplicateTile: "Duplicate",
|
|
77
77
|
remove: "Remove",
|
|
78
78
|
delete: "Delete"
|
|
79
|
-
},
|
|
80
|
-
forbidden: "
|
|
79
|
+
}, Ri = {
|
|
80
|
+
forbidden: "To access this data, either filter for an entity you have access to or request analytics viewer access from your administrator.",
|
|
81
81
|
timeRangeExceeded: "The time range for this report is outside of your organization's data retention period",
|
|
82
82
|
timeout: "Query timed out. Consider querying a shorter time range."
|
|
83
|
-
},
|
|
83
|
+
}, Ti = {
|
|
84
84
|
defaultFilename: "Chart export",
|
|
85
85
|
exportAsCsv: "Export as CSV"
|
|
86
|
-
}, zi = "Explore",
|
|
86
|
+
}, zi = "Explore", Di = "View requests", ki = "This tile was configured with {savedGranularity} granularity, which is no longer available. It now shows {currentGranularity} data, the closest available granularity.", Si = {
|
|
87
87
|
daily: "1 day",
|
|
88
88
|
fiveMinutely: "5 minutes",
|
|
89
89
|
hourly: "1 hour",
|
|
@@ -96,25 +96,25 @@ const xi = {
|
|
|
96
96
|
twoHourly: "2 hours",
|
|
97
97
|
weekly: "1 week",
|
|
98
98
|
unknown: "Unknown"
|
|
99
|
-
},
|
|
100
|
-
renderer:
|
|
101
|
-
queryDataProvider:
|
|
102
|
-
csvExport:
|
|
99
|
+
}, Ni = {
|
|
100
|
+
renderer: Ci,
|
|
101
|
+
queryDataProvider: Ri,
|
|
102
|
+
csvExport: Ti,
|
|
103
103
|
jumpToExplore: zi,
|
|
104
|
-
jumpToRequests:
|
|
105
|
-
query_aged_out_warning:
|
|
106
|
-
granularities:
|
|
104
|
+
jumpToRequests: Di,
|
|
105
|
+
query_aged_out_warning: ki,
|
|
106
|
+
granularities: Si
|
|
107
107
|
};
|
|
108
|
-
function
|
|
109
|
-
const c = gi("en-us",
|
|
108
|
+
function Oi() {
|
|
109
|
+
const c = gi("en-us", Ni);
|
|
110
110
|
return {
|
|
111
111
|
i18n: c,
|
|
112
112
|
i18nT: mi(c)
|
|
113
113
|
// Translation component <i18n-t>
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
|
-
const $e = 170, Nt = 6, ue = "analytics-query-provider", ut = "{entity-id}",
|
|
117
|
-
function
|
|
116
|
+
const $e = 170, Nt = 6, ue = "analytics-query-provider", ut = "{entity-id}", Ai = "{cp-id}", Hi = "{timeframe}", Li = 30 * 1e3;
|
|
117
|
+
function Ii() {
|
|
118
118
|
const c = _e(ue);
|
|
119
119
|
return {
|
|
120
120
|
evaluateFeatureFlag: (t, i) => c ? c.evaluateFeatureFlagFn(t, i) : i
|
|
@@ -163,7 +163,7 @@ var Ot = { exports: {} };
|
|
|
163
163
|
}, n.prototype.emit = function(l, d, a, f, m, g) {
|
|
164
164
|
var v = t ? t + l : l;
|
|
165
165
|
if (!this._events[v]) return !1;
|
|
166
|
-
var p = this._events[v], R = arguments.length, A,
|
|
166
|
+
var p = this._events[v], R = arguments.length, A, T;
|
|
167
167
|
if (p.fn) {
|
|
168
168
|
switch (p.once && this.removeListener(l, p.fn, void 0, !0), R) {
|
|
169
169
|
case 1:
|
|
@@ -179,29 +179,29 @@ var Ot = { exports: {} };
|
|
|
179
179
|
case 6:
|
|
180
180
|
return p.fn.call(p.context, d, a, f, m, g), !0;
|
|
181
181
|
}
|
|
182
|
-
for (
|
|
183
|
-
A[
|
|
182
|
+
for (T = 1, A = new Array(R - 1); T < R; T++)
|
|
183
|
+
A[T - 1] = arguments[T];
|
|
184
184
|
p.fn.apply(p.context, A);
|
|
185
185
|
} else {
|
|
186
186
|
var H = p.length, E;
|
|
187
|
-
for (
|
|
188
|
-
switch (p[
|
|
187
|
+
for (T = 0; T < H; T++)
|
|
188
|
+
switch (p[T].once && this.removeListener(l, p[T].fn, void 0, !0), R) {
|
|
189
189
|
case 1:
|
|
190
|
-
p[
|
|
190
|
+
p[T].fn.call(p[T].context);
|
|
191
191
|
break;
|
|
192
192
|
case 2:
|
|
193
|
-
p[
|
|
193
|
+
p[T].fn.call(p[T].context, d);
|
|
194
194
|
break;
|
|
195
195
|
case 3:
|
|
196
|
-
p[
|
|
196
|
+
p[T].fn.call(p[T].context, d, a);
|
|
197
197
|
break;
|
|
198
198
|
case 4:
|
|
199
|
-
p[
|
|
199
|
+
p[T].fn.call(p[T].context, d, a, f);
|
|
200
200
|
break;
|
|
201
201
|
default:
|
|
202
202
|
if (!A) for (E = 1, A = new Array(R - 1); E < R; E++)
|
|
203
203
|
A[E - 1] = arguments[E];
|
|
204
|
-
p[
|
|
204
|
+
p[T].fn.apply(p[T].context, A);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
return !0;
|
|
@@ -228,23 +228,23 @@ var Ot = { exports: {} };
|
|
|
228
228
|
return l ? (d = t ? t + l : l, this._events[d] && o(this, d)) : (this._events = new i(), this._eventsCount = 0), this;
|
|
229
229
|
}, n.prototype.off = n.prototype.removeListener, n.prototype.addListener = n.prototype.on, n.prefixed = t, n.EventEmitter = n, c.exports = n;
|
|
230
230
|
})(Ot);
|
|
231
|
-
var
|
|
232
|
-
const
|
|
231
|
+
var qi = Ot.exports;
|
|
232
|
+
const Pi = /* @__PURE__ */ Mi(qi);
|
|
233
233
|
class At extends Error {
|
|
234
234
|
constructor(e) {
|
|
235
235
|
super(e), this.name = "TimeoutError";
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
class
|
|
238
|
+
class $i extends Error {
|
|
239
239
|
constructor(e) {
|
|
240
240
|
super(), this.name = "AbortError", this.message = e;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
const ct = (c) => globalThis.DOMException === void 0 ? new
|
|
243
|
+
const ct = (c) => globalThis.DOMException === void 0 ? new $i(c) : new DOMException(c), ft = (c) => {
|
|
244
244
|
const e = c.reason === void 0 ? ct("This operation was aborted.") : c.reason;
|
|
245
245
|
return e instanceof Error ? e : ct(e);
|
|
246
246
|
};
|
|
247
|
-
function
|
|
247
|
+
function Bi(c, e) {
|
|
248
248
|
const {
|
|
249
249
|
milliseconds: t,
|
|
250
250
|
fallback: i,
|
|
@@ -290,7 +290,7 @@ function $i(c, e) {
|
|
|
290
290
|
r.clearTimeout.call(void 0, o), o = void 0;
|
|
291
291
|
}, l;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Gi(c, e, t) {
|
|
294
294
|
let i = 0, s = c.length;
|
|
295
295
|
for (; s > 0; ) {
|
|
296
296
|
const r = Math.trunc(s / 2);
|
|
@@ -300,9 +300,9 @@ function Bi(c, e, t) {
|
|
|
300
300
|
return i;
|
|
301
301
|
}
|
|
302
302
|
var Q;
|
|
303
|
-
class
|
|
303
|
+
class Ui {
|
|
304
304
|
constructor() {
|
|
305
|
-
|
|
305
|
+
$(this, Q, []);
|
|
306
306
|
}
|
|
307
307
|
enqueue(e, t) {
|
|
308
308
|
t = {
|
|
@@ -318,7 +318,7 @@ class Gi {
|
|
|
318
318
|
_(this, Q).push(i);
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
const s =
|
|
321
|
+
const s = Gi(_(this, Q), i, (r, o) => o.priority - r.priority);
|
|
322
322
|
_(this, Q).splice(s, 0, i);
|
|
323
323
|
}
|
|
324
324
|
setPriority(e, t) {
|
|
@@ -340,30 +340,30 @@ class Gi {
|
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
Q = new WeakMap();
|
|
343
|
-
var fe, ge, le,
|
|
344
|
-
class
|
|
343
|
+
var fe, ge, le, Re, me, Te, Z, pe, F, ze, J, ye, oe, De, qe, z, Ht, Lt, It, Mt, qt, Se, Fe, We, Ne, Pt, Oe;
|
|
344
|
+
class Fi extends Pi {
|
|
345
345
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
346
346
|
constructor(t) {
|
|
347
347
|
var i, s;
|
|
348
348
|
super();
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
349
|
+
$(this, z);
|
|
350
|
+
$(this, fe);
|
|
351
|
+
$(this, ge);
|
|
352
|
+
$(this, le, 0);
|
|
353
|
+
$(this, Re);
|
|
354
|
+
$(this, me);
|
|
355
|
+
$(this, Te, 0);
|
|
356
|
+
$(this, Z);
|
|
357
|
+
$(this, pe);
|
|
358
|
+
$(this, F);
|
|
359
|
+
$(this, ze);
|
|
360
|
+
$(this, J, 0);
|
|
361
361
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
362
|
+
$(this, ye);
|
|
363
|
+
$(this, oe);
|
|
364
|
+
$(this, De);
|
|
365
365
|
// Use to assign a unique identifier to a promise function, if not explicitly specified
|
|
366
|
-
|
|
366
|
+
$(this, qe, 1n);
|
|
367
367
|
/**
|
|
368
368
|
Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
|
|
369
369
|
|
|
@@ -376,13 +376,13 @@ class Ui extends qi {
|
|
|
376
376
|
interval: 0,
|
|
377
377
|
concurrency: Number.POSITIVE_INFINITY,
|
|
378
378
|
autoStart: !0,
|
|
379
|
-
queueClass:
|
|
379
|
+
queueClass: Ui,
|
|
380
380
|
...t
|
|
381
381
|
}, !(typeof t.intervalCap == "number" && t.intervalCap >= 1))
|
|
382
382
|
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})`);
|
|
383
383
|
if (t.interval === void 0 || !(Number.isFinite(t.interval) && t.interval >= 0))
|
|
384
384
|
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${((s = t.interval) == null ? void 0 : s.toString()) ?? ""}\` (${typeof t.interval})`);
|
|
385
|
-
|
|
385
|
+
I(this, fe, t.carryoverConcurrencyCount), I(this, ge, t.intervalCap === Number.POSITIVE_INFINITY || t.interval === 0), I(this, Re, t.intervalCap), I(this, me, t.interval), I(this, F, new t.queueClass()), I(this, ze, t.queueClass), this.concurrency = t.concurrency, this.timeout = t.timeout, I(this, De, t.throwOnTimeout === !0), I(this, oe, t.autoStart === !1);
|
|
386
386
|
}
|
|
387
387
|
get concurrency() {
|
|
388
388
|
return _(this, ye);
|
|
@@ -390,7 +390,7 @@ class Ui extends qi {
|
|
|
390
390
|
set concurrency(t) {
|
|
391
391
|
if (!(typeof t == "number" && t >= 1))
|
|
392
392
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${t}\` (${typeof t})`);
|
|
393
|
-
|
|
393
|
+
I(this, ye, t), B(this, z, Ne).call(this);
|
|
394
394
|
}
|
|
395
395
|
/**
|
|
396
396
|
Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
|
|
@@ -432,9 +432,9 @@ class Ui extends qi {
|
|
|
432
432
|
_(this, F).setPriority(t, i);
|
|
433
433
|
}
|
|
434
434
|
async add(t, i = {}) {
|
|
435
|
-
return i.id ?? (i.id = (we(this,
|
|
435
|
+
return i.id ?? (i.id = (we(this, qe)._++).toString()), i = {
|
|
436
436
|
timeout: this.timeout,
|
|
437
|
-
throwOnTimeout: _(this,
|
|
437
|
+
throwOnTimeout: _(this, De),
|
|
438
438
|
...i
|
|
439
439
|
}, new Promise((s, r) => {
|
|
440
440
|
_(this, F).enqueue(async () => {
|
|
@@ -443,7 +443,7 @@ class Ui extends qi {
|
|
|
443
443
|
try {
|
|
444
444
|
(o = i.signal) == null || o.throwIfAborted();
|
|
445
445
|
let n = t({ signal: i.signal });
|
|
446
|
-
i.timeout && (n =
|
|
446
|
+
i.timeout && (n = Bi(Promise.resolve(n), { milliseconds: i.timeout })), i.signal && (n = Promise.race([n, B(this, z, Pt).call(this, i.signal)]));
|
|
447
447
|
const h = await n;
|
|
448
448
|
s(h), this.emit("completed", h);
|
|
449
449
|
} catch (n) {
|
|
@@ -453,9 +453,9 @@ class Ui extends qi {
|
|
|
453
453
|
}
|
|
454
454
|
r(n), this.emit("error", n);
|
|
455
455
|
} finally {
|
|
456
|
-
B(this,
|
|
456
|
+
B(this, z, It).call(this);
|
|
457
457
|
}
|
|
458
|
-
}, i), this.emit("add"), B(this,
|
|
458
|
+
}, i), this.emit("add"), B(this, z, Se).call(this);
|
|
459
459
|
});
|
|
460
460
|
}
|
|
461
461
|
async addAll(t, i) {
|
|
@@ -465,19 +465,19 @@ class Ui extends qi {
|
|
|
465
465
|
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.)
|
|
466
466
|
*/
|
|
467
467
|
start() {
|
|
468
|
-
return _(this, oe) ? (
|
|
468
|
+
return _(this, oe) ? (I(this, oe, !1), B(this, z, Ne).call(this), this) : this;
|
|
469
469
|
}
|
|
470
470
|
/**
|
|
471
471
|
Put queue execution on hold.
|
|
472
472
|
*/
|
|
473
473
|
pause() {
|
|
474
|
-
|
|
474
|
+
I(this, oe, !0);
|
|
475
475
|
}
|
|
476
476
|
/**
|
|
477
477
|
Clear the queue.
|
|
478
478
|
*/
|
|
479
479
|
clear() {
|
|
480
|
-
|
|
480
|
+
I(this, F, new (_(this, ze))());
|
|
481
481
|
}
|
|
482
482
|
/**
|
|
483
483
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -485,7 +485,7 @@ class Ui extends qi {
|
|
|
485
485
|
@returns A promise that settles when the queue becomes empty.
|
|
486
486
|
*/
|
|
487
487
|
async onEmpty() {
|
|
488
|
-
_(this, F).size !== 0 && await B(this,
|
|
488
|
+
_(this, F).size !== 0 && await B(this, z, Oe).call(this, "empty");
|
|
489
489
|
}
|
|
490
490
|
/**
|
|
491
491
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -495,7 +495,7 @@ class Ui extends qi {
|
|
|
495
495
|
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.
|
|
496
496
|
*/
|
|
497
497
|
async onSizeLessThan(t) {
|
|
498
|
-
_(this, F).size < t || await B(this,
|
|
498
|
+
_(this, F).size < t || await B(this, z, Oe).call(this, "next", () => _(this, F).size < t);
|
|
499
499
|
}
|
|
500
500
|
/**
|
|
501
501
|
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.
|
|
@@ -503,7 +503,7 @@ class Ui extends qi {
|
|
|
503
503
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
504
504
|
*/
|
|
505
505
|
async onIdle() {
|
|
506
|
-
_(this, J) === 0 && _(this, F).size === 0 || await B(this,
|
|
506
|
+
_(this, J) === 0 && _(this, F).size === 0 || await B(this, z, Oe).call(this, "idle");
|
|
507
507
|
}
|
|
508
508
|
/**
|
|
509
509
|
Size of the queue, the number of queued items waiting to run.
|
|
@@ -532,48 +532,48 @@ class Ui extends qi {
|
|
|
532
532
|
return _(this, oe);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
fe = new WeakMap(), ge = new WeakMap(), le = new WeakMap(),
|
|
536
|
-
return _(this, ge) || _(this, le) < _(this,
|
|
535
|
+
fe = new WeakMap(), ge = new WeakMap(), le = new WeakMap(), Re = new WeakMap(), me = new WeakMap(), Te = new WeakMap(), Z = new WeakMap(), pe = new WeakMap(), F = new WeakMap(), ze = new WeakMap(), J = new WeakMap(), ye = new WeakMap(), oe = new WeakMap(), De = new WeakMap(), qe = new WeakMap(), z = new WeakSet(), Ht = function() {
|
|
536
|
+
return _(this, ge) || _(this, le) < _(this, Re);
|
|
537
537
|
}, Lt = function() {
|
|
538
538
|
return _(this, J) < _(this, ye);
|
|
539
|
-
}, Mt = function() {
|
|
540
|
-
we(this, J)._--, B(this, T, ke).call(this), this.emit("next");
|
|
541
539
|
}, It = function() {
|
|
542
|
-
|
|
540
|
+
we(this, J)._--, B(this, z, Se).call(this), this.emit("next");
|
|
541
|
+
}, Mt = function() {
|
|
542
|
+
B(this, z, We).call(this), B(this, z, Fe).call(this), I(this, pe, void 0);
|
|
543
543
|
}, qt = function() {
|
|
544
544
|
const t = Date.now();
|
|
545
545
|
if (_(this, Z) === void 0) {
|
|
546
|
-
const i = _(this,
|
|
546
|
+
const i = _(this, Te) - t;
|
|
547
547
|
if (i < 0)
|
|
548
|
-
|
|
548
|
+
I(this, le, _(this, fe) ? _(this, J) : 0);
|
|
549
549
|
else
|
|
550
|
-
return _(this, pe) === void 0 &&
|
|
551
|
-
B(this,
|
|
550
|
+
return _(this, pe) === void 0 && I(this, pe, setTimeout(() => {
|
|
551
|
+
B(this, z, Mt).call(this);
|
|
552
552
|
}, i)), !0;
|
|
553
553
|
}
|
|
554
554
|
return !1;
|
|
555
|
-
},
|
|
555
|
+
}, Se = function() {
|
|
556
556
|
if (_(this, F).size === 0)
|
|
557
|
-
return _(this, Z) && clearInterval(_(this, Z)),
|
|
557
|
+
return _(this, Z) && clearInterval(_(this, Z)), I(this, Z, void 0), this.emit("empty"), _(this, J) === 0 && this.emit("idle"), !1;
|
|
558
558
|
if (!_(this, oe)) {
|
|
559
|
-
const t = !_(this,
|
|
560
|
-
if (_(this,
|
|
559
|
+
const t = !_(this, z, qt);
|
|
560
|
+
if (_(this, z, Ht) && _(this, z, Lt)) {
|
|
561
561
|
const i = _(this, F).dequeue();
|
|
562
|
-
return i ? (this.emit("active"), i(), t && B(this,
|
|
562
|
+
return i ? (this.emit("active"), i(), t && B(this, z, Fe).call(this), !0) : !1;
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
return !1;
|
|
566
566
|
}, Fe = function() {
|
|
567
|
-
_(this, ge) || _(this, Z) !== void 0 || (
|
|
568
|
-
B(this,
|
|
569
|
-
}, _(this, me))),
|
|
567
|
+
_(this, ge) || _(this, Z) !== void 0 || (I(this, Z, setInterval(() => {
|
|
568
|
+
B(this, z, We).call(this);
|
|
569
|
+
}, _(this, me))), I(this, Te, Date.now() + _(this, me)));
|
|
570
570
|
}, We = function() {
|
|
571
|
-
_(this, le) === 0 && _(this, J) === 0 && _(this, Z) && (clearInterval(_(this, Z)),
|
|
571
|
+
_(this, le) === 0 && _(this, J) === 0 && _(this, Z) && (clearInterval(_(this, Z)), I(this, Z, void 0)), I(this, le, _(this, fe) ? _(this, J) : 0), B(this, z, Ne).call(this);
|
|
572
572
|
}, /**
|
|
573
573
|
Executes all queued functions until it reaches the limit.
|
|
574
574
|
*/
|
|
575
|
-
|
|
576
|
-
for (; B(this,
|
|
575
|
+
Ne = function() {
|
|
576
|
+
for (; B(this, z, Se).call(this); )
|
|
577
577
|
;
|
|
578
578
|
}, Pt = async function(t) {
|
|
579
579
|
return new Promise((i, s) => {
|
|
@@ -581,7 +581,7 @@ Se = function() {
|
|
|
581
581
|
s(t.reason);
|
|
582
582
|
}, { once: !0 });
|
|
583
583
|
});
|
|
584
|
-
},
|
|
584
|
+
}, Oe = async function(t, i) {
|
|
585
585
|
return new Promise((s) => {
|
|
586
586
|
const r = () => {
|
|
587
587
|
i && !i() || (this.off(t, r), s());
|
|
@@ -589,7 +589,7 @@ Se = function() {
|
|
|
589
589
|
this.on(t, r);
|
|
590
590
|
});
|
|
591
591
|
};
|
|
592
|
-
const
|
|
592
|
+
const Wi = () => {
|
|
593
593
|
const c = kt(), e = _e(ue);
|
|
594
594
|
if (!e)
|
|
595
595
|
return;
|
|
@@ -597,7 +597,7 @@ const Fi = () => {
|
|
|
597
597
|
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.");
|
|
598
598
|
return;
|
|
599
599
|
}
|
|
600
|
-
const t = new
|
|
600
|
+
const t = new Fi({
|
|
601
601
|
carryoverConcurrencyCount: !0,
|
|
602
602
|
concurrency: c.maxParallelRequests,
|
|
603
603
|
interval: c.requestInterval,
|
|
@@ -609,9 +609,9 @@ const Fi = () => {
|
|
|
609
609
|
};
|
|
610
610
|
Zt(ue, i);
|
|
611
611
|
}, ve = {
|
|
612
|
-
useI18n:
|
|
613
|
-
useEvaluateFeatureFlag:
|
|
614
|
-
useRequestQueue:
|
|
612
|
+
useI18n: Oi,
|
|
613
|
+
useEvaluateFeatureFlag: Ii,
|
|
614
|
+
useRequestQueue: Wi
|
|
615
615
|
}, Ze = /* @__PURE__ */ j({
|
|
616
616
|
__name: "QueryDataProvider",
|
|
617
617
|
props: {
|
|
@@ -626,11 +626,11 @@ const Fi = () => {
|
|
|
626
626
|
Ve(() => {
|
|
627
627
|
n.abort();
|
|
628
628
|
});
|
|
629
|
-
const h = (R, A,
|
|
629
|
+
const h = (R, A, T) => {
|
|
630
630
|
const H = [];
|
|
631
|
-
return A && H.push(...A), H.push(...ni(R,
|
|
631
|
+
return A && H.push(...A), H.push(...ni(R, T)), H;
|
|
632
632
|
}, { data: l, error: d, isValidating: a } = fi(o, async () => {
|
|
633
|
-
var R, A,
|
|
633
|
+
var R, A, T, H;
|
|
634
634
|
try {
|
|
635
635
|
let {
|
|
636
636
|
datasource: E,
|
|
@@ -646,17 +646,29 @@ const Fi = () => {
|
|
|
646
646
|
...t.context.timeSpec,
|
|
647
647
|
tz: t.context.tz
|
|
648
648
|
};
|
|
649
|
-
const
|
|
649
|
+
const P = {
|
|
650
650
|
datasource: E,
|
|
651
651
|
query: {
|
|
652
652
|
...x,
|
|
653
653
|
time_range: D,
|
|
654
654
|
filters: O
|
|
655
655
|
}
|
|
656
|
-
}, ee = await (r == null ? void 0 : r.queryFn(
|
|
656
|
+
}, ee = await (r == null ? void 0 : r.queryFn(P, n));
|
|
657
657
|
return g.value = null, ee;
|
|
658
658
|
} catch (E) {
|
|
659
|
-
throw (E == null ? void 0 : E.status) === 403 ? g.value =
|
|
659
|
+
throw (E == null ? void 0 : E.status) === 403 ? g.value = {
|
|
660
|
+
message: s.t("queryDataProvider.forbidden"),
|
|
661
|
+
type: "forbidden"
|
|
662
|
+
} : (E == null ? void 0 : E.status) === 408 ? g.value = {
|
|
663
|
+
message: s.t("queryDataProvider.timeout"),
|
|
664
|
+
type: "timeout"
|
|
665
|
+
} : ((A = (R = E == null ? void 0 : E.response) == null ? void 0 : R.data) == null ? void 0 : A.message) === "Range not allowed for this tier" ? g.value = {
|
|
666
|
+
message: s.t("queryDataProvider.timeRangeExceeded"),
|
|
667
|
+
type: "range_exceeded"
|
|
668
|
+
} : g.value = {
|
|
669
|
+
message: ((H = (T = E == null ? void 0 : E.response) == null ? void 0 : T.data) == null ? void 0 : H.message) || (E == null ? void 0 : E.message),
|
|
670
|
+
type: "other"
|
|
671
|
+
}, E;
|
|
660
672
|
} finally {
|
|
661
673
|
i("queryComplete");
|
|
662
674
|
}
|
|
@@ -664,32 +676,48 @@ const Fi = () => {
|
|
|
664
676
|
refreshInterval: t.context.refreshInterval,
|
|
665
677
|
revalidateOnFocus: !1,
|
|
666
678
|
shouldRetryOnError: !1
|
|
667
|
-
}), { state: f, swrvState: m } =
|
|
679
|
+
}), { state: f, swrvState: m } = xi(l, d, a), g = G(null), v = N(() => f.value === m.ERROR || !!g.value), p = N(() => !t.queryReady || f.value === m.PENDING);
|
|
668
680
|
return Ke(l, (R) => {
|
|
669
681
|
R && i("chart-data", R);
|
|
670
682
|
}), (R, A) => {
|
|
671
|
-
|
|
672
|
-
|
|
683
|
+
var E;
|
|
684
|
+
const T = he("KSkeleton"), H = he("KEmptyState");
|
|
685
|
+
return p.value || !k(l) && !v.value ? (C(), M(T, {
|
|
673
686
|
key: 0,
|
|
674
687
|
class: "chart-skeleton",
|
|
675
688
|
type: "table"
|
|
676
|
-
})) : v.value ? (C(),
|
|
689
|
+
})) : v.value && ((E = g.value) == null ? void 0 : E.type) === "forbidden" ? (C(), M(H, {
|
|
677
690
|
key: 1,
|
|
678
691
|
"action-button-visible": !1,
|
|
679
|
-
"data-testid": "chart-
|
|
680
|
-
"icon-variant": "error"
|
|
692
|
+
"data-testid": "chart-forbidden-state"
|
|
681
693
|
}, {
|
|
682
|
-
default:
|
|
683
|
-
|
|
694
|
+
default: q(() => [
|
|
695
|
+
Ee(te(g.value.message), 1)
|
|
696
|
+
]),
|
|
697
|
+
icon: q(() => [
|
|
698
|
+
se(k(pi))
|
|
684
699
|
]),
|
|
685
700
|
_: 1
|
|
686
|
-
})) :
|
|
701
|
+
})) : v.value ? (C(), M(H, {
|
|
687
702
|
key: 2,
|
|
703
|
+
"action-button-visible": !1,
|
|
704
|
+
"data-testid": "chart-empty-state",
|
|
705
|
+
"icon-variant": "error"
|
|
706
|
+
}, {
|
|
707
|
+
default: q(() => {
|
|
708
|
+
var x;
|
|
709
|
+
return [
|
|
710
|
+
Ee(te((x = g.value) == null ? void 0 : x.message), 1)
|
|
711
|
+
];
|
|
712
|
+
}),
|
|
713
|
+
_: 1
|
|
714
|
+
})) : k(l) ? Pe(R.$slots, "default", {
|
|
715
|
+
key: 3,
|
|
688
716
|
data: k(l)
|
|
689
717
|
}) : Y("", !0);
|
|
690
718
|
};
|
|
691
719
|
}
|
|
692
|
-
}),
|
|
720
|
+
}), Vi = /* @__PURE__ */ j({
|
|
693
721
|
__name: "SimpleChartRenderer",
|
|
694
722
|
props: {
|
|
695
723
|
query: {},
|
|
@@ -705,17 +733,17 @@ const Fi = () => {
|
|
|
705
733
|
"088169ae": `${i.height}px`
|
|
706
734
|
}));
|
|
707
735
|
const e = c, t = N(() => e.chartOptions.type === "single_value");
|
|
708
|
-
return (i, s) => (C(),
|
|
736
|
+
return (i, s) => (C(), M(Ze, {
|
|
709
737
|
context: i.context,
|
|
710
738
|
query: i.query,
|
|
711
739
|
"query-ready": i.queryReady,
|
|
712
740
|
"refresh-counter": i.refreshCounter
|
|
713
741
|
}, {
|
|
714
|
-
default:
|
|
742
|
+
default: q(({ data: r }) => [
|
|
715
743
|
ae("div", {
|
|
716
744
|
class: je(["analytics-chart", { "single-value": t.value }])
|
|
717
745
|
}, [
|
|
718
|
-
|
|
746
|
+
se(k(hi), {
|
|
719
747
|
"chart-data": r,
|
|
720
748
|
"chart-options": i.chartOptions,
|
|
721
749
|
"synthetics-data-key": t.value ? void 0 : i.chartOptions.synthetics_data_key
|
|
@@ -730,7 +758,7 @@ const Fi = () => {
|
|
|
730
758
|
for (const [i, s] of e)
|
|
731
759
|
t[i] = s;
|
|
732
760
|
return t;
|
|
733
|
-
}, gt = /* @__PURE__ */ ce(
|
|
761
|
+
}, gt = /* @__PURE__ */ ce(Vi, [["__scopeId", "data-v-1e9ff912"]]), Ki = { class: "analytics-chart" }, Yi = /* @__PURE__ */ j({
|
|
734
762
|
__name: "BaseAnalyticsChartRenderer",
|
|
735
763
|
props: {
|
|
736
764
|
query: {},
|
|
@@ -756,16 +784,16 @@ const Fi = () => {
|
|
|
756
784
|
};
|
|
757
785
|
return (a, f) => {
|
|
758
786
|
const m = he("KDropdownItem");
|
|
759
|
-
return C(),
|
|
787
|
+
return C(), M(Ze, {
|
|
760
788
|
context: a.context,
|
|
761
789
|
query: a.query,
|
|
762
790
|
"query-ready": a.queryReady,
|
|
763
791
|
"refresh-counter": a.refreshCounter,
|
|
764
792
|
onChartData: d
|
|
765
793
|
}, {
|
|
766
|
-
default:
|
|
767
|
-
ae("div",
|
|
768
|
-
|
|
794
|
+
default: q(({ data: g }) => [
|
|
795
|
+
ae("div", Ki, [
|
|
796
|
+
se(k(di), xt({
|
|
769
797
|
"allow-csv-export": a.chartOptions.allow_csv_export,
|
|
770
798
|
"chart-data": g,
|
|
771
799
|
"chart-options": n.value,
|
|
@@ -781,10 +809,10 @@ const Fi = () => {
|
|
|
781
809
|
}), Xe({ _: 2 }, [
|
|
782
810
|
a.context.editable ? {
|
|
783
811
|
name: "menu-items",
|
|
784
|
-
fn:
|
|
785
|
-
|
|
786
|
-
default:
|
|
787
|
-
|
|
812
|
+
fn: q(() => [
|
|
813
|
+
se(m, { onClick: l }, {
|
|
814
|
+
default: q(() => [
|
|
815
|
+
Ee(te(k(s).t("renderer.edit")), 1)
|
|
788
816
|
]),
|
|
789
817
|
_: 1
|
|
790
818
|
})
|
|
@@ -798,7 +826,7 @@ const Fi = () => {
|
|
|
798
826
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]);
|
|
799
827
|
};
|
|
800
828
|
}
|
|
801
|
-
}), Je = /* @__PURE__ */ ce(
|
|
829
|
+
}), Je = /* @__PURE__ */ ce(Yi, [["__scopeId", "data-v-9d4f6602"]]), mt = /* @__PURE__ */ j({
|
|
802
830
|
__name: "BarChartRenderer",
|
|
803
831
|
props: {
|
|
804
832
|
query: {},
|
|
@@ -810,7 +838,7 @@ const Fi = () => {
|
|
|
810
838
|
requestsLink: {}
|
|
811
839
|
},
|
|
812
840
|
setup(c) {
|
|
813
|
-
return (e, t) => (C(),
|
|
841
|
+
return (e, t) => (C(), M(Je, {
|
|
814
842
|
"chart-options": e.chartOptions,
|
|
815
843
|
context: e.context,
|
|
816
844
|
"extra-props": { showAnnotations: !1 },
|
|
@@ -834,7 +862,7 @@ const Fi = () => {
|
|
|
834
862
|
emits: ["zoom-time-range", "select-chart-range"],
|
|
835
863
|
setup(c, { emit: e }) {
|
|
836
864
|
const t = e;
|
|
837
|
-
return (i, s) => (C(),
|
|
865
|
+
return (i, s) => (C(), M(Je, {
|
|
838
866
|
"chart-options": i.chartOptions,
|
|
839
867
|
context: i.context,
|
|
840
868
|
height: i.height,
|
|
@@ -846,7 +874,7 @@ const Fi = () => {
|
|
|
846
874
|
onZoomTimeRange: s[1] || (s[1] = (r) => t("zoom-time-range", r))
|
|
847
875
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter", "requests-link"]));
|
|
848
876
|
}
|
|
849
|
-
}),
|
|
877
|
+
}), ji = { class: "metric-card-tile-wrapper" }, Xi = /* @__PURE__ */ j({
|
|
850
878
|
__name: "GoldenSignalsRenderer",
|
|
851
879
|
props: {
|
|
852
880
|
query: {},
|
|
@@ -895,16 +923,16 @@ const Fi = () => {
|
|
|
895
923
|
refreshCounter: e.refreshCounter
|
|
896
924
|
};
|
|
897
925
|
});
|
|
898
|
-
return (s, r) => (C(), W("div",
|
|
899
|
-
|
|
900
|
-
default:
|
|
901
|
-
|
|
926
|
+
return (s, r) => (C(), W("div", ji, [
|
|
927
|
+
se(k(bi), Jt(ei(i.value)), {
|
|
928
|
+
default: q(() => [
|
|
929
|
+
se(k(wi))
|
|
902
930
|
]),
|
|
903
931
|
_: 1
|
|
904
932
|
}, 16)
|
|
905
933
|
]));
|
|
906
934
|
}
|
|
907
|
-
}),
|
|
935
|
+
}), Qi = /* @__PURE__ */ ce(Xi, [["__scopeId", "data-v-7e1b1cc1"]]), yt = "#6c7489", Zi = "12px", vt = "20px", $t = "20px", Ji = {
|
|
908
936
|
class: "fallback-entity-link",
|
|
909
937
|
"data-testid": "entity-link-parent"
|
|
910
938
|
}, _t = /* @__PURE__ */ j({
|
|
@@ -913,9 +941,9 @@ const Fi = () => {
|
|
|
913
941
|
entityLinkData: {}
|
|
914
942
|
},
|
|
915
943
|
setup(c) {
|
|
916
|
-
return (e, t) => (C(), W("div",
|
|
944
|
+
return (e, t) => (C(), W("div", Ji, te(e.entityLinkData.label), 1));
|
|
917
945
|
}
|
|
918
|
-
}),
|
|
946
|
+
}), es = /* @__PURE__ */ j({
|
|
919
947
|
__name: "TopNTableRenderer",
|
|
920
948
|
props: {
|
|
921
949
|
query: {},
|
|
@@ -940,26 +968,26 @@ const Fi = () => {
|
|
|
940
968
|
if ((o = e.chartOptions) != null && o.entity_link)
|
|
941
969
|
if (r.id.includes(":")) {
|
|
942
970
|
const [n, h] = r.id.split(":");
|
|
943
|
-
return e.chartOptions.entity_link.replace(
|
|
971
|
+
return e.chartOptions.entity_link.replace(Ai, n).replace(ut, h);
|
|
944
972
|
} else
|
|
945
973
|
return e.chartOptions.entity_link.replace(ut, r.id);
|
|
946
974
|
return "";
|
|
947
975
|
};
|
|
948
|
-
return (r, o) => (C(),
|
|
976
|
+
return (r, o) => (C(), M(Ze, {
|
|
949
977
|
context: r.context,
|
|
950
978
|
query: r.query,
|
|
951
979
|
"query-ready": r.queryReady,
|
|
952
980
|
"refresh-counter": r.refreshCounter
|
|
953
981
|
}, {
|
|
954
|
-
default:
|
|
955
|
-
|
|
982
|
+
default: q(({ data: n }) => [
|
|
983
|
+
se(k(ui), {
|
|
956
984
|
data: n,
|
|
957
985
|
"synthetics-data-key": r.chartOptions.synthetics_data_key
|
|
958
986
|
}, Xe({ _: 2 }, [
|
|
959
987
|
e.chartOptions.entity_link ? {
|
|
960
988
|
name: "name",
|
|
961
|
-
fn:
|
|
962
|
-
|
|
989
|
+
fn: q(({ record: h }) => [
|
|
990
|
+
se(k(i), {
|
|
963
991
|
"entity-link-data": {
|
|
964
992
|
id: h.id,
|
|
965
993
|
label: h.name,
|
|
@@ -975,7 +1003,7 @@ const Fi = () => {
|
|
|
975
1003
|
_: 1
|
|
976
1004
|
}, 8, ["context", "query", "query-ready", "refresh-counter"]));
|
|
977
1005
|
}
|
|
978
|
-
}),
|
|
1006
|
+
}), ts = /* @__PURE__ */ j({
|
|
979
1007
|
__name: "DonutChartRenderer",
|
|
980
1008
|
props: {
|
|
981
1009
|
query: {},
|
|
@@ -987,7 +1015,7 @@ const Fi = () => {
|
|
|
987
1015
|
requestsLink: {}
|
|
988
1016
|
},
|
|
989
1017
|
setup(c) {
|
|
990
|
-
return (e, t) => (C(),
|
|
1018
|
+
return (e, t) => (C(), M(Je, {
|
|
991
1019
|
"chart-options": e.chartOptions,
|
|
992
1020
|
context: e.context,
|
|
993
1021
|
height: e.height,
|
|
@@ -996,10 +1024,10 @@ const Fi = () => {
|
|
|
996
1024
|
"refresh-counter": e.refreshCounter
|
|
997
1025
|
}, null, 8, ["chart-options", "context", "height", "query", "query-ready", "refresh-counter"]));
|
|
998
1026
|
}
|
|
999
|
-
}),
|
|
1027
|
+
}), is = ["data-testid"], ss = {
|
|
1000
1028
|
key: 0,
|
|
1001
1029
|
class: "tile-header"
|
|
1002
|
-
},
|
|
1030
|
+
}, rs = ["data-testid"], ns = { class: "badge-text" }, os = ["data-testid"], as = { class: "delete-option" }, ls = ["data-testid"], hs = ["data-testid"], ds = /* @__PURE__ */ j({
|
|
1003
1031
|
__name: "DashboardTile",
|
|
1004
1032
|
props: {
|
|
1005
1033
|
definition: {},
|
|
@@ -1043,15 +1071,15 @@ const Fi = () => {
|
|
|
1043
1071
|
y
|
|
1044
1072
|
);
|
|
1045
1073
|
return `${m.value}?q=${JSON.stringify(S)}`;
|
|
1046
|
-
}), A = N(() => n.t("csvExport.defaultFilename")),
|
|
1074
|
+
}), A = N(() => n.t("csvExport.defaultFilename")), T = N(() => H.value && (E.value || i.context.editable) || !!P.value), H = N(() => !["golden_signals", "top_n", "gauge"].includes(i.definition.chart.type)), E = N(() => !!v.value || "allow_csv_export" in i.definition.chart && i.definition.chart.allow_csv_export || i.context.editable), x = {
|
|
1047
1075
|
timeseries_line: pt,
|
|
1048
1076
|
timeseries_bar: pt,
|
|
1049
1077
|
horizontal_bar: mt,
|
|
1050
1078
|
vertical_bar: mt,
|
|
1051
1079
|
gauge: gt,
|
|
1052
|
-
donut:
|
|
1053
|
-
golden_signals:
|
|
1054
|
-
top_n:
|
|
1080
|
+
donut: ts,
|
|
1081
|
+
golden_signals: Qi,
|
|
1082
|
+
top_n: es,
|
|
1055
1083
|
slottable: void 0,
|
|
1056
1084
|
single_value: gt
|
|
1057
1085
|
}, O = N(() => {
|
|
@@ -1079,7 +1107,7 @@ const Fi = () => {
|
|
|
1079
1107
|
supportsZoom: L
|
|
1080
1108
|
}
|
|
1081
1109
|
};
|
|
1082
|
-
}),
|
|
1110
|
+
}), P = N(() => {
|
|
1083
1111
|
var S;
|
|
1084
1112
|
const y = (S = i.definition.query) == null ? void 0 : S.time_range;
|
|
1085
1113
|
if ((y == null ? void 0 : y.type) === "relative") {
|
|
@@ -1094,7 +1122,7 @@ const Fi = () => {
|
|
|
1094
1122
|
var L;
|
|
1095
1123
|
const y = i.definition.query.granularity, S = Ue(((L = h.value) == null ? void 0 : L.meta.granularity_ms) || 0);
|
|
1096
1124
|
return de.value && y !== S;
|
|
1097
|
-
}),
|
|
1125
|
+
}), ke = N(() => {
|
|
1098
1126
|
var L, X, V;
|
|
1099
1127
|
const y = Ue(((L = h.value) == null ? void 0 : L.meta.granularity_ms) ?? 0) ?? "unknown", S = ((V = (X = i.definition) == null ? void 0 : X.query) == null ? void 0 : V.granularity) ?? "unknown";
|
|
1100
1128
|
return n.t("query_aged_out_warning", {
|
|
@@ -1144,47 +1172,47 @@ const Fi = () => {
|
|
|
1144
1172
|
class: je(["tile-boundary", { editable: y.context.editable }]),
|
|
1145
1173
|
"data-testid": `tile-${y.tileId}`
|
|
1146
1174
|
}, [
|
|
1147
|
-
y.definition.chart.type !== "slottable" ? (C(), W("div",
|
|
1148
|
-
|
|
1175
|
+
y.definition.chart.type !== "slottable" ? (C(), W("div", ss, [
|
|
1176
|
+
se(L, {
|
|
1149
1177
|
class: "title-tooltip",
|
|
1150
1178
|
disabled: !a.value,
|
|
1151
1179
|
"max-width": "500",
|
|
1152
1180
|
text: y.definition.chart.chart_title
|
|
1153
1181
|
}, {
|
|
1154
|
-
default:
|
|
1182
|
+
default: q(() => [
|
|
1155
1183
|
ae("div", {
|
|
1156
1184
|
ref_key: "titleRef",
|
|
1157
1185
|
ref: d,
|
|
1158
1186
|
class: "title"
|
|
1159
|
-
},
|
|
1187
|
+
}, te(y.definition.chart.chart_title), 513)
|
|
1160
1188
|
]),
|
|
1161
1189
|
_: 1
|
|
1162
1190
|
}, 8, ["disabled", "text"]),
|
|
1163
|
-
|
|
1191
|
+
T.value ? (C(), W("div", {
|
|
1164
1192
|
key: 0,
|
|
1165
1193
|
class: "tile-actions",
|
|
1166
1194
|
"data-testid": `tile-actions-${y.tileId}`
|
|
1167
1195
|
}, [
|
|
1168
|
-
|
|
1196
|
+
P.value ? (C(), M(X, {
|
|
1169
1197
|
key: 0,
|
|
1170
1198
|
"data-testid": "time-range-badge",
|
|
1171
|
-
tooltip: be.value ?
|
|
1199
|
+
tooltip: be.value ? ke.value : void 0,
|
|
1172
1200
|
"tooltip-attributes": { maxWidth: "320px" }
|
|
1173
1201
|
}, Xe({
|
|
1174
|
-
default:
|
|
1175
|
-
ae("span",
|
|
1202
|
+
default: q(() => [
|
|
1203
|
+
ae("span", ns, te(P.value), 1)
|
|
1176
1204
|
]),
|
|
1177
1205
|
_: 2
|
|
1178
1206
|
}, [
|
|
1179
1207
|
be.value ? {
|
|
1180
1208
|
name: "icon",
|
|
1181
|
-
fn:
|
|
1182
|
-
|
|
1209
|
+
fn: q(() => [
|
|
1210
|
+
se(k(yi), { size: k(Zi) }, null, 8, ["size"])
|
|
1183
1211
|
]),
|
|
1184
1212
|
key: "0"
|
|
1185
1213
|
} : void 0
|
|
1186
1214
|
]), 1032, ["tooltip"])) : Y("", !0),
|
|
1187
|
-
H.value && y.context.editable ? (C(),
|
|
1215
|
+
H.value && y.context.editable ? (C(), M(k(vi), {
|
|
1188
1216
|
key: 1,
|
|
1189
1217
|
class: "edit-icon",
|
|
1190
1218
|
color: k(yt),
|
|
@@ -1192,60 +1220,60 @@ const Fi = () => {
|
|
|
1192
1220
|
size: k(vt),
|
|
1193
1221
|
onClick: Ut
|
|
1194
1222
|
}, null, 8, ["color", "data-testid", "size"])) : Y("", !0),
|
|
1195
|
-
H.value && E.value ? (C(),
|
|
1223
|
+
H.value && E.value ? (C(), M(rt, {
|
|
1196
1224
|
key: 2,
|
|
1197
1225
|
class: "dropdown",
|
|
1198
1226
|
"data-testid": `chart-action-menu-${y.tileId}`,
|
|
1199
1227
|
"kpop-attributes": { placement: "bottom-end" }
|
|
1200
1228
|
}, {
|
|
1201
|
-
items:
|
|
1202
|
-
v.value ? (C(),
|
|
1229
|
+
items: q(() => [
|
|
1230
|
+
v.value ? (C(), M(V, {
|
|
1203
1231
|
key: 0,
|
|
1204
1232
|
"data-testid": `chart-jump-to-explore-${y.tileId}`,
|
|
1205
1233
|
item: { label: k(n).t("jumpToExplore"), to: v.value }
|
|
1206
1234
|
}, null, 8, ["data-testid", "item"])) : Y("", !0),
|
|
1207
|
-
k(o) && R.value ? (C(),
|
|
1235
|
+
k(o) && R.value ? (C(), M(V, {
|
|
1208
1236
|
key: 1,
|
|
1209
1237
|
"data-testid": `chart-jump-to-requests-${y.tileId}`,
|
|
1210
1238
|
item: { label: k(n).t("jumpToRequests"), to: R.value }
|
|
1211
1239
|
}, null, 8, ["data-testid", "item"])) : Y("", !0),
|
|
1212
|
-
!("allowCsvExport" in y.definition.chart) || y.definition.chart.allowCsvExport ? (C(),
|
|
1240
|
+
!("allowCsvExport" in y.definition.chart) || y.definition.chart.allowCsvExport ? (C(), M(V, {
|
|
1213
1241
|
key: 2,
|
|
1214
1242
|
class: "chart-export-button",
|
|
1215
1243
|
"data-testid": `chart-csv-export-${y.tileId}`,
|
|
1216
1244
|
onClick: S[0] || (S[0] = (nt) => Kt())
|
|
1217
1245
|
}, {
|
|
1218
|
-
default:
|
|
1246
|
+
default: q(() => [
|
|
1219
1247
|
ae("span", {
|
|
1220
1248
|
class: "chart-export-trigger",
|
|
1221
1249
|
"data-testid": `csv-export-button-${y.tileId}`
|
|
1222
|
-
},
|
|
1250
|
+
}, te(k(n).t("csvExport.exportAsCsv")), 9, os)
|
|
1223
1251
|
]),
|
|
1224
1252
|
_: 1
|
|
1225
1253
|
}, 8, ["data-testid"])) : Y("", !0),
|
|
1226
|
-
y.context.editable ? (C(),
|
|
1254
|
+
y.context.editable ? (C(), M(V, {
|
|
1227
1255
|
key: 3,
|
|
1228
1256
|
"data-testid": `duplicate-tile-${y.tileId}`,
|
|
1229
1257
|
onClick: Ft
|
|
1230
1258
|
}, {
|
|
1231
|
-
default:
|
|
1232
|
-
|
|
1259
|
+
default: q(() => [
|
|
1260
|
+
Ee(te(k(n).t("renderer.duplicateTile")), 1)
|
|
1233
1261
|
]),
|
|
1234
1262
|
_: 1
|
|
1235
1263
|
}, 8, ["data-testid"])) : Y("", !0),
|
|
1236
|
-
y.context.editable ? (C(),
|
|
1264
|
+
y.context.editable ? (C(), M(V, {
|
|
1237
1265
|
key: 4,
|
|
1238
1266
|
"data-testid": `remove-tile-${y.tileId}`,
|
|
1239
1267
|
onClick: Wt
|
|
1240
1268
|
}, {
|
|
1241
|
-
default:
|
|
1242
|
-
ae("span",
|
|
1269
|
+
default: q(() => [
|
|
1270
|
+
ae("span", as, te(k(n).t("renderer.delete")), 1)
|
|
1243
1271
|
]),
|
|
1244
1272
|
_: 1
|
|
1245
1273
|
}, 8, ["data-testid"])) : Y("", !0)
|
|
1246
1274
|
]),
|
|
1247
|
-
default:
|
|
1248
|
-
|
|
1275
|
+
default: q(() => [
|
|
1276
|
+
se(k(_i), {
|
|
1249
1277
|
class: "kebab-action-menu",
|
|
1250
1278
|
color: k(yt),
|
|
1251
1279
|
"data-testid": `kebab-action-menu-${y.tileId}`,
|
|
@@ -1254,12 +1282,12 @@ const Fi = () => {
|
|
|
1254
1282
|
]),
|
|
1255
1283
|
_: 1
|
|
1256
1284
|
}, 8, ["data-testid"])) : Y("", !0)
|
|
1257
|
-
], 8,
|
|
1285
|
+
], 8, rs)) : "description" in y.definition.chart ? (C(), W("div", {
|
|
1258
1286
|
key: 1,
|
|
1259
1287
|
class: "header-description",
|
|
1260
1288
|
"data-testid": `tile-description-${y.tileId}`
|
|
1261
|
-
},
|
|
1262
|
-
l.value ? (C(),
|
|
1289
|
+
}, te(y.definition.chart.description), 9, ls)) : Y("", !0),
|
|
1290
|
+
l.value ? (C(), M(k(ci), {
|
|
1263
1291
|
key: 2,
|
|
1264
1292
|
"chart-data": h.value,
|
|
1265
1293
|
"data-testid": `csv-export-modal-${y.tileId}`,
|
|
@@ -1271,12 +1299,12 @@ const Fi = () => {
|
|
|
1271
1299
|
class: "tile-content",
|
|
1272
1300
|
"data-testid": `tile-content-${y.tileId}`
|
|
1273
1301
|
}, [
|
|
1274
|
-
D.value ? (C(),
|
|
1275
|
-
], 8,
|
|
1276
|
-
], 10,
|
|
1302
|
+
D.value ? (C(), M(Rt(D.value.component), xt({ key: 0 }, D.value.rendererProps, ii(O.value), { onChartData: Vt }), null, 16)) : Y("", !0)
|
|
1303
|
+
], 8, hs)
|
|
1304
|
+
], 10, is);
|
|
1277
1305
|
};
|
|
1278
1306
|
}
|
|
1279
|
-
}),
|
|
1307
|
+
}), us = /* @__PURE__ */ ce(ds, [["__scopeId", "data-v-9ff83fdc"]]), cs = (c, e) => {
|
|
1280
1308
|
let t = 0;
|
|
1281
1309
|
const i = /* @__PURE__ */ new Map();
|
|
1282
1310
|
e.forEach((r) => {
|
|
@@ -1287,7 +1315,7 @@ const Fi = () => {
|
|
|
1287
1315
|
for (let r = 0; r < t; r++)
|
|
1288
1316
|
i.get(r) ? s.push("auto") : s.push(`${c}px`);
|
|
1289
1317
|
return s;
|
|
1290
|
-
},
|
|
1318
|
+
}, fs = /* @__PURE__ */ j({
|
|
1291
1319
|
__name: "GridLayout",
|
|
1292
1320
|
props: {
|
|
1293
1321
|
tileHeight: {
|
|
@@ -1315,7 +1343,7 @@ const Fi = () => {
|
|
|
1315
1343
|
}), Ve(() => {
|
|
1316
1344
|
t.value && s.unobserve(t.value);
|
|
1317
1345
|
});
|
|
1318
|
-
const r = N(() =>
|
|
1346
|
+
const r = N(() => cs(e.tileHeight, e.tiles).join(" ")), o = N(() => e.tiles.map((n, h) => ({
|
|
1319
1347
|
key: `tile-${h}`,
|
|
1320
1348
|
tile: n,
|
|
1321
1349
|
style: {
|
|
@@ -1330,22 +1358,22 @@ const Fi = () => {
|
|
|
1330
1358
|
ref: t,
|
|
1331
1359
|
class: "kong-ui-public-grid-layout"
|
|
1332
1360
|
}, [
|
|
1333
|
-
(C(!0), W(
|
|
1361
|
+
(C(!0), W(Tt, null, zt(o.value, (l) => (C(), W("div", {
|
|
1334
1362
|
key: l.key,
|
|
1335
1363
|
class: je(["grid-cell", {
|
|
1336
1364
|
"empty-cell": !l.tile
|
|
1337
1365
|
}]),
|
|
1338
1366
|
style: lt(l.style)
|
|
1339
1367
|
}, [
|
|
1340
|
-
|
|
1368
|
+
Pe(n.$slots, "tile", {
|
|
1341
1369
|
style: lt(l.style),
|
|
1342
1370
|
tile: l.tile
|
|
1343
1371
|
}, void 0, !0)
|
|
1344
1372
|
], 6))), 128))
|
|
1345
1373
|
], 512));
|
|
1346
1374
|
}
|
|
1347
|
-
}),
|
|
1348
|
-
function
|
|
1375
|
+
}), gs = /* @__PURE__ */ ce(fs, [["__scopeId", "data-v-354b7177"]]);
|
|
1376
|
+
function ms(c, e, t, i, s) {
|
|
1349
1377
|
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(c, o));
|
|
1350
1378
|
return r.prototype = e.prototype, r;
|
|
1351
1379
|
}
|
|
@@ -1685,7 +1713,7 @@ class u {
|
|
|
1685
1713
|
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);
|
|
1686
1714
|
}
|
|
1687
1715
|
}
|
|
1688
|
-
class
|
|
1716
|
+
class re {
|
|
1689
1717
|
constructor(e = {}) {
|
|
1690
1718
|
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;
|
|
1691
1719
|
}
|
|
@@ -1863,7 +1891,7 @@ class se {
|
|
|
1863
1891
|
* @param resizing if out of bound, resize down or move into the grid to fit ?
|
|
1864
1892
|
*/
|
|
1865
1893
|
prepareNode(e, t) {
|
|
1866
|
-
e._id = e._id ??
|
|
1894
|
+
e._id = e._id ?? re._idSeq++;
|
|
1867
1895
|
const i = e.id;
|
|
1868
1896
|
if (i) {
|
|
1869
1897
|
let r = 1;
|
|
@@ -1958,7 +1986,7 @@ class se {
|
|
|
1958
1986
|
if (t.pack = !0, !this.maxRow)
|
|
1959
1987
|
return this.moveNode(e, t);
|
|
1960
1988
|
let i;
|
|
1961
|
-
const s = new
|
|
1989
|
+
const s = new re({
|
|
1962
1990
|
column: this.column,
|
|
1963
1991
|
float: this.float,
|
|
1964
1992
|
nodes: this.nodes.map((o) => o._id === e._id ? (i = { ...o }, i) : { ...o })
|
|
@@ -1980,7 +2008,7 @@ class se {
|
|
|
1980
2008
|
willItFit(e) {
|
|
1981
2009
|
if (delete e._willFitPos, !this.maxRow)
|
|
1982
2010
|
return !0;
|
|
1983
|
-
const t = new
|
|
2011
|
+
const t = new re({
|
|
1984
2012
|
column: this.column,
|
|
1985
2013
|
float: this.float,
|
|
1986
2014
|
nodes: this.nodes.map((s) => ({ ...s }))
|
|
@@ -2116,7 +2144,7 @@ class se {
|
|
|
2116
2144
|
return e.forEach((r, o) => {
|
|
2117
2145
|
if (r._id === void 0) {
|
|
2118
2146
|
const n = r.id ? this.nodes.find((h) => h.id === r.id) : void 0;
|
|
2119
|
-
r._id = (n == null ? void 0 : n._id) ??
|
|
2147
|
+
r._id = (n == null ? void 0 : n._id) ?? re._idSeq++;
|
|
2120
2148
|
}
|
|
2121
2149
|
s[o] = { x: r.x, y: r.y, w: r.w, _id: r._id };
|
|
2122
2150
|
}), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
|
|
@@ -2127,7 +2155,7 @@ class se {
|
|
|
2127
2155
|
* @param column corresponding column index to save it under
|
|
2128
2156
|
*/
|
|
2129
2157
|
cacheOneLayout(e, t) {
|
|
2130
|
-
e._id = e._id ??
|
|
2158
|
+
e._id = e._id ?? re._idSeq++;
|
|
2131
2159
|
const i = { x: e.x, y: e.y, w: e.w, _id: e._id };
|
|
2132
2160
|
(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] || [];
|
|
2133
2161
|
const s = this.findCacheLayout(e, t);
|
|
@@ -2151,7 +2179,7 @@ class se {
|
|
|
2151
2179
|
return this;
|
|
2152
2180
|
}
|
|
2153
2181
|
}
|
|
2154
|
-
|
|
2182
|
+
re._idSeq = 0;
|
|
2155
2183
|
const K = {
|
|
2156
2184
|
alwaysShowResizeHandle: "mobile",
|
|
2157
2185
|
animate: !0,
|
|
@@ -2184,27 +2212,27 @@ const K = {
|
|
|
2184
2212
|
};
|
|
2185
2213
|
class w {
|
|
2186
2214
|
}
|
|
2187
|
-
const
|
|
2188
|
-
class
|
|
2215
|
+
const ie = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
|
|
2216
|
+
class ne {
|
|
2189
2217
|
}
|
|
2190
|
-
function
|
|
2218
|
+
function Ae(c, e) {
|
|
2191
2219
|
c.touches.length > 1 || (c.cancelable && c.preventDefault(), u.simulateMouseEvent(c.changedTouches[0], e));
|
|
2192
2220
|
}
|
|
2193
2221
|
function Bt(c, e) {
|
|
2194
2222
|
c.cancelable && c.preventDefault(), u.simulateMouseEvent(c, e);
|
|
2195
2223
|
}
|
|
2196
|
-
function Ae(c) {
|
|
2197
|
-
re.touchHandled || (re.touchHandled = !0, Oe(c, "mousedown"));
|
|
2198
|
-
}
|
|
2199
2224
|
function He(c) {
|
|
2200
|
-
|
|
2225
|
+
ne.touchHandled || (ne.touchHandled = !0, Ae(c, "mousedown"));
|
|
2201
2226
|
}
|
|
2202
2227
|
function Le(c) {
|
|
2203
|
-
|
|
2228
|
+
ne.touchHandled && Ae(c, "mousemove");
|
|
2229
|
+
}
|
|
2230
|
+
function Ie(c) {
|
|
2231
|
+
if (!ne.touchHandled)
|
|
2204
2232
|
return;
|
|
2205
|
-
|
|
2233
|
+
ne.pointerLeaveTimeout && (window.clearTimeout(ne.pointerLeaveTimeout), delete ne.pointerLeaveTimeout);
|
|
2206
2234
|
const e = !!w.dragElement;
|
|
2207
|
-
|
|
2235
|
+
Ae(c, "mouseup"), e || Ae(c, "click"), ne.touchHandled = !1;
|
|
2208
2236
|
}
|
|
2209
2237
|
function Me(c) {
|
|
2210
2238
|
c.pointerType !== "mouse" && c.target.releasePointerCapture(c.pointerId);
|
|
@@ -2213,8 +2241,8 @@ function bt(c) {
|
|
|
2213
2241
|
w.dragElement && c.pointerType !== "mouse" && Bt(c, "mouseenter");
|
|
2214
2242
|
}
|
|
2215
2243
|
function wt(c) {
|
|
2216
|
-
w.dragElement && c.pointerType !== "mouse" && (
|
|
2217
|
-
delete
|
|
2244
|
+
w.dragElement && c.pointerType !== "mouse" && (ne.pointerLeaveTimeout = window.setTimeout(() => {
|
|
2245
|
+
delete ne.pointerLeaveTimeout, Bt(c, "mouseleave");
|
|
2218
2246
|
}, 10));
|
|
2219
2247
|
}
|
|
2220
2248
|
class Be {
|
|
@@ -2224,15 +2252,15 @@ class Be {
|
|
|
2224
2252
|
/** @internal */
|
|
2225
2253
|
_init() {
|
|
2226
2254
|
const e = this.el = document.createElement("div");
|
|
2227
|
-
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Be.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown),
|
|
2255
|
+
return e.classList.add("ui-resizable-handle"), e.classList.add(`${Be.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), ie && (this.el.addEventListener("touchstart", He), this.el.addEventListener("pointerdown", Me)), this;
|
|
2228
2256
|
}
|
|
2229
2257
|
/** call this when resize handle needs to be removed and cleaned up */
|
|
2230
2258
|
destroy() {
|
|
2231
|
-
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown),
|
|
2259
|
+
return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), ie && (this.el.removeEventListener("touchstart", He), this.el.removeEventListener("pointerdown", Me)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
|
|
2232
2260
|
}
|
|
2233
2261
|
/** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
|
|
2234
2262
|
_mouseDown(e) {
|
|
2235
|
-
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0),
|
|
2263
|
+
this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, { capture: !0, passive: !0 }), document.addEventListener("mouseup", this._mouseUp, !0), ie && (this.el.addEventListener("touchmove", Le), this.el.addEventListener("touchend", Ie)), e.stopPropagation(), e.preventDefault();
|
|
2236
2264
|
}
|
|
2237
2265
|
/** @internal */
|
|
2238
2266
|
_mouseMove(e) {
|
|
@@ -2241,7 +2269,7 @@ class Be {
|
|
|
2241
2269
|
}
|
|
2242
2270
|
/** @internal */
|
|
2243
2271
|
_mouseUp(e) {
|
|
2244
|
-
this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0),
|
|
2272
|
+
this.moving && (this._triggerEvent("stop", e), document.removeEventListener("keydown", this._keyEvent)), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), ie && (this.el.removeEventListener("touchmove", Le), this.el.removeEventListener("touchend", Ie)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
|
|
2245
2273
|
}
|
|
2246
2274
|
/** @internal call when keys are being pressed - use Esc to cancel */
|
|
2247
2275
|
_keyEvent(e) {
|
|
@@ -2282,7 +2310,7 @@ class et {
|
|
|
2282
2310
|
return this._eventRegister[e](t);
|
|
2283
2311
|
}
|
|
2284
2312
|
}
|
|
2285
|
-
class
|
|
2313
|
+
class xe extends et {
|
|
2286
2314
|
// have to be public else complains for HTMLElementExtendOpt ?
|
|
2287
2315
|
constructor(e, t = {}) {
|
|
2288
2316
|
super(), this.el = e, this.option = t, this.rectScale = { x: 1, y: 1 }, this._ui = () => {
|
|
@@ -2383,7 +2411,7 @@ class Ee extends et {
|
|
|
2383
2411
|
}
|
|
2384
2412
|
/** @internal */
|
|
2385
2413
|
_setupHelper() {
|
|
2386
|
-
this.elOriginStyleVal =
|
|
2414
|
+
this.elOriginStyleVal = xe._originStyleProp.map((i) => this.el.style[i]), this.parentOriginStylePosition = this.el.parentElement.style.position;
|
|
2387
2415
|
const e = this.el.parentElement, t = u.getValuesFromTransformedElement(e);
|
|
2388
2416
|
return this.rectScale = {
|
|
2389
2417
|
x: t.xScale,
|
|
@@ -2392,7 +2420,7 @@ class Ee extends et {
|
|
|
2392
2420
|
}
|
|
2393
2421
|
/** @internal */
|
|
2394
2422
|
_cleanHelper() {
|
|
2395
|
-
return
|
|
2423
|
+
return xe._originStyleProp.forEach((e, t) => {
|
|
2396
2424
|
this.el.style[e] = this.elOriginStyleVal[t] || null;
|
|
2397
2425
|
}), this.el.parentElement.style.position = this.parentOriginStylePosition || null, this;
|
|
2398
2426
|
}
|
|
@@ -2431,9 +2459,9 @@ class Ee extends et {
|
|
|
2431
2459
|
return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
|
|
2432
2460
|
}
|
|
2433
2461
|
}
|
|
2434
|
-
|
|
2435
|
-
const
|
|
2436
|
-
class
|
|
2462
|
+
xe._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
|
|
2463
|
+
const ps = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
|
|
2464
|
+
class Ce extends et {
|
|
2437
2465
|
constructor(e, t = {}) {
|
|
2438
2466
|
var r;
|
|
2439
2467
|
super(), this.el = e, this.option = t, this.dragTransform = {
|
|
@@ -2453,12 +2481,12 @@ class xe extends et {
|
|
|
2453
2481
|
}
|
|
2454
2482
|
enable() {
|
|
2455
2483
|
this.disabled !== !1 && (super.enable(), this.dragEls.forEach((e) => {
|
|
2456
|
-
e.addEventListener("mousedown", this._mouseDown),
|
|
2484
|
+
e.addEventListener("mousedown", this._mouseDown), ie && (e.addEventListener("touchstart", He), e.addEventListener("pointerdown", Me));
|
|
2457
2485
|
}), this.el.classList.remove("ui-draggable-disabled"));
|
|
2458
2486
|
}
|
|
2459
2487
|
disable(e = !1) {
|
|
2460
2488
|
this.disabled !== !0 && (super.disable(), this.dragEls.forEach((t) => {
|
|
2461
|
-
t.removeEventListener("mousedown", this._mouseDown),
|
|
2489
|
+
t.removeEventListener("mousedown", this._mouseDown), ie && (t.removeEventListener("touchstart", He), t.removeEventListener("pointerdown", Me));
|
|
2462
2490
|
}), e || this.el.classList.add("ui-draggable-disabled"));
|
|
2463
2491
|
}
|
|
2464
2492
|
destroy() {
|
|
@@ -2470,7 +2498,7 @@ class xe extends et {
|
|
|
2470
2498
|
/** @internal call when mouse goes down before a dragstart happens */
|
|
2471
2499
|
_mouseDown(e) {
|
|
2472
2500
|
if (!w.mouseHandled)
|
|
2473
|
-
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(
|
|
2501
|
+
return e.button !== 0 || !this.dragEls.find((t) => t === e.target) && e.target.closest(ps) || 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), ie && (e.currentTarget.addEventListener("touchmove", Le), e.currentTarget.addEventListener("touchend", Ie)), e.preventDefault(), document.activeElement && document.activeElement.blur(), w.mouseHandled = !0), !0;
|
|
2474
2502
|
}
|
|
2475
2503
|
/** @internal method to call actual drag event */
|
|
2476
2504
|
_callDrag(e) {
|
|
@@ -2501,7 +2529,7 @@ class xe extends et {
|
|
|
2501
2529
|
/** @internal call when the mouse gets released to drop the item at current location */
|
|
2502
2530
|
_mouseUp(e) {
|
|
2503
2531
|
var t, i;
|
|
2504
|
-
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0),
|
|
2532
|
+
if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), ie && e.currentTarget && (e.currentTarget.removeEventListener("touchmove", Le, !0), e.currentTarget.removeEventListener("touchend", Ie, !0)), this.dragging) {
|
|
2505
2533
|
delete this.dragging, (t = this.el.gridstackNode) == null || delete t._origRotate, document.removeEventListener("keydown", this._keyEvent), ((i = w.dropElement) == null ? void 0 : i.el) === this.el.parentElement && delete w.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper !== this.el && this.helper.remove(), this._removeHelperStyle();
|
|
2506
2534
|
const s = u.initEvent(e, { target: this.el, type: "dragstop" });
|
|
2507
2535
|
this.option.stop && this.option.stop(s), this.triggerEvent("dragstop", s), w.dropElement && w.dropElement.drop(e);
|
|
@@ -2523,7 +2551,7 @@ class xe extends et {
|
|
|
2523
2551
|
/** @internal create a clone copy (or user defined method) of the original drag item if set */
|
|
2524
2552
|
_createHelper() {
|
|
2525
2553
|
let e = this.el;
|
|
2526
|
-
return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = u.cloneNode(this.el)), e.parentElement || u.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle =
|
|
2554
|
+
return typeof this.option.helper == "function" ? e = this.option.helper(this.el) : this.option.helper === "clone" && (e = u.cloneNode(this.el)), e.parentElement || u.appendTo(e, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), this.dragElementOriginStyle = Ce.originStyleProp.map((t) => this.el.style[t]), e;
|
|
2527
2555
|
}
|
|
2528
2556
|
/** @internal set the fix position of the dragged item */
|
|
2529
2557
|
_setupHelperStyle(e) {
|
|
@@ -2540,7 +2568,7 @@ class xe extends et {
|
|
|
2540
2568
|
const e = (t = this.helper) == null ? void 0 : t.gridstackNode;
|
|
2541
2569
|
if (!(e != null && e._isAboutToRemove) && this.dragElementOriginStyle) {
|
|
2542
2570
|
const i = this.helper, s = this.dragElementOriginStyle.transition || null;
|
|
2543
|
-
i.style.transition = this.dragElementOriginStyle.transition = "none",
|
|
2571
|
+
i.style.transition = this.dragElementOriginStyle.transition = "none", Ce.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
|
|
2544
2572
|
}
|
|
2545
2573
|
return delete this.dragElementOriginStyle, this;
|
|
2546
2574
|
}
|
|
@@ -2582,8 +2610,8 @@ class xe extends et {
|
|
|
2582
2610
|
};
|
|
2583
2611
|
}
|
|
2584
2612
|
}
|
|
2585
|
-
|
|
2586
|
-
class
|
|
2613
|
+
Ce.originStyleProp = ["width", "height", "transform", "transform-origin", "transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
|
|
2614
|
+
class ys extends et {
|
|
2587
2615
|
constructor(e, t = {}) {
|
|
2588
2616
|
super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
|
|
2589
2617
|
}
|
|
@@ -2594,10 +2622,10 @@ class ps extends et {
|
|
|
2594
2622
|
super.off(e);
|
|
2595
2623
|
}
|
|
2596
2624
|
enable() {
|
|
2597
|
-
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),
|
|
2625
|
+
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), ie && (this.el.addEventListener("pointerenter", bt), this.el.addEventListener("pointerleave", wt)));
|
|
2598
2626
|
}
|
|
2599
2627
|
disable(e = !1) {
|
|
2600
|
-
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),
|
|
2628
|
+
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), ie && (this.el.removeEventListener("pointerenter", bt), this.el.removeEventListener("pointerleave", wt)));
|
|
2601
2629
|
}
|
|
2602
2630
|
destroy() {
|
|
2603
2631
|
this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
|
|
@@ -2663,25 +2691,25 @@ class tt {
|
|
|
2663
2691
|
return this.ddDraggable && ["drag", "dragstart", "dragstop"].indexOf(e) > -1 ? this.ddDraggable.off(e) : this.ddDroppable && ["drop", "dropover", "dropout"].indexOf(e) > -1 ? this.ddDroppable.off(e) : this.ddResizable && ["resizestart", "resize", "resizestop"].indexOf(e) > -1 && this.ddResizable.off(e), this;
|
|
2664
2692
|
}
|
|
2665
2693
|
setupDraggable(e) {
|
|
2666
|
-
return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new
|
|
2694
|
+
return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new Ce(this.el, e), this;
|
|
2667
2695
|
}
|
|
2668
2696
|
cleanDraggable() {
|
|
2669
2697
|
return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
|
|
2670
2698
|
}
|
|
2671
2699
|
setupResizable(e) {
|
|
2672
|
-
return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new
|
|
2700
|
+
return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new xe(this.el, e), this;
|
|
2673
2701
|
}
|
|
2674
2702
|
cleanResizable() {
|
|
2675
2703
|
return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
|
|
2676
2704
|
}
|
|
2677
2705
|
setupDroppable(e) {
|
|
2678
|
-
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new
|
|
2706
|
+
return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new ys(this.el, e), this;
|
|
2679
2707
|
}
|
|
2680
2708
|
cleanDroppable() {
|
|
2681
2709
|
return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
|
|
2682
2710
|
}
|
|
2683
2711
|
}
|
|
2684
|
-
class
|
|
2712
|
+
class vs {
|
|
2685
2713
|
resizable(e, t, i, s) {
|
|
2686
2714
|
return this._getDDElements(e, t).forEach((r) => {
|
|
2687
2715
|
if (t === "disable" || t === "enable")
|
|
@@ -2770,7 +2798,7 @@ class ys {
|
|
|
2770
2798
|
* Copyright (c) 2021-2024 Alain Dumesny
|
|
2771
2799
|
* see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
|
|
2772
2800
|
*/
|
|
2773
|
-
const U = new
|
|
2801
|
+
const U = new vs();
|
|
2774
2802
|
class b {
|
|
2775
2803
|
/**
|
|
2776
2804
|
* initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
|
|
@@ -2878,8 +2906,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
2878
2906
|
};
|
|
2879
2907
|
e.getAttribute("gs-animate") && (n.animate = u.toBool(e.getAttribute("gs-animate"))), t = u.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");
|
|
2880
2908
|
const h = this.el.closest("." + K.itemClass), l = h == null ? void 0 : h.gridstackNode;
|
|
2881
|
-
l && (l.subGrid = this, this.parentGridNode = l, this.el.classList.add("grid-stack-nested"), l.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 !== K.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle =
|
|
2882
|
-
const d = t.engineClass || b.engineClass ||
|
|
2909
|
+
l && (l.subGrid = this, this.parentGridNode = l, this.el.classList.add("grid-stack-nested"), l.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 !== K.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit), this.cellHeight(t.cellHeight, !1)), t.alwaysShowResizeHandle === "mobile" && (t.alwaysShowResizeHandle = ie), this._styleSheetClass = "gs-id-" + re._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
|
|
2910
|
+
const d = t.engineClass || b.engineClass || re;
|
|
2883
2911
|
if (this.engine = new d({
|
|
2884
2912
|
column: this.getColumn(),
|
|
2885
2913
|
float: t.float,
|
|
@@ -3952,14 +3980,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3952
3980
|
s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && u.updateScrollPosition(e, i.position, p);
|
|
3953
3981
|
const R = i.position.left + (i.position.left > s._lastUiPosition.left ? -d : l), A = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : a);
|
|
3954
3982
|
n.x = Math.round(R / r), n.y = Math.round(A / o);
|
|
3955
|
-
const
|
|
3983
|
+
const T = this._extraDragRow;
|
|
3956
3984
|
if (this.engine.collide(s, n)) {
|
|
3957
3985
|
const H = this.getRow();
|
|
3958
3986
|
let E = Math.max(0, n.y + s.h - H);
|
|
3959
3987
|
this.opts.maxRow && H + E > this.opts.maxRow && (E = Math.max(0, this.opts.maxRow - H)), this._extraDragRow = E;
|
|
3960
3988
|
} else
|
|
3961
3989
|
this._extraDragRow = 0;
|
|
3962
|
-
if (this._extraDragRow !==
|
|
3990
|
+
if (this._extraDragRow !== T && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
|
|
3963
3991
|
return;
|
|
3964
3992
|
} else if (t.type === "resize") {
|
|
3965
3993
|
if (n.x < 0 || (u.updateScrollResize(t, e, o), n.w = Math.round((i.size.width - l) / 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)
|
|
@@ -3995,7 +4023,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
|
|
|
3995
4023
|
}
|
|
3996
4024
|
// legacy method removed
|
|
3997
4025
|
commit() {
|
|
3998
|
-
return
|
|
4026
|
+
return ms(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
|
|
3999
4027
|
}
|
|
4000
4028
|
}
|
|
4001
4029
|
b.renderCB = (c, e) => {
|
|
@@ -4003,9 +4031,9 @@ b.renderCB = (c, e) => {
|
|
|
4003
4031
|
};
|
|
4004
4032
|
b.resizeToContentParent = ".grid-stack-item-content";
|
|
4005
4033
|
b.Utils = u;
|
|
4006
|
-
b.Engine =
|
|
4034
|
+
b.Engine = re;
|
|
4007
4035
|
b.GDRev = "11.5.1";
|
|
4008
|
-
const
|
|
4036
|
+
const _s = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], bs = { class: "grid-stack-item-content" }, ws = /* @__PURE__ */ j({
|
|
4009
4037
|
__name: "DraggableGridLayout",
|
|
4010
4038
|
props: {
|
|
4011
4039
|
tiles: {},
|
|
@@ -4072,7 +4100,7 @@ const vs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], _s = { cl
|
|
|
4072
4100
|
ref: r,
|
|
4073
4101
|
class: "grid-stack"
|
|
4074
4102
|
}, [
|
|
4075
|
-
(C(!0), W(
|
|
4103
|
+
(C(!0), W(Tt, null, zt(i.tiles, (v) => (C(), W("div", {
|
|
4076
4104
|
key: v.id,
|
|
4077
4105
|
class: "grid-stack-item",
|
|
4078
4106
|
"data-id": `${v.id}`,
|
|
@@ -4083,16 +4111,16 @@ const vs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], _s = { cl
|
|
|
4083
4111
|
"gs-x": v.layout.position.col,
|
|
4084
4112
|
"gs-y": v.layout.position.row
|
|
4085
4113
|
}, [
|
|
4086
|
-
ae("div",
|
|
4087
|
-
|
|
4114
|
+
ae("div", bs, [
|
|
4115
|
+
Pe(m.$slots, "tile", { tile: v }, void 0, !0)
|
|
4088
4116
|
])
|
|
4089
|
-
], 8,
|
|
4117
|
+
], 8, _s))), 128))
|
|
4090
4118
|
], 512));
|
|
4091
4119
|
}
|
|
4092
|
-
}),
|
|
4120
|
+
}), Es = /* @__PURE__ */ ce(ws, [["__scopeId", "data-v-a68d6821"]]), xs = { class: "kong-ui-public-dashboard-renderer" }, Cs = {
|
|
4093
4121
|
key: 0,
|
|
4094
4122
|
class: "tile-container slottable-tile"
|
|
4095
|
-
},
|
|
4123
|
+
}, Rs = /* @__PURE__ */ j({
|
|
4096
4124
|
__name: "DashboardRenderer",
|
|
4097
4125
|
props: /* @__PURE__ */ ht({
|
|
4098
4126
|
context: {}
|
|
@@ -4114,7 +4142,7 @@ const vs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], _s = { cl
|
|
|
4114
4142
|
var D;
|
|
4115
4143
|
let O = x.definition;
|
|
4116
4144
|
if ("description" in O.chart) {
|
|
4117
|
-
const
|
|
4145
|
+
const P = (D = O.chart.description) == null ? void 0 : D.replace(Hi, () => {
|
|
4118
4146
|
const de = `renderer.trendRange.${a.value.type === "absolute" ? "custom" : a.value.time_range}`;
|
|
4119
4147
|
return o.te(de) ? o.t(de) : "";
|
|
4120
4148
|
});
|
|
@@ -4122,7 +4150,7 @@ const vs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], _s = { cl
|
|
|
4122
4150
|
...O,
|
|
4123
4151
|
chart: {
|
|
4124
4152
|
...O.chart,
|
|
4125
|
-
description:
|
|
4153
|
+
description: P
|
|
4126
4154
|
}
|
|
4127
4155
|
};
|
|
4128
4156
|
}
|
|
@@ -4138,13 +4166,13 @@ const vs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], _s = { cl
|
|
|
4138
4166
|
id: x.id ?? crypto.randomUUID()
|
|
4139
4167
|
};
|
|
4140
4168
|
})), v = N(() => {
|
|
4141
|
-
var de, be,
|
|
4169
|
+
var de, be, ke;
|
|
4142
4170
|
let { tz: x, refreshInterval: O, editable: D } = i.context;
|
|
4143
|
-
const
|
|
4144
|
-
x || (x = new Intl.DateTimeFormat().resolvedOptions().timeZone), O === void 0 && (O =
|
|
4145
|
-
const ee = !!((
|
|
4171
|
+
const P = [...i.context.filters ?? [], ...r.value.preset_filters ?? []];
|
|
4172
|
+
x || (x = new Intl.DateTimeFormat().resolvedOptions().timeZone), O === void 0 && (O = Li), D === void 0 && (D = !1);
|
|
4173
|
+
const ee = !!((ke = (be = (de = ri()) == null ? void 0 : de.vnode) == null ? void 0 : be.props) != null && ke.onTileTimeRangeZoom);
|
|
4146
4174
|
return {
|
|
4147
|
-
filters:
|
|
4175
|
+
filters: P,
|
|
4148
4176
|
tz: x,
|
|
4149
4177
|
timeSpec: a.value,
|
|
4150
4178
|
refreshInterval: O,
|
|
@@ -4173,7 +4201,7 @@ const vs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], _s = { cl
|
|
|
4173
4201
|
}
|
|
4174
4202
|
};
|
|
4175
4203
|
r.value.tiles.push(D);
|
|
4176
|
-
},
|
|
4204
|
+
}, T = (x) => {
|
|
4177
4205
|
h.value && h.value.removeWidget(x.id);
|
|
4178
4206
|
}, H = () => {
|
|
4179
4207
|
n.value++;
|
|
@@ -4188,8 +4216,8 @@ const vs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], _s = { cl
|
|
|
4188
4216
|
};
|
|
4189
4217
|
return e({ refresh: H }), (x, O) => {
|
|
4190
4218
|
const D = he("KAlert");
|
|
4191
|
-
return C(), W("div",
|
|
4192
|
-
k(l) ? (C(),
|
|
4219
|
+
return C(), W("div", xs, [
|
|
4220
|
+
k(l) ? (C(), M(Rt(x.context.editable ? Es : gs), {
|
|
4193
4221
|
key: 1,
|
|
4194
4222
|
ref_key: "gridLayoutRef",
|
|
4195
4223
|
ref: h,
|
|
@@ -4197,46 +4225,46 @@ const vs = ["data-id", "data-testid", "gs-h", "gs-w", "gs-x", "gs-y"], _s = { cl
|
|
|
4197
4225
|
tiles: g.value,
|
|
4198
4226
|
onUpdateTiles: E
|
|
4199
4227
|
}, {
|
|
4200
|
-
tile:
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
])) : (C(),
|
|
4228
|
+
tile: q(({ tile: P }) => [
|
|
4229
|
+
P.meta.chart.type === "slottable" ? (C(), W("div", Cs, [
|
|
4230
|
+
Pe(x.$slots, P.meta.chart.id, {}, void 0, !0)
|
|
4231
|
+
])) : (C(), M(us, {
|
|
4204
4232
|
key: 1,
|
|
4205
4233
|
class: "tile-container",
|
|
4206
4234
|
context: v.value,
|
|
4207
|
-
definition:
|
|
4208
|
-
height:
|
|
4235
|
+
definition: P.meta,
|
|
4236
|
+
height: P.layout.size.rows * (r.value.tile_height || k($e)) + parseInt(k($t), 10),
|
|
4209
4237
|
"query-ready": f.value,
|
|
4210
4238
|
"refresh-counter": n.value,
|
|
4211
|
-
"tile-id":
|
|
4212
|
-
onDuplicateTile: (ee) => A(
|
|
4213
|
-
onEditTile: (ee) => p(
|
|
4214
|
-
onRemoveTile: (ee) =>
|
|
4239
|
+
"tile-id": P.id,
|
|
4240
|
+
onDuplicateTile: (ee) => A(P),
|
|
4241
|
+
onEditTile: (ee) => p(P),
|
|
4242
|
+
onRemoveTile: (ee) => T(P),
|
|
4215
4243
|
onTileTimeRangeZoom: O[0] || (O[0] = (ee) => s("tile-time-range-zoom", ee))
|
|
4216
4244
|
}, null, 8, ["context", "definition", "height", "query-ready", "refresh-counter", "tile-id", "onDuplicateTile", "onEditTile", "onRemoveTile"]))
|
|
4217
4245
|
]),
|
|
4218
4246
|
_: 3
|
|
4219
|
-
}, 40, ["tile-height", "tiles"])) : (C(),
|
|
4247
|
+
}, 40, ["tile-height", "tiles"])) : (C(), M(D, {
|
|
4220
4248
|
key: 0,
|
|
4221
4249
|
appearance: "danger"
|
|
4222
4250
|
}, {
|
|
4223
|
-
default:
|
|
4224
|
-
|
|
4251
|
+
default: q(() => [
|
|
4252
|
+
Ee(te(k(o).t("renderer.noQueryBridge")), 1)
|
|
4225
4253
|
]),
|
|
4226
4254
|
_: 1
|
|
4227
4255
|
}))
|
|
4228
4256
|
]);
|
|
4229
4257
|
};
|
|
4230
4258
|
}
|
|
4231
|
-
}),
|
|
4259
|
+
}), Is = /* @__PURE__ */ ce(Rs, [["__scopeId", "data-v-c16badc2"]]);
|
|
4232
4260
|
export {
|
|
4233
|
-
|
|
4261
|
+
Ai as CP_ID_TOKEN,
|
|
4234
4262
|
Nt as DASHBOARD_COLS,
|
|
4235
4263
|
$e as DEFAULT_TILE_HEIGHT,
|
|
4236
|
-
|
|
4237
|
-
|
|
4264
|
+
Li as DEFAULT_TILE_REFRESH_INTERVAL_MS,
|
|
4265
|
+
Is as DashboardRenderer,
|
|
4238
4266
|
ut as ENTITY_ID_TOKEN,
|
|
4239
|
-
|
|
4267
|
+
gs as GridLayout,
|
|
4240
4268
|
ue as INJECT_QUERY_PROVIDER,
|
|
4241
|
-
|
|
4269
|
+
Hi as TIMEFRAME_TOKEN
|
|
4242
4270
|
};
|