Size(GiB) - fix for forgotten space
and fix few small mistakes Change-Id: Ic8271dd179178bdf00478c0ce4949d653d8e75a4
This commit is contained in:
parent
cbea7e9e88
commit
63780f4b76
@ -100,7 +100,7 @@ class BackupsFilterAction(tables.FilterAction):
|
||||
filter_choices = (
|
||||
('project', _("Project ="), True),
|
||||
('name', _("Backup Name ="), True),
|
||||
('size', _("Size(GiB) ="), True),
|
||||
('size', _("Size (GiB) ="), True),
|
||||
('status', _("Status ="), True),
|
||||
('volume_id', _("Volume ID ="), True,),
|
||||
)
|
||||
|
@ -120,15 +120,15 @@ def get_size(flavor):
|
||||
|
||||
|
||||
def get_swap_size(flavor):
|
||||
return _("%sMB") % (flavor.swap or 0)
|
||||
return _("%s MB") % (flavor.swap or 0)
|
||||
|
||||
|
||||
def get_disk_size(flavor):
|
||||
return _("%sGB") % (flavor.disk or 0)
|
||||
return _("%s GB") % (flavor.disk or 0)
|
||||
|
||||
|
||||
def get_ephemeral_size(flavor):
|
||||
return _("%sGB") % getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral', 0)
|
||||
return _("%s GB") % getattr(flavor, 'OS-FLV-EXT-DATA:ephemeral', 0)
|
||||
|
||||
|
||||
def get_extra_specs(flavor):
|
||||
|
@ -147,11 +147,11 @@ class CreatePolicyForm(forms.SelfHandlingForm):
|
||||
return rbac_policy
|
||||
except neutron_exc.OverQuotaClient:
|
||||
redirect = reverse('horizon:admin:rbac_policies:index')
|
||||
msg = _('rbac policy quota exceeded.')
|
||||
msg = _('RBAC Policy quota exceeded.')
|
||||
exceptions.handle(request, msg, redirect=redirect)
|
||||
except Exception:
|
||||
redirect = reverse('horizon:admin:rbac_policies:index')
|
||||
msg = _('Failed to create a rbac policy.')
|
||||
msg = _('Failed to create a RBAC Policy.')
|
||||
exceptions.handle(request, msg, redirect=redirect)
|
||||
return False
|
||||
|
||||
@ -179,9 +179,9 @@ class UpdatePolicyForm(forms.SelfHandlingForm):
|
||||
messages.success(request, msg)
|
||||
return rbac_policy
|
||||
except Exception as e:
|
||||
LOG.info('Failed to update rbac policy %(id)s: %(exc)s',
|
||||
LOG.info('Failed to update RBAC Policy %(id)s: %(exc)s',
|
||||
{'id': self.initial['rbac_policy_id'], 'exc': e})
|
||||
msg = _('Failed to update rbac policy %s') \
|
||||
msg = _('Failed to update RBAC Policy %s') \
|
||||
% self.initial['rbac_policy_id']
|
||||
redirect = reverse(self.failure_url)
|
||||
exceptions.handle(request, msg, redirect=redirect)
|
||||
|
@ -38,7 +38,7 @@ class OverviewTab(tabs.Tab):
|
||||
rbac_policy_id)
|
||||
|
||||
except Exception:
|
||||
msg = _('Unable to retrieve details for rbac_policy "%s".') \
|
||||
msg = _('Unable to retrieve details for RBAC Policy "%s".') \
|
||||
% (rbac_policy_id)
|
||||
exceptions.handle(self.request, msg)
|
||||
return rbac_policy
|
||||
|
@ -3,5 +3,5 @@
|
||||
|
||||
{% block modal-body-right %}
|
||||
<h3>{% trans "Description:" %}</h3>
|
||||
<p>{% trans "From here you can create a rbac policy." %}</p>
|
||||
<p>{% trans "From here you can create a RBAC Policy." %}</p>
|
||||
{% endblock %}
|
||||
|
@ -129,7 +129,7 @@ class UpdateView(forms.ModalFormView):
|
||||
return api.neutron.rbac_policy_get(self.request, rbac_policy_id)
|
||||
except Exception:
|
||||
redirect = self.success_url
|
||||
msg = _('Unable to retrieve rbac policy details.')
|
||||
msg = _('Unable to retrieve RBAC Policy details.')
|
||||
exceptions.handle(self.request, msg, redirect=redirect)
|
||||
|
||||
def get_initial(self):
|
||||
|
@ -30,7 +30,7 @@ class VolumesFilterAction(tables.FilterAction):
|
||||
('encrypted', _('Encrypted ='), True),
|
||||
('availability_zone', _('Availability Zone ='), True),
|
||||
('status', _('Status ='), True),
|
||||
('size', _('Size(GiB) ='), True),
|
||||
('size', _('Size (GiB) ='), True),
|
||||
)
|
||||
|
||||
|
||||
|
@ -135,7 +135,7 @@ class UpdateRow(tables.Row):
|
||||
|
||||
|
||||
def get_size(backup):
|
||||
return _("%sGB") % backup.size
|
||||
return _("%s GB") % backup.size
|
||||
|
||||
|
||||
class BackupsFilterAction(tables.FilterAction):
|
||||
|
Loading…
x
Reference in New Issue
Block a user