Chore: add new theme event, modify preference type in drawer (#102523)

* add new theme event, modify preference type in drawer

* update to theme_drawer
This commit is contained in:
Ashley Harrison
2025-03-24 11:57:37 +00:00
committed by GitHub
parent 0bedd57812
commit 9e9eb7a4f8
2 changed files with 6 additions and 1 deletions
@@ -120,6 +120,11 @@ export class SharedPreferences extends PureComponent<Props, State> {
if (confirmationResult) {
const { homeDashboardUID, theme, timezone, weekStart, language, queryHistory, navbar } = this.state;
reportInteraction('grafana_preferences_save_button_clicked', {
preferenceType: this.props.preferenceType,
theme,
language,
});
await this.service.update({ homeDashboardUID, theme, timezone, weekStart, language, queryHistory, navbar });
window.location.reload();
}
@@ -22,7 +22,7 @@ export function ThemeSelectorDrawer({ onClose }: Props) {
const onChange = (theme: ThemeRegistryItem) => {
reportInteraction('grafana_preferences_theme_changed', {
toTheme: theme.id,
preferenceType: 'user',
preferenceType: 'theme_drawer',
});
changeTheme(theme.id, false);
};