Commit fc30e871 by Kálmán Viktor

Merge branch 'issue-288'

Conflicts:
	circle/dashboard/views/vm.py
parents 04beb592 fc3d79dd
...@@ -51,7 +51,8 @@ $(function() { ...@@ -51,7 +51,8 @@ $(function() {
if(data.success) { if(data.success) {
$('a[href="#activity"]').trigger("click"); $('a[href="#activity"]').trigger("click");
if(data.with_reload) { if(data.with_reload) {
location.reload(); // when the activity check stops the page will reload
reload_vm_detail = true;
} }
/* if there are messages display them */ /* if there are messages display them */
......
var show_all = false; var show_all = false;
var in_progress = false; var in_progress = false;
var activity_hash = 5; var activity_hash = 5;
var reload_vm_detail = false;
$(function() { $(function() {
/* do we need to check for new activities */ /* do we need to check for new activities */
...@@ -404,6 +405,7 @@ function checkNewActivity(runs) { ...@@ -404,6 +405,7 @@ function checkNewActivity(runs) {
); );
} else { } else {
in_progress = false; in_progress = false;
if(reload_vm_detail) location.reload();
} }
$('a[href="#activity"] i').removeClass('fa-spin'); $('a[href="#activity"] i').removeClass('fa-spin');
}, },
......
...@@ -372,6 +372,9 @@ class VmAddInterfaceView(FormOperationMixin, VmOperationView): ...@@ -372,6 +372,9 @@ class VmAddInterfaceView(FormOperationMixin, VmOperationView):
class VmDiskModifyView(FormOperationMixin, VmOperationView): class VmDiskModifyView(FormOperationMixin, VmOperationView):
show_in_toolbar = False show_in_toolbar = False
with_reload = True
icon = 'arrows-alt'
effect = "success"
def get_form_kwargs(self): def get_form_kwargs(self):
choices = self.get_op().instance.disks choices = self.get_op().instance.disks
...@@ -397,6 +400,7 @@ class VmCreateDiskView(FormOperationMixin, VmOperationView): ...@@ -397,6 +400,7 @@ class VmCreateDiskView(FormOperationMixin, VmOperationView):
icon = 'hdd-o' icon = 'hdd-o'
effect = "success" effect = "success"
is_disk_operation = True is_disk_operation = True
with_reload = True
def get_form_kwargs(self): def get_form_kwargs(self):
op = self.get_op() op = self.get_op()
...@@ -414,6 +418,7 @@ class VmDownloadDiskView(FormOperationMixin, VmOperationView): ...@@ -414,6 +418,7 @@ class VmDownloadDiskView(FormOperationMixin, VmOperationView):
icon = 'download' icon = 'download'
effect = "success" effect = "success"
is_disk_operation = True is_disk_operation = True
with_reload = True
class VmMigrateView(VmOperationView): class VmMigrateView(VmOperationView):
......
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