93af461e40
Since large Glance images even temporarily stored on dashboard side tend to fill up Web Server filesystem, it is desirable to route image payload directly to Glance service (which usually streams it to storage backend, which in turn has plenty of space). To make it possible we need to trick Django into thinking that a file was selected inside FileInput, while its contents are not actually transferred to Django server. Then, once image is created client-side code needs to know the exact url the image payload needs to be transferred to. Both tasks are solved via using ExternalFileField / ExternalUploadMeta classes which allow to work around the usual Django form processing workflow with minimal changes to CreateImage form business logic. The client-side code relies on CORS being enabled for Glance service (otherwise browser would forbid the PUT request to a location different from the one form content came from). In a Devstack setup you'll need to edit [cors] section of glance-api.conf file, setting `allowed_origin` setting to the full hostname of the web server (say, http://<HOST_IP>/dashboard) and restart glance-api process. A progress bar is implemented to track the progress of a file upload, in case a really huge image is transferred. The new machinery could be easily switched on/off with a single setting `HORIZON_IMAGES_UPLOAD_MODE` set to 'direct' / 'legacy'. Related-Bug: #1467890 Closes-Bug: #1403129 Implements blueprint: horizon-glance-large-image-upload Change-Id: I01d02f75268186b43066df6fd966aa01c08e01d7 |
||
---|---|---|
doc | ||
horizon | ||
openstack_dashboard | ||
releasenotes | ||
tools | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.pylintrc | ||
.testr.conf | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
MANIFEST.in | ||
Makefile | ||
README.rst | ||
babel-django.cfg | ||
babel-djangojs.cfg | ||
manage.py | ||
package.json | ||
requirements.txt | ||
run_tests.sh | ||
setup.cfg | ||
setup.py | ||
test-requirements.txt | ||
test-shim.js | ||
tox.ini |
README.rst
Horizon (OpenStack Dashboard)
Horizon is a Django-based project aimed at providing a complete
OpenStack Dashboard along with an extensible framework for building new
dashboards from reusable components. The
openstack_dashboard
module is a reference implementation of
a Django site that uses the horizon
app to provide
web-based interactions with the various OpenStack projects.
- Release management: https://launchpad.net/horizon
- Blueprints and feature specifications: https://blueprints.launchpad.net/horizon
- Issue tracking: https://bugs.launchpad.net/horizon
Using Horizon
See doc/source/topics/install.rst
about how to install
Horizon in your OpenStack setup. It describes the example steps and has
pointers for more detailed settings and configurations.
It is also available at http://docs.openstack.org/developer/horizon/topics/install.html.
Getting Started for Developers
doc/source/quickstart.rst
or http://docs.openstack.org/developer/horizon/quickstart.html
describes how to setup Horizon development environment and start
development.
Building Contributor Documentation
This documentation is written by contributors, for contributors.
The source is maintained in the doc/source
directory
using reStructuredText and
built by Sphinx
Building Automatically:
$ ./run_tests.sh --docs
Building Manually:
$ tools/with_venv.sh sphinx-build doc/source doc/build/html
Results are in the doc/build/html
directory