Commit b566ae91 by Kálmán Viktor

dashboard: better filtering of stopped vms

parent 1ea1f78b
......@@ -23,12 +23,11 @@ class IndexView(TemplateView):
'more_instances': instances.count() - len(instances[:5])
stopped_vm_states = ['PAUSED', 'SHUTDOWN', 'SHUTOFF']
'running_vms': instances.filter(state='RUNNING'),
'running_vm_num': instances.filter(state='RUNNING').count(),
'stopped_vm_num': instances.filter(
'stopped_vm_num': instances.exclude(
state__in=['RUNNING', 'NOSTATE']).count()
return context
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