Project

General

Profile

Actions

Bug #10927

closed

Resetting dashboard to default widgets adds no widgets

Added by Dominic Cleal almost 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Dashboard
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When resetting the dashboard to the default widgets in a development environment, it may not add any widgets. To reproduce, edit app/services/dashboard/manager.rb and then click restore.

It appears that the class Dashboard::Manager stores a list of default widgets in a class variable which is only initialised via Dashboard::Loader on boot. When the Manager class gets reloaded by Rails, it loses the list of default widgets.

Adding a require on dashboard/manager to config/initializers/foreman.rb may disable autoloading of the class, or move logic into dashboard/loader.


Related issues 4 (0 open4 closed)

Related to Foreman - Refactor #8106: Save dashboard widgets in DB to increase flexibilityClosedTomer Brisker10/26/2014Actions
Related to Foreman - Bug #19317: Plugin and dashboard widget registry auto-reloadedClosedDominic Cleal04/19/2017Actions
Related to Foreman - Refactor #19464: Move Dashboard::Manager out of app/registries/ to permit autoloadingClosedDominic Cleal05/04/2017Actions
Has duplicate Foreman - Bug #14300: after removing dashboard widgets none are listed to add backDuplicate03/21/2016Actions
Actions

Also available in: Atom PDF