app.module shouldd'n be generated

Bug #1477825 reported by Shaoquan Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Tyr Johanson

Bug Description

Currently app.module's JavaScript code is generated from Django template, this causes many issues. JavaScript code should not be generated except for pure data or data object that receives value from the page's environment.

Revision history for this message
Shaoquan Chen (sean-chen2) wrote :

This has been identified as top priority as it is blocking other top priority tasks defined in https://etherpad.openstack.org/p/YVR-horizon-liberty-priorities .

Changed in horizon:
assignee: nobody → Shaoquan Chen (sean-chen2)
Changed in horizon:
status: New → In Progress
Changed in horizon:
assignee: Shaoquan Chen (sean-chen2) → Tyr Johanson (tyr-6)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/205720
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=66485be81a3f100b0672a3193823cd8a4bbc177e
Submitter: Jenkins
Branch: master

commit 66485be81a3f100b0672a3193823cd8a4bbc177e
Author: Tyr Johanson <email address hidden>
Date: Fri Jul 24 16:34:57 2015 -0600

    Auto-collect app/ instead of only app/core/

    Angular code for openstack_dashboard is almost finished
    migrating to openstack_dashboard/static/app/.

    Previously, the root module of app (app.module.js) was explicitly
    included from _conf.html so that environment variables from Django
    could be captured in the 'horizon.app.conf' constant.

    This prevented auto-collection at the static/app/ level because
    app.module.js will be included twice (once from _conf.html, and
    again during auto-collection)

    It turns out that 'horizon.app.conf' is unnecessary as an Angular
    constant. It's only use is to initialize the 'horizon.conf' global
    provided by horizon.js.

    This patch refactors _conf.html to directly initialize horizon.conf.
    This removes the need for app.module.js to be included from
    _conf.html, which allows us to change the auto-collection directory
    to 'app/'.

    Now all files in horizon/static and openstack_dashboard/static/app
    are auto-collected, without including app.module.js twice. All new
    angular files are expected to live in one of these two locations,
    minimizing changes to static_settings.py to include new files for
    auto-collection

    Change-Id: I95b6f13c85eb08c875885812a7db054a5aa6e7c2
    Partial-Bug: #1458697
    Closes-Bug: #1477825

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
importance: Undecided → High
milestone: none → liberty-3
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-3 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.