Build Grafana dashboards directly in your Grafana app plugins.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by grafanabot 8 months ago
Published by grafanabot 8 months ago
@grafana/scenes
@grafana/scenes
Published by grafanabot 8 months ago
@grafana/scenes
Published by grafanabot 8 months ago
@grafana/scenes
Published by grafanabot 8 months ago
*
to extract dependencies from every state path (#599)Possible breaking change: VariableDependencyConfig
default behavior
VariableDependencyConfig
without options scanned the entire state.*
) to scan the whole state. This prevents unintended dependency resolution.Impact: If you intentionally scanned the entire state, use statePaths: ['*']
. Otherwise, specify desired statePaths
or variableNames
.
Example:
class TestObj extends SceneObjectBase<TestState> {
public constructor() {
super({
query: 'query with ${queryVarA} ${queryVarB}',
otherProp: 'string with ${otherPropA}',
nested: {
query: 'nested object with ${nestedVarA}',
},
});
}
}
it('Should be able to extract dependencies from all state', () => {
const sceneObj = new TestObj();
- const deps = new VariableDependencyConfig(sceneObj, {});
+ const deps = new VariableDependencyConfig(sceneObj, { statePaths: ['*'] });
expect(deps.getNames()).toEqual(new Set(['queryVarA', 'queryVarB', 'nestedVarA', 'otherPropA']));
});
This mproves performance and avoids unexpected dependency resolution.
@grafana/scenes
*
to extract dependencies from every state path #599 (@ivanortegaalba)@grafana/scenes
Published by grafanabot 8 months ago
All variables that extend from MultValueVariable (Query, DataSource, Custom) now clear the current value if no options / values are returned by query, clears to empty string or array depending on multi or not.
Published by grafanabot 8 months ago
@grafana/scenes
variableNames
is defined #598 (@ivanortegaalba)Published by grafanabot 8 months ago
@grafana/scenes
Published by grafanabot 8 months ago
AdHocFilterSet is now removed from the library. AdHocFiltersVariable can now be used in both modes (auto and manual).
To migrate replace AdHocFilterSet with AdHocFiltersVariable , the applyMode
defaults to auto
which is the new renamed value that was previously same-datasource
. Instead of adding this directly to a controls array add it to the variables array of a SceneVariableSet. It will then be rendered along with other variables via the VariableValueSelectors controls component. If you want to render ad hoc filters separately you can set hide: VariableHide.hideVariable
so that the filters are not rendered by VariableValueSelectors and use the new component VariableValueControl that can render a specific variable.
AdHocFiltersVariable.create
is also removed as this separate factory function is no longer needed. If you where using AdHocFiltersVariable.create
then switch to the normal constructor but be sure to pass in applyMode: 'manual'
when you create it to preserve the same behavior as before.
@grafana/scenes
Published by grafanabot 9 months ago