Commit 03ae1309 by Őry Máté

dashboard: reorder operation buttons by hand

parent f49834d1
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
from __future__ import unicode_literals, absolute_import from __future__ import unicode_literals, absolute_import
from collections import OrderedDict
from itertools import chain from itertools import chain
from os import getenv from os import getenv
import json import json
...@@ -691,22 +692,31 @@ class VmSaveView(FormOperationMixin, VmOperationView): ...@@ -691,22 +692,31 @@ class VmSaveView(FormOperationMixin, VmOperationView):
op = 'save_as_template' op = 'save_as_template'
icon = 'save' icon = 'save'
effect = 'info'
form_class = VmSaveForm form_class = VmSaveForm
vm_ops = { vm_ops = OrderedDict([
'reset': VmOperationView.factory(op='reset', icon='bolt'), ('deploy', VmOperationView.factory(
'deploy': VmOperationView.factory(op='deploy', icon='play'), op='deploy', icon='play')),
'migrate': VmMigrateView, ('wake_up', VmOperationView.factory(
'reboot': VmOperationView.factory(op='reboot', icon='refresh'), op='wake_up', icon='sun')),
'shut_off': VmOperationView.factory(op='shut_off', icon='ban-circle'), ('sleep', VmOperationView.factory(
'shutdown': VmOperationView.factory(op='shutdown', icon='off'), op='sleep', icon='moon')),
'save_as_template': VmSaveView, ('migrate', VmMigrateView),
'destroy': VmOperationView.factory(op='destroy', icon='remove'), ('save_as_template', VmSaveView),
'sleep': VmOperationView.factory(op='sleep', icon='moon'), ('reboot', VmOperationView.factory(
'wake_up': VmOperationView.factory(op='wake_up', icon='sun'), op='reboot', icon='refresh')),
'create_disk': VmCreateDiskView, ('reset', VmOperationView.factory(
'download_disk': VmDownloadDiskView, op='reset', icon='bolt')),
} ('shutdown', VmOperationView.factory(
op='shutdown', icon='off')),
('shut_off', VmOperationView.factory(
op='shut_off', icon='ban-circle')),
('destroy', VmOperationView.factory(
op='destroy', icon='remove')),
('create_disk', VmCreateDiskView),
('download_disk', VmDownloadDiskView),
])
def get_operations(instance, user): def get_operations(instance, user):
......
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