mirror of
https://github.com/grafana/grafana.git
synced 2025-01-10 08:03:58 -06:00
Datasource working with filters after fixing bugs
This commit is contained in:
parent
599b1eb689
commit
63dfa303e5
@ -89,6 +89,7 @@ function (angular, _, dateMath) {
|
||||
// In case the backend is 3rd-party hosted and does not suport OPTIONS, urlencoded requests
|
||||
// go as POST rather than OPTIONS+POST
|
||||
options.headers = { 'Content-Type': 'application/x-www-form-urlencoded' };
|
||||
|
||||
return backendSrv.datasourceRequest(options);
|
||||
};
|
||||
|
||||
@ -308,15 +309,17 @@ function (angular, _, dateMath) {
|
||||
}
|
||||
}
|
||||
|
||||
query.tags = angular.copy(target.tags);
|
||||
if(query.tags){
|
||||
for(var key in query.tags){
|
||||
query.tags[key] = templateSrv.replace(query.tags[key], options.scopedVars);
|
||||
if (target.filters && target.filters.length > 0) {
|
||||
query.filters = angular.copy(target.filters);
|
||||
} else {
|
||||
query.tags = angular.copy(target.tags);
|
||||
if(query.tags){
|
||||
for(var key in query.tags){
|
||||
query.tags[key] = templateSrv.replace(query.tags[key], options.scopedVars);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query.filters = angular.copy(target.filters);
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user