Update API version to 2.33

The Manila API version in the UI needs to be updated
and it was advised to do that step by step.

In this patch we update it to v2.33, that adds timestamp details:
’updated_at’ & ‘created_at’ to access_list API
With this patch we make those two added values visible in the dashboard
at:
   /dashboard/project/shares/<share_id>/
   /dashboard/project/shares/<share_id>/rules/
   /dashboard/admin/shares/<share_id>/

Partial-Bug: #1823078
Change-Id: I2502e1446070ef625538c13a30438a548498626e
This commit is contained in:
Maari Tamm 2020-01-24 13:41:01 +00:00
parent c20a5e0286
commit 7ff565844a
5 changed files with 39 additions and 19 deletions

View File

@ -32,7 +32,7 @@ LOG = logging.getLogger(__name__)
MANILA_UI_USER_AGENT_REPR = "manila_ui_plugin_for_horizon"
# NOTE(vponomaryov): update version to 2.34 when manilaclient is released with
# its support. It will allow to show 'availability zones' for share groups.
MANILA_VERSION = "2.32" # requires manilaclient 1.13.0 or newer
MANILA_VERSION = "2.33" # requires manilaclient 1.16.0 or newer
MANILA_SERVICE_TYPE = "sharev2"
# API static values

View File

@ -81,15 +81,19 @@
<h4>{% trans "Access Rules" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
{% for rule in share.rules %}
{% for rule in share.rules %}
<dt>{{ rule.access_type }}</dt>
<dd><p>
<div><b>Access to: </b>{{ rule.access_to }}</div>
<div><b>Access Level: </b>{{ rule.access_level }}</div>
<div><b>Status: </b>{{ rule.state }}</div>
<div><b>Access Key: </b>{{ rule.access_key }}</div>
</p></dd>
{% endfor %}
<dd>
<p>
<div><b>Access to: </b>{{ rule.access_to }}</div>
<div><b>Access Level: </b>{{ rule.access_level }}</div>
<div><b>Status: </b>{{ rule.state }}</div>
<div><b>Access Key: </b>{{ rule.access_key }}</div>
<div><b>Created At: </b>{{ rule.created_at|parse_date }}</div>
<div><b>Updated At: </b>{{ rule.updated_at|parse_date }}</div>
</p>
</dd>
{% endfor %}
</dl>
</div>
@ -102,4 +106,4 @@
<dd>{{ value }}</dd>
{% endfor %}
</dl>
</div>
</div>

View File

@ -21,6 +21,7 @@ from django.utils.translation import ungettext_lazy
from horizon import exceptions
from horizon import messages
from horizon import tables
from horizon.utils import filters
from manila_ui.api import manila
from manila_ui.dashboards.project.share_snapshots import tables as ss_tables
@ -359,6 +360,10 @@ class RulesTable(tables.DataTable):
"access_level", verbose_name=_("Access Level"))
status = tables.Column("state", verbose_name=_("Status"))
access_key = tables.Column("access_key", verbose_name=_("Access Key"))
created_at = tables.Column("created_at", verbose_name=_("Created At"),
filters=(filters.parse_isotime,))
updated_at = tables.Column("updated_at", verbose_name=_("Updated At"),
filters=(filters.parse_isotime,))
def get_object_display(self, obj):
return obj.id

View File

@ -83,15 +83,19 @@
<h4>{% trans "Access Rules" %}</h4>
<hr class="header_rule">
<dl class="dl-horizontal">
{% for rule in share.rules %}
{% for rule in share.rules %}
<dt>{{ rule.access_type }}</dt>
<dd><p>
<div><b>Access to: </b>{{ rule.access_to }}</div>
<div><b>Access Level: </b>{{ rule.access_level }}</div>
<div><b>Status: </b>{{ rule.state }}</div>
<div><b>Access Key: </b>{{ rule.access_key }}</div>
</p></dd>
{% endfor %}
<dd>
<p>
<div><b>Access to: </b>{{ rule.access_to }}</div>
<div><b>Access Level: </b>{{ rule.access_level }}</div>
<div><b>Status: </b>{{ rule.state }}</div>
<div><b>Access Key: </b>{{ rule.access_key }}</div>
<div><b>Created At: </b>{{ rule.created_at|parse_date }}</div>
<div><b>Updated At: </b>{{ rule.updated_at|parse_date }}</div>
</p>
</dd>
{% endfor %}
</dl>
</div>
@ -104,4 +108,4 @@
<dd>{{ value }}</dd>
{% endfor %}
</dl>
</div>
</div>

View File

@ -0,0 +1,7 @@
---
fixes:
- |
This change updates the Manila API version to 2.33.
This means that users can have access to timestamp details in access rules,
available since API v2.33