mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Google Cloud Monitoring: Fix project variable (#66524)
Google Cloud Monitoring: fix project variable Also fix typo found while debugging
This commit is contained in:
parent
a6a7cebbe5
commit
02951e8a26
@ -645,7 +645,7 @@ func (s *Service) getDSInfo(pluginCtx backend.PluginContext) (*datasourceInfo, e
|
||||
|
||||
instance, ok := i.(*datasourceInfo)
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("failed to cast datsource info")
|
||||
return nil, fmt.Errorf("failed to cast datasource info")
|
||||
}
|
||||
|
||||
return instance, nil
|
||||
|
@ -62,7 +62,7 @@ export class CloudMonitoringVariableQueryEditor extends PureComponent<Props, Var
|
||||
|
||||
async componentDidMount() {
|
||||
await this.props.datasource.ensureGCEDefaultProject();
|
||||
const projectName = this.props.datasource.getDefaultProject();
|
||||
const projectName = this.props.query.projectName || this.props.datasource.getDefaultProject();
|
||||
const projects = (await this.props.datasource.getProjects()) as MetricDescriptor[];
|
||||
const metricDescriptors = await this.props.datasource.getMetricTypes(
|
||||
this.props.query.projectName || this.props.datasource.getDefaultProject()
|
||||
|
Loading…
Reference in New Issue
Block a user