Merge "Fixes to match Horizon Rocky"
This commit is contained in:
commit
8f8022d3b8
@ -1,4 +1,4 @@
|
||||
{% overextends 'auth/_login_page.html' %}
|
||||
{% extends 'auth/_login_page.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block login_footer %}
|
||||
|
@ -20,7 +20,9 @@ from django.utils.translation import ungettext_lazy
|
||||
from horizon import exceptions
|
||||
from horizon import tables
|
||||
|
||||
from openstack_dashboard.dashboards.admin.defaults.tables import get_quota_name
|
||||
from openstack_dashboard.dashboards.admin.defaults.tables import (
|
||||
get_compute_quota_name, get_volume_quota_name, get_network_quota_name
|
||||
)
|
||||
|
||||
from adjutant_ui.api import adjutant
|
||||
|
||||
@ -35,6 +37,17 @@ def display_as_percent(value):
|
||||
return '{:.1%}'.format(value)
|
||||
|
||||
|
||||
def get_quota_name(quota):
|
||||
if quota.service == "nova":
|
||||
return get_compute_quota_name(quota)
|
||||
if quota.service == "cinder":
|
||||
return get_volume_quota_name(quota)
|
||||
if quota.service == "neutron":
|
||||
return get_network_quota_name(quota)
|
||||
|
||||
return quota.name.replace("_", " ").title()
|
||||
|
||||
|
||||
class UpdateQuota(tables.LinkAction):
|
||||
name = "update"
|
||||
verbose_name = _("Update Quota")
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% overextends 'auth/_login_page.html' %}
|
||||
{% extends 'auth/_login_page.html' %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block login_footer %}
|
||||
|
@ -5,29 +5,4 @@ FEATURE = "adjutant-ui-base"
|
||||
# A list of applications to be added to INSTALLED_APPS.
|
||||
ADD_INSTALLED_APPS = [
|
||||
'adjutant_ui',
|
||||
'overextends',
|
||||
]
|
||||
|
||||
# TODO(adriant): Remove this and overextends when we drop django<1.11
|
||||
from distutils.version import StrictVersion # noqa
|
||||
import django # noqa
|
||||
|
||||
if StrictVersion(django.__version__) >= StrictVersion("1.9"):
|
||||
from openstack_dashboard.settings import TEMPLATES as _TEMPLATES
|
||||
|
||||
_builtin = 'overextends.templatetags.overextends_tags'
|
||||
_template_backend = 'django.template.backends.django.DjangoTemplates'
|
||||
|
||||
for _backend in _TEMPLATES:
|
||||
if _backend['BACKEND'] == _template_backend:
|
||||
if 'OPTIONS' in _backend:
|
||||
try:
|
||||
if _builtin not in _backend['OPTIONS']['builtins']:
|
||||
_backend['OPTIONS']['builtins'].append(_builtin)
|
||||
except KeyError:
|
||||
_backend['OPTIONS']['builtins'] = [_builtin, ]
|
||||
else:
|
||||
_backend['OPTIONS'] = {
|
||||
'builtins': [_builtin, ]
|
||||
}
|
||||
break
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% overextends 'auth/_login_page.html' %}
|
||||
{% extends 'auth/_login_page.html' %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load relabel_username_field %}
|
||||
|
@ -9,6 +9,5 @@
|
||||
# PBR should always appear first
|
||||
pbr>=2.0.0 # Apache-2.0
|
||||
Babel>=2.3.4 # BSD
|
||||
Django<1.12,>=1.8 # BSD
|
||||
Django<1.12,>=1.11 # BSD
|
||||
django-babel>=0.5.1 # BSD
|
||||
django-overextends>=0.4.2
|
||||
|
Loading…
Reference in New Issue
Block a user