3e4d0ad77e
While troubleshooting a problem with pagination I noticed the following conditional in `horizon/templates/horizon/common/_data_table.html`: ``` {% if table.number_of_pages is defined %} {% include "horizon/common/_data_table_pagination.html" %} {% else %} {% include "horizon/common/_data_table_pagination_with_pages.html" %} {% endif %} ``` At first sight, it looks wrong. I mean, if there are number_of_pages, we should use `_data_table_pagination_with_pages.html`. However, this conditional solves to `True` if table.number_of_pages is NOT defined, and then it solves to `False`, if it is defined. It is a very weird (to me) behavior. Therefore, I am suggesting to use a more readable and understandable conditional in this patch. We can simply use `if table.number_of_pages is None`, which will behave as expected; if there are not number of pages, we use the traditional paging, and then, if there are number of pages, we use the paged data table approach. Change-Id: I933b1f9399f40569c7661c1db5776d468917b966 |
||
---|---|---|
.zuul.d | ||
doc | ||
horizon | ||
openstack_auth | ||
openstack_dashboard | ||
playbooks | ||
releasenotes | ||
roles | ||
tools | ||
.eslintignore | ||
.eslintrc | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.pylintrc | ||
CONTRIBUTING.rst | ||
HACKING.rst | ||
LICENSE | ||
MANIFEST.in | ||
README.rst | ||
babel-django.cfg | ||
babel-djangojs.cfg | ||
bindep.txt | ||
lower-constraints.txt | ||
manage.py | ||
package.json | ||
plugin-registry.csv | ||
reno.yaml | ||
requirements.txt | ||
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.
- Project documentation: https://docs.openstack.org/horizon/latest/
- Release management: https://launchpad.net/horizon
- Blueprints and feature specifications: https://blueprints.launchpad.net/horizon
- Issue tracking: https://bugs.launchpad.net/horizon
- Release notes: https://docs.openstack.org/releasenotes/horizon/
Using Horizon
See doc/source/install/index.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 Installation Guide.
Getting Started for Developers
doc/source/quickstart.rst
or Quickstart
Guide 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
To build the docs, use:
$ tox -e docs
Results are in the doc/build/html
directory