Commit 19d1d7f3 by Erik Sundell

stackdriver: add query keyword style to query fields

parent 164e9a4f
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment