Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
49aabc75
authored
Nov 28, 2013
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add node detail view
parent
2022d10b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
circle/dashboard/views.py
+15
-0
No files found.
circle/dashboard/views.py
View file @
49aabc75
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment