horizon.js is overloaded

Bug #961509 reported by Gabriel Hurley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Wishlist
Gabriel Hurley

Bug Description

We created separate js files to make things cleaner, but then everything ended up being added to horizon.js. Time to do another cleanup pass!

Devin Carlen (devcamcar)
tags: removed: essex-rc-potential
Changed in horizon:
milestone: none → folsom-1
Revision history for this message
John Postlethwait (john-postlethwait) wrote :

We should using something like: http://requirejs.org/

We should move it to a module sort of approach where horizon.js creates the base Horizon object/namespace and then individual modules can add on to that on an as-needed, page-by-page (need-by-need) basis.

Any new code or functionality added to the JS would be done in their own (or respective) modules. EG: a module for quote related JS. Horizon.Quota = {}; Which would encapsulate anything related to Quotas and live in its own quota.js file and would be "Required" as it was needed by the individual pages.

Revision history for this message
Tres Henry (tres) wrote :

This should probably be a blueprint.

Devin Carlen (devcamcar)
Changed in horizon:
milestone: folsom-1 → folsom-2
Devin Carlen (devcamcar)
Changed in horizon:
importance: Low → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/8894

Changed in horizon:
assignee: Nebula (nebula) → Gabriel Hurley (gabriel-hurley)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/8894
Committed: http://github.com/openstack/horizon/commit/41c3a5990c0cf48e5deb33597caca0d1f345effb
Submitter: Jenkins
Branch: master

commit 41c3a5990c0cf48e5deb33597caca0d1f345effb
Author: Gabriel Hurley <email address hidden>
Date: Sat Jun 23 17:06:37 2012 -0700

    JavaScript Refactor.

    Cleans up Horizon's JavaScript to make it properly modular and
    well-organized.

    Adds unit tests written in QUnit for some of the JS modules
    as a starting point for the JS test framework. You can visit
    /qunit/ with DEBUG=True in your settings to access the JS
    test runner.

    Fixes bug 961509.

    Change-Id: Ica33765660d0ed80f22c71bc96f122c3fc8b80cc

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: folsom-2 → 2012.2
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.