mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
stackdriver: add query keyword style to query fields
This commit is contained in:
parent
164e9a4f9a
commit
19d1d7f35a
@ -11,7 +11,7 @@ const SimpleSelect: SFC<Props> = props => {
|
||||
const { label, onValueChange, value, options } = props;
|
||||
return (
|
||||
<div className="gf-form max-width-21">
|
||||
<span className="gf-form-label width-10">{label}</span>
|
||||
<span className="gf-form-label width-10 query-keyword">{label}</span>
|
||||
<div className="gf-form-select-wrapper max-width-12">
|
||||
<select className="gf-form-input" required onChange={onValueChange} value={value}>
|
||||
{options.map(({ value, name }, i) => (
|
||||
|
@ -127,7 +127,7 @@ export class StackdriverVariableQueryEditor extends PureComponent<VariableQueryP
|
||||
value={this.state.selectedService}
|
||||
options={this.insertTemplateVariables(this.state.services)}
|
||||
onValueChange={e => this.onServiceChange(e)}
|
||||
label="Services"
|
||||
label="Service"
|
||||
/>
|
||||
);
|
||||
case MetricFindQueryTypes.LabelKeys:
|
||||
@ -139,20 +139,20 @@ export class StackdriverVariableQueryEditor extends PureComponent<VariableQueryP
|
||||
value={this.state.selectedService}
|
||||
options={this.insertTemplateVariables(this.state.services)}
|
||||
onValueChange={e => this.onServiceChange(e)}
|
||||
label="Services"
|
||||
label="Service"
|
||||
/>
|
||||
<SimpleSelect
|
||||
value={this.state.selectedMetricType}
|
||||
options={this.insertTemplateVariables(this.state.metricTypes)}
|
||||
onValueChange={e => this.onMetricTypeChange(e)}
|
||||
label="Metric Types"
|
||||
label="Metric Type"
|
||||
/>
|
||||
{queryType === MetricFindQueryTypes.LabelValues && (
|
||||
<SimpleSelect
|
||||
value={this.state.labelKey}
|
||||
options={this.insertTemplateVariables(this.state.labels.map(l => ({ value: l, name: l })))}
|
||||
onValueChange={e => this.onLabelKeyChange(e)}
|
||||
label="Label Keys"
|
||||
label="Label Key"
|
||||
/>
|
||||
)}
|
||||
</React.Fragment>
|
||||
@ -165,13 +165,13 @@ export class StackdriverVariableQueryEditor extends PureComponent<VariableQueryP
|
||||
value={this.state.selectedService}
|
||||
options={this.insertTemplateVariables(this.state.services)}
|
||||
onValueChange={e => this.onServiceChange(e)}
|
||||
label="Services"
|
||||
label="Service"
|
||||
/>
|
||||
<SimpleSelect
|
||||
value={this.state.selectedMetricType}
|
||||
options={this.insertTemplateVariables(this.state.metricTypes)}
|
||||
onValueChange={e => this.onMetricTypeChange(e)}
|
||||
label="Metric Types"
|
||||
label="Metric Type"
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
@ -187,7 +187,7 @@ export class StackdriverVariableQueryEditor extends PureComponent<VariableQueryP
|
||||
value={this.state.selectedQueryType}
|
||||
options={this.queryTypes}
|
||||
onValueChange={e => this.handleQueryTypeChange(e)}
|
||||
label="Query Types"
|
||||
label="Query Type"
|
||||
/>
|
||||
{this.renderQueryTypeSwitch(this.state.selectedQueryType)}
|
||||
</React.Fragment>
|
||||
|
Loading…
Reference in New Issue
Block a user