The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/plugins/datasource/stackdriver/templateQueryCtrl.tsx

36 lines
925 B

import React, { PureComponent } from 'react';
import StackdriverDatasource from './datasource';
interface Props {
datasource: StackdriverDatasource;
query: string;
onChange: (c: string) => void;
}
export class StackdriverTemplateQueryCtrl extends PureComponent<Props, any> {
constructor(props) {
super(props);
}
async componentDidMount() {
const metricDescriptors = await this.props.datasource.getMetricTypes(this.props.datasource.projectName);
console.log(metricDescriptors);
}
render() {
return (
<div className="gf-form">
<span className="gf-form-label width-7">Query</span>
<input
type="text"
className="gf-form-input"
// value={this.state.value}
// onChange={this.handleChange}
// onBlur={this.handleBlur}
placeholder="metric name or tags query"
required
/>
</div>
);
}
}