Commit 4f61edd2 by Ivana Huckova Committed by GitHub

Prometheus: Fix enabling of disabled queries when editing in dashboard (#31055)

* Fix disable bug by passing hide prop

* Make more universal fix

* Revert to original fix

* Update public/app/plugins/datasource/prometheus/components/PromQueryEditor.tsx

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
parent 38daf0cb
...@@ -92,7 +92,9 @@ export class PromQueryEditor extends PureComponent<Props, State> { ...@@ -92,7 +92,9 @@ export class PromQueryEditor extends PureComponent<Props, State> {
onRunQuery = () => { onRunQuery = () => {
const { query } = this; const { query } = this;
this.props.onChange(query); // Change of query.hide happens outside of this component and is just passed as prop. We have to update it when running queries.
const { hide } = this.props.query;
this.props.onChange({ ...query, hide });
this.props.onRunQuery(); this.props.onRunQuery();
}; };
......
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