Project

General

Profile

Bug #14963

Contents of select boxes in settings are static, not showing latest objects

Added by Dominic Cleal about 6 years ago. Updated almost 4 years ago.

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

Description

#3200 reverted some behaviour of select boxes in the settings page so it now has static lists of environment, orgs and locations which are determined when the Rails server starts. These lists should be loaded dynamically on page load.

The lists of objects used to be loaded inside the helper, which ran during page rendering:

https://github.com/theforeman/foreman/commit/ad603e4023c5400c51674f1fa3635565f7b3b552#diff-99f01fed5094bece4bbc97c882f4b666L15

These are now hardcoded lists in the settings loader, which runs at startup:

https://github.com/theforeman/foreman/commit/ad603e4023c5400c51674f1fa3635565f7b3b552#diff-110b9dfb3bec067f495173daa77532f3R10

The :collection should probably accept a lambda or something, which would also fix this situation for plugins.


Related issues

Related to Foreman - Feature #3200: Add select boxes to SettingsClosed2013-10-04

Associated revisions

Revision 1f823285 (diff)
Added by Amir Fefer about 6 years ago

Fixes #14963 - supports dynamic content in setting select box

History

#1 Updated by Dominic Cleal about 6 years ago

#2 Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Amir Fefer
  • Pull request https://github.com/theforeman/foreman/pull/3509 added

#3 Updated by Amir Fefer about 6 years ago

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

Also available in: Atom PDF