adjutant-ui 8.0.0__tar.gz → 9.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/AUTHORS +2 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/ChangeLog +6 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/PKG-INFO +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/api/adjutant.py +20 -12
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/default/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/email/forms.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/email/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/email/urls.py +2 -2
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/email/views.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/forms.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/urls.py +3 -3
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/tables.py +4 -4
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/tabs.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/urls.py +4 -4
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/views.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/forms.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/tables.py +7 -7
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/urls.py +6 -6
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/views.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/forms.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/tables.py +4 -4
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/templates/quota/region_detail.html +1 -1
- adjutant-ui-9.0.0/adjutant_ui/content/quota/templates/quota/size_detail.html +7 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/urls.py +8 -8
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/views.py +7 -5
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/forms.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/urls.py +3 -3
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/forms.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/tables.py +12 -12
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/tabs.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/urls.py +7 -7
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/views.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/forms.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/panel.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/urls.py +3 -3
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/views.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/dashboards/forgot_password_dash.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/dashboards/management.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/dashboards/signup_dash.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/dashboards/token_dash.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6020_management_access_control_group.py +1 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/templatetags/relabel_username_field.py +2 -2
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui.egg-info/PKG-INFO +1 -1
- adjutant-ui-9.0.0/adjutant_ui.egg-info/pbr.json +1 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/run_tests.sh +0 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/tox.ini +3 -3
- adjutant-ui-8.0.0/adjutant_ui/content/quota/templates/quota/size_detail.html +0 -11
- adjutant-ui-8.0.0/adjutant_ui.egg-info/pbr.json +0 -1
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/.zuul.yaml +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/LICENSE +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/README.rst +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/api/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/default/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/default/templates/default/base.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/email/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/email/templates/email/_change.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/email/templates/email/change.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/templates/auth/_login_page.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/templates/forgot_password/_forgot_password_form.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/templates/forgot_password/_index.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/templates/forgot_password/_sent.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/templates/forgot_password/_sent_text.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/templates/forgot_password/index.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/templates/forgot_password/sent.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/forgot_password/views.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/templates/notifications/detail.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/templates/notifications/index.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/notifications/templates/notifications/table_override.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/templates/project_users/_invite.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/templates/project_users/_role_help.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/templates/project_users/_update.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/templates/project_users/index.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/templates/project_users/invite.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/project_users/templates/project_users/update.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/templates/quota/_index_help.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/templates/quota/_update.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/templates/quota/index.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/quota/templates/quota/update.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/templates/auth/_login_page.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/templates/signup/_index.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/templates/signup/_signup_form.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/templates/signup/_submitted.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/templates/signup/_submitted_text.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/templates/signup/index.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/templates/signup/submitted.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/signup/views.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/templates/tasks/_task_detail_actions.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/templates/tasks/_task_detail_notes.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/templates/tasks/_task_detail_overview.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/templates/tasks/_update.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/templates/tasks/index.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/templates/tasks/update.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/templatetags/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/tasks/templatetags/task_filters.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/templates/token/_emailtokenconfirm.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/templates/token/_setpassword.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/templates/token/_setpassword_form.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/templates/token/_tokenconfirm.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/templates/token/_tokenconfirm_form.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/templates/token/emailtokenconfirm.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/templates/token/setpassword.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/content/token/templates/token/tokenconfirm.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/dashboards/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6000_management.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6001_adjutant_base.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6010_token.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6015_forgot_password.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6021_management_project_users.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6025_signup.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6070_settings_update_email.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6080_management_quota.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6090_management_task_list.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/_6100_management_notification_list.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/enabled/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/karma.conf.js +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/templates/auth/_login_page.html +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/templatetags/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/test/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/test/api_tests/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/test/api_tests/test_rest_api.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/test/helpers.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/test/integration_tests/__init__.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/test/settings.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/test/test_data.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui/version.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui.egg-info/SOURCES.txt +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui.egg-info/dependency_links.txt +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui.egg-info/not-zip-safe +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui.egg-info/requires.txt +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/adjutant_ui.egg-info/top_level.txt +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/babel-django.cfg +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/babel-djangojs.cfg +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/bindep.txt +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/doc/Makefile +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/doc/requirements.txt +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/doc/source/conf.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/doc/source/configuration.rst +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/doc/source/index.rst +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/doc/source/installation.rst +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/manage.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/requirements.txt +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/setup.cfg +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/setup.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/test-requirements.txt +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/test-shim.js +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/tools/install_venv.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/tools/install_venv_common.py +0 -0
- {adjutant-ui-8.0.0 → adjutant-ui-9.0.0}/tools/with_venv.sh +0 -0
@@ -3,7 +3,9 @@ Adrian Turjak <adriant@catalystcloud.nz>
|
|
3
3
|
Akihiro Motoki <amotoki@gmail.com>
|
4
4
|
Amelia Cordwell <ameliacordwell@catalyst.net.nz>
|
5
5
|
Andreas Jaeger <aj@suse.com>
|
6
|
+
Callum Dickinson <callum.dickinson@catalystcloud.nz>
|
6
7
|
Dale Smith <dale@catalystcloud.nz>
|
8
|
+
Dmitriy Rabotyagov <noonedeadpunk@gmail.com>
|
7
9
|
Ghanshyam Mann <gmann@ghanshyammann.com>
|
8
10
|
Hervé Beraud <hberaud@redhat.com>
|
9
11
|
Jonathan Herlin <Jonte@jherlin.se>
|
@@ -19,7 +19,7 @@ import requests
|
|
19
19
|
from urllib.parse import urljoin
|
20
20
|
|
21
21
|
from django.conf import settings
|
22
|
-
from django.utils.translation import
|
22
|
+
from django.utils.translation import gettext_lazy as _
|
23
23
|
|
24
24
|
from horizon import exceptions
|
25
25
|
from horizon.utils import functions as utils
|
@@ -625,20 +625,24 @@ def size_details_get(request, size, region=None):
|
|
625
625
|
resp = _get_quota_information(request, regions=region)
|
626
626
|
|
627
627
|
data = resp['quota_sizes'][size]
|
628
|
-
|
628
|
+
try:
|
629
|
+
region = resp['regions'][0]
|
630
|
+
except IndexError:
|
631
|
+
region = {}
|
632
|
+
current_quota = region.get('current_quota', {})
|
633
|
+
current_usage = region.get('current_usage', {})
|
629
634
|
for service, values in data.items():
|
630
|
-
if service not in resp['regions'][0]['current_usage']:
|
631
|
-
continue
|
632
635
|
for resource, value in values.items():
|
633
636
|
if _is_quota_hidden(service, resource):
|
634
637
|
continue
|
635
638
|
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
639
|
+
quota = current_quota.get(service, {}).get(resource, '-')
|
640
|
+
usage = current_usage.get(service, {}).get(resource, '-')
|
641
|
+
percent = (
|
642
|
+
'-'
|
643
|
+
if not value or usage == '-'
|
644
|
+
else (usage / value)
|
645
|
+
)
|
642
646
|
|
643
647
|
quota_details.append(
|
644
648
|
SIZE_QUOTA_VALUE(
|
@@ -646,7 +650,7 @@ def size_details_get(request, size, region=None):
|
|
646
650
|
name=resource,
|
647
651
|
service=service,
|
648
652
|
value=value,
|
649
|
-
current_quota=
|
653
|
+
current_quota=quota,
|
650
654
|
current_usage=usage,
|
651
655
|
percent=percent
|
652
656
|
)
|
@@ -659,7 +663,11 @@ def quota_details_get(request, region):
|
|
659
663
|
|
660
664
|
resp = _get_quota_information(request, regions=region)
|
661
665
|
|
662
|
-
|
666
|
+
try:
|
667
|
+
region = resp['regions'][0]
|
668
|
+
except IndexError:
|
669
|
+
region = {}
|
670
|
+
data = region.get('current_quota', {})
|
663
671
|
|
664
672
|
for service, values in data.items():
|
665
673
|
for name, value in values.items():
|
@@ -12,11 +12,11 @@
|
|
12
12
|
# License for the specific language governing permissions and limitations
|
13
13
|
# under the License.
|
14
14
|
|
15
|
-
from django.
|
15
|
+
from django.urls import re_path
|
16
16
|
|
17
17
|
from adjutant_ui.content.email import views
|
18
18
|
|
19
19
|
|
20
20
|
urlpatterns = [
|
21
|
-
|
21
|
+
re_path(r'^$', views.EmailView.as_view(), name='index')
|
22
22
|
]
|
@@ -15,7 +15,7 @@
|
|
15
15
|
from django.conf import settings
|
16
16
|
from django import forms
|
17
17
|
from django import http
|
18
|
-
from django.utils.translation import
|
18
|
+
from django.utils.translation import gettext_lazy as _
|
19
19
|
|
20
20
|
from horizon import forms as hforms
|
21
21
|
from horizon.utils import functions as utils
|
@@ -12,12 +12,12 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
from django.
|
15
|
+
from django.urls import re_path
|
16
16
|
|
17
17
|
from adjutant_ui.content.forgot_password import views
|
18
18
|
|
19
19
|
# NOTE(adriant): These urls are registered in the project_users urls.py file.
|
20
20
|
urlpatterns = [
|
21
|
-
|
22
|
-
|
21
|
+
re_path(r'^$', views.ForgotPasswordView.as_view(), name='forgot_index'),
|
22
|
+
re_path(r'^sent/?$', views.password_sent_view, name='forgot_sent'),
|
23
23
|
]
|
@@ -13,8 +13,8 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
15
|
from django.urls import reverse
|
16
|
-
from django.utils.translation import
|
17
|
-
from django.utils.translation import
|
16
|
+
from django.utils.translation import gettext_lazy as _
|
17
|
+
from django.utils.translation import ngettext_lazy
|
18
18
|
|
19
19
|
from horizon import exceptions
|
20
20
|
from horizon import tables
|
@@ -28,7 +28,7 @@ class AcknowlegeNotifcation(tables.BatchAction):
|
|
28
28
|
|
29
29
|
@staticmethod
|
30
30
|
def action_present(count):
|
31
|
-
return
|
31
|
+
return ngettext_lazy(
|
32
32
|
u"Acknowlege Notification",
|
33
33
|
u"Acknowlege Notifications",
|
34
34
|
count
|
@@ -36,7 +36,7 @@ class AcknowlegeNotifcation(tables.BatchAction):
|
|
36
36
|
|
37
37
|
@staticmethod
|
38
38
|
def action_past(count):
|
39
|
-
return
|
39
|
+
return ngettext_lazy(
|
40
40
|
u"Acknowleged Notification",
|
41
41
|
u"Acknowleged Notifications",
|
42
42
|
count
|
@@ -12,7 +12,7 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
from django.utils.translation import
|
15
|
+
from django.utils.translation import gettext_lazy as _
|
16
16
|
|
17
17
|
from horizon import exceptions
|
18
18
|
from horizon import tabs
|
@@ -13,13 +13,13 @@
|
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
15
|
|
16
|
-
from django.
|
16
|
+
from django.urls import re_path
|
17
17
|
|
18
18
|
from adjutant_ui.content.notifications import views
|
19
19
|
|
20
20
|
|
21
21
|
urlpatterns = [
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
re_path(r'^$', views.IndexView.as_view(), name='index'),
|
23
|
+
re_path(r'^(?P<notif_id>[^/]+)/$',
|
24
|
+
views.NotificationDetailView.as_view(), name='detail'),
|
25
25
|
]
|
@@ -14,8 +14,8 @@
|
|
14
14
|
|
15
15
|
from collections import defaultdict
|
16
16
|
|
17
|
-
from django.utils.translation import
|
18
|
-
from django.utils.translation import
|
17
|
+
from django.utils.translation import gettext_lazy as _
|
18
|
+
from django.utils.translation import ngettext_lazy
|
19
19
|
|
20
20
|
from horizon import exceptions
|
21
21
|
from horizon import tables
|
@@ -32,7 +32,7 @@ class InviteUser(tables.LinkAction):
|
|
32
32
|
|
33
33
|
@staticmethod
|
34
34
|
def action_past(count):
|
35
|
-
return
|
35
|
+
return ngettext_lazy(
|
36
36
|
u"Invited User",
|
37
37
|
u"Invited Users",
|
38
38
|
count
|
@@ -44,7 +44,7 @@ class ResendInvitation(tables.BatchAction):
|
|
44
44
|
|
45
45
|
@staticmethod
|
46
46
|
def action_present(count):
|
47
|
-
return
|
47
|
+
return ngettext_lazy(
|
48
48
|
u"Resend Invitation",
|
49
49
|
u"Resend Invitations",
|
50
50
|
count
|
@@ -52,7 +52,7 @@ class ResendInvitation(tables.BatchAction):
|
|
52
52
|
|
53
53
|
@staticmethod
|
54
54
|
def action_past(count):
|
55
|
-
return
|
55
|
+
return ngettext_lazy(
|
56
56
|
u"Invitation re-sent",
|
57
57
|
u"Invitations re-sent",
|
58
58
|
count
|
@@ -85,7 +85,7 @@ class RevokeUser(tables.DeleteAction):
|
|
85
85
|
|
86
86
|
@staticmethod
|
87
87
|
def action_present(count):
|
88
|
-
return
|
88
|
+
return ngettext_lazy(
|
89
89
|
u"Revoke User",
|
90
90
|
u"Revoke Users",
|
91
91
|
count
|
@@ -93,7 +93,7 @@ class RevokeUser(tables.DeleteAction):
|
|
93
93
|
|
94
94
|
@staticmethod
|
95
95
|
def action_past(count):
|
96
|
-
return
|
96
|
+
return ngettext_lazy(
|
97
97
|
u"Revoked User",
|
98
98
|
u"Revoked Users",
|
99
99
|
count
|
@@ -12,15 +12,15 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
from django.
|
15
|
+
from django.urls import re_path
|
16
16
|
|
17
17
|
from adjutant_ui.content.project_users import views
|
18
18
|
|
19
19
|
|
20
20
|
urlpatterns = [
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
re_path(r'^invite/$', views.InviteUserView.as_view(), name='invite'),
|
22
|
+
re_path(r'^(?P<user_id>[^/]+)/update/$',
|
23
|
+
views.UpdateUserView.as_view(),
|
24
|
+
name='update'),
|
25
|
+
re_path(r'^$', views.UsersView.as_view(), name='index')
|
26
26
|
]
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
from django.urls import reverse
|
16
16
|
from django.urls import reverse_lazy
|
17
|
-
from django.utils.translation import
|
17
|
+
from django.utils.translation import gettext_lazy as _
|
18
18
|
|
19
19
|
from horizon import exceptions
|
20
20
|
from horizon import forms
|
@@ -14,8 +14,8 @@
|
|
14
14
|
|
15
15
|
import json
|
16
16
|
|
17
|
-
from django.utils.translation import
|
18
|
-
from django.utils.translation import
|
17
|
+
from django.utils.translation import gettext_lazy as _
|
18
|
+
from django.utils.translation import ngettext_lazy
|
19
19
|
|
20
20
|
from horizon import exceptions
|
21
21
|
from horizon import tables
|
@@ -61,7 +61,7 @@ class CancelQuotaTask(tables.DeleteAction):
|
|
61
61
|
|
62
62
|
@staticmethod
|
63
63
|
def action_present(count):
|
64
|
-
return
|
64
|
+
return ngettext_lazy(
|
65
65
|
u"Cancel Quota Update",
|
66
66
|
u"Cancel Quota Updates",
|
67
67
|
count
|
@@ -69,7 +69,7 @@ class CancelQuotaTask(tables.DeleteAction):
|
|
69
69
|
|
70
70
|
@staticmethod
|
71
71
|
def action_past(count):
|
72
|
-
return
|
72
|
+
return ngettext_lazy(
|
73
73
|
u"Cancelled Quota Update",
|
74
74
|
u"Cancelled Quota Updates",
|
75
75
|
count
|
@@ -12,17 +12,17 @@
|
|
12
12
|
# License for the specific language governing permissions and limitations
|
13
13
|
# under the License.
|
14
14
|
|
15
|
-
from django.
|
15
|
+
from django.urls import re_path
|
16
16
|
|
17
17
|
from adjutant_ui.content.quota import views
|
18
18
|
|
19
19
|
|
20
20
|
urlpatterns = [
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
re_path(r'^$', views.IndexView.as_view(), name='index'),
|
22
|
+
re_path(r'^region/(?P<region>[^/]+)$', views.RegionDetailView.as_view(),
|
23
|
+
name='region_detail'),
|
24
|
+
re_path(r'^(?P<region>[^/]+)/update$',
|
25
|
+
views.RegionUpdateView.as_view(), name='update'),
|
26
|
+
re_path(r'^size/(?P<size>[^/]+)$', views.QuotaSizeView.as_view(),
|
27
|
+
name='size_detail'),
|
28
28
|
]
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
from django.urls import reverse
|
16
16
|
from django.urls import reverse_lazy
|
17
|
-
from django.utils.translation import
|
17
|
+
from django.utils.translation import gettext_lazy as _
|
18
18
|
|
19
19
|
from horizon import exceptions
|
20
20
|
from horizon import forms
|
@@ -57,7 +57,7 @@ class IndexView(horizon_tables.MultiTableView):
|
|
57
57
|
class RegionDetailView(horizon_tables.DataTableView):
|
58
58
|
table_class = quota_tables.RegionQuotaDetailTable
|
59
59
|
template_name = 'management/quota/region_detail.html'
|
60
|
-
page_title = _("
|
60
|
+
page_title = _("{{ region }} Quota Details")
|
61
61
|
|
62
62
|
def get_data(self):
|
63
63
|
try:
|
@@ -76,7 +76,7 @@ class RegionDetailView(horizon_tables.DataTableView):
|
|
76
76
|
class QuotaSizeView(horizon_tables.DataTableView):
|
77
77
|
table_class = quota_tables.QuotaDetailUsageTable
|
78
78
|
template_name = 'management/quota/size_detail.html'
|
79
|
-
page_title = _("
|
79
|
+
page_title = _("{{ size | title }} Quota Details")
|
80
80
|
|
81
81
|
def get_data(self):
|
82
82
|
try:
|
@@ -89,8 +89,10 @@ class QuotaSizeView(horizon_tables.DataTableView):
|
|
89
89
|
def get_context_data(self, **kwargs):
|
90
90
|
# request.user.services_region
|
91
91
|
context = super(QuotaSizeView, self).get_context_data(**kwargs)
|
92
|
-
context['
|
93
|
-
|
92
|
+
context['size'] = self.kwargs['size']
|
93
|
+
# NOTE(callumdickinson): Necessary because the title filter
|
94
|
+
# is overloaded in the title block.
|
95
|
+
context['size_titlecase'] = self.kwargs['size'].title()
|
94
96
|
return context
|
95
97
|
|
96
98
|
|
@@ -15,7 +15,7 @@
|
|
15
15
|
from django.conf import settings
|
16
16
|
from django import forms
|
17
17
|
from django import http
|
18
|
-
from django.utils.translation import
|
18
|
+
from django.utils.translation import gettext_lazy as _
|
19
19
|
|
20
20
|
from horizon import forms as hforms
|
21
21
|
from horizon.utils import functions as utils
|
@@ -12,11 +12,11 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
from django.
|
15
|
+
from django.urls import re_path
|
16
16
|
|
17
17
|
from adjutant_ui.content.signup import views
|
18
18
|
|
19
19
|
urlpatterns = [
|
20
|
-
|
21
|
-
|
20
|
+
re_path(r'^$', views.SignupFormView.as_view(), name='index'),
|
21
|
+
re_path(r'^submitted/?$', views.signup_sent_view, name='submitted'),
|
22
22
|
]
|
@@ -12,7 +12,7 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
from django.utils.translation import
|
15
|
+
from django.utils.translation import gettext_lazy as _
|
16
16
|
|
17
17
|
from horizon import forms
|
18
18
|
from horizon import messages
|