attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.
After this, there are only 3 noqa under openstack_dashboard/ :)
Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
When the password is successfully changed, the background colour
of the success message is changed from red to green to avoid
users mistaking it for an error message.
Change-Id: Icbaae9f15d02368539e47cd5e929c19ed67b5fed
Closes-Bug: #1520486
change password same with old one will give the error:
Error: Unable to change password.
This patch make sure new password can not the same with old one.
Change-Id: Ib2261df262ba9bdf2b6d2ecb9cf5ce406893634d
Closes-bug: #1641046
Under Setttings -> User Settings OR -> Change Password
There are two title elements with the same content and shown in the same
area, remove one for better ux.
Change-Id: I863363d8fc79f5144d8ead750ba48878a7fa251b
Closes-bug: #1583319
Django 1.8 altered and deprecated the existing pattern for defining
URLs. This will be removed in 1.10, meaning that many deprecation
warnings show up under Django 1.9. We should fix the URLs promptly to
avoid logspam, and to support Django 1.10 in Newton.
See
https://docs.djangoproject.com/en/1.9/releases/1.8/#django-conf-urls-patterns
Change-Id: I074d20850de59bfe678a3bc72e9f0f25bd743cbf
Partially-Implements: blueprint dj110
These lines of code were introduced as Horizon migrated
through several Django versions and are no longer
needed.
Change-Id: I12aae1a843fccc803859da6337a3274339a3741f
Partially-Implements: blueprint drop-dj17
mox doesn't work on Python 3, whereas mox3 works on Python 2 and Python
3. Cinder, Nova and many other projects already replaced mox with mox3.
mox3 is now maintained by OpenStack.
Partial-Implements: blueprint porting-python3
Change-Id: I10e6a9754ebd58a2640d73ec8966527c3aa1fe9a
Refactor of User settings & Password modals
Based on merged patch: https://review.openstack.org/#/c/123472/
Change-Id: Ibadfda67edc6c8c2c0a9c42c7f0ec982497005ef
Partially-Implements: blueprint form-template-to-view
Patch https://review.openstack.org/#/c/142802 adds a method of
reducing duplication of page title logic, this patch applies that change
to the project settings and the test panel views.
Change-Id: I4af59bb3c051dcd24e46aacd91c49b8fcc6c10c7
Partial-Bug: 1413749
If both the keystone token and the session expired, the user was asked to login
twice. This is because the token expiration was not checked.
When a user had timed out both in session and keystone token validity, the user
was asked to log in, then the timestamp was checked, and the user logged out
again and asked to log in a second time.
We now check both the timestamp and keystone token validity before
authentication validity and force back the login page to retrieve a new
keystone token, avoiding the timeout race condition between session and token
validity which was forcing a dual login. A keystone token expiration is now
considered as a session timeout too.
Also, a page can start loading while the token is valid, and finish while it's
invalid. This was leading to errors during the page loading.
We now set a TOKEN_TIMEOUT_MARGIN period in seconds which allows defining
a margin before which we consider the token as expired.
This is a configurable parameter in the django settings because the time a page
takes to render is infra and deployment specific. This margin is preset to
ten seconds.
Requires: https://review.openstack.org/101556
Closes-Bug: 1308918
Change-Id: I0bf0d079a9dc000c1a30f0e20dcaa03b22d63e51
We have two imports with #noqa: django.conf.urls.patterns and
django.conf.urls.url however using them is a standard way of creating
any urls.py module. So there are over 150 imports in Horizon code
where #noqa could be replaced with two lines in list of import_exceptions.
Change-Id: I81c3290e0dc958b5037dd6a87e44df18adfbe751
Some general guidelines:
1. Removed contractions
2. Changed "Info" to "Information"
3. Removed the "From here you can..." at the beginning of messages.
4. Explained concepts to users instead of just reiterating the modal
title. Thanks Jeff Calcaterra!
Co-Authored-By: Cindy Lu <clu@us.ibm.com>
Closes-Bug: #1329984
Change-Id: I35af81953cafcbafc28c31b3ce305e8c5e21fe84
Keystone have a policy for change password, we need to apply this to
horizon too.
policy:
"identity:change_password": "rule:admin_or_owner"
Change-Id: Idd35646f9cbe4fadaa96bc85b243ed4f7823d9dd
Closes-bug: 1347354
Updated to bootstrap 3.2.0
back to v3.1.1
fix base-line-height variable
Revamped grid system
Replaced help-inline with help-block
Change .control-group to .form-group
Add column widths to horizontal form labels and .controls, remove .controls class
Datepicker form fix
Add btn-default to btn elements with no other color
Topbar switcher fix
Rename button sizes
Replace alert-error with alert-danger
Removed alert-block
Alerts fixing
Updated LinkAction and Action table actions to define icon, replaced btn-default icon with glyphicon
Replaced icons with glyphicons, removed btn-icon styling from horizon.scss
change Button Icons text in customizing docs
Fixed table header
Fix page_header h2 margin
Nav accordion fix
Tables fix
Modal fixes
added form-control class to input and selects
Forms fixes
Workflow modal fix
Fix quota bar
updated customizing docs
removed unused styling from horizon.scss
make datepicker form inline
fix table filter styling
added btn-danger to terminate instances button
fixed loading spinner
form fields and validations
Created bootstrap_form_field filter and template to render bootstrap forms properly
Style up the datepicker
Fixed failing test cases
Implements: blueprint bootstrap-update
Change-Id: Ic826849be1af7fc6bf06f97dd7a60fc54b862148
The new django_openstack_auth 1.1.6 library surfaced a defect in this
test, whereby the test client does not properly log out the user. This
only affects the test, the functionality otherwise works fine.
This temporarily disables the test in order to repair the gate, while
waiting to replace it with a new unit test more reduced in scope and/or
an integration test.
Change-Id: I8779666c053a4835e22038a39a530fe5fc84b6a3
Partial-Bug: #1333144
Since 'Change Password' form handle successfully return
httpResponseRedirect(settings.LOGOUT_URL), it's no need
to set success_url and never reach the 'return True' at
the end.
Change-Id: I47c8888b07d06044fec8f06042d4ef6401e77097
Closes-Bug: #1331329
Remove vim setting:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4
at the top of source code files, except for files in
openstack/common.
Change-Id: I9a5c6b17c6ef7ecec601f4503dfc7b31fc72e90a
Close-bug: #1229324
We have a lot of import with #noqa that is there to ignore h302,
because it's traditional to import and use a name directly, instead
of a whole module. This hides other errors and gives people the
impression that it's actually fine to import non-modules, you just
have to slap #noqa on those lines.
I went through the code and identified about a dozen names that are
most commonly imported this way. I remove the #noqa tag from them,
and added them to the list in import_exceptions.
I also removed a few unused imports that were revealed in the process.
Change-Id: I27afb8e2b1d4759ec974ded9464d8f010312ee78
These imports aren't available in Django 1.6. We need to use
django.conf.urls instead.
Partially-implements blueprint django-1point6
Change-Id: I692439a76de4fe5abff9ab9395bad5c10f1cdbba
When using keystone v3, it was possible to change the user
password without knowing the old password.
Change-Id: I2e3721f9c8a1de4b9a5f85b230432844d2c83507
Closes-Bug: 1237989
In some cases, particularly when having to log the user out after
performing some action (e.g. password change), we want to display a
friendly message on the login screen to explain to the user why they
have been redirected to the login page.
This adds a function to do so, and uses it in a couple of places:
- When updating one's own password using the Settings panel
- Session time out
- HTTP 401
Change-Id: Ie53c5552159304e1f1304ac6211b3accfd9aa623
Implements: blueprint messages-on-login-page
This patch set removes some commented out stuff that
has been unintentially left in "H302 check" patch set.
It also replaces a couple more method imports with
module imports.
Fixes bug 1215892
Change-Id: I35fd880154a4ea6d6d8d3b3615103c271aa4a005
This patch replaces some method imports with module imports and
makes H302 test enabled.
Fixes bug 1188531
Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
Fixes all occurrences of this. We have a custom exception handler
in Horizon anyway that only catches ClientException in most of these
cases, but this commit lets us gate on the other cases.
Change-Id: Iea3dc13817f3e5b775b2024424bf3a906da5584b
Closes-Bug: #1211657
This check looks to see whether a local variable
is unused. Also fixed all violators of said check.
Change-Id: I7c186df41b5601078ffc54588aace8136c6576bd
This patch replaces relative imports with full paths and
makes H304 test enabled.
Fixes bug 1188535
Change-Id: I47254cf9a790727102f7993d0fd107da514983df
This patch also re-organizes imports to import one per line.
Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
In the move to make flake8 tests stricter, we need a code
cleanup earlier.
This removes all unused imports and also enables tests to prevent
them for the future.
This patch also includes the checks on __init__.py files.
Change-Id: I34055803f7c4726682ac6fb95cc5b50ba761fec8
Fixes: bug 1188134
Add change password panel on settings dashboard to enable users
to change their passwords
Change-Id: Ibfea2592e13aab3cc4892dce77ab62dcba65eacc
Implements: blueprint change-user-passwords