@grafana/scenes 6.47.1--canary.1303.19493819306.0 → 6.47.1--canary.1303.19499670138.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/index.js +2 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/variables/utils.js +1 -47
- package/dist/esm/variables/utils.js.map +1 -1
- package/dist/index.d.ts +184 -188
- package/dist/index.js +1 -48
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9071,50 +9071,6 @@ function getNonApplicablePillStyles(theme) {
|
|
|
9071
9071
|
})
|
|
9072
9072
|
};
|
|
9073
9073
|
}
|
|
9074
|
-
function verifyDrilldownApplicability(sourceObject, queriesDataSource, drilldownDatasource, isApplicabilityEnabled) {
|
|
9075
|
-
const datasourceUid = sceneGraph.interpolate(sourceObject, queriesDataSource == null ? void 0 : queriesDataSource.uid);
|
|
9076
|
-
return Boolean(
|
|
9077
|
-
isApplicabilityEnabled && datasourceUid === sceneGraph.interpolate(sourceObject, drilldownDatasource == null ? void 0 : drilldownDatasource.uid)
|
|
9078
|
-
);
|
|
9079
|
-
}
|
|
9080
|
-
async function getDrilldownApplicability(queryRunner, filtersVar, groupByVar) {
|
|
9081
|
-
var _a, _b, _c, _d, _e, _f;
|
|
9082
|
-
if (!filtersVar && !groupByVar) {
|
|
9083
|
-
return;
|
|
9084
|
-
}
|
|
9085
|
-
const datasource = queryRunner.state.datasource;
|
|
9086
|
-
const queries = (_b = (_a = queryRunner.state.data) == null ? void 0 : _a.request) == null ? void 0 : _b.targets;
|
|
9087
|
-
const ds = await getDataSource(datasource, {
|
|
9088
|
-
__sceneObject: wrapInSafeSerializableSceneObject(queryRunner)
|
|
9089
|
-
});
|
|
9090
|
-
if (!ds.getDrilldownsApplicability) {
|
|
9091
|
-
return;
|
|
9092
|
-
}
|
|
9093
|
-
const dsUid = sceneGraph.interpolate(queryRunner, datasource == null ? void 0 : datasource.uid);
|
|
9094
|
-
const timeRange = sceneGraph.getTimeRange(queryRunner).state.value;
|
|
9095
|
-
const groupByKeys = [];
|
|
9096
|
-
const filters = [];
|
|
9097
|
-
const hasGroupByApplicability = groupByVar && dsUid === sceneGraph.interpolate(groupByVar, (_c = groupByVar == null ? void 0 : groupByVar.state.datasource) == null ? void 0 : _c.uid);
|
|
9098
|
-
const hasFiltersApplicability = filtersVar && dsUid === sceneGraph.interpolate(filtersVar, (_e = (_d = filtersVar.state) == null ? void 0 : _d.datasource) == null ? void 0 : _e.uid);
|
|
9099
|
-
if (!hasGroupByApplicability && !hasFiltersApplicability) {
|
|
9100
|
-
return;
|
|
9101
|
-
}
|
|
9102
|
-
if (hasGroupByApplicability) {
|
|
9103
|
-
groupByKeys.push(
|
|
9104
|
-
...Array.isArray(groupByVar.state.value) ? groupByVar.state.value.map((v) => String(v)) : groupByVar.state.value ? [String(groupByVar.state.value)] : []
|
|
9105
|
-
);
|
|
9106
|
-
}
|
|
9107
|
-
if (hasFiltersApplicability) {
|
|
9108
|
-
filters.push(...filtersVar.state.filters, ...(_f = filtersVar.state.originFilters) != null ? _f : []);
|
|
9109
|
-
}
|
|
9110
|
-
return await ds.getDrilldownsApplicability({
|
|
9111
|
-
groupByKeys,
|
|
9112
|
-
filters,
|
|
9113
|
-
queries,
|
|
9114
|
-
timeRange,
|
|
9115
|
-
scopes: sceneGraph.getScopes(queryRunner)
|
|
9116
|
-
});
|
|
9117
|
-
}
|
|
9118
9074
|
|
|
9119
9075
|
class ConstantVariable extends SceneObjectBase {
|
|
9120
9076
|
constructor(initialState) {
|
|
@@ -16178,10 +16134,7 @@ const sceneUtils = {
|
|
|
16178
16134
|
isGroupByVariable,
|
|
16179
16135
|
isSwitchVariable,
|
|
16180
16136
|
isRepeatCloneOrChildOf,
|
|
16181
|
-
buildPathIdFor
|
|
16182
|
-
//drilldowns
|
|
16183
|
-
verifyDrilldownApplicability,
|
|
16184
|
-
getDrilldownApplicability
|
|
16137
|
+
buildPathIdFor
|
|
16185
16138
|
};
|
|
16186
16139
|
|
|
16187
16140
|
exports.AdHocFiltersComboboxRenderer = AdHocFiltersComboboxRenderer;
|