@grafana/scenes 5.14.6 → 5.14.8--canary.858.10850008598.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -6
- package/dist/esm/behaviors/SceneQueryController.js +60 -5
- package/dist/esm/behaviors/SceneQueryController.js.map +1 -1
- package/dist/esm/behaviors/SceneRenderProfiler.js +169 -0
- package/dist/esm/behaviors/SceneRenderProfiler.js.map +1 -0
- package/dist/esm/components/SceneRefreshPicker.js +4 -1
- package/dist/esm/components/SceneRefreshPicker.js.map +1 -1
- package/dist/esm/components/VizPanel/VizPanel.js +9 -6
- package/dist/esm/components/VizPanel/VizPanel.js.map +1 -1
- package/dist/esm/core/SceneTimeRange.js +3 -0
- package/dist/esm/core/SceneTimeRange.js.map +1 -1
- package/dist/esm/core/sceneGraph/getQueryController.js +19 -0
- package/dist/esm/core/sceneGraph/getQueryController.js.map +1 -0
- package/dist/esm/core/sceneGraph/index.js +3 -3
- package/dist/esm/core/sceneGraph/index.js.map +1 -1
- package/dist/esm/core/sceneGraph/sceneGraph.js +1 -26
- package/dist/esm/core/sceneGraph/sceneGraph.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/querying/SceneQueryRunner.js +1 -3
- package/dist/esm/querying/SceneQueryRunner.js.map +1 -1
- package/dist/esm/querying/registerQueryWithController.js +19 -2
- package/dist/esm/querying/registerQueryWithController.js.map +1 -1
- package/dist/esm/utils/getDataSource.js +17 -1
- package/dist/esm/utils/getDataSource.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js +12 -8
- package/dist/esm/variables/adhoc/AdHocFilterRenderer.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersVariable.js +11 -7
- package/dist/esm/variables/adhoc/AdHocFiltersVariable.js.map +1 -1
- package/dist/esm/variables/adhoc/AdHocFiltersVariableUrlSyncHandler.js +1 -4
- package/dist/esm/variables/adhoc/AdHocFiltersVariableUrlSyncHandler.js.map +1 -1
- package/dist/esm/variables/components/VariableValueSelect.js +5 -0
- package/dist/esm/variables/components/VariableValueSelect.js.map +1 -1
- package/dist/esm/variables/utils.js.map +1 -1
- package/dist/esm/variables/variants/MultiValueVariable.js.map +1 -1
- package/dist/esm/variables/variants/TestVariable.js.map +1 -1
- package/dist/index.d.ts +44 -32
- package/dist/index.js +490 -237
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -945,20 +945,6 @@ declare class UserActionEvent extends BusEventWithPayload<UserActionEventPayload
|
|
945
945
|
*/
|
946
946
|
declare function lookupVariable(name: string, sceneObject: SceneObject): SceneVariable | null;
|
947
947
|
|
948
|
-
/**
|
949
|
-
* Will walk up the scene object graph to the closest $timeRange scene object
|
950
|
-
*/
|
951
|
-
declare function getTimeRange(sceneObject: SceneObject): SceneTimeRangeLike;
|
952
|
-
|
953
|
-
interface SceneQueryStateControllerState extends SceneObjectState {
|
954
|
-
isRunning: boolean;
|
955
|
-
}
|
956
|
-
interface SceneQueryControllerLike extends SceneObject<SceneQueryStateControllerState> {
|
957
|
-
isQueryController: true;
|
958
|
-
cancelAll(): void;
|
959
|
-
queryStarted(entry: SceneQueryControllerEntry): void;
|
960
|
-
queryCompleted(entry: SceneQueryControllerEntry): void;
|
961
|
-
}
|
962
948
|
interface QueryResultWithState {
|
963
949
|
state: LoadingState;
|
964
950
|
}
|
@@ -968,17 +954,40 @@ interface SceneQueryControllerEntry {
|
|
968
954
|
origin: SceneObject;
|
969
955
|
cancel?: () => void;
|
970
956
|
}
|
971
|
-
type SceneQueryControllerEntryType = 'data' | 'annotations' | 'variable' | 'alerts';
|
972
|
-
|
973
|
-
|
957
|
+
type SceneQueryControllerEntryType = 'data' | 'annotations' | 'variable' | 'alerts' | 'plugin';
|
958
|
+
interface SceneInteractionProfileEvent {
|
959
|
+
origin: string;
|
960
|
+
duration: number;
|
961
|
+
networkDuration: number;
|
962
|
+
jsHeapSizeLimit: number;
|
963
|
+
usedJSHeapSize: number;
|
964
|
+
totalJSHeapSize: number;
|
965
|
+
crumbs: string[];
|
966
|
+
}
|
967
|
+
interface SceneQueryStateControllerState extends SceneObjectState {
|
968
|
+
isRunning: boolean;
|
969
|
+
enableProfiling?: boolean;
|
970
|
+
onProfileComplete?(event: SceneInteractionProfileEvent): void;
|
971
|
+
}
|
972
|
+
interface SceneQueryControllerLike extends SceneObject<SceneQueryStateControllerState> {
|
974
973
|
isQueryController: true;
|
975
|
-
|
974
|
+
cancelAll(): void;
|
976
975
|
queryStarted(entry: SceneQueryControllerEntry): void;
|
977
976
|
queryCompleted(entry: SceneQueryControllerEntry): void;
|
978
|
-
|
979
|
-
|
977
|
+
startProfile(source: SceneObject): void;
|
978
|
+
runningQueriesCount(): number;
|
980
979
|
}
|
981
980
|
|
981
|
+
/**
|
982
|
+
* Returns the closest query controller undefined if none found
|
983
|
+
*/
|
984
|
+
declare function getQueryController(sceneObject: SceneObject): SceneQueryControllerLike | undefined;
|
985
|
+
|
986
|
+
/**
|
987
|
+
* Will walk up the scene object graph to the closest $timeRange scene object
|
988
|
+
*/
|
989
|
+
declare function getTimeRange(sceneObject: SceneObject): SceneTimeRangeLike;
|
990
|
+
|
982
991
|
interface UrlSyncManagerLike {
|
983
992
|
initSync(root: SceneObject): void;
|
984
993
|
cleanUp(root: SceneObject): void;
|
@@ -1080,15 +1089,6 @@ declare function getAncestor<ParentType>(sceneObject: SceneObject, ancestorType:
|
|
1080
1089
|
* This will search down the full scene graph, looking for objects that match the provided descendentType type.
|
1081
1090
|
*/
|
1082
1091
|
declare function findDescendents<T extends SceneObject>(scene: SceneObject, descendentType: SceneType<T>): T[];
|
1083
|
-
/**
|
1084
|
-
* Returns the closest query controller undefined if none found
|
1085
|
-
*/
|
1086
|
-
declare function getQueryController(sceneObject: SceneObject): SceneQueryControllerLike | undefined;
|
1087
|
-
/**
|
1088
|
-
* Returns the closest SceneObject that has a state property with the
|
1089
|
-
* name urlSyncManager that is of type UrlSyncManager
|
1090
|
-
*/
|
1091
|
-
declare function getUrlSyncManager(sceneObject: SceneObject): UrlSyncManagerLike | undefined;
|
1092
1092
|
|
1093
1093
|
declare const sceneGraph: {
|
1094
1094
|
getVariables: typeof getVariables;
|
@@ -1104,9 +1104,8 @@ declare const sceneGraph: {
|
|
1104
1104
|
findObject: typeof findObject;
|
1105
1105
|
findAllObjects: typeof findAllObjects;
|
1106
1106
|
getAncestor: typeof getAncestor;
|
1107
|
-
findDescendents: typeof findDescendents;
|
1108
1107
|
getQueryController: typeof getQueryController;
|
1109
|
-
|
1108
|
+
findDescendents: typeof findDescendents;
|
1110
1109
|
};
|
1111
1110
|
|
1112
1111
|
interface ActWhenVariableChangedState extends SceneObjectState {
|
@@ -1152,6 +1151,19 @@ declare class PanelContextEventBus implements EventBus {
|
|
1152
1151
|
newScopedBus(key: string, filter: EventFilterOptions): EventBus;
|
1153
1152
|
}
|
1154
1153
|
|
1154
|
+
declare class SceneQueryController extends SceneObjectBase<SceneQueryStateControllerState> implements SceneQueryControllerLike {
|
1155
|
+
#private;
|
1156
|
+
isQueryController: true;
|
1157
|
+
private profiler;
|
1158
|
+
constructor(state?: Partial<SceneQueryStateControllerState>);
|
1159
|
+
runningQueriesCount: () => number;
|
1160
|
+
startProfile(source: SceneObject): void;
|
1161
|
+
queryStarted(entry: SceneQueryControllerEntry): void;
|
1162
|
+
queryCompleted(entry: SceneQueryControllerEntry): void;
|
1163
|
+
private changeRunningQueryCount;
|
1164
|
+
cancelAll(): void;
|
1165
|
+
}
|
1166
|
+
|
1155
1167
|
interface LiveNowTimerState extends SceneObjectState {
|
1156
1168
|
enabled: boolean;
|
1157
1169
|
}
|
@@ -2756,4 +2768,4 @@ declare const sceneUtils: {
|
|
2756
2768
|
isGroupByVariable: typeof isGroupByVariable;
|
2757
2769
|
};
|
2758
2770
|
|
2759
|
-
export { AdHocFiltersVariable, CancelActivationHandler, ConstantVariable, ControlsLayout, CustomFormatterVariable, CustomTransformOperator, CustomTransformerDefinition, CustomVariable, CustomVariableValue, DataLayerFilter, DataRequestEnricher, DataSourceVariable, DeepPartial, EmbeddedScene, EmbeddedSceneState, ExtraQueryDataProcessor, ExtraQueryDescriptor, ExtraQueryProvider, FieldConfigBuilder, FieldConfigBuilders, FieldConfigOverridesBuilder, FiltersRequestEnricher, FormatVariable, GroupByVariable, InterpolationFormatParameter, IntervalVariable, LocalValueVariable, MacroVariableConstructor, MultiValueVariable, MultiValueVariableState, NestedScene, NewSceneObjectAddedEvent, PanelBuilders, PanelOptionsBuilders, QueryRunnerState, QueryVariable, RuntimeDataSource, SafeSerializableSceneObject, SceneActivationHandler, SceneApp, SceneAppDrilldownView, SceneAppPage, SceneAppPageLike, SceneAppPageState, SceneAppRoute, SceneByFrameRepeater, SceneByVariableRepeater, SceneCSSGridItem, SceneCSSGridLayout, SceneCanvasText, SceneComponent, SceneComponentProps, SceneControlsSpacer, SceneDataLayerBase, SceneDataLayerControls, SceneDataLayerProvider, SceneDataLayerProviderState, SceneDataLayerSet, SceneDataLayerSetBase, SceneDataNode, SceneDataProvider, SceneDataProviderResult, SceneDataQuery, SceneDataState, SceneDataTransformer, SceneDataTransformerState, SceneDeactivationHandler, SceneDebugger, SceneFlexItem, SceneFlexItemLike, SceneFlexItemState, SceneFlexLayout, SceneGridItem, SceneGridItemLike, SceneGridItemStateLike, SceneGridLayout, SceneGridRow, SceneLayout, SceneLayoutChildOptions, SceneLayoutState, SceneObject, SceneObjectBase, SceneObjectRef, SceneObjectState, SceneObjectStateChangedEvent, SceneObjectStateChangedPayload, SceneObjectUrlSyncConfig, SceneObjectUrlSyncHandler, SceneObjectUrlValue, SceneObjectUrlValues, SceneObjectWithUrlSync, SceneQueryControllerEntry, SceneQueryControllerEntryType, SceneQueryControllerLike, SceneQueryRunner, SceneReactObject, SceneRefreshPicker, SceneRefreshPickerState, SceneRouteMatch, SceneStateChangedHandler, SceneStatelessBehavior, SceneTimePicker, SceneTimeRange, SceneTimeRangeCompare, SceneTimeRangeLike, SceneTimeRangeState, SceneTimeRangeTransformerBase, SceneTimeZoneOverride, SceneToolbarButton, SceneToolbarInput, SceneUrlSyncOptions, SceneVariable, SceneVariableDependencyConfigLike, SceneVariableSet, SceneVariableSetState, SceneVariableState, SceneVariableValueChangedEvent, SceneVariables, SplitLayout, TestVariable, TextBoxVariable, UrlSyncContextProvider, UrlSyncManager, UrlSyncManagerLike, UseStateHookOptions, UserActionEvent, ValidateAndUpdateResult, VariableCustomFormatterFn, VariableDependencyConfig, VariableGetOptionsArgs, VariableValue, VariableValueControl, VariableValueOption, VariableValueSelectWrapper, VariableValueSelectors, VariableValueSingle, VizConfig, VizConfigBuilder, VizConfigBuilders, VizPanel, VizPanelBuilder, VizPanelMenu, VizPanelState, index$1 as behaviors, index as dataLayers, formatRegistry, isCustomVariableValue, isDataLayer, isDataRequestEnricher, isFiltersRequestEnricher, isSceneObject, registerQueryWithController, registerRuntimeDataSource, renderSelectForVariable, sceneGraph, sceneUtils, useSceneApp, useSceneObjectState, useUrlSync };
|
2771
|
+
export { AdHocFiltersVariable, CancelActivationHandler, ConstantVariable, ControlsLayout, CustomFormatterVariable, CustomTransformOperator, CustomTransformerDefinition, CustomVariable, CustomVariableValue, DataLayerFilter, DataRequestEnricher, DataSourceVariable, DeepPartial, EmbeddedScene, EmbeddedSceneState, ExtraQueryDataProcessor, ExtraQueryDescriptor, ExtraQueryProvider, FieldConfigBuilder, FieldConfigBuilders, FieldConfigOverridesBuilder, FiltersRequestEnricher, FormatVariable, GroupByVariable, InterpolationFormatParameter, IntervalVariable, LocalValueVariable, MacroVariableConstructor, MultiValueVariable, MultiValueVariableState, NestedScene, NewSceneObjectAddedEvent, PanelBuilders, PanelOptionsBuilders, QueryRunnerState, QueryVariable, RuntimeDataSource, SafeSerializableSceneObject, SceneActivationHandler, SceneApp, SceneAppDrilldownView, SceneAppPage, SceneAppPageLike, SceneAppPageState, SceneAppRoute, SceneByFrameRepeater, SceneByVariableRepeater, SceneCSSGridItem, SceneCSSGridLayout, SceneCanvasText, SceneComponent, SceneComponentProps, SceneControlsSpacer, SceneDataLayerBase, SceneDataLayerControls, SceneDataLayerProvider, SceneDataLayerProviderState, SceneDataLayerSet, SceneDataLayerSetBase, SceneDataNode, SceneDataProvider, SceneDataProviderResult, SceneDataQuery, SceneDataState, SceneDataTransformer, SceneDataTransformerState, SceneDeactivationHandler, SceneDebugger, SceneFlexItem, SceneFlexItemLike, SceneFlexItemState, SceneFlexLayout, SceneGridItem, SceneGridItemLike, SceneGridItemStateLike, SceneGridLayout, SceneGridRow, SceneInteractionProfileEvent, SceneLayout, SceneLayoutChildOptions, SceneLayoutState, SceneObject, SceneObjectBase, SceneObjectRef, SceneObjectState, SceneObjectStateChangedEvent, SceneObjectStateChangedPayload, SceneObjectUrlSyncConfig, SceneObjectUrlSyncHandler, SceneObjectUrlValue, SceneObjectUrlValues, SceneObjectWithUrlSync, SceneQueryControllerEntry, SceneQueryControllerEntryType, SceneQueryControllerLike, SceneQueryRunner, SceneReactObject, SceneRefreshPicker, SceneRefreshPickerState, SceneRouteMatch, SceneStateChangedHandler, SceneStatelessBehavior, SceneTimePicker, SceneTimeRange, SceneTimeRangeCompare, SceneTimeRangeLike, SceneTimeRangeState, SceneTimeRangeTransformerBase, SceneTimeZoneOverride, SceneToolbarButton, SceneToolbarInput, SceneUrlSyncOptions, SceneVariable, SceneVariableDependencyConfigLike, SceneVariableSet, SceneVariableSetState, SceneVariableState, SceneVariableValueChangedEvent, SceneVariables, SplitLayout, TestVariable, TextBoxVariable, UrlSyncContextProvider, UrlSyncManager, UrlSyncManagerLike, UseStateHookOptions, UserActionEvent, ValidateAndUpdateResult, VariableCustomFormatterFn, VariableDependencyConfig, VariableGetOptionsArgs, VariableValue, VariableValueControl, VariableValueOption, VariableValueSelectWrapper, VariableValueSelectors, VariableValueSingle, VizConfig, VizConfigBuilder, VizConfigBuilders, VizPanel, VizPanelBuilder, VizPanelMenu, VizPanelState, index$1 as behaviors, index as dataLayers, formatRegistry, isCustomVariableValue, isDataLayer, isDataRequestEnricher, isFiltersRequestEnricher, isSceneObject, registerQueryWithController, registerRuntimeDataSource, renderSelectForVariable, sceneGraph, sceneUtils, useSceneApp, useSceneObjectState, useUrlSync };
|