Browse Source

Replace embedded static files with XStatic-*

Remove embedded js, add reference in settings,
add requirement xstatic libs.

Change-Id: I07685dfbde7c96c5b8da7e93af291df16c3b8bad
Depends-On: https://review.opendev.org/712744
Story: #2004051
tags/3.1.0
Michal Arbet 4 months ago
parent
commit
d181623f22
21 changed files with 32 additions and 30035 deletions
  1. +6
    -0
      requirements.txt
  2. +0
    -5
      vitrage_dashboard/admin_alarms/templates/adminalarms/index.html
  3. +0
    -5
      vitrage_dashboard/admin_dashboard/templates/admintopology/index.html
  4. +0
    -5
      vitrage_dashboard/admin_entities/templates/adminentities/index.html
  5. +0
    -3
      vitrage_dashboard/admin_templates/templates/admintemplates/index.html
  6. +0
    -5
      vitrage_dashboard/alarms/templates/alarms/index.html
  7. +0
    -1192
      vitrage_dashboard/dashboard/static/vendor/dagre-d3/dagre-d3.core.js
  8. +0
    -2905
      vitrage_dashboard/dashboard/static/vendor/dagre/dagre.core.js
  9. +0
    -1237
      vitrage_dashboard/dashboard/static/vendor/graphlib/graphlib.core.js
  10. +0
    -7158
      vitrage_dashboard/dashboard/static/vendor/lodash/lodash.compat.js
  11. +0
    -6786
      vitrage_dashboard/dashboard/static/vendor/lodash/lodash.js
  12. +0
    -4979
      vitrage_dashboard/dashboard/static/vendor/lodash/lodash.underscore.js
  13. +0
    -4530
      vitrage_dashboard/dashboard/static/vendor/moment/moment.js
  14. +0
    -1212
      vitrage_dashboard/dashboard/static/vendor/moment_timezone_with_data/moment-timezone-with-data-2012-2022.js
  15. +0
    -5
      vitrage_dashboard/dashboard/templates/topology/index.html
  16. +7
    -0
      vitrage_dashboard/enabled/_4000_project_vitrage_panel_group.py
  17. +6
    -0
      vitrage_dashboard/enabled/_4040_project_template_vitrage_panel.py
  18. +7
    -0
      vitrage_dashboard/enabled/_4100_admin_vitrage_panel_group.py
  19. +6
    -0
      vitrage_dashboard/enabled/_4140_admin_template_vitrage_panel.py
  20. +0
    -5
      vitrage_dashboard/entities/templates/entities/index.html
  21. +0
    -3
      vitrage_dashboard/templates/templates/templates/index.html

+ 6
- 0
requirements.txt View File

@@ -11,8 +11,14 @@ XStatic-Angular>=1.5.8.0 # MIT License
XStatic-Angular-Bootstrap>=2.2.0.0 # MIT License
XStatic-Bootstrap-Datepicker>=1.3.1.0 # Apache 2.0 License
XStatic-Bootstrap-SCSS>=3.3.7.1 # Apache 2.0 License
XStatic-Dagre>=0.6.4.0 # MIT License
XStatic-Dagre-D3>=0.4.17.0 # MIT License
XStatic-D3>=3.5.17.0 # BSD License (3 clause)
XStatic-Font-Awesome>=4.7.0.0 # SIL OFL 1.1 License, MIT License
XStatic-Graphlib>=1.0.7.0 # MIT License
XStatic-jQuery>=1.8.2.1 # MIT License
XStatic-lodash>=4.16.4.1 # MIT License
XStatic-moment>=2.8.4.1 # MIT License
XStatic-Moment-Timezone>=0.5.22.0 # MIT License
XStatic-smart-table>=1.4.13.2 # MIT License
python-vitrageclient>=2.5.0 # Apache-2.

+ 0
- 5
vitrage_dashboard/admin_alarms/templates/adminalarms/index.html View File

@@ -12,10 +12,5 @@
<ng-include src="'{{STATIC_URL}}dashboard/project/alarmList/alarmList.html'"></ng-include>
</div>

<script src="{{STATIC_URL}}vendor/lodash/lodash.js"></script>
<script src="{{STATIC_URL}}vendor/graphlib/graphlib.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre/dagre.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre-d3/dagre-d3.core.js"></script>

{% endblock %}


+ 0
- 5
vitrage_dashboard/admin_dashboard/templates/admintopology/index.html View File

@@ -14,10 +14,5 @@
<ng-include src="'{{STATIC_URL}}dashboard/project/layout/main/main.html'"></ng-include>
</div>

<script src="{{STATIC_URL}}vendor/lodash/lodash.js"></script>
<script src="{{STATIC_URL}}vendor/graphlib/graphlib.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre/dagre.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre-d3/dagre-d3.core.js"></script>

{% endblock %}


+ 0
- 5
vitrage_dashboard/admin_entities/templates/adminentities/index.html View File

@@ -12,11 +12,6 @@
<ng-include src="'{{STATIC_URL}}dashboard/project/entities/entities.html'"></ng-include>
</div>

<script src="{{STATIC_URL}}vendor/lodash/lodash.js"></script>
<script src="{{STATIC_URL}}vendor/graphlib/graphlib.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre/dagre.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre-d3/dagre-d3.core.js"></script>

<!--<div ng-cloak ng-init='init({{ TOPOLOGY_VITRAGE_SETTINGS }})'>-->
<!--<ng-include src="'{{STATIC_URL}}dashboard/project/layout/system-health.html'"></ng-include>-->
<!--</div>-->


+ 0
- 3
vitrage_dashboard/admin_templates/templates/admintemplates/index.html View File

@@ -12,8 +12,5 @@
<ng-include src="'{{STATIC_URL}}dashboard/project/templateList/templateList.html'"></ng-include>
</div>

<script src="{{STATIC_URL}}vendor/moment/moment.js"></script>
<script src="{{STATIC_URL}}vendor/moment_timezone_with_data/moment-timezone-with-data-2012-2022.js"></script>

{% endblock %}


+ 0
- 5
vitrage_dashboard/alarms/templates/alarms/index.html View File

@@ -12,10 +12,5 @@
<ng-include src="'{{STATIC_URL}}dashboard/project/alarmList/alarmList.html'"></ng-include>
</div>

<script src="{{STATIC_URL}}vendor/lodash/lodash.js"></script>
<script src="{{STATIC_URL}}vendor/graphlib/graphlib.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre/dagre.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre-d3/dagre-d3.core.js"></script>

{% endblock %}


+ 0
- 1192
vitrage_dashboard/dashboard/static/vendor/dagre-d3/dagre-d3.core.js
File diff suppressed because it is too large
View File


+ 0
- 2905
vitrage_dashboard/dashboard/static/vendor/dagre/dagre.core.js
File diff suppressed because it is too large
View File


+ 0
- 1237
vitrage_dashboard/dashboard/static/vendor/graphlib/graphlib.core.js
File diff suppressed because it is too large
View File


+ 0
- 7158
vitrage_dashboard/dashboard/static/vendor/lodash/lodash.compat.js
File diff suppressed because it is too large
View File


+ 0
- 6786
vitrage_dashboard/dashboard/static/vendor/lodash/lodash.js
File diff suppressed because it is too large
View File


+ 0
- 4979
vitrage_dashboard/dashboard/static/vendor/lodash/lodash.underscore.js
File diff suppressed because it is too large
View File


+ 0
- 4530
vitrage_dashboard/dashboard/static/vendor/moment/moment.js
File diff suppressed because it is too large
View File


+ 0
- 1212
vitrage_dashboard/dashboard/static/vendor/moment_timezone_with_data/moment-timezone-with-data-2012-2022.js
File diff suppressed because it is too large
View File


+ 0
- 5
vitrage_dashboard/dashboard/templates/topology/index.html View File

@@ -16,10 +16,5 @@
<ng-include src="'{{STATIC_URL}}dashboard/project/layout/main/main.html'"></ng-include>
</div>

<script src="{{STATIC_URL}}vendor/lodash/lodash.js"></script>
<script src="{{STATIC_URL}}vendor/graphlib/graphlib.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre/dagre.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre-d3/dagre-d3.core.js"></script>

{% endblock %}


+ 7
- 0
vitrage_dashboard/enabled/_4000_project_vitrage_panel_group.py View File

@@ -16,3 +16,10 @@ PANEL_GROUP = 'vitrage_panel_group'
PANEL_GROUP_NAME = 'Vitrage'
# The name of the dashboard the PANEL_GROUP associated with. Required.
PANEL_GROUP_DASHBOARD = 'project'

ADD_XSTATIC_MODULES = [
('xstatic.pkg.lodash', ['lodash.js']),
('xstatic.pkg.graphlib', ['graphlib.core.js']),
('xstatic.pkg.dagre', ['dagre.core.js']),
('xstatic.pkg.dagre_d3', ['dagre-d3.core.js']),
]

+ 6
- 0
vitrage_dashboard/enabled/_4040_project_template_vitrage_panel.py View File

@@ -25,3 +25,9 @@ ADD_INSTALLED_APPS = ['vitrage_dashboard.templates']
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']

AUTO_DISCOVER_STATIC_FILES = True

ADD_XSTATIC_MODULES = [
('xstatic.pkg.moment', ['moment.min.js']),
('xstatic.pkg.moment_timezone',
['moment-timezone-with-data-2012-2022.js']),
]

+ 7
- 0
vitrage_dashboard/enabled/_4100_admin_vitrage_panel_group.py View File

@@ -16,3 +16,10 @@ PANEL_GROUP = 'admin_vitrage_panel_group'
PANEL_GROUP_NAME = 'Vitrage'
# The name of the dashboard the PANEL_GROUP associated with. Required.
PANEL_GROUP_DASHBOARD = 'admin'

ADD_XSTATIC_MODULES = [
('xstatic.pkg.lodash', ['lodash.js']),
('xstatic.pkg.graphlib', ['graphlib.core.js']),
('xstatic.pkg.dagre', ['dagre.core.js']),
('xstatic.pkg.dagre_d3', ['dagre-d3.core.js']),
]

+ 6
- 0
vitrage_dashboard/enabled/_4140_admin_template_vitrage_panel.py View File

@@ -25,3 +25,9 @@ ADD_INSTALLED_APPS = ['vitrage_dashboard.admin_templates']
ADD_ANGULAR_MODULES = ['horizon.dashboard.project.vitrage']

AUTO_DISCOVER_STATIC_FILES = True

ADD_XSTATIC_MODULES = [
('xstatic.pkg.moment', ['moment.min.js']),
('xstatic.pkg.moment_timezone',
['moment-timezone-with-data-2012-2022.js']),
]

+ 0
- 5
vitrage_dashboard/entities/templates/entities/index.html View File

@@ -12,11 +12,6 @@
<ng-include src="'{{STATIC_URL}}dashboard/project/entities/entities.html'"></ng-include>
</div>

<script src="{{STATIC_URL}}vendor/lodash/lodash.js"></script>
<script src="{{STATIC_URL}}vendor/graphlib/graphlib.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre/dagre.core.js"></script>
<script src="{{STATIC_URL}}vendor/dagre-d3/dagre-d3.core.js"></script>

<!--<div ng-cloak ng-init='init({{ TOPOLOGY_VITRAGE_SETTINGS }})'>-->
<!--<ng-include src="'{{STATIC_URL}}dashboard/project/layout/system-health.html'"></ng-include>-->
<!--</div>-->


+ 0
- 3
vitrage_dashboard/templates/templates/templates/index.html View File

@@ -12,8 +12,5 @@
<ng-include src="'{{STATIC_URL}}dashboard/project/templateList/templateList.html'"></ng-include>
</div>

<script src="{{STATIC_URL}}vendor/moment/moment.js"></script>
<script src="{{STATIC_URL}}vendor/moment_timezone_with_data/moment-timezone-with-data-2012-2022.js"></script>

{% endblock %}


Loading…
Cancel
Save