|
@@ -235,26 +235,28 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
|
|
|
const chooserText = syntaxLoaded ? 'Metrics' : 'Loading metrics...';
|
|
const chooserText = syntaxLoaded ? 'Metrics' : 'Loading metrics...';
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div className="prom-query-field">
|
|
|
|
|
- <div className="prom-query-field-tools">
|
|
|
|
|
- <Cascader options={metricsOptions} onChange={this.onChangeMetrics}>
|
|
|
|
|
- <button className="btn navbar-button navbar-button--tight" disabled={!syntaxLoaded}>
|
|
|
|
|
- {chooserText}
|
|
|
|
|
- </button>
|
|
|
|
|
- </Cascader>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div className="prom-query-field-wrapper">
|
|
|
|
|
- <QueryField
|
|
|
|
|
- additionalPlugins={this.plugins}
|
|
|
|
|
- cleanText={cleanText}
|
|
|
|
|
- initialQuery={initialQuery.expr}
|
|
|
|
|
- onTypeahead={this.onTypeahead}
|
|
|
|
|
- onWillApplySuggestion={willApplySuggestion}
|
|
|
|
|
- onValueChanged={this.onChangeQuery}
|
|
|
|
|
- placeholder="Enter a PromQL query"
|
|
|
|
|
- portalOrigin="prometheus"
|
|
|
|
|
- syntaxLoaded={syntaxLoaded}
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ <>
|
|
|
|
|
+ <div className="gf-form-inline">
|
|
|
|
|
+ <div className="gf-form">
|
|
|
|
|
+ <Cascader options={metricsOptions} onChange={this.onChangeMetrics}>
|
|
|
|
|
+ <button className="gf-form-label gf-form-label--btn" disabled={!syntaxLoaded}>
|
|
|
|
|
+ {chooserText} <i className="fa fa-caret-down" />
|
|
|
|
|
+ </button>
|
|
|
|
|
+ </Cascader>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div className="gf-form gf-form--grow">
|
|
|
|
|
+ <QueryField
|
|
|
|
|
+ additionalPlugins={this.plugins}
|
|
|
|
|
+ cleanText={cleanText}
|
|
|
|
|
+ initialQuery={initialQuery.expr}
|
|
|
|
|
+ onTypeahead={this.onTypeahead}
|
|
|
|
|
+ onWillApplySuggestion={willApplySuggestion}
|
|
|
|
|
+ onValueChanged={this.onChangeQuery}
|
|
|
|
|
+ placeholder="Enter a PromQL query"
|
|
|
|
|
+ portalOrigin="prometheus"
|
|
|
|
|
+ syntaxLoaded={syntaxLoaded}
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
{error ? <div className="prom-query-field-info text-error">{error}</div> : null}
|
|
{error ? <div className="prom-query-field-info text-error">{error}</div> : null}
|
|
|
{hint ? (
|
|
{hint ? (
|
|
|
<div className="prom-query-field-info text-warning">
|
|
<div className="prom-query-field-info text-warning">
|
|
@@ -267,7 +269,7 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
|
|
|
</div>
|
|
</div>
|
|
|
) : null}
|
|
) : null}
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|