Prometheus: Adds hint support to dashboard and fixes prometheus link in query editor (#20275)

* Prometheus: moved hints into query editor, and fixed missing refIds in responses

* Minor fix

* Removed unused type import
This commit is contained in:
Torkel Ödegaard
2019-11-11 16:47:17 +01:00
committed by GitHub
parent 78520ac3d1
commit b756aa0bb1
7 changed files with 14 additions and 23 deletions

View File

@@ -221,11 +221,11 @@ class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryF
};
onClickHintFix = () => {
const { datasource, query, onChange, onRunQuery } = this.props;
const { hint } = this.state;
const { onHint } = this.props;
if (onHint && hint && hint.fix) {
onHint(hint.fix.action);
}
onChange(datasource.modifyQuery(query, hint.fix.action));
onRunQuery();
};
onUpdateLanguage = () => {