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
Commit
2511d461
authored
Oct 04, 2017
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flake8 warnings
parent
ef5501a6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
circle/circle/__init__.py
+1
-0
circle/dashboard/views/graph.py
+9
-0
circle/firewall/admin.py
+1
-0
No files found.
circle/circle/__init__.py
View file @
2511d461
...
...
@@ -17,4 +17,5 @@ def update_permissions_after_migration(sender, **kwargs):
create_permissions
(
sender
,
apps
.
get_models
(),
2
if
settings
.
DEBUG
else
0
)
post_migrate
.
connect
(
update_permissions_after_migration
)
circle/dashboard/views/graph.py
View file @
2511d461
...
...
@@ -171,6 +171,7 @@ class TemplateVms(object):
def
get_minmax
(
self
):
return
(
0
,
None
)
register_graph
(
TemplateVms
,
'instances'
,
TemplateGraphView
)
...
...
@@ -197,6 +198,7 @@ class Ram(object):
def
get_minmax
(
self
):
return
(
0
,
105
)
register_graph
(
Ram
,
'memory'
,
VmGraphView
)
register_graph
(
Ram
,
'memory'
,
NodeGraphView
)
...
...
@@ -212,6 +214,7 @@ class Cpu(object):
else
:
return
(
0
,
self
.
obj
.
num_cores
*
100
+
5
)
register_graph
(
Cpu
,
'cpu'
,
VmGraphView
)
register_graph
(
Cpu
,
'cpu'
,
NodeGraphView
)
...
...
@@ -236,6 +239,7 @@ class VmNetwork(object):
params
))
return
'group(
%
s)'
%
','
.
join
(
metrics
)
if
metrics
else
None
register_graph
(
VmNetwork
,
'network'
,
VmGraphView
)
...
...
@@ -251,6 +255,7 @@ class NodeNetwork(object):
'10), ".*
\
.bytes_(sent|recv)-([a-zA-Z0-9]+).*", "
\\
2
\\
1")'
%
(
self
.
obj
.
metric_prefix
))
register_graph
(
NodeNetwork
,
'network'
,
NodeGraphView
)
...
...
@@ -262,6 +267,7 @@ class NodeVms(object):
def
get_minmax
(
self
):
return
(
0
,
None
)
register_graph
(
NodeVms
,
'vm'
,
NodeGraphView
)
...
...
@@ -282,6 +288,7 @@ class NodeAllocated(object):
def
get_minmax
(
self
):
return
(
0
,
None
)
register_graph
(
NodeAllocated
,
'alloc'
,
NodeGraphView
)
...
...
@@ -302,6 +309,7 @@ class NodeListAllocated(object):
def
get_minmax
(
self
):
return
(
0
,
None
)
register_graph
(
NodeListAllocated
,
'alloc'
,
NodeListGraphView
)
...
...
@@ -315,4 +323,5 @@ class NodeListVms(object):
def
get_minmax
(
self
):
return
(
0
,
None
)
register_graph
(
NodeListVms
,
'vm'
,
NodeListGraphView
)
circle/firewall/admin.py
View file @
2511d461
...
...
@@ -143,6 +143,7 @@ class SwitchPortAdmin(admin.ModelAdmin):
class
EthernetDeviceAdmin
(
admin
.
ModelAdmin
):
list_display
=
(
'name'
,
)
admin
.
site
.
register
(
Host
,
HostAdmin
)
admin
.
site
.
register
(
Vlan
,
VlanAdmin
)
admin
.
site
.
register
(
Rule
,
RuleAdmin
)
...
...
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