mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
wip: panel-header: Add proper typings to maxDataPoints and interval + remove code in comment
This commit is contained in:
parent
e55f3f883f
commit
8117a7559f
@ -47,8 +47,8 @@ export class PanelModel {
|
|||||||
timeShift?: any;
|
timeShift?: any;
|
||||||
hideTimeOverride?: any;
|
hideTimeOverride?: any;
|
||||||
|
|
||||||
maxDataPoints?: any;
|
maxDataPoints?: number;
|
||||||
interval?: any;
|
interval?: string;
|
||||||
|
|
||||||
// non persisted
|
// non persisted
|
||||||
fullscreen: boolean;
|
fullscreen: boolean;
|
||||||
|
@ -148,19 +148,6 @@ class MetricsPanelCtrl extends PanelCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
calculateInterval() {
|
calculateInterval() {
|
||||||
// let intervalOverride = this.panel.interval;
|
|
||||||
|
|
||||||
// // if no panel interval check datasource
|
|
||||||
// if (intervalOverride) {
|
|
||||||
// intervalOverride = this.templateSrv.replace(intervalOverride, this.panel.scopedVars);
|
|
||||||
// } else if (this.datasource && this.datasource.interval) {
|
|
||||||
// intervalOverride = this.datasource.interval;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// const res = kbn.calculateInterval(this.range, this.resolution, intervalOverride);
|
|
||||||
// this.interval = res.interval;
|
|
||||||
// this.intervalMs = res.intervalMs;
|
|
||||||
|
|
||||||
const interval = calculateIntervalUtil(this.panel, this.datasource, this.range, this.resolution);
|
const interval = calculateIntervalUtil(this.panel, this.datasource, this.range, this.resolution);
|
||||||
this.interval = interval.interval;
|
this.interval = interval.interval;
|
||||||
this.intervalMs = this.intervalMs;
|
this.intervalMs = this.intervalMs;
|
||||||
|
Loading…
Reference in New Issue
Block a user