mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataSourceApi: add getCollapsedText(query) to DataSourceApi (#16482)
Add getQueryDisplayText() to DataSourceApi
This commit is contained in:
@@ -55,6 +55,10 @@ export class PrometheusDatasource implements DataSourceApi<PromQuery> {
|
||||
this.loadRules();
|
||||
}
|
||||
|
||||
getQueryDisplayText(query: PromQuery) {
|
||||
return query.expr;
|
||||
}
|
||||
|
||||
_request(url, data?, options?: any) {
|
||||
options = _.defaults(options || {}, {
|
||||
url: this.url + url,
|
||||
|
||||
@@ -89,10 +89,6 @@ class PrometheusQueryCtrl extends QueryCtrl {
|
||||
}).join('&');
|
||||
this.linkToPrometheus = this.datasource.directUrl + '/graph?' + args;
|
||||
}
|
||||
|
||||
getCollapsedText() {
|
||||
return this.target.expr;
|
||||
}
|
||||
}
|
||||
|
||||
export { PrometheusQueryCtrl };
|
||||
|
||||
Reference in New Issue
Block a user