in src/components/QueryEditor.tsx [84:103]
componentDidMount() {
this.props.datasource.getGroupByViewOptions().then((options) => {
this.setState({
...this.state,
groupByViewOptions: options.map(toOption),
});
});
if (this.props.query.selectedStream != null) {
this.restoreView();
}
this.props.datasource.variables$.subscribe((variable) => {
if (usedInQuery(variable.name, this.props.query)) {
this.restoreView();
}
});
this.loadStreams('', []);
}