File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -211,6 +211,41 @@ local Hub =
211211 ])
212212 + bc.panelOptions.withRepeat('hub_user' )
213213 + bc.panelOptions.withRepeatDirection('v' )
214+ + bc.queryOptions.withTransformations([
215+ bc.queryOptions.transformation.withId('formatTime' )
216+ + bc.queryOptions.transformation.withOptions({
217+ "outputFormat" : "MMM DD" ,
218+ "timeField" : "Date" ,
219+ "timezone" : "utc" ,
220+ "useTimezone" : true
221+ }),
222+ bc.queryOptions.transformation.withId('groupBy' )
223+ + bc.queryOptions.transformation.withOptions({
224+ fields: {
225+ Cost: {
226+ aggregations: [
227+ 'firstNotNull' ,
228+ ],
229+ operation: 'aggregate' ,
230+ },
231+ Date: {
232+ "aggregations" : [],
233+ "operation" : "groupby"
234+ },
235+ User: {
236+ "aggregations" : [],
237+ "operation" : "groupby"
238+ },
239+ },
240+ }),
241+ bc.queryOptions.transformation.withId('groupingToMatrix' )
242+ + bc.queryOptions.transformation.withOptions({
243+ "columnField" : "User" ,
244+ "emptyValue" : "zero" ,
245+ "rowField" : "Date" ,
246+ "valueField" : "Cost (firstNotNull)"
247+ })
248+ ])
214249;
215250
216251dashboard.new('User cloud costs' )
You can’t perform that action at this time.
0 commit comments