Commit 8e306d05 by Őry Máté

dashboard: refactor VmRenewView to an explicit class

parent 4f4bd0c6
...@@ -803,6 +803,13 @@ class TokenOperationView(OperationView): ...@@ -803,6 +803,13 @@ class TokenOperationView(OperationView):
return user return user
class VmRenewView(TokenOperationView, VmOperationView):
op = 'renew'
icon = 'calendar'
effect = 'info'
show_in_toolbar = False
vm_ops = OrderedDict([ vm_ops = OrderedDict([
('deploy', VmOperationView.factory( ('deploy', VmOperationView.factory(
op='deploy', icon='play', effect='success')), op='deploy', icon='play', effect='success')),
...@@ -826,9 +833,7 @@ vm_ops = OrderedDict([ ...@@ -826,9 +833,7 @@ vm_ops = OrderedDict([
op='destroy', icon='remove', effect='danger')), op='destroy', icon='remove', effect='danger')),
('create_disk', VmCreateDiskView), ('create_disk', VmCreateDiskView),
('download_disk', VmDownloadDiskView), ('download_disk', VmDownloadDiskView),
('renew', VmOperationView.factory( ('renew', VmRenewView),
op='renew', icon='calendar', extra_bases=[TokenOperationView],
show_in_toolbar=False)),
]) ])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment