Commit 62303312 by Őry Máté

dashboard: add activity-icon lookup helpers

parent 2115aff1
......@@ -2958,6 +2958,20 @@ def get_disk_download_status(request, pk):
def _get_activity_icon(act):
op = act.get_operation()
if op and in vm_ops:
return vm_ops[].icon
return "cog"
def _format_activities(acts):
for i in acts:
i.icon = _get_activity_icon(i)
return acts
class InstanceActivityDetail(CheckedDetailView):
model = InstanceActivity
context_object_name = 'instanceactivity' # much simpler to mock object
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