angular/horizon.js puts vars in global namespace

Bug #1354120 reported by Randy Bertram
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Randy Bertram

Bug Description

In horizon/static/horizon/js/angular/horizon.js, there is no encapsulation. The variables horizon_dependencies and dependencies are only used locally, but are placed in the global namespace. Encapsulating the file would also allow for strict mode.

(The variable horizonApp has to be placed in the global namespace, since it is referenced elsewhere. It should perhaps be eliminated in favor of just referencing angular.module('hz'), but that is a different issue.)

Changed in horizon:
assignee: nobody → Randy Bertram (rbertram)
status: New → In Progress
Revision history for this message
Julie Pichon (jpichon) wrote :
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Medium
milestone: none → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/112654
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=21d878531a97a6e1a9c3e09bc2a73bfe89014cc9
Submitter: Jenkins
Branch: master

commit 21d878531a97a6e1a9c3e09bc2a73bfe89014cc9
Author: Randy Bertram <email address hidden>
Date: Thu Aug 7 14:52:08 2014 -0400

    With angular hz module, use strict & avoid globals

    Change-Id: I28a1a71f362045769083b90e15a6ad9ee19d090a
    Closes-Bug: 1354120

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: kilo-1 → 2015.1.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.