Skip to content

Commit

Permalink
feat: 【产品需求】grafana 变量的需求,把时间粒度参数化,可配置成一分钟 一秒钟 一小时 --Story=121485879
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 28390
  • Loading branch information
liangling0628 committed Jan 3, 2025
1 parent dc793e7 commit 1fa251f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/timeseries/src/datasource/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,6 @@ export default class DashboardDatasource extends DataSourceApi<QueryData, QueryO
format: item.format,
query_configs: [queryConfig],
start_time: options.range.from.unix(),
step: item.step || 'auto',
target: this.buildTargets({ cluster, host, module }),
type: item.type,
},
Expand Down Expand Up @@ -915,7 +914,7 @@ export default class DashboardDatasource extends DataSourceApi<QueryData, QueryO
...this.getRangeScopedVars(options.range),
}),
start_time: options.range.from.unix(),
step: item.step || 'auto',
step: getTemplateSrv().replace(item.step) || 'auto',
type: item.type,
},
method: 'POST',
Expand Down Expand Up @@ -953,7 +952,6 @@ export default class DashboardDatasource extends DataSourceApi<QueryData, QueryO
functions: exp.functions?.filter?.(item => item.id),
query_configs: configList,
start_time: options.range.from.unix(),
step: item.step || 'auto',
target: this.buildTargets({ cluster, host, module }),
type: item.type,
},
Expand Down

0 comments on commit 1fa251f

Please sign in to comment.