Tracking: Report dash nowDelay and liveNow values (#79744)

This commit is contained in:
Ivan Ortega Alba 2023-12-29 12:36:09 +01:00 committed by GitHub
parent a62db1e24b
commit 1892ae5ca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,10 @@ describe('trackDashboardLoaded', () => {
{ type: 'query', name: 'Query 2' },
],
},
timepicker: {
nowDelay: '1m',
},
liveNow: true,
};
const model = getDashboardModel(dashboardJSON);
const reportInteractionSpy = jest.spyOn(runtime, 'reportInteraction');
@ -45,6 +49,8 @@ describe('trackDashboardLoaded', () => {
panel_type_timeseries_count: 1,
'panel_type_grafana-worldmap-panel_count': 1,
panel_type_geomap_count: 1,
settings_nowdelay: '1m',
settings_livenow: true,
});
});
});

View File

@ -28,6 +28,8 @@ export function trackDashboardLoaded(dashboard: DashboardModel, versionBeforeMig
panels_count: dashboard.panels.length,
...panels,
...variables,
settings_nowdelay: dashboard.timepicker.nowDelay,
settings_livenow: !!dashboard.liveNow,
});
}