Commit 49aabc75 by Oláh István Gergely

dashboard: add node detail view

parent 2022d10b
......@@ -43,6 +43,12 @@ class IndexView(TemplateView):
'more_instances': instances.count() - len(instances[:5])
})
nodes = Node.objects.all()
context.update({
'nodes': nodes[:1],
'more_nodes': nodes.count() - len(nodes[:1])
})
context.update({
'running_vms': instances.filter(state='RUNNING'),
'running_vm_num': instances.filter(state='RUNNING').count(),
......@@ -195,6 +201,15 @@ class VmDetailView(CheckedDetailView):
)
class NodeDetailView(DetailView):
template_name = "dashboard/node-detail.html"
model = Node
def get_context_data(self, **kwargs):
context = super(NodeDetailView, self).get_context_data(**kwargs)
return context
class AclUpdateView(View, SingleObjectMixin):
def post(self, request, *args, **kwargs):
......
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