move client-side config options out of settings.py

Registered by Cindy Lu

Summary:
Future client-side config options should not be in local_settings and settings.py, but in a new file for consumption by the framework code. Thus we will have two files: current settings file and a client-side configuration file.

Motivation:
The local_settings.py file is huge. Radomir has submitted this patch: https://review.openstack.org/#/c/100521/ (bp: https://blueprints.launchpad.net/horizon/+spec/ini-based-configuration) to address the issue of Django/OpenStack/Horizon settings being all mixed together.

Similarly, client-side and server-side settings should not be mixed up. There are a few cases of it today, as seen below.

Description:
Things like:

    'auto_fade_alerts': {
        'delay': 3000,
        'fade_duration': 1500,
        'types': ['alert-success', 'alert-info']
    },

== OR ==

    'modal_backdrop': 'static',

Similarly, PAGE_SIZE can be on the client-side for the Angular dashboards (Since we are fetching everything all at once and paginating that).

Those settings should *not* be stored in HORIZON_CONFIG. They only apply to the Horizon framework, and should be configured there, not on the Python side. Having another settings file will also make it easier to allow users to customize other things in their installation (see ***).

Since we don't want to break backward compatibility, those client-side settings currently in settings.py will be left there. We need to find a way to pass in the Python settings to the client-side in a clean way.

Any incoming options should be in conf.js or some other files TBD.

This will solve the another problem. Currently, openstack_dashboard depends on horizon framework. The reverse is not true: horizon framework should *not* depend on openstack_dashboard for anything.

***Also, this client-side config file is really "user preferences." They can be stored locally on the browser. In the future, we can also add additional things like like usability/ accessibility/ personal customizations/ we can also tie this into Diana Whitten/Rob Cresswell's theming preview - https://blueprints.launchpad.net/horizon/+spec/bootstrap-theme-preview).

UX:
The UX will look the same way and will work the same way.

Outside Dependencies:
N/A

Doc Impact:
settings.rst will need to show where/how to configure the client-side options as well as a list of what is configurable.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Cindy Lu
Direction:
Needs approval
Assignee:
Cindy Lu
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Cindy Lu

Related branches

Sprints

Whiteboard

***** 10/28/2016 [clu_] seems no interest in this patch, not very useful at this point

[lhcheng]
note: we can't just remove an option from local_setting, it would break backward compatibility.
[clu_] Yes, for legacy. I've clarified that for future client-side settings we should move it to a separate file.

Gerrit topic: https://review.openstack.org/#q,topic:bp/client-side-configuration-file,n,z

Addressed by: https://review.openstack.org/227013
    Docs for moving future client-side settings out of settings.py

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.