Angular source re-organization

Bug #1454880 reported by Tyr Johanson
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Tyr Johanson

Bug Description

The Angular source will benefit from re-organization to
1) align module names with their directory structure
2) make it clear what is "framework" code (reusable utilities), what is "core business logic" of the horizon UI, and what is code that bootstraps the application.

See https://review.openstack.org/#/c/176152/ for an example of the full set of proposed changes. The ideas in that patch are well supported by cores and the PTL, however that patch is too large to be easily reviewed and merged. Instead, create a series of smaller, dependent patches that incrementally make the desired improvements.

List of in-progress changes:
1) Create a "framework" directory
2) Create a "util" directory and populate it with utilities
3) Create a "widgets" directory and populate it with the widgets
4) Align the module names with their directory structure
5) Align constant, service and factory names with their modules
6) Move API support files to openstack_dashboard
7) Move horizon/js/angular/filters to framework/utils
8) Refactor the "hz" module to "hz-app" and move as much "legacy" code
   as possible into the new structure (out of horizon/js/angular)

List of additional possible changes:
?) Align controller names to include their module
?) Clean up unneeded dependencies
   - We may consider moving wizard.js dependency on 'ui.bootstrap' as a dependency to horizon module.
   - It seams we can remove `horizon.framework.util.i18n` from here.

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/182891

Changed in horizon:
assignee: nobody → Tyr Johanson (tyr-6)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit d1bdc0ae7db5c8519cbc46e6de2f169df9264294
Author: Tyr Johanson <email address hidden>
Date: Wed May 13 16:58:09 2015 -0600

    ngReorg - create framework dir

    This patch simply renames:
      horizon/horizon/static/angular
    to:
      horizon/horizon/static/framework

    This is one step in a larger effort to restructure the Angular
    source. See https://review.openstack.org/#/c/176152/ for the
    full set of planned changes.

    Partial-Bug: 1454880
    Change-Id: I2bbcc64caa42f97c7d92688f4c5d7915146966bc

Tyr Johanson (tyr-6)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/182891
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=317023e2e2c492a782e81d54a687b6889e03b42e
Submitter: Jenkins
Branch: master

commit 317023e2e2c492a782e81d54a687b6889e03b42e
Author: Tyr Johanson <email address hidden>
Date: Wed May 13 17:42:10 2015 -0600

    ngReorg - create 'util' module

    This commit collects some utilties into a new
    'horizon.framework.util' module

    This is one step in a larger effort to restructure the Angular
    source. See https://review.openstack.org/#/c/176152/ for the
    full set of planned changes.

    Change-Id: I67f080a7d563c37e5dd4d89e5906471e443d4302
    Partial-Bug: #1454880

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/182904
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5762d0deee5f093c03a1dd73e3694a33b8a1e07a
Submitter: Jenkins
Branch: master

commit 5762d0deee5f093c03a1dd73e3694a33b8a1e07a
Author: Tyr Johanson <email address hidden>
Date: Wed May 13 18:41:21 2015 -0600

    ngReorg - create 'widgets' module

    This commit collects UI components into a new
    'horizon.framework.widgets' module. It also standardizes
    the naming pattern for .scss files and makes them hierarchical.

    This is one step in a larger effort to restructure the Angular
    source. See https://review.openstack.org/#/c/176152/ for the
    full set of planned changes.

    Change-Id: I2edabd6c43f811a4bb2e3abe982dbc24958ddf93
    Partial-Bug: #1454880

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/184345

Tyr Johanson (tyr-6)
description: updated
Tyr Johanson (tyr-6)
description: updated
Tyr Johanson (tyr-6)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in horizon:
assignee: Tyr Johanson (tyr-6) → Ryan Peters (rjpeter2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in horizon:
assignee: Ryan Peters (rjpeter2) → Tyr Johanson (tyr-6)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in horizon:
assignee: Tyr Johanson (tyr-6) → Ryan Peters (rjpeter2)
Changed in horizon:
assignee: Ryan Peters (rjpeter2) → Tyr Johanson (tyr-6)
Tyr Johanson (tyr-6)
description: updated
Changed in horizon:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/182909
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=2b7b8ac93c902cef65d6c50523e906ce0ee7f9a8
Submitter: Jenkins
Branch: master

commit 2b7b8ac93c902cef65d6c50523e906ce0ee7f9a8
Author: Tyr Johanson <email address hidden>
Date: Wed May 13 18:50:11 2015 -0600

    ngReorg - align module names with directory

    This commit aligns module names with their directory
    structure.

    This is one step in a larger effort to restructure the Angular
    source. See https://review.openstack.org/#/c/176152/ for the
    full set of planned changes.

    Change-Id: I3f48ebaef23d6249983f33b1a4710cc1fe3ef789
    Partial-Bug: #1454880

Changed in horizon:
assignee: Tyr Johanson (tyr-6) → Ryan Peters (rjpeter2)
David Lyle (david-lyle)
Changed in horizon:
assignee: Ryan Peters (rjpeter2) → Tyr Johanson (tyr-6)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/184345
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=660d43badf578543e1177cbe522a45b57e5dc3a6
Submitter: Jenkins
Branch: master

commit 660d43badf578543e1177cbe522a45b57e5dc3a6
Author: Tyr Johanson <email address hidden>
Date: Tue May 19 16:17:55 2015 -0600

    ngReorg - Align constants, factories and services

    This commit makes injectable names consistent to include
    the module as a prefix. This reduces confusiong about
    exactly which item is being injected.

    It also simplifies the naming scheme for the Angular-based
    API modules.

    This is one step in a larger effort to restructure the Angular
    source. See https://review.openstack.org/#/c/176152/ for the
    full set of planned changes.

    Change-Id: I87d4ff78b97950248442056ce3ce5af9177042ae
    Partial-Bug: #1454880

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/184575
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=264fb533429f02e6271178a2711bb5e870bbc72e
Submitter: Jenkins
Branch: master

commit 264fb533429f02e6271178a2711bb5e870bbc72e
Author: Tyr Johanson <email address hidden>
Date: Wed May 20 12:29:48 2015 -0600

    ngReorg - Relocate filters and a validator

    This commit moves some filters and a validator into
    the current framework structure.

    This is one step in a larger effort to restructure the Angular
    source. See https://review.openstack.org/#/c/176152/ for the
    full set of planned changes.

    Change-Id: I47579c13a39c2c14dc2d6d41d3e0e70132dbc406
    Partial-Bug: #1454880

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/184597
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=31de099efb7fea9ba2fdd9b27ea005bc8e83e0c4
Submitter: Jenkins
Branch: master

commit 31de099efb7fea9ba2fdd9b27ea005bc8e83e0c4
Author: Tyr Johanson <email address hidden>
Date: Wed May 20 13:25:07 2015 -0600

    ngReorg - Create dashboard-app

    This is the last patch of this ngReorg series!!

    This commit attempts to refactor the "hz" module and horizon.js
    into "dashboard-app" because the code is actually bootstrapping
    the default dashboard application, created using framework and
    openstack_dashboard pieces. Ideally, this moves into a directory
    that is a peer to openstack_dashboard, but for now, it is at
    least grouped together with a name that reflects its purpose.

    This was the last step in a larger effort to restructure the Angular
    source. See https://review.openstack.org/#/c/176152/ for the
    full set of planned changes.

    The next refactoring effort (not addressed by this patch series)
    is to restructure the Django templates so that
    horizon.dashboard-app can be moved OUT of horizon/horizon.

    Change-Id: If2cbc243ebfd0b2f1f834056e34b8e2d3df06060
    Closes-Bug: #1454880

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