in src/VariableQueryEditor.tsx [49:65]
async componentDidMount() {
await this.props.datasource.ensureGCEDefaultProject();
const projectId = this.props.query.projectId || (await this.props.datasource.getDefaultProject());
const projects = (await this.props.datasource.getProjects());
let buckets: string[] = [];
if (!projectId.startsWith('$')) {
buckets = await this.props.datasource.getLogBuckets(projectId);
}
const state: any = {
projects,
buckets,
loading: false,
projectId,
};
this.setState(state, () => this.onPropsChange());
}