Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
b6b57fa4
authored
Sep 20, 2018
by
Chif Gergő
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flake8 warning, rename function
parent
4fc8b149
Pipeline
#658
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
circle/dashboard/views/node.py
+4
-3
No files found.
circle/dashboard/views/node.py
View file @
b6b57fa4
...
...
@@ -193,6 +193,7 @@ class NodeList(LoginRequiredMixin, GraphMixin, SingleTableView):
def
get
(
self
,
*
args
,
**
kwargs
):
if
not
self
.
request
.
user
.
has_perm
(
'vm.view_statistics'
):
raise
PermissionDenied
()
self
.
wrong_nodes_message
()
if
self
.
request
.
is_ajax
():
nodes
=
Node
.
objects
.
all
()
nodes
=
[{
...
...
@@ -210,14 +211,14 @@ class NodeList(LoginRequiredMixin, GraphMixin, SingleTableView):
return
super
(
NodeList
,
self
)
.
get
(
*
args
,
**
kwargs
)
def
get_queryset
(
self
):
self
.
wrong_node_message
()
return
Node
.
objects
.
annotate
(
number_of_VMs
=
Count
(
'instance_set'
))
.
select_related
(
'host'
)
def
wrong_node_message
(
self
):
def
wrong_node
s
_message
(
self
):
for
node
in
Node
.
objects
.
all
():
if
node
.
monitor_info
is
None
:
messages
.
error
(
self
.
request
,
"Can't reach "
+
node
.
name
+
" monitor info"
)
messages
.
error
(
self
.
request
,
"Can't reach "
+
node
.
name
+
" monitor info"
)
class
NodeCreate
(
LoginRequiredMixin
,
SuperuserRequiredMixin
,
TemplateView
):
...
...
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