Skip to content

Commit

Permalink
azure blob storage variable interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
yesoreyeram committed Mar 15, 2024
1 parent a37851f commit 0b7a019
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/sixty-hornets-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'grafana-infinity-datasource': minor
---

Support for variables in azure blob storage container and blob name
4 changes: 4 additions & 0 deletions src/interpolate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ export const interpolateQuery = (query: InfinityQuery, scopedVars: ScopedVars):
if (newQuery.source === 'inline') {
newQuery.data = replaceVariable(newQuery.data, scopedVars);
}
if (newQuery.source === 'azure-blob') {
newQuery.azBlobName = replaceVariable(newQuery.azBlobName, scopedVars);
newQuery.azContainerName = replaceVariable(newQuery.azContainerName, scopedVars);
}
if (isDataQuery(newQuery)) {
newQuery.filters = (newQuery.filters || []).map((filter) => {
const value = (filter.value || []).map((val) => {
Expand Down

0 comments on commit 0b7a019

Please sign in to comment.