@grafana/scenes 6.32.1--canary.1231.17376394106.0 → 6.32.1--canary.1233.17382026725.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/dist/esm/core/sceneGraph/index.js +1 -2
- package/dist/esm/core/sceneGraph/index.js.map +1 -1
- package/dist/esm/core/sceneGraph/sceneGraph.js +2 -12
- package/dist/esm/core/sceneGraph/sceneGraph.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersVariable.js +2 -2
- package/dist/esm/variables/adhoc/AdHocFiltersVariable.js.map +1 -1
- package/dist/esm/variables/groupby/GroupByVariable.js +3 -4
- package/dist/esm/variables/groupby/GroupByVariable.js.map +1 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +6 -18
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3579,13 +3579,13 @@ class GroupByVariable extends MultiValueVariable {
|
|
|
3579
3579
|
const ds = await getDataSource(this.state.datasource, {
|
|
3580
3580
|
__sceneObject: wrapInSafeSerializableSceneObject(this)
|
|
3581
3581
|
});
|
|
3582
|
-
if (!ds.
|
|
3582
|
+
if (!ds.getDrilldownsApplicability) {
|
|
3583
3583
|
return;
|
|
3584
3584
|
}
|
|
3585
3585
|
const queries = getQueriesForVariables(this);
|
|
3586
3586
|
const timeRange = sceneGraph.getTimeRange(this).state.value;
|
|
3587
3587
|
const value = this.state.value;
|
|
3588
|
-
const response = await ds.
|
|
3588
|
+
const response = await ds.getDrilldownsApplicability({
|
|
3589
3589
|
groupByKeys: Array.isArray(value) ? value.map((v) => String(v)) : value ? [String(value)] : [],
|
|
3590
3590
|
queries,
|
|
3591
3591
|
timeRange,
|
|
@@ -3722,12 +3722,11 @@ function GroupByVariableRenderer({ model }) {
|
|
|
3722
3722
|
if (restorable !== model.state.restorable) {
|
|
3723
3723
|
model.setState({ restorable });
|
|
3724
3724
|
}
|
|
3725
|
+
model._verifyApplicability();
|
|
3725
3726
|
},
|
|
3726
3727
|
onChange: (newValue, action) => {
|
|
3727
3728
|
if (action.action === "clear" && noValueOnClear) {
|
|
3728
3729
|
model.changeValueTo([], void 0, true);
|
|
3729
|
-
} else {
|
|
3730
|
-
model._verifyApplicability();
|
|
3731
3730
|
}
|
|
3732
3731
|
setUncommittedValue(newValue);
|
|
3733
3732
|
},
|
|
@@ -6159,7 +6158,7 @@ class AdHocFiltersVariable extends SceneObjectBase {
|
|
|
6159
6158
|
var _a, _b, _c;
|
|
6160
6159
|
const filters = [...this.state.filters, ...(_a = this.state.originFilters) != null ? _a : []];
|
|
6161
6160
|
const ds = await this._dataSourceSrv.get(this.state.datasource, this._scopedVars);
|
|
6162
|
-
if (!ds || !ds.
|
|
6161
|
+
if (!ds || !ds.getDrilldownsApplicability) {
|
|
6163
6162
|
return;
|
|
6164
6163
|
}
|
|
6165
6164
|
if (!filters) {
|
|
@@ -6167,7 +6166,7 @@ class AdHocFiltersVariable extends SceneObjectBase {
|
|
|
6167
6166
|
}
|
|
6168
6167
|
const timeRange = sceneGraph.getTimeRange(this).state.value;
|
|
6169
6168
|
const queries = this.state.useQueriesAsFilterForOptions ? getQueriesForVariables(this) : void 0;
|
|
6170
|
-
const response = await ds.
|
|
6169
|
+
const response = await ds.getDrilldownsApplicability({
|
|
6171
6170
|
filters,
|
|
6172
6171
|
queries,
|
|
6173
6172
|
timeRange,
|
|
@@ -7788,17 +7787,7 @@ class ScopesVariableFormatter {
|
|
|
7788
7787
|
|
|
7789
7788
|
function getVariables(sceneObject) {
|
|
7790
7789
|
var _a;
|
|
7791
|
-
|
|
7792
|
-
return filterVariables(variables, (v) => v.state.showInControlsMenu !== true);
|
|
7793
|
-
}
|
|
7794
|
-
function getDashboardControls(sceneObject) {
|
|
7795
|
-
var _a;
|
|
7796
|
-
const variables = (_a = getClosest(sceneObject, (s) => s.state.$variables)) != null ? _a : EmptyVariableSet;
|
|
7797
|
-
return filterVariables(variables, (v) => v.state.showInControlsMenu === true);
|
|
7798
|
-
}
|
|
7799
|
-
function filterVariables(sceneObject, filter) {
|
|
7800
|
-
sceneObject.setState({ variables: sceneObject.state.variables.filter(filter) });
|
|
7801
|
-
return sceneObject;
|
|
7790
|
+
return (_a = getClosest(sceneObject, (s) => s.state.$variables)) != null ? _a : EmptyVariableSet;
|
|
7802
7791
|
}
|
|
7803
7792
|
function getData(sceneObject) {
|
|
7804
7793
|
var _a;
|
|
@@ -7951,7 +7940,6 @@ function getScopes(sceneObject) {
|
|
|
7951
7940
|
|
|
7952
7941
|
const sceneGraph = {
|
|
7953
7942
|
getVariables,
|
|
7954
|
-
getDashboardControls,
|
|
7955
7943
|
getData,
|
|
7956
7944
|
getTimeRange,
|
|
7957
7945
|
getLayout,
|