Project

General

Profile

Bug #10929

No way to add dashboard widgets?

Added by Dominic Cleal over 5 years ago. Updated over 2 years ago.

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

Description

Since #8106, I can't see a way to add dashboard widgets that have been deleted.

The Manage dashboard menu shows minimised widgets, but not those which are simply not enabled (yet). The only way I can see to do it is to click Manage dashboard, Reset to default assuming the widget's in the default set, after which you need to set everything up again.

I hope I'm not missing something obvious.


Related issues

Related to Foreman - Refactor #8106: Save dashboard widgets in DB to increase flexibilityClosed2014-10-26
Related to Foreman - Feature #14492: Remove 'minimize' from dashboard widgetsClosed2016-04-05

Associated revisions

Revision 24fc15c5 (diff)
Added by Daniel Lobato Garcia over 5 years ago

Fixes #10929 - Add removed widgets to dashboard

This commit allows users to re-add widgets. At this point it's only
possible to recover removed widgets by clicking on "Reset to default".

To do this I populate the 'Add widgets' list by getting a diff
between the current widgets and the available ones. The code calls any
available widget 'default_widget', so keep that in mind.

After removing a widget, we reload the page, which is fairly fast thanks
to turbolinks. This is so that we populate the 'Add widgets' list.

Clicking on the widget to add will trigger a POST call that will add the
widget to User.current.widgets and reload the page. The reason why I
need to reload the page is to get the data in the new widget, otherwise
we would load an empty widget. It's not optimal but turbolinks makes it
fast.

Revision c1a8ccf1 (diff)
Added by Daniel Lobato Garcia about 5 years ago

Fixes #10929 - Add removed widgets to dashboard

This commit allows users to re-add widgets. At this point it's only
possible to recover removed widgets by clicking on "Reset to default".

To do this I populate the 'Add widgets' list by getting a diff
between the current widgets and the available ones. The code calls any
available widget 'default_widget', so keep that in mind.

After removing a widget, we reload the page, which is fairly fast thanks
to turbolinks. This is so that we populate the 'Add widgets' list.

Clicking on the widget to add will trigger a POST call that will add the
widget to User.current.widgets and reload the page. The reason why I
need to reload the page is to get the data in the new widget, otherwise
we would load an empty widget. It's not optimal but turbolinks makes it
fast.

(cherry picked from commit 24fc15c59e0acb589ef46a8f60e8ce76e72fd8d2)

History

#1 Updated by Dominic Cleal over 5 years ago

  • Related to Refactor #8106: Save dashboard widgets in DB to increase flexibility added

#2 Updated by Daniel Lobato Garcia over 5 years ago

That's the way it is right now, I don't think you're missing anything obvious. Once we get more widgets maybe we can figure out better mechanisms to add new ones, I'd say 'reset to default' is acceptable for the current number of widgets.

#3 Updated by Dominic Cleal over 5 years ago

It used to be possible though before that changeset, you'd close a widget and it'd be listed in the menu.

#4 Updated by Daniel Lobato Garcia over 5 years ago

  • Assignee set to Daniel Lobato Garcia

#5 Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2538 added
  • Pull request deleted ()

#6 Updated by Dominic Cleal over 5 years ago

  • Legacy Backlogs Release (now unused) changed from 35 to 72

#7 Updated by Daniel Lobato Garcia over 5 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#8 Updated by Tomer Brisker over 4 years ago

  • Related to Feature #14492: Remove 'minimize' from dashboard widgets added

Also available in: Atom PDF