Remove unused status related fields
The action and the status_reason fields are not used in the latest state-machine. This patch stops showing these unused fields. Partially Implements: blueprint state-machine Change-Id: I14e7e2c545c37f215c0303d6906748f4d5a120ab
This commit is contained in:
parent
14f738b23d
commit
c3e16dfed0
@ -33,8 +33,7 @@ class Lease(base.APIDictWrapper):
|
|||||||
) = ('IN_PROGRESS', 'FAILED', 'COMPLETE')
|
) = ('IN_PROGRESS', 'FAILED', 'COMPLETE')
|
||||||
|
|
||||||
_attrs = ['id', 'name', 'start_date', 'end_date', 'user_id', 'project_id',
|
_attrs = ['id', 'name', 'start_date', 'end_date', 'user_id', 'project_id',
|
||||||
'before_end_date', 'action', 'status', 'status_reason',
|
'before_end_date', 'status', 'degraded']
|
||||||
'degraded']
|
|
||||||
|
|
||||||
def __init__(self, apiresource):
|
def __init__(self, apiresource):
|
||||||
super(Lease, self).__init__(apiresource)
|
super(Lease, self).__init__(apiresource)
|
||||||
|
@ -84,9 +84,7 @@ class LeasesTable(tables.DataTable):
|
|||||||
filters=(filters.parse_isotime,
|
filters=(filters.parse_isotime,
|
||||||
partial(django_filters.date,
|
partial(django_filters.date,
|
||||||
arg='Y-m-d H:i T')),)
|
arg='Y-m-d H:i T')),)
|
||||||
action = tables.Column("action", verbose_name=_("Action"),)
|
|
||||||
status = tables.Column("status", verbose_name=_("Status"),)
|
status = tables.Column("status", verbose_name=_("Status"),)
|
||||||
status_reason = tables.Column("status_reason", verbose_name=_("Reason"),)
|
|
||||||
degraded = tables.Column("degraded", verbose_name=_("Degraded"),
|
degraded = tables.Column("degraded", verbose_name=_("Degraded"),
|
||||||
filters=(django_filters.yesno,
|
filters=(django_filters.yesno,
|
||||||
django_filters.capfirst),)
|
django_filters.capfirst),)
|
||||||
|
@ -15,12 +15,8 @@
|
|||||||
<dd>{{ lease.start_date|parse_isotime|date:"Y-m-d H:i T"|default:"-" }}</dd>
|
<dd>{{ lease.start_date|parse_isotime|date:"Y-m-d H:i T"|default:"-" }}</dd>
|
||||||
<dt>{% trans "End date" %}</dt>
|
<dt>{% trans "End date" %}</dt>
|
||||||
<dd>{{ lease.end_date|parse_isotime|date:"Y-m-d H:i T"|default:"-" }}</dd>
|
<dd>{{ lease.end_date|parse_isotime|date:"Y-m-d H:i T"|default:"-" }}</dd>
|
||||||
<dt>{% trans "Action" %}</dt>
|
|
||||||
<dd>{{ lease.action|default:"-" }}</dd>
|
|
||||||
<dt>{% trans "Status" %}</dt>
|
<dt>{% trans "Status" %}</dt>
|
||||||
<dd>{{ lease.status|default:"-" }}</dd>
|
<dd>{{ lease.status|default:"-" }}</dd>
|
||||||
<dt>{% trans "Status Reason" %}</dt>
|
|
||||||
<dd>{{ lease.status_reason|default:"-" }}</dd>
|
|
||||||
<dt>{% trans "Degraded" %}</dt>
|
<dt>{% trans "Degraded" %}</dt>
|
||||||
<dd>{{ lease.degraded|yesno|capfirst }}</dd>
|
<dd>{{ lease.degraded|yesno|capfirst }}</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -69,9 +69,7 @@ lease_sample1 = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
'id': '6ee55c78-ac52-41a6-99af-2d2d73bcc466',
|
'id': '6ee55c78-ac52-41a6-99af-2d2d73bcc466',
|
||||||
'action': None,
|
|
||||||
'project_id': 'aa45f56901ef45ee95e3d211097c0ea3',
|
'project_id': 'aa45f56901ef45ee95e3d211097c0ea3',
|
||||||
'status_reason': None,
|
|
||||||
'start_date': '2017-06-27T18:00:00.000000',
|
'start_date': '2017-06-27T18:00:00.000000',
|
||||||
'trust_id': 'b442a580b9504ababf305bf2b4c49512',
|
'trust_id': 'b442a580b9504ababf305bf2b4c49512',
|
||||||
'degraded': False
|
'degraded': False
|
||||||
@ -131,9 +129,7 @@ lease_sample2 = {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
'id': 'ef32abe8-a1f7-4c2f-b5f2-941428848230',
|
'id': 'ef32abe8-a1f7-4c2f-b5f2-941428848230',
|
||||||
'action': None,
|
|
||||||
'project_id': 'aa45f56901ef45ee95e3d211097c0ea3',
|
'project_id': 'aa45f56901ef45ee95e3d211097c0ea3',
|
||||||
'status_reason': None,
|
|
||||||
'start_date': '2017-06-27T18:00:00.000000',
|
'start_date': '2017-06-27T18:00:00.000000',
|
||||||
'trust_id': 'b442a580b9504ababf305bf2b4c49512',
|
'trust_id': 'b442a580b9504ababf305bf2b4c49512',
|
||||||
'degraded': False
|
'degraded': False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user