Move javascript libraries to separate packages

Registered by Matthias Runge

Currently, Horizon bundles a couple of JavaScipt libraries.

This blueprint is to track the removal or move to separate python packages (to be hosted on pypi)

Blueprint information

Status:
Complete
Approver:
David Lyle
Priority:
High
Drafter:
Matthias Runge
Direction:
Approved
Assignee:
Matthias Runge
Definition:
Approved
Series goal:
Accepted for juno
Implementation:
Implemented
Milestone target:
milestone icon 2014.2
Started by
David Lyle
Completed by
Matthias Runge

Related branches

Sprints

Whiteboard

[2014-01-29 mrunge]: moved javascript part out of separate-dashboard proposal

- split out jquery via django-jquery https://pypi.python.org/pypi/django-jquery/1.9.1
- https://pypi.python.org/pypi/django-angularjs/1.0.2
- unsure about bootstrap support here, maybe this one: https://pypi.python.org/pypi/django-bootstrap-toolkit/2.15.0
- d3: https://pypi.python.org/pypi/django-d3/3.3.11
cd horizon/static/

$ tree
.
|-- bootstrap
| `-- js
| |-- bootstrap-datepicker.js
| |-- bootstrap.js
| `-- bootstrap.min.js
`-- horizon
    |-- js
    | |-- angular
    | | |-- controllers
    | | | `-- dummy.js
    | | |-- directives
    | | | `-- forms.js
    | | `-- horizon.js
    | |-- horizon.communication.js
    | |-- horizon.conf.js
    | |-- horizon.cookies.js
    | |-- horizon.d3barchart.js
    | |-- horizon.d3linechart.js
    | |-- horizon.d3piechart.js
    | |-- horizon.firewalls.js
    | |-- horizon.formset_table.js
    | |-- horizon.forms.js
    | |-- horizon.heattop.js
    | |-- horizon.instances.js
    | |-- horizon.js
    | |-- horizon.membership.js
    | |-- horizon.messages.js
    | |-- horizon.modals.js
    | |-- horizon.networktopology.js
    | |-- horizon.quota.js
    | |-- horizon.tables_inline_edit.js
    | |-- horizon.tables.js
    | |-- horizon.tabs.js
    | |-- horizon.templates.js
    | |-- horizon.users.js
    | `-- horizon.utils.js
    |-- lib
    | |-- angular.js
    | |-- d3.v3.min.js
    | |-- hogan-2.0.0.js
    | |-- jquery
    | | |-- jquery.bootstrap.wizard.js
    | | |-- jquery.cookie.js
    | | |-- jquery.min.js
    | | |-- jquery.quicksearch.js
    | | |-- jquery.tablesorter.js
    | | `-- jquery-ui-1.9.2.custom.min.js
    | |-- jshint-2.3.0.js
    | |-- qhint.js
    | |-- qunit
    | | |-- qunit.css
    | | `-- qunit.js
    | |-- rickshaw.js
    | |-- spin.jquery.js
    | `-- spin.js
    `-- tests
        |-- jshint.js
        |-- messages.js
        |-- modals.js
        |-- tables.js
        `-- templates.js

IMHO everything not starting with horizon needs to go away from here.

[2014-01-30 enykeev] Angular 1.0.2 is ancient. Not only it lacks some extreme useful functions like ng-repeat's 'track by', but it also has a lot of braking changes with both the latest version and the one we are using right now. If we are not going to use something like django-bower (as the owner himself suggests), we should probably contact him and ask to update the package.

[2014-02-18 rdopieralski] Maybe we should consider using XStatic (https://pypi.python.org/pypi/XStatic/) together with django-xstatic (https://github.com/gautier/django-xstatic). We can easily package the missing libraries, but there are quite a few available already: https://pypi.python.org/pypi?%3Aaction=search&term=xstatic&submit=search . The project was created for the MoinMoin wiki and so it is going to be maintained.

Gerrit topic: https://review.openstack.org/#q,topic:bp/remove-javascript-bundling,n,z

Addressed by: https://review.openstack.org/82516
    Unbundle jquery from horizon using xstatic

Addressed by: https://review.openstack.org/94837
    Upgrade jquery to version 1.10.2 with jquery-migrate

Addressed by: https://review.openstack.org/106041
    Unbundle all JavaScript libraries from Horizon

[david-lyle | 2014.07.23] Moving to Juno-3.

Addressed by: https://review.openstack.org/116583
    Unbundle bootstrap and use xstatic version

Addressed by: https://review.openstack.org/120411
    Upgrade and unbundle jquery-ui

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.