Table: Adds adhoc filtering (#25467)

* Table: Adds adhoc filtering

* Refactor: changes after PR comments

* Refactor: hides filtering for data sources that do not support modifyQuery in Explore

* Refactor: fixes strict null error

* Changed tooltip position to above icon

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Hugo Häggmark
2020-06-10 07:09:02 +02:00
committed by GitHub
parent 1040d824c5
commit 72b8300571
10 changed files with 239 additions and 30 deletions

View File

@@ -693,6 +693,10 @@ export class PrometheusDatasource extends DataSourceApi<PromQuery, PromOptions>
expression = addLabelToQuery(expression, action.key, action.value);
break;
}
case 'ADD_FILTER_OUT': {
expression = addLabelToQuery(expression, action.key, action.value, '!=');
break;
}
case 'ADD_HISTOGRAM_QUANTILE': {
expression = `histogram_quantile(0.95, sum(rate(${expression}[5m])) by (le))`;
break;