Make sure the override works with pubdash
This commit is contained in:
@@ -243,6 +243,7 @@ func groupQueriesByPanelId(dashboard *simplejson.Json) map[int64][]*simplejson.J
|
||||
|
||||
var panelQueries []*simplejson.Json
|
||||
|
||||
cacheTTLOverride := panel.Get("queryCachingTTL").MustInt64(0)
|
||||
for _, queryObj := range panel.Get("targets").MustArray() {
|
||||
query := simplejson.NewFromAny(queryObj)
|
||||
|
||||
@@ -257,6 +258,10 @@ func groupQueriesByPanelId(dashboard *simplejson.Json) map[int64][]*simplejson.J
|
||||
query.Set("datasource", datasource)
|
||||
}
|
||||
|
||||
if cacheTTLOverride > 0 {
|
||||
query.Set("queryCachingTTL", cacheTTLOverride)
|
||||
}
|
||||
|
||||
panelQueries = append(panelQueries, query)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user