Refactor upgrade websocket progress, so "anyone" can join in to see
now while an upgrade is executing, anyone with permission can "view" the upgrade and see the same progress the executor is seeing
This commit is contained in:
parent
18cec49a86
commit
e93063a344
3 changed files with 204 additions and 127 deletions
|
@ -1063,6 +1063,8 @@ class MasterView(View):
|
|||
'instance_deletable': self.deletable_instance(instance),
|
||||
'form': form,
|
||||
}
|
||||
if self.executable:
|
||||
context['instance_executable'] = self.executable_instance(instance)
|
||||
if hasattr(form, 'make_deform_form'):
|
||||
context['dform'] = form.make_deform_form()
|
||||
|
||||
|
@ -1784,6 +1786,14 @@ class MasterView(View):
|
|||
elif importer.allow_create:
|
||||
return importer.create_object(key, host_data)
|
||||
|
||||
def executable_instance(self, instance):
|
||||
"""
|
||||
Returns boolean indicating whether or not the given instance
|
||||
can be considered "executable". Returns ``True`` by default;
|
||||
override as necessary.
|
||||
"""
|
||||
return True
|
||||
|
||||
def execute(self):
|
||||
"""
|
||||
Execute an object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue