@grafana/scenes 6.1.3--canary.1063.13548554287.0 → 6.2.0--canary.1062.13545292325.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -43
- package/dist/esm/behaviors/SceneQueryController.js +2 -2
- package/dist/esm/behaviors/SceneQueryController.js.map +1 -1
- package/dist/esm/components/SceneRefreshPicker.js +2 -2
- package/dist/esm/components/SceneRefreshPicker.js.map +1 -1
- package/dist/esm/components/layout/grid/SceneGridLayout.js +0 -8
- package/dist/esm/components/layout/grid/SceneGridLayout.js.map +1 -1
- package/dist/esm/core/SceneTimeRange.js +1 -1
- package/dist/esm/core/SceneTimeRange.js.map +1 -1
- package/dist/esm/core/sceneGraph/utils.js +4 -10
- package/dist/esm/core/sceneGraph/utils.js.map +1 -1
- package/dist/esm/core/types.js.map +1 -1
- package/dist/esm/index.js +1 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/querying/SceneQueryRunner.js +8 -3
- package/dist/esm/querying/SceneQueryRunner.js.map +1 -1
- package/dist/esm/services/SceneObjectUrlSyncConfig.js +3 -3
- package/dist/esm/services/SceneObjectUrlSyncConfig.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFilterPill.js +21 -6
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFilterPill.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersComboboxRenderer.js +9 -2
- package/dist/esm/variables/adhoc/AdHocFiltersCombobox/AdHocFiltersComboboxRenderer.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersVariable.js +41 -6
- package/dist/esm/variables/adhoc/AdHocFiltersVariable.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersVariableUrlSyncHandler.js +57 -12
- package/dist/esm/variables/adhoc/AdHocFiltersVariableUrlSyncHandler.js.map +1 -1
- package/dist/esm/variables/components/VariableValueSelect.js +5 -5
- package/dist/esm/variables/components/VariableValueSelect.js.map +1 -1
- package/dist/esm/variables/groupby/GroupByVariable.js +2 -3
- package/dist/esm/variables/groupby/GroupByVariable.js.map +1 -1
- package/dist/esm/variables/variants/MultiValueVariable.js +2 -17
- package/dist/esm/variables/variants/MultiValueVariable.js.map +1 -1
- package/dist/index.d.ts +14 -31
- package/dist/index.js +349 -275
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/esm/components/layout/grid/types.js +0 -8
- package/dist/esm/components/layout/grid/types.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -41,19 +41,19 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
41
41
|
var uFuzzy__default = /*#__PURE__*/_interopDefaultLegacy(uFuzzy);
|
|
42
42
|
var ReactGridLayout__default = /*#__PURE__*/_interopDefaultLegacy(ReactGridLayout);
|
|
43
43
|
|
|
44
|
-
var __defProp$
|
|
45
|
-
var __getOwnPropSymbols$
|
|
46
|
-
var __hasOwnProp$
|
|
47
|
-
var __propIsEnum$
|
|
48
|
-
var __defNormalProp$
|
|
49
|
-
var __spreadValues$
|
|
44
|
+
var __defProp$S = Object.defineProperty;
|
|
45
|
+
var __getOwnPropSymbols$S = Object.getOwnPropertySymbols;
|
|
46
|
+
var __hasOwnProp$S = Object.prototype.hasOwnProperty;
|
|
47
|
+
var __propIsEnum$S = Object.prototype.propertyIsEnumerable;
|
|
48
|
+
var __defNormalProp$S = (obj, key, value) => key in obj ? __defProp$S(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
49
|
+
var __spreadValues$S = (a, b) => {
|
|
50
50
|
for (var prop in b || (b = {}))
|
|
51
|
-
if (__hasOwnProp$
|
|
52
|
-
__defNormalProp$
|
|
53
|
-
if (__getOwnPropSymbols$
|
|
54
|
-
for (var prop of __getOwnPropSymbols$
|
|
55
|
-
if (__propIsEnum$
|
|
56
|
-
__defNormalProp$
|
|
51
|
+
if (__hasOwnProp$S.call(b, prop))
|
|
52
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
53
|
+
if (__getOwnPropSymbols$S)
|
|
54
|
+
for (var prop of __getOwnPropSymbols$S(b)) {
|
|
55
|
+
if (__propIsEnum$S.call(b, prop))
|
|
56
|
+
__defNormalProp$S(a, prop, b[prop]);
|
|
57
57
|
}
|
|
58
58
|
return a;
|
|
59
59
|
};
|
|
@@ -62,7 +62,7 @@ function useAppQueryParams() {
|
|
|
62
62
|
return runtime.locationSearchToObject(location.search || "");
|
|
63
63
|
}
|
|
64
64
|
function getUrlWithAppState(path, searchObject, preserveParams) {
|
|
65
|
-
const paramsCopy = __spreadValues$
|
|
65
|
+
const paramsCopy = __spreadValues$S({}, searchObject);
|
|
66
66
|
if (preserveParams) {
|
|
67
67
|
for (const key of Object.keys(paramsCopy)) {
|
|
68
68
|
if (!preserveParams.includes(key)) {
|
|
@@ -92,21 +92,21 @@ function useSceneRouteMatch(path) {
|
|
|
92
92
|
return match;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
var __defProp$
|
|
95
|
+
var __defProp$R = Object.defineProperty;
|
|
96
96
|
var __defProps$y = Object.defineProperties;
|
|
97
97
|
var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
|
|
98
|
-
var __getOwnPropSymbols$
|
|
99
|
-
var __hasOwnProp$
|
|
100
|
-
var __propIsEnum$
|
|
101
|
-
var __defNormalProp$
|
|
102
|
-
var __spreadValues$
|
|
98
|
+
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
99
|
+
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
100
|
+
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
101
|
+
var __defNormalProp$R = (obj, key, value) => key in obj ? __defProp$R(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
102
|
+
var __spreadValues$R = (a, b) => {
|
|
103
103
|
for (var prop in b || (b = {}))
|
|
104
|
-
if (__hasOwnProp$
|
|
105
|
-
__defNormalProp$
|
|
106
|
-
if (__getOwnPropSymbols$
|
|
107
|
-
for (var prop of __getOwnPropSymbols$
|
|
108
|
-
if (__propIsEnum$
|
|
109
|
-
__defNormalProp$
|
|
104
|
+
if (__hasOwnProp$R.call(b, prop))
|
|
105
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
106
|
+
if (__getOwnPropSymbols$R)
|
|
107
|
+
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
108
|
+
if (__propIsEnum$R.call(b, prop))
|
|
109
|
+
__defNormalProp$R(a, prop, b[prop]);
|
|
110
110
|
}
|
|
111
111
|
return a;
|
|
112
112
|
};
|
|
@@ -116,7 +116,7 @@ function registerRuntimePanelPlugin({ pluginId, plugin }) {
|
|
|
116
116
|
if (runtimePanelPlugins.has(pluginId)) {
|
|
117
117
|
throw new Error(`A runtime panel plugin with id ${pluginId} has already been registered`);
|
|
118
118
|
}
|
|
119
|
-
plugin.meta = __spreadProps$y(__spreadValues$
|
|
119
|
+
plugin.meta = __spreadProps$y(__spreadValues$R({}, plugin.meta), {
|
|
120
120
|
id: pluginId,
|
|
121
121
|
name: pluginId,
|
|
122
122
|
module: "runtime plugin",
|
|
@@ -144,21 +144,21 @@ function loadPanelPluginSync(pluginId) {
|
|
|
144
144
|
return (_a = getPanelPluginFromCache(pluginId)) != null ? _a : runtimePanelPlugins.get(pluginId);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
var __defProp$
|
|
147
|
+
var __defProp$Q = Object.defineProperty;
|
|
148
148
|
var __defProps$x = Object.defineProperties;
|
|
149
149
|
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
150
|
-
var __getOwnPropSymbols$
|
|
151
|
-
var __hasOwnProp$
|
|
152
|
-
var __propIsEnum$
|
|
153
|
-
var __defNormalProp$
|
|
154
|
-
var __spreadValues$
|
|
150
|
+
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
151
|
+
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
152
|
+
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
153
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
154
|
+
var __spreadValues$Q = (a, b) => {
|
|
155
155
|
for (var prop in b || (b = {}))
|
|
156
|
-
if (__hasOwnProp$
|
|
157
|
-
__defNormalProp$
|
|
158
|
-
if (__getOwnPropSymbols$
|
|
159
|
-
for (var prop of __getOwnPropSymbols$
|
|
160
|
-
if (__propIsEnum$
|
|
161
|
-
__defNormalProp$
|
|
156
|
+
if (__hasOwnProp$Q.call(b, prop))
|
|
157
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
158
|
+
if (__getOwnPropSymbols$Q)
|
|
159
|
+
for (var prop of __getOwnPropSymbols$Q(b)) {
|
|
160
|
+
if (__propIsEnum$Q.call(b, prop))
|
|
161
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
162
162
|
}
|
|
163
163
|
return a;
|
|
164
164
|
};
|
|
@@ -166,11 +166,11 @@ var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
|
166
166
|
var __objRest$5 = (source, exclude) => {
|
|
167
167
|
var target = {};
|
|
168
168
|
for (var prop in source)
|
|
169
|
-
if (__hasOwnProp$
|
|
169
|
+
if (__hasOwnProp$Q.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
170
170
|
target[prop] = source[prop];
|
|
171
|
-
if (source != null && __getOwnPropSymbols$
|
|
172
|
-
for (var prop of __getOwnPropSymbols$
|
|
173
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
171
|
+
if (source != null && __getOwnPropSymbols$Q)
|
|
172
|
+
for (var prop of __getOwnPropSymbols$Q(source)) {
|
|
173
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Q.call(source, prop))
|
|
174
174
|
target[prop] = source[prop];
|
|
175
175
|
}
|
|
176
176
|
return target;
|
|
@@ -188,7 +188,7 @@ function SceneComponentWrapperWithoutMemo(_a) {
|
|
|
188
188
|
if (!model.isActive && !model.renderBeforeActivation) {
|
|
189
189
|
return null;
|
|
190
190
|
}
|
|
191
|
-
return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$x(__spreadValues$
|
|
191
|
+
return /* @__PURE__ */ React__default["default"].createElement(Component, __spreadProps$x(__spreadValues$Q({}, otherProps), {
|
|
192
192
|
model
|
|
193
193
|
}));
|
|
194
194
|
}
|
|
@@ -234,19 +234,19 @@ class SceneObjectRef {
|
|
|
234
234
|
}
|
|
235
235
|
_ref = new WeakMap();
|
|
236
236
|
|
|
237
|
-
var __defProp$
|
|
238
|
-
var __getOwnPropSymbols$
|
|
239
|
-
var __hasOwnProp$
|
|
240
|
-
var __propIsEnum$
|
|
241
|
-
var __defNormalProp$
|
|
242
|
-
var __spreadValues$
|
|
237
|
+
var __defProp$P = Object.defineProperty;
|
|
238
|
+
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
239
|
+
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
240
|
+
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
241
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
242
|
+
var __spreadValues$P = (a, b) => {
|
|
243
243
|
for (var prop in b || (b = {}))
|
|
244
|
-
if (__hasOwnProp$
|
|
245
|
-
__defNormalProp$
|
|
246
|
-
if (__getOwnPropSymbols$
|
|
247
|
-
for (var prop of __getOwnPropSymbols$
|
|
248
|
-
if (__propIsEnum$
|
|
249
|
-
__defNormalProp$
|
|
244
|
+
if (__hasOwnProp$P.call(b, prop))
|
|
245
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
246
|
+
if (__getOwnPropSymbols$P)
|
|
247
|
+
for (var prop of __getOwnPropSymbols$P(b)) {
|
|
248
|
+
if (__propIsEnum$P.call(b, prop))
|
|
249
|
+
__defNormalProp$P(a, prop, b[prop]);
|
|
250
250
|
}
|
|
251
251
|
return a;
|
|
252
252
|
};
|
|
@@ -313,7 +313,7 @@ class SceneObjectBase {
|
|
|
313
313
|
}
|
|
314
314
|
setState(update) {
|
|
315
315
|
const prevState = this._state;
|
|
316
|
-
const newState = __spreadValues$
|
|
316
|
+
const newState = __spreadValues$P(__spreadValues$P({}, this._state), update);
|
|
317
317
|
this._state = Object.freeze(newState);
|
|
318
318
|
this._setParent(update);
|
|
319
319
|
this._handleActivationOfChangedStateProps(prevState, newState);
|
|
@@ -509,19 +509,19 @@ function forEachChild(state, callback) {
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
|
|
512
|
-
var __defProp$
|
|
513
|
-
var __getOwnPropSymbols$
|
|
514
|
-
var __hasOwnProp$
|
|
515
|
-
var __propIsEnum$
|
|
516
|
-
var __defNormalProp$
|
|
517
|
-
var __spreadValues$
|
|
512
|
+
var __defProp$O = Object.defineProperty;
|
|
513
|
+
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
514
|
+
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
515
|
+
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
516
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
517
|
+
var __spreadValues$O = (a, b) => {
|
|
518
518
|
for (var prop in b || (b = {}))
|
|
519
|
-
if (__hasOwnProp$
|
|
520
|
-
__defNormalProp$
|
|
521
|
-
if (__getOwnPropSymbols$
|
|
522
|
-
for (var prop of __getOwnPropSymbols$
|
|
523
|
-
if (__propIsEnum$
|
|
524
|
-
__defNormalProp$
|
|
519
|
+
if (__hasOwnProp$O.call(b, prop))
|
|
520
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
521
|
+
if (__getOwnPropSymbols$O)
|
|
522
|
+
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
523
|
+
if (__propIsEnum$O.call(b, prop))
|
|
524
|
+
__defNormalProp$O(a, prop, b[prop]);
|
|
525
525
|
}
|
|
526
526
|
return a;
|
|
527
527
|
};
|
|
@@ -530,35 +530,30 @@ function cloneSceneObject(sceneObject, withState) {
|
|
|
530
530
|
return new sceneObject.constructor(clonedState);
|
|
531
531
|
}
|
|
532
532
|
function cloneSceneObjectState(sceneState, withState) {
|
|
533
|
-
const clonedState = __spreadValues$
|
|
533
|
+
const clonedState = __spreadValues$O({}, sceneState);
|
|
534
534
|
Object.assign(clonedState, withState);
|
|
535
535
|
for (const key in clonedState) {
|
|
536
536
|
if (withState && withState[key] !== void 0) {
|
|
537
537
|
continue;
|
|
538
538
|
}
|
|
539
539
|
const propValue = clonedState[key];
|
|
540
|
+
if (propValue instanceof SceneObjectBase) {
|
|
541
|
+
clonedState[key] = propValue.clone();
|
|
542
|
+
}
|
|
540
543
|
if (propValue instanceof SceneObjectRef) {
|
|
541
544
|
console.warn("Cloning object with SceneObjectRef");
|
|
542
545
|
continue;
|
|
543
546
|
}
|
|
544
|
-
if (propValue
|
|
545
|
-
clonedState[key] = propValue.clone();
|
|
546
|
-
} else if (Array.isArray(propValue)) {
|
|
547
|
+
if (Array.isArray(propValue)) {
|
|
547
548
|
const newArray = [];
|
|
548
549
|
for (const child of propValue) {
|
|
549
550
|
if (child instanceof SceneObjectBase) {
|
|
550
551
|
newArray.push(child.clone());
|
|
551
|
-
} else if (typeof child === "object") {
|
|
552
|
-
newArray.push(lodash.cloneDeep(child));
|
|
553
552
|
} else {
|
|
554
553
|
newArray.push(child);
|
|
555
554
|
}
|
|
556
555
|
}
|
|
557
556
|
clonedState[key] = newArray;
|
|
558
|
-
} else if (typeof propValue === "object") {
|
|
559
|
-
clonedState[key] = lodash.cloneDeep(propValue);
|
|
560
|
-
} else {
|
|
561
|
-
clonedState[key] = propValue;
|
|
562
557
|
}
|
|
563
558
|
}
|
|
564
559
|
return clonedState;
|
|
@@ -811,21 +806,21 @@ function calculateNetworkTime(requests) {
|
|
|
811
806
|
return totalNetworkTime;
|
|
812
807
|
}
|
|
813
808
|
|
|
814
|
-
var __defProp$
|
|
809
|
+
var __defProp$N = Object.defineProperty;
|
|
815
810
|
var __defProps$w = Object.defineProperties;
|
|
816
811
|
var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
|
|
817
|
-
var __getOwnPropSymbols$
|
|
818
|
-
var __hasOwnProp$
|
|
819
|
-
var __propIsEnum$
|
|
820
|
-
var __defNormalProp$
|
|
821
|
-
var __spreadValues$
|
|
812
|
+
var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
|
|
813
|
+
var __hasOwnProp$N = Object.prototype.hasOwnProperty;
|
|
814
|
+
var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
|
|
815
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
816
|
+
var __spreadValues$N = (a, b) => {
|
|
822
817
|
for (var prop in b || (b = {}))
|
|
823
|
-
if (__hasOwnProp$
|
|
824
|
-
__defNormalProp$
|
|
825
|
-
if (__getOwnPropSymbols$
|
|
826
|
-
for (var prop of __getOwnPropSymbols$
|
|
827
|
-
if (__propIsEnum$
|
|
828
|
-
__defNormalProp$
|
|
818
|
+
if (__hasOwnProp$N.call(b, prop))
|
|
819
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
820
|
+
if (__getOwnPropSymbols$N)
|
|
821
|
+
for (var prop of __getOwnPropSymbols$N(b)) {
|
|
822
|
+
if (__propIsEnum$N.call(b, prop))
|
|
823
|
+
__defNormalProp$N(a, prop, b[prop]);
|
|
829
824
|
}
|
|
830
825
|
return a;
|
|
831
826
|
};
|
|
@@ -854,7 +849,7 @@ function isQueryController(s) {
|
|
|
854
849
|
}
|
|
855
850
|
class SceneQueryController extends SceneObjectBase {
|
|
856
851
|
constructor(state = {}) {
|
|
857
|
-
super(__spreadProps$w(__spreadValues$
|
|
852
|
+
super(__spreadProps$w(__spreadValues$N({}, state), { isRunning: false }));
|
|
858
853
|
this.isQueryController = true;
|
|
859
854
|
this.profiler = new SceneRenderProfiler(this);
|
|
860
855
|
__privateAdd$2(this, _running, /* @__PURE__ */ new Set());
|
|
@@ -866,11 +861,11 @@ class SceneQueryController extends SceneObjectBase {
|
|
|
866
861
|
return () => __privateGet$2(this, _running).clear();
|
|
867
862
|
});
|
|
868
863
|
}
|
|
869
|
-
startProfile(
|
|
864
|
+
startProfile(source) {
|
|
870
865
|
if (!this.state.enableProfiling) {
|
|
871
866
|
return;
|
|
872
867
|
}
|
|
873
|
-
this.profiler.startProfile(name);
|
|
868
|
+
this.profiler.startProfile(source.constructor.name);
|
|
874
869
|
}
|
|
875
870
|
queryStarted(entry) {
|
|
876
871
|
__privateGet$2(this, _running).add(entry);
|
|
@@ -935,25 +930,25 @@ function getQueryController(sceneObject) {
|
|
|
935
930
|
return void 0;
|
|
936
931
|
}
|
|
937
932
|
|
|
938
|
-
var __defProp$
|
|
939
|
-
var __getOwnPropSymbols$
|
|
940
|
-
var __hasOwnProp$
|
|
941
|
-
var __propIsEnum$
|
|
942
|
-
var __defNormalProp$
|
|
943
|
-
var __spreadValues$
|
|
933
|
+
var __defProp$M = Object.defineProperty;
|
|
934
|
+
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
935
|
+
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
936
|
+
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
937
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
938
|
+
var __spreadValues$M = (a, b) => {
|
|
944
939
|
for (var prop in b || (b = {}))
|
|
945
|
-
if (__hasOwnProp$
|
|
946
|
-
__defNormalProp$
|
|
947
|
-
if (__getOwnPropSymbols$
|
|
948
|
-
for (var prop of __getOwnPropSymbols$
|
|
949
|
-
if (__propIsEnum$
|
|
950
|
-
__defNormalProp$
|
|
940
|
+
if (__hasOwnProp$M.call(b, prop))
|
|
941
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
942
|
+
if (__getOwnPropSymbols$M)
|
|
943
|
+
for (var prop of __getOwnPropSymbols$M(b)) {
|
|
944
|
+
if (__propIsEnum$M.call(b, prop))
|
|
945
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
951
946
|
}
|
|
952
947
|
return a;
|
|
953
948
|
};
|
|
954
949
|
class SceneDataNode extends SceneObjectBase {
|
|
955
950
|
constructor(state) {
|
|
956
|
-
super(__spreadValues$
|
|
951
|
+
super(__spreadValues$M({
|
|
957
952
|
data: emptyPanelData
|
|
958
953
|
}, state));
|
|
959
954
|
}
|
|
@@ -989,14 +984,14 @@ class SceneObjectUrlSyncConfig {
|
|
|
989
984
|
updateFromUrl(values) {
|
|
990
985
|
this._sceneObject.updateFromUrl(values);
|
|
991
986
|
}
|
|
992
|
-
shouldCreateHistoryStep(values) {
|
|
993
|
-
return this._nextChangeShouldAddHistoryStep;
|
|
994
|
-
}
|
|
995
987
|
performBrowserHistoryAction(callback) {
|
|
996
988
|
this._nextChangeShouldAddHistoryStep = true;
|
|
997
989
|
callback();
|
|
998
990
|
this._nextChangeShouldAddHistoryStep = false;
|
|
999
991
|
}
|
|
992
|
+
shouldCreateHistoryStep(values) {
|
|
993
|
+
return this._nextChangeShouldAddHistoryStep;
|
|
994
|
+
}
|
|
1000
995
|
}
|
|
1001
996
|
|
|
1002
997
|
const INTERVAL_STRING_REGEX = /^\d+[yYmMsSwWhHdD]$/;
|
|
@@ -1087,19 +1082,19 @@ function isValid$1(value, roundUp, timeZone) {
|
|
|
1087
1082
|
return parsed.isValid();
|
|
1088
1083
|
}
|
|
1089
1084
|
|
|
1090
|
-
var __defProp$
|
|
1091
|
-
var __getOwnPropSymbols$
|
|
1092
|
-
var __hasOwnProp$
|
|
1093
|
-
var __propIsEnum$
|
|
1094
|
-
var __defNormalProp$
|
|
1095
|
-
var __spreadValues$
|
|
1085
|
+
var __defProp$L = Object.defineProperty;
|
|
1086
|
+
var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
|
|
1087
|
+
var __hasOwnProp$L = Object.prototype.hasOwnProperty;
|
|
1088
|
+
var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
|
|
1089
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1090
|
+
var __spreadValues$L = (a, b) => {
|
|
1096
1091
|
for (var prop in b || (b = {}))
|
|
1097
|
-
if (__hasOwnProp$
|
|
1098
|
-
__defNormalProp$
|
|
1099
|
-
if (__getOwnPropSymbols$
|
|
1100
|
-
for (var prop of __getOwnPropSymbols$
|
|
1101
|
-
if (__propIsEnum$
|
|
1102
|
-
__defNormalProp$
|
|
1092
|
+
if (__hasOwnProp$L.call(b, prop))
|
|
1093
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
1094
|
+
if (__getOwnPropSymbols$L)
|
|
1095
|
+
for (var prop of __getOwnPropSymbols$L(b)) {
|
|
1096
|
+
if (__propIsEnum$L.call(b, prop))
|
|
1097
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
1103
1098
|
}
|
|
1104
1099
|
return a;
|
|
1105
1100
|
};
|
|
@@ -1118,7 +1113,7 @@ class SceneTimeRange extends SceneObjectBase {
|
|
|
1118
1113
|
state.weekStart
|
|
1119
1114
|
);
|
|
1120
1115
|
const refreshOnActivate = (_a = state.refreshOnActivate) != null ? _a : { percent: 10 };
|
|
1121
|
-
super(__spreadValues$
|
|
1116
|
+
super(__spreadValues$L({ from, to, timeZone, value, refreshOnActivate }, state));
|
|
1122
1117
|
this._urlSync = new SceneObjectUrlSyncConfig(this, { keys: ["from", "to", "timezone", "time", "time.window"] });
|
|
1123
1118
|
this.onTimeRangeChange = (timeRange) => {
|
|
1124
1119
|
const update = {};
|
|
@@ -1142,7 +1137,7 @@ class SceneTimeRange extends SceneObjectBase {
|
|
|
1142
1137
|
);
|
|
1143
1138
|
if (update.from !== this.state.from || update.to !== this.state.to) {
|
|
1144
1139
|
const queryController = getQueryController(this);
|
|
1145
|
-
queryController == null ? void 0 : queryController.startProfile(
|
|
1140
|
+
queryController == null ? void 0 : queryController.startProfile(this);
|
|
1146
1141
|
this._urlSync.performBrowserHistoryAction(() => {
|
|
1147
1142
|
this.setState(update);
|
|
1148
1143
|
});
|
|
@@ -1901,8 +1896,7 @@ class MultiValueVariable extends SceneObjectBase {
|
|
|
1901
1896
|
return { value: "", text: "" };
|
|
1902
1897
|
}
|
|
1903
1898
|
}
|
|
1904
|
-
changeValueTo(value, text
|
|
1905
|
-
var _a, _b;
|
|
1899
|
+
changeValueTo(value, text) {
|
|
1906
1900
|
if (value === this.state.value && text === this.state.text) {
|
|
1907
1901
|
return;
|
|
1908
1902
|
}
|
|
@@ -1932,12 +1926,7 @@ class MultiValueVariable extends SceneObjectBase {
|
|
|
1932
1926
|
if (lodash.isEqual(value, this.state.value) && lodash.isEqual(text, this.state.text)) {
|
|
1933
1927
|
return;
|
|
1934
1928
|
}
|
|
1935
|
-
|
|
1936
|
-
if (isUserAction) {
|
|
1937
|
-
(_b = (_a = this._urlSync).performBrowserHistoryAction) == null ? void 0 : _b.call(_a, stateChangeAction);
|
|
1938
|
-
} else {
|
|
1939
|
-
stateChangeAction();
|
|
1940
|
-
}
|
|
1929
|
+
this.setStateHelper({ value, text, loading: false });
|
|
1941
1930
|
this.publishEvent(new SceneVariableValueChangedEvent(this), true);
|
|
1942
1931
|
}
|
|
1943
1932
|
findLabelTextForValue(value) {
|
|
@@ -1991,7 +1980,6 @@ function findOptionMatchingCurrent(currentValue, currentText, options) {
|
|
|
1991
1980
|
class MultiValueUrlSyncHandler {
|
|
1992
1981
|
constructor(_sceneObject) {
|
|
1993
1982
|
this._sceneObject = _sceneObject;
|
|
1994
|
-
this._nextChangeShouldAddHistoryStep = false;
|
|
1995
1983
|
}
|
|
1996
1984
|
getKey() {
|
|
1997
1985
|
return `var-${this._sceneObject.state.name}`;
|
|
@@ -2032,14 +2020,6 @@ class MultiValueUrlSyncHandler {
|
|
|
2032
2020
|
this._sceneObject.changeValueTo(urlValue);
|
|
2033
2021
|
}
|
|
2034
2022
|
}
|
|
2035
|
-
performBrowserHistoryAction(callback) {
|
|
2036
|
-
this._nextChangeShouldAddHistoryStep = true;
|
|
2037
|
-
callback();
|
|
2038
|
-
this._nextChangeShouldAddHistoryStep = false;
|
|
2039
|
-
}
|
|
2040
|
-
shouldCreateHistoryStep(values) {
|
|
2041
|
-
return this._nextChangeShouldAddHistoryStep;
|
|
2042
|
-
}
|
|
2043
2023
|
}
|
|
2044
2024
|
function handleLegacyUrlAllValue(value) {
|
|
2045
2025
|
if (lodash.isArray(value) && value[0] === ALL_VARIABLE_TEXT) {
|
|
@@ -2116,21 +2096,21 @@ function collectAllVariables(sceneObject, record = {}) {
|
|
|
2116
2096
|
return record;
|
|
2117
2097
|
}
|
|
2118
2098
|
|
|
2119
|
-
var __defProp$
|
|
2099
|
+
var __defProp$K = Object.defineProperty;
|
|
2120
2100
|
var __defProps$v = Object.defineProperties;
|
|
2121
2101
|
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
2122
|
-
var __getOwnPropSymbols$
|
|
2123
|
-
var __hasOwnProp$
|
|
2124
|
-
var __propIsEnum$
|
|
2125
|
-
var __defNormalProp$
|
|
2126
|
-
var __spreadValues$
|
|
2102
|
+
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
2103
|
+
var __hasOwnProp$K = Object.prototype.hasOwnProperty;
|
|
2104
|
+
var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
|
|
2105
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2106
|
+
var __spreadValues$K = (a, b) => {
|
|
2127
2107
|
for (var prop in b || (b = {}))
|
|
2128
|
-
if (__hasOwnProp$
|
|
2129
|
-
__defNormalProp$
|
|
2130
|
-
if (__getOwnPropSymbols$
|
|
2131
|
-
for (var prop of __getOwnPropSymbols$
|
|
2132
|
-
if (__propIsEnum$
|
|
2133
|
-
__defNormalProp$
|
|
2108
|
+
if (__hasOwnProp$K.call(b, prop))
|
|
2109
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
2110
|
+
if (__getOwnPropSymbols$K)
|
|
2111
|
+
for (var prop of __getOwnPropSymbols$K(b)) {
|
|
2112
|
+
if (__propIsEnum$K.call(b, prop))
|
|
2113
|
+
__defNormalProp$K(a, prop, b[prop]);
|
|
2134
2114
|
}
|
|
2135
2115
|
return a;
|
|
2136
2116
|
};
|
|
@@ -2150,7 +2130,7 @@ function getTemplateProxyForField(field, frame, frames) {
|
|
|
2150
2130
|
if (!field.labels) {
|
|
2151
2131
|
return "";
|
|
2152
2132
|
}
|
|
2153
|
-
return __spreadProps$v(__spreadValues$
|
|
2133
|
+
return __spreadProps$v(__spreadValues$K({}, field.labels), {
|
|
2154
2134
|
__values: Object.values(field.labels).sort().join(", "),
|
|
2155
2135
|
toString: () => {
|
|
2156
2136
|
return data.formatLabels(field.labels, "", true);
|
|
@@ -2646,21 +2626,21 @@ function isExtraQueryProvider(obj) {
|
|
|
2646
2626
|
return typeof obj === "object" && "getExtraQueries" in obj;
|
|
2647
2627
|
}
|
|
2648
2628
|
|
|
2649
|
-
var __defProp$
|
|
2629
|
+
var __defProp$J = Object.defineProperty;
|
|
2650
2630
|
var __defProps$u = Object.defineProperties;
|
|
2651
2631
|
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
2652
|
-
var __getOwnPropSymbols$
|
|
2653
|
-
var __hasOwnProp$
|
|
2654
|
-
var __propIsEnum$
|
|
2655
|
-
var __defNormalProp$
|
|
2656
|
-
var __spreadValues$
|
|
2632
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
2633
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
2634
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
2635
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2636
|
+
var __spreadValues$J = (a, b) => {
|
|
2657
2637
|
for (var prop in b || (b = {}))
|
|
2658
|
-
if (__hasOwnProp$
|
|
2659
|
-
__defNormalProp$
|
|
2660
|
-
if (__getOwnPropSymbols$
|
|
2661
|
-
for (var prop of __getOwnPropSymbols$
|
|
2662
|
-
if (__propIsEnum$
|
|
2663
|
-
__defNormalProp$
|
|
2638
|
+
if (__hasOwnProp$J.call(b, prop))
|
|
2639
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
2640
|
+
if (__getOwnPropSymbols$J)
|
|
2641
|
+
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
2642
|
+
if (__propIsEnum$J.call(b, prop))
|
|
2643
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
2664
2644
|
}
|
|
2665
2645
|
return a;
|
|
2666
2646
|
};
|
|
@@ -2677,7 +2657,7 @@ const extraQueryProcessingOperator = (processors) => (data) => {
|
|
|
2677
2657
|
}),
|
|
2678
2658
|
rxjs.map(([primary, ...processedSecondaries]) => {
|
|
2679
2659
|
var _a;
|
|
2680
|
-
return __spreadProps$u(__spreadValues$
|
|
2660
|
+
return __spreadProps$u(__spreadValues$J({}, primary), {
|
|
2681
2661
|
series: [...primary.series, ...processedSecondaries.flatMap((s) => s.series)],
|
|
2682
2662
|
annotations: [...(_a = primary.annotations) != null ? _a : [], ...processedSecondaries.flatMap((s) => {
|
|
2683
2663
|
var _a2;
|
|
@@ -2688,21 +2668,21 @@ const extraQueryProcessingOperator = (processors) => (data) => {
|
|
|
2688
2668
|
);
|
|
2689
2669
|
};
|
|
2690
2670
|
|
|
2691
|
-
var __defProp$
|
|
2671
|
+
var __defProp$I = Object.defineProperty;
|
|
2692
2672
|
var __defProps$t = Object.defineProperties;
|
|
2693
2673
|
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
2694
|
-
var __getOwnPropSymbols$
|
|
2695
|
-
var __hasOwnProp$
|
|
2696
|
-
var __propIsEnum$
|
|
2697
|
-
var __defNormalProp$
|
|
2698
|
-
var __spreadValues$
|
|
2674
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
2675
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
2676
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
2677
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2678
|
+
var __spreadValues$I = (a, b) => {
|
|
2699
2679
|
for (var prop in b || (b = {}))
|
|
2700
|
-
if (__hasOwnProp$
|
|
2701
|
-
__defNormalProp$
|
|
2702
|
-
if (__getOwnPropSymbols$
|
|
2703
|
-
for (var prop of __getOwnPropSymbols$
|
|
2704
|
-
if (__propIsEnum$
|
|
2705
|
-
__defNormalProp$
|
|
2680
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
2681
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
2682
|
+
if (__getOwnPropSymbols$I)
|
|
2683
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
2684
|
+
if (__propIsEnum$I.call(b, prop))
|
|
2685
|
+
__defNormalProp$I(a, prop, b[prop]);
|
|
2706
2686
|
}
|
|
2707
2687
|
return a;
|
|
2708
2688
|
};
|
|
@@ -2758,11 +2738,11 @@ function filterAnnotations(data, filters) {
|
|
|
2758
2738
|
continue;
|
|
2759
2739
|
}
|
|
2760
2740
|
}
|
|
2761
|
-
fields.push(__spreadProps$t(__spreadValues$
|
|
2741
|
+
fields.push(__spreadProps$t(__spreadValues$I({}, field), {
|
|
2762
2742
|
values: buffer
|
|
2763
2743
|
}));
|
|
2764
2744
|
}
|
|
2765
|
-
processed.push(__spreadProps$t(__spreadValues$
|
|
2745
|
+
processed.push(__spreadProps$t(__spreadValues$I({}, frame), {
|
|
2766
2746
|
fields,
|
|
2767
2747
|
length: frameLength
|
|
2768
2748
|
}));
|
|
@@ -2843,21 +2823,21 @@ function getOptionSearcher(options, includeAll = false) {
|
|
|
2843
2823
|
return (search) => fuzzySearch(search).map((i) => allOptions[i]);
|
|
2844
2824
|
}
|
|
2845
2825
|
|
|
2846
|
-
var __defProp$
|
|
2826
|
+
var __defProp$H = Object.defineProperty;
|
|
2847
2827
|
var __defProps$s = Object.defineProperties;
|
|
2848
2828
|
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
2849
|
-
var __getOwnPropSymbols$
|
|
2850
|
-
var __hasOwnProp$
|
|
2851
|
-
var __propIsEnum$
|
|
2852
|
-
var __defNormalProp$
|
|
2853
|
-
var __spreadValues$
|
|
2829
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
2830
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
2831
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
2832
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2833
|
+
var __spreadValues$H = (a, b) => {
|
|
2854
2834
|
for (var prop in b || (b = {}))
|
|
2855
|
-
if (__hasOwnProp$
|
|
2856
|
-
__defNormalProp$
|
|
2857
|
-
if (__getOwnPropSymbols$
|
|
2858
|
-
for (var prop of __getOwnPropSymbols$
|
|
2859
|
-
if (__propIsEnum$
|
|
2860
|
-
__defNormalProp$
|
|
2835
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
2836
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
2837
|
+
if (__getOwnPropSymbols$H)
|
|
2838
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
2839
|
+
if (__propIsEnum$H.call(b, prop))
|
|
2840
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
2861
2841
|
}
|
|
2862
2842
|
return a;
|
|
2863
2843
|
};
|
|
@@ -2865,11 +2845,11 @@ var __spreadProps$s = (a, b) => __defProps$s(a, __getOwnPropDescs$s(b));
|
|
|
2865
2845
|
var __objRest$4 = (source, exclude) => {
|
|
2866
2846
|
var target = {};
|
|
2867
2847
|
for (var prop in source)
|
|
2868
|
-
if (__hasOwnProp$
|
|
2848
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2869
2849
|
target[prop] = source[prop];
|
|
2870
|
-
if (source != null && __getOwnPropSymbols$
|
|
2871
|
-
for (var prop of __getOwnPropSymbols$
|
|
2872
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
2850
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
2851
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
2852
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
2873
2853
|
target[prop] = source[prop];
|
|
2874
2854
|
}
|
|
2875
2855
|
return target;
|
|
@@ -2935,8 +2915,8 @@ function VariableValueSelect({ model }) {
|
|
|
2935
2915
|
options: filteredOptions,
|
|
2936
2916
|
"data-testid": e2eSelectors.selectors.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts(`${value}`),
|
|
2937
2917
|
onChange: (newValue) => {
|
|
2938
|
-
model.changeValueTo(newValue.value, newValue.label
|
|
2939
|
-
queryController == null ? void 0 : queryController.startProfile(
|
|
2918
|
+
model.changeValueTo(newValue.value, newValue.label);
|
|
2919
|
+
queryController == null ? void 0 : queryController.startProfile(model);
|
|
2940
2920
|
if (hasCustomValue !== newValue.__isNew__) {
|
|
2941
2921
|
setHasCustomValue(newValue.__isNew__);
|
|
2942
2922
|
}
|
|
@@ -3002,14 +2982,14 @@ function VariableValueSelectMulti({ model }) {
|
|
|
3002
2982
|
hideSelectedOptions: false,
|
|
3003
2983
|
onInputChange,
|
|
3004
2984
|
onBlur: () => {
|
|
3005
|
-
model.changeValueTo(uncommittedValue
|
|
3006
|
-
queryController == null ? void 0 : queryController.startProfile(
|
|
2985
|
+
model.changeValueTo(uncommittedValue);
|
|
2986
|
+
queryController == null ? void 0 : queryController.startProfile(model);
|
|
3007
2987
|
},
|
|
3008
2988
|
filterOption: filterNoOp$2,
|
|
3009
2989
|
"data-testid": e2eSelectors.selectors.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts(`${uncommittedValue}`),
|
|
3010
2990
|
onChange: (newValue, action) => {
|
|
3011
2991
|
if (action.action === "clear" && noValueOnClear) {
|
|
3012
|
-
model.changeValueTo([]
|
|
2992
|
+
model.changeValueTo([]);
|
|
3013
2993
|
}
|
|
3014
2994
|
setUncommittedValue(newValue.map((x) => x.value));
|
|
3015
2995
|
}
|
|
@@ -3030,7 +3010,7 @@ const OptionWithCheckbox = ({
|
|
|
3030
3010
|
const theme = ui.useTheme2();
|
|
3031
3011
|
const selectStyles = ui.getSelectStyles(theme);
|
|
3032
3012
|
const optionStyles = ui.useStyles2(getOptionStyles);
|
|
3033
|
-
return /* @__PURE__ */ React__default["default"].createElement("div", __spreadProps$s(__spreadValues$
|
|
3013
|
+
return /* @__PURE__ */ React__default["default"].createElement("div", __spreadProps$s(__spreadValues$H({
|
|
3034
3014
|
ref: innerRef,
|
|
3035
3015
|
className: css.cx(selectStyles.option, isFocused && selectStyles.optionFocused)
|
|
3036
3016
|
}, rest), {
|
|
@@ -3195,28 +3175,28 @@ function wrapInSafeSerializableSceneObject(sceneObject) {
|
|
|
3195
3175
|
return { value: sceneObject, text: "__sceneObject" };
|
|
3196
3176
|
}
|
|
3197
3177
|
|
|
3198
|
-
var __defProp$
|
|
3178
|
+
var __defProp$G = Object.defineProperty;
|
|
3199
3179
|
var __defProps$r = Object.defineProperties;
|
|
3200
3180
|
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
3201
|
-
var __getOwnPropSymbols$
|
|
3202
|
-
var __hasOwnProp$
|
|
3203
|
-
var __propIsEnum$
|
|
3204
|
-
var __defNormalProp$
|
|
3205
|
-
var __spreadValues$
|
|
3181
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
3182
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
3183
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
3184
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3185
|
+
var __spreadValues$G = (a, b) => {
|
|
3206
3186
|
for (var prop in b || (b = {}))
|
|
3207
|
-
if (__hasOwnProp$
|
|
3208
|
-
__defNormalProp$
|
|
3209
|
-
if (__getOwnPropSymbols$
|
|
3210
|
-
for (var prop of __getOwnPropSymbols$
|
|
3211
|
-
if (__propIsEnum$
|
|
3212
|
-
__defNormalProp$
|
|
3187
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
3188
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
3189
|
+
if (__getOwnPropSymbols$G)
|
|
3190
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
3191
|
+
if (__propIsEnum$G.call(b, prop))
|
|
3192
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
3213
3193
|
}
|
|
3214
3194
|
return a;
|
|
3215
3195
|
};
|
|
3216
3196
|
var __spreadProps$r = (a, b) => __defProps$r(a, __getOwnPropDescs$r(b));
|
|
3217
3197
|
class GroupByVariable extends MultiValueVariable {
|
|
3218
3198
|
constructor(initialState) {
|
|
3219
|
-
super(__spreadProps$r(__spreadValues$
|
|
3199
|
+
super(__spreadProps$r(__spreadValues$G({
|
|
3220
3200
|
isMulti: true,
|
|
3221
3201
|
name: "",
|
|
3222
3202
|
value: [],
|
|
@@ -3247,7 +3227,7 @@ class GroupByVariable extends MultiValueVariable {
|
|
|
3247
3227
|
const queries = getQueriesForVariables(this);
|
|
3248
3228
|
const otherFilters = this.state.baseFilters || [];
|
|
3249
3229
|
const timeRange = sceneGraph.getTimeRange(this).state.value;
|
|
3250
|
-
const response = await ds.getTagKeys(__spreadValues$
|
|
3230
|
+
const response = await ds.getTagKeys(__spreadValues$G({
|
|
3251
3231
|
filters: otherFilters,
|
|
3252
3232
|
queries,
|
|
3253
3233
|
timeRange
|
|
@@ -3408,13 +3388,12 @@ function GroupByVariableRenderer({ model }) {
|
|
|
3408
3388
|
onBlur: () => {
|
|
3409
3389
|
model.changeValueTo(
|
|
3410
3390
|
uncommittedValue.map((x) => x.value),
|
|
3411
|
-
uncommittedValue.map((x) => x.label)
|
|
3412
|
-
true
|
|
3391
|
+
uncommittedValue.map((x) => x.label)
|
|
3413
3392
|
);
|
|
3414
3393
|
},
|
|
3415
3394
|
onChange: (newValue, action) => {
|
|
3416
3395
|
if (action.action === "clear" && noValueOnClear) {
|
|
3417
|
-
model.changeValueTo([]
|
|
3396
|
+
model.changeValueTo([]);
|
|
3418
3397
|
}
|
|
3419
3398
|
setUncommittedValue(newValue);
|
|
3420
3399
|
},
|
|
@@ -3608,19 +3587,19 @@ function getAdhocOptionSearcher(options) {
|
|
|
3608
3587
|
return (search) => fuzzySearch(search).map((i) => options[i]);
|
|
3609
3588
|
}
|
|
3610
3589
|
|
|
3611
|
-
var __defProp$
|
|
3612
|
-
var __getOwnPropSymbols$
|
|
3613
|
-
var __hasOwnProp$
|
|
3614
|
-
var __propIsEnum$
|
|
3615
|
-
var __defNormalProp$
|
|
3616
|
-
var __spreadValues$
|
|
3590
|
+
var __defProp$F = Object.defineProperty;
|
|
3591
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
3592
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
3593
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
3594
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3595
|
+
var __spreadValues$F = (a, b) => {
|
|
3617
3596
|
for (var prop in b || (b = {}))
|
|
3618
|
-
if (__hasOwnProp$
|
|
3619
|
-
__defNormalProp$
|
|
3620
|
-
if (__getOwnPropSymbols$
|
|
3621
|
-
for (var prop of __getOwnPropSymbols$
|
|
3622
|
-
if (__propIsEnum$
|
|
3623
|
-
__defNormalProp$
|
|
3597
|
+
if (__hasOwnProp$F.call(b, prop))
|
|
3598
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
3599
|
+
if (__getOwnPropSymbols$F)
|
|
3600
|
+
for (var prop of __getOwnPropSymbols$F(b)) {
|
|
3601
|
+
if (__propIsEnum$F.call(b, prop))
|
|
3602
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
3624
3603
|
}
|
|
3625
3604
|
return a;
|
|
3626
3605
|
};
|
|
@@ -3709,7 +3688,7 @@ function AdHocFilterRenderer({ filter, model }) {
|
|
|
3709
3688
|
});
|
|
3710
3689
|
}
|
|
3711
3690
|
};
|
|
3712
|
-
const valueSelect = /* @__PURE__ */ React__default["default"].createElement(ui.Select, __spreadValues$
|
|
3691
|
+
const valueSelect = /* @__PURE__ */ React__default["default"].createElement(ui.Select, __spreadValues$F({
|
|
3713
3692
|
virtualized: true,
|
|
3714
3693
|
allowCustomValue: (_b = model.state.allowCustomValue) != null ? _b : true,
|
|
3715
3694
|
isValidNewOption: (inputValue) => inputValue.trim().length > 0,
|
|
@@ -3923,37 +3902,78 @@ function AdHocFilterBuilder({ model, addFilterButtonText }) {
|
|
|
3923
3902
|
});
|
|
3924
3903
|
}
|
|
3925
3904
|
|
|
3905
|
+
var __defProp$E = Object.defineProperty;
|
|
3906
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
3907
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
3908
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
3909
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3910
|
+
var __spreadValues$E = (a, b) => {
|
|
3911
|
+
for (var prop in b || (b = {}))
|
|
3912
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
3913
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
3914
|
+
if (__getOwnPropSymbols$E)
|
|
3915
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
3916
|
+
if (__propIsEnum$E.call(b, prop))
|
|
3917
|
+
__defNormalProp$E(a, prop, b[prop]);
|
|
3918
|
+
}
|
|
3919
|
+
return a;
|
|
3920
|
+
};
|
|
3926
3921
|
class AdHocFiltersVariableUrlSyncHandler {
|
|
3927
3922
|
constructor(_variable) {
|
|
3928
3923
|
this._variable = _variable;
|
|
3929
3924
|
}
|
|
3930
|
-
getKey() {
|
|
3925
|
+
getKey(isInjected) {
|
|
3926
|
+
if (isInjected) {
|
|
3927
|
+
return `var-injected-${this._variable.state.name}`;
|
|
3928
|
+
}
|
|
3931
3929
|
return `var-${this._variable.state.name}`;
|
|
3932
3930
|
}
|
|
3933
3931
|
getKeys() {
|
|
3934
|
-
return [this.getKey()];
|
|
3932
|
+
return [this.getKey(), this.getKey(true)];
|
|
3935
3933
|
}
|
|
3936
3934
|
getUrlState() {
|
|
3937
3935
|
const filters = this._variable.state.filters;
|
|
3938
|
-
|
|
3939
|
-
|
|
3936
|
+
const baseFilters = this._variable.state.baseFilters;
|
|
3937
|
+
let value = [""];
|
|
3938
|
+
let baseValues = [""];
|
|
3939
|
+
if (filters.length === 0 && (baseFilters == null ? void 0 : baseFilters.length) === 0) {
|
|
3940
|
+
return { [this.getKey()]: value };
|
|
3941
|
+
}
|
|
3942
|
+
if (filters.length) {
|
|
3943
|
+
value = filters.filter(isFilterComplete).filter((filter) => !filter.hidden).map((filter) => toArray(filter).map(escapeUrlPipeDelimiters).join("|"));
|
|
3944
|
+
}
|
|
3945
|
+
if (baseFilters == null ? void 0 : baseFilters.length) {
|
|
3946
|
+
baseValues = baseFilters == null ? void 0 : baseFilters.filter(isFilterComplete).filter((filter) => !filter.hidden && filter.source).map(
|
|
3947
|
+
(filter) => {
|
|
3948
|
+
var _a, _b;
|
|
3949
|
+
return toArray(filter).map(escapeUrlPipeDelimiters).join("|").concat(`/${(_b = (_a = filter.originalValue) == null ? void 0 : _a.map(escapeUrlPipeDelimiters).join("|")) != null ? _b : ""}/${filter.source}`);
|
|
3950
|
+
}
|
|
3951
|
+
);
|
|
3940
3952
|
}
|
|
3941
|
-
|
|
3942
|
-
|
|
3953
|
+
return __spreadValues$E({
|
|
3954
|
+
[this.getKey()]: value
|
|
3955
|
+
}, (baseFilters == null ? void 0 : baseFilters.length) ? { [this.getKey(true)]: baseValues } : {});
|
|
3943
3956
|
}
|
|
3944
3957
|
updateFromUrl(values) {
|
|
3945
3958
|
const urlValue = values[this.getKey()];
|
|
3946
|
-
|
|
3959
|
+
const urlValueBaseFilters = values[this.getKey(true)];
|
|
3960
|
+
if (urlValue == null && urlValueBaseFilters == null) {
|
|
3947
3961
|
return;
|
|
3948
3962
|
}
|
|
3949
|
-
|
|
3950
|
-
|
|
3963
|
+
if (urlValue) {
|
|
3964
|
+
const filters = deserializeUrlToFilters(urlValue);
|
|
3965
|
+
this._variable.setState({ filters });
|
|
3966
|
+
}
|
|
3967
|
+
if (urlValueBaseFilters) {
|
|
3968
|
+
const baseFilters = deserializeUrlToFilters(urlValueBaseFilters);
|
|
3969
|
+
this._variable.setState({ baseFilters });
|
|
3970
|
+
}
|
|
3951
3971
|
}
|
|
3952
3972
|
}
|
|
3953
3973
|
function deserializeUrlToFilters(value) {
|
|
3954
3974
|
if (Array.isArray(value)) {
|
|
3955
3975
|
const values = value;
|
|
3956
|
-
return values.map(toFilter).filter(isFilter);
|
|
3976
|
+
return values.map((value2) => toFilter(value2)).filter(isFilter);
|
|
3957
3977
|
}
|
|
3958
3978
|
const filter = toFilter(value);
|
|
3959
3979
|
return filter === null ? [] : [filter];
|
|
@@ -3972,10 +3992,12 @@ function toArray(filter) {
|
|
|
3972
3992
|
return result;
|
|
3973
3993
|
}
|
|
3974
3994
|
function toFilter(urlValue) {
|
|
3995
|
+
var _a;
|
|
3975
3996
|
if (typeof urlValue !== "string" || urlValue.length === 0) {
|
|
3976
3997
|
return null;
|
|
3977
3998
|
}
|
|
3978
|
-
const [
|
|
3999
|
+
const [filter, originalValues, source] = urlValue.split("/");
|
|
4000
|
+
const [key, keyLabel, operator, _operatorLabel, ...values] = filter.split("|").reduce((acc, v) => {
|
|
3979
4001
|
const [key2, label] = v.split(",");
|
|
3980
4002
|
acc.push(key2, label != null ? label : key2);
|
|
3981
4003
|
return acc;
|
|
@@ -3987,7 +4009,9 @@ function toFilter(urlValue) {
|
|
|
3987
4009
|
value: values[0],
|
|
3988
4010
|
values: isMultiValueOperator(operator) ? values.filter((_, index) => index % 2 === 0) : void 0,
|
|
3989
4011
|
valueLabels: values.filter((_, index) => index % 2 === 1),
|
|
3990
|
-
condition: ""
|
|
4012
|
+
condition: "",
|
|
4013
|
+
source,
|
|
4014
|
+
originalValue: originalValues && originalValues.length ? (_a = originalValues.split("|")) != null ? _a : [originalValues] : void 0
|
|
3991
4015
|
};
|
|
3992
4016
|
}
|
|
3993
4017
|
function isFilter(filter) {
|
|
@@ -5109,6 +5133,7 @@ var __spreadValues$A = (a, b) => {
|
|
|
5109
5133
|
return a;
|
|
5110
5134
|
};
|
|
5111
5135
|
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
5136
|
+
const LABEL_MAX_VISIBLE_LENGTH = 20;
|
|
5112
5137
|
function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
5113
5138
|
var _a, _b, _c;
|
|
5114
5139
|
const styles = ui.useStyles2(getStyles$b);
|
|
@@ -5152,7 +5177,7 @@ function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
|
5152
5177
|
className: styles.pillText
|
|
5153
5178
|
}, keyLabel, " ", filter.operator, " ", valueLabel);
|
|
5154
5179
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
5155
|
-
className: css.cx(styles.combinedFilterPill,
|
|
5180
|
+
className: css.cx(styles.combinedFilterPill, readOnly && styles.readOnlyCombinedFilter),
|
|
5156
5181
|
onClick: (e) => {
|
|
5157
5182
|
e.stopPropagation();
|
|
5158
5183
|
setPopulateInputOnEdit(true);
|
|
@@ -5168,12 +5193,12 @@ function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
|
5168
5193
|
"aria-label": `Edit filter with key ${keyLabel}`,
|
|
5169
5194
|
tabIndex: 0,
|
|
5170
5195
|
ref: pillWrapperRef
|
|
5171
|
-
}, valueLabel.length <
|
|
5196
|
+
}, valueLabel.length < LABEL_MAX_VISIBLE_LENGTH ? pillText : /* @__PURE__ */ React__default["default"].createElement(ui.Tooltip, {
|
|
5172
5197
|
content: /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
5173
5198
|
className: styles.tooltipText
|
|
5174
5199
|
}, valueLabel),
|
|
5175
5200
|
placement: "top"
|
|
5176
|
-
}, pillText), !readOnly ? /* @__PURE__ */ React__default["default"].createElement(ui.IconButton, {
|
|
5201
|
+
}, pillText), !readOnly && !filter.source ? /* @__PURE__ */ React__default["default"].createElement(ui.IconButton, {
|
|
5177
5202
|
onClick: (e) => {
|
|
5178
5203
|
e.stopPropagation();
|
|
5179
5204
|
model._removeFilter(filter);
|
|
@@ -5189,9 +5214,23 @@ function AdHocFilterPill({ filter, model, readOnly, focusOnWipInputRef }) {
|
|
|
5189
5214
|
},
|
|
5190
5215
|
name: "times",
|
|
5191
5216
|
size: "md",
|
|
5192
|
-
className: styles.
|
|
5217
|
+
className: styles.pillIcon,
|
|
5193
5218
|
tooltip: `Remove filter with key ${keyLabel}`
|
|
5194
|
-
}) : null
|
|
5219
|
+
}) : null, filter.source && !filter.originalValue && /* @__PURE__ */ React__default["default"].createElement(ui.IconButton, {
|
|
5220
|
+
name: "info-circle",
|
|
5221
|
+
size: "md",
|
|
5222
|
+
className: styles.pillIcon,
|
|
5223
|
+
tooltip: `This is a ${filter.source} injected filter`
|
|
5224
|
+
}), filter.source && filter.originalValue && /* @__PURE__ */ React__default["default"].createElement(ui.IconButton, {
|
|
5225
|
+
onClick: (e) => {
|
|
5226
|
+
e.stopPropagation();
|
|
5227
|
+
model.restoreBaseFilter(filter);
|
|
5228
|
+
},
|
|
5229
|
+
name: "history",
|
|
5230
|
+
size: "md",
|
|
5231
|
+
className: styles.pillIcon,
|
|
5232
|
+
tooltip: `Restore filter to its original value`
|
|
5233
|
+
}));
|
|
5195
5234
|
}
|
|
5196
5235
|
return /* @__PURE__ */ React__default["default"].createElement(AdHocCombobox, {
|
|
5197
5236
|
filter,
|
|
@@ -5227,7 +5266,7 @@ const getStyles$b = (theme) => ({
|
|
|
5227
5266
|
background: theme.colors.action.selected
|
|
5228
5267
|
}
|
|
5229
5268
|
}),
|
|
5230
|
-
|
|
5269
|
+
pillIcon: css.css({
|
|
5231
5270
|
marginInline: theme.spacing(0.5),
|
|
5232
5271
|
cursor: "pointer",
|
|
5233
5272
|
"&:hover": {
|
|
@@ -5261,7 +5300,7 @@ const AdHocFiltersAlwaysWipCombobox = React.forwardRef(function AdHocFiltersAlwa
|
|
|
5261
5300
|
});
|
|
5262
5301
|
|
|
5263
5302
|
const AdHocFiltersComboboxRenderer = React.memo(function AdHocFiltersComboboxRenderer2({ model }) {
|
|
5264
|
-
const { filters, readOnly } = model.useState();
|
|
5303
|
+
const { baseFilters, filters, readOnly } = model.useState();
|
|
5265
5304
|
const styles = ui.useStyles2(getStyles$a);
|
|
5266
5305
|
const focusOnWipInputRef = React.useRef();
|
|
5267
5306
|
return /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
@@ -5274,7 +5313,14 @@ const AdHocFiltersComboboxRenderer = React.memo(function AdHocFiltersComboboxRen
|
|
|
5274
5313
|
name: "filter",
|
|
5275
5314
|
className: styles.filterIcon,
|
|
5276
5315
|
size: "lg"
|
|
5277
|
-
}),
|
|
5316
|
+
}), baseFilters == null ? void 0 : baseFilters.map(
|
|
5317
|
+
(filter, index) => filter.source ? /* @__PURE__ */ React__default["default"].createElement(AdHocFilterPill, {
|
|
5318
|
+
key: `${index}-${filter.key}`,
|
|
5319
|
+
filter,
|
|
5320
|
+
model,
|
|
5321
|
+
focusOnWipInputRef: focusOnWipInputRef.current
|
|
5322
|
+
}) : null
|
|
5323
|
+
), filters.map((filter, index) => /* @__PURE__ */ React__default["default"].createElement(AdHocFilterPill, {
|
|
5278
5324
|
key: `${index}-${filter.key}`,
|
|
5279
5325
|
filter,
|
|
5280
5326
|
model,
|
|
@@ -5336,6 +5382,11 @@ var __spreadValues$z = (a, b) => {
|
|
|
5336
5382
|
return a;
|
|
5337
5383
|
};
|
|
5338
5384
|
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
5385
|
+
var FilterSource = /* @__PURE__ */ ((FilterSource2) => {
|
|
5386
|
+
FilterSource2["Scopes"] = "scopes";
|
|
5387
|
+
FilterSource2["Dashboards"] = "dashboards";
|
|
5388
|
+
return FilterSource2;
|
|
5389
|
+
})(FilterSource || {});
|
|
5339
5390
|
const OPERATORS = [
|
|
5340
5391
|
{
|
|
5341
5392
|
value: "=",
|
|
@@ -5393,9 +5444,13 @@ class AdHocFiltersVariable extends SceneObjectBase {
|
|
|
5393
5444
|
}
|
|
5394
5445
|
}
|
|
5395
5446
|
setState(update) {
|
|
5447
|
+
var _a, _b, _c;
|
|
5396
5448
|
let filterExpressionChanged = false;
|
|
5397
|
-
if (update.filters && update.filters !== this.state.filters && !update.filterExpression) {
|
|
5398
|
-
update.filterExpression = renderExpression(this.state.expressionBuilder,
|
|
5449
|
+
if ((update.filters && update.filters !== this.state.filters || update.baseFilters && update.baseFilters !== this.state.baseFilters) && !update.filterExpression) {
|
|
5450
|
+
update.filterExpression = renderExpression(this.state.expressionBuilder, [
|
|
5451
|
+
...(_b = (_a = update.baseFilters) == null ? void 0 : _a.filter((filter) => filter.source)) != null ? _b : [],
|
|
5452
|
+
...(_c = update.filters) != null ? _c : []
|
|
5453
|
+
]);
|
|
5399
5454
|
filterExpressionChanged = update.filterExpression !== this.state.filterExpression;
|
|
5400
5455
|
}
|
|
5401
5456
|
super.setState(update);
|
|
@@ -5418,11 +5473,36 @@ class AdHocFiltersVariable extends SceneObjectBase {
|
|
|
5418
5473
|
this.publishEvent(new SceneVariableValueChangedEvent(this), true);
|
|
5419
5474
|
}
|
|
5420
5475
|
}
|
|
5476
|
+
restoreBaseFilter(filter) {
|
|
5477
|
+
if (filter) {
|
|
5478
|
+
const originalBaseFilter = filter.originalValue;
|
|
5479
|
+
if (originalBaseFilter == null ? void 0 : originalBaseFilter.length) {
|
|
5480
|
+
this._updateFilter(filter, {
|
|
5481
|
+
value: originalBaseFilter[0],
|
|
5482
|
+
values: originalBaseFilter,
|
|
5483
|
+
valueLabels: originalBaseFilter,
|
|
5484
|
+
originalValue: void 0
|
|
5485
|
+
});
|
|
5486
|
+
}
|
|
5487
|
+
}
|
|
5488
|
+
}
|
|
5421
5489
|
getValue() {
|
|
5422
5490
|
return this.state.filterExpression;
|
|
5423
5491
|
}
|
|
5424
5492
|
_updateFilter(filter, update) {
|
|
5425
|
-
|
|
5493
|
+
var _a;
|
|
5494
|
+
const { baseFilters, filters, _wip } = this.state;
|
|
5495
|
+
const isBaseFilter = baseFilters == null ? void 0 : baseFilters.includes(filter);
|
|
5496
|
+
if (isBaseFilter && filter.source) {
|
|
5497
|
+
if (!filter.originalValue) {
|
|
5498
|
+
update.originalValue = filter.values ? filter.values : [filter.value];
|
|
5499
|
+
}
|
|
5500
|
+
const updatedBaseFilters = (_a = baseFilters == null ? void 0 : baseFilters.map((f) => {
|
|
5501
|
+
return f === filter ? __spreadValues$z(__spreadValues$z({}, f), update) : f;
|
|
5502
|
+
})) != null ? _a : [];
|
|
5503
|
+
this.setState({ baseFilters: updatedBaseFilters });
|
|
5504
|
+
return;
|
|
5505
|
+
}
|
|
5426
5506
|
if (filter === _wip) {
|
|
5427
5507
|
if ("value" in update && update["value"] !== "") {
|
|
5428
5508
|
this.setState({ filters: [...filters, __spreadValues$z(__spreadValues$z({}, _wip), update)], _wip: void 0 });
|
|
@@ -5508,7 +5588,7 @@ class AdHocFiltersVariable extends SceneObjectBase {
|
|
|
5508
5588
|
return keys.map(toSelectableValue);
|
|
5509
5589
|
}
|
|
5510
5590
|
async _getValuesFor(filter) {
|
|
5511
|
-
var _a, _b, _c;
|
|
5591
|
+
var _a, _b, _c, _d;
|
|
5512
5592
|
const override = await ((_b = (_a = this.state).getTagValuesProvider) == null ? void 0 : _b.call(_a, this, filter));
|
|
5513
5593
|
if (override && override.replace) {
|
|
5514
5594
|
return dataFromResponse(override.values).map(toSelectableValue);
|
|
@@ -5517,7 +5597,8 @@ class AdHocFiltersVariable extends SceneObjectBase {
|
|
|
5517
5597
|
if (!ds || !ds.getTagValues) {
|
|
5518
5598
|
return [];
|
|
5519
5599
|
}
|
|
5520
|
-
const
|
|
5600
|
+
const filteredBaseFilters = (_d = (_c = this.state.baseFilters) == null ? void 0 : _c.filter((f) => f.source && f.key !== filter.key)) != null ? _d : [];
|
|
5601
|
+
const otherFilters = this.state.filters.filter((f) => f.key !== filter.key).concat(filteredBaseFilters);
|
|
5521
5602
|
const timeRange = sceneGraph.getTimeRange(this).state.value;
|
|
5522
5603
|
const queries = this.state.useQueriesAsFilterForOptions ? getQueriesForVariables(this) : void 0;
|
|
5523
5604
|
const response = await ds.getTagValues(__spreadValues$z({
|
|
@@ -5968,7 +6049,7 @@ class SceneQueryRunner extends SceneObjectBase {
|
|
|
5968
6049
|
return clone;
|
|
5969
6050
|
}
|
|
5970
6051
|
prepareRequests(timeRange, ds) {
|
|
5971
|
-
var _a;
|
|
6052
|
+
var _a, _b;
|
|
5972
6053
|
const { minInterval, queries } = this.state;
|
|
5973
6054
|
let request = __spreadValues$y({
|
|
5974
6055
|
app: "scenes",
|
|
@@ -5990,7 +6071,12 @@ class SceneQueryRunner extends SceneObjectBase {
|
|
|
5990
6071
|
queryCachingTTL: this.state.queryCachingTTL
|
|
5991
6072
|
}, getEnrichedDataRequest(this));
|
|
5992
6073
|
if (this._adhocFiltersVar) {
|
|
5993
|
-
request.filters =
|
|
6074
|
+
request.filters = [];
|
|
6075
|
+
if ((_a = this._adhocFiltersVar.state.baseFilters) == null ? void 0 : _a.length) {
|
|
6076
|
+
const injectedBaseFilters = this._adhocFiltersVar.state.baseFilters.filter((filter) => filter.source);
|
|
6077
|
+
request.filters = request.filters.concat(injectedBaseFilters);
|
|
6078
|
+
}
|
|
6079
|
+
request.filters = request.filters.concat(this._adhocFiltersVar.state.filters.filter(isFilterComplete));
|
|
5994
6080
|
}
|
|
5995
6081
|
if (this._groupByVar) {
|
|
5996
6082
|
request.groupByKeys = this._groupByVar.state.value;
|
|
@@ -6013,7 +6099,7 @@ class SceneQueryRunner extends SceneObjectBase {
|
|
|
6013
6099
|
const primaryTimeRange = timeRange.state.value;
|
|
6014
6100
|
let secondaryRequests = [];
|
|
6015
6101
|
let secondaryProcessors = /* @__PURE__ */ new Map();
|
|
6016
|
-
for (const provider of (
|
|
6102
|
+
for (const provider of (_b = this.getClosestExtraQueryProviders()) != null ? _b : []) {
|
|
6017
6103
|
for (const { req, processor } of provider.getExtraQueries(request)) {
|
|
6018
6104
|
const requestId = getNextRequestId$1();
|
|
6019
6105
|
secondaryRequests.push(__spreadProps$m(__spreadValues$y({}, req), { requestId }));
|
|
@@ -10928,10 +11014,6 @@ function getResizeHandleStyles(theme) {
|
|
|
10928
11014
|
});
|
|
10929
11015
|
}
|
|
10930
11016
|
|
|
10931
|
-
class SceneGridLayoutDragStartEvent extends data.BusEventWithPayload {
|
|
10932
|
-
}
|
|
10933
|
-
SceneGridLayoutDragStartEvent.type = "scene-grid-layout-drag-start";
|
|
10934
|
-
|
|
10935
11017
|
var __defProp$9 = Object.defineProperty;
|
|
10936
11018
|
var __defProps$6 = Object.defineProperties;
|
|
10937
11019
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
@@ -11064,13 +11146,6 @@ const _SceneGridLayout = class extends SceneObjectBase {
|
|
|
11064
11146
|
getDragClassCancel() {
|
|
11065
11147
|
return `grid-drag-cancel`;
|
|
11066
11148
|
}
|
|
11067
|
-
getDragHooks() {
|
|
11068
|
-
return {
|
|
11069
|
-
onDragStart: (evt, panel) => {
|
|
11070
|
-
this.publishEvent(new SceneGridLayoutDragStartEvent({ evt, panel }), true);
|
|
11071
|
-
}
|
|
11072
|
-
};
|
|
11073
|
-
}
|
|
11074
11149
|
toggleRow(row) {
|
|
11075
11150
|
var _a, _b;
|
|
11076
11151
|
const isCollapsed = row.state.isCollapsed;
|
|
@@ -11732,7 +11807,7 @@ class SceneRefreshPicker extends SceneObjectBase {
|
|
|
11732
11807
|
this._autoRefreshBlocked = false;
|
|
11733
11808
|
this.onRefresh = () => {
|
|
11734
11809
|
const queryController = sceneGraph.getQueryController(this);
|
|
11735
|
-
queryController == null ? void 0 : queryController.startProfile(
|
|
11810
|
+
queryController == null ? void 0 : queryController.startProfile(this);
|
|
11736
11811
|
if (queryController == null ? void 0 : queryController.state.isRunning) {
|
|
11737
11812
|
queryController.cancelAll();
|
|
11738
11813
|
return;
|
|
@@ -11789,7 +11864,7 @@ class SceneRefreshPicker extends SceneObjectBase {
|
|
|
11789
11864
|
this._intervalTimer = setInterval(() => {
|
|
11790
11865
|
if (this.isTabVisible()) {
|
|
11791
11866
|
const queryController = sceneGraph.getQueryController(this);
|
|
11792
|
-
queryController == null ? void 0 : queryController.startProfile(
|
|
11867
|
+
queryController == null ? void 0 : queryController.startProfile(this);
|
|
11793
11868
|
timeRange.onRefresh();
|
|
11794
11869
|
} else {
|
|
11795
11870
|
this._autoRefreshBlocked = true;
|
|
@@ -14197,9 +14272,9 @@ exports.EmbeddedScene = EmbeddedScene;
|
|
|
14197
14272
|
exports.FieldConfigBuilder = FieldConfigBuilder;
|
|
14198
14273
|
exports.FieldConfigBuilders = FieldConfigBuilders;
|
|
14199
14274
|
exports.FieldConfigOverridesBuilder = FieldConfigOverridesBuilder;
|
|
14275
|
+
exports.FilterSource = FilterSource;
|
|
14200
14276
|
exports.GroupByVariable = GroupByVariable;
|
|
14201
14277
|
exports.IntervalVariable = IntervalVariable;
|
|
14202
|
-
exports.LazyLoader = LazyLoader;
|
|
14203
14278
|
exports.LocalValueVariable = LocalValueVariable;
|
|
14204
14279
|
exports.MultiValueVariable = MultiValueVariable;
|
|
14205
14280
|
exports.NestedScene = NestedScene;
|
|
@@ -14228,7 +14303,6 @@ exports.SceneFlexItem = SceneFlexItem;
|
|
|
14228
14303
|
exports.SceneFlexLayout = SceneFlexLayout;
|
|
14229
14304
|
exports.SceneGridItem = SceneGridItem;
|
|
14230
14305
|
exports.SceneGridLayout = SceneGridLayout;
|
|
14231
|
-
exports.SceneGridLayoutDragStartEvent = SceneGridLayoutDragStartEvent;
|
|
14232
14306
|
exports.SceneGridRow = SceneGridRow;
|
|
14233
14307
|
exports.SceneObjectBase = SceneObjectBase;
|
|
14234
14308
|
exports.SceneObjectRef = SceneObjectRef;
|