Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3886665c
authored
Jun 17, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix calvin
parent
15a3ba50
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
circle/dashboard/templates/dashboard/node-list/column-monitor.html
+1
-1
circle/vm/models/node.py
+2
-1
No files found.
circle/dashboard/templates/dashboard/node-list/column-monitor.html
View file @
3886665c
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
style=
"width: {% widthratio record.cpu_usage 1 100 %}%;"
>
style=
"width: {% widthratio record.cpu_usage 1 100 %}%;"
>
<span
class=
"progress-bar-text"
>
<span
class=
"progress-bar-text"
>
{% if record.cpu_usage != None %}
{% if record.cpu_usage != None %}
{
{ record.cpu_usage|floatformat:1 }
} %
{
% widthratio record.cpu_usage 1 100 %
} %
{% else %}
{% else %}
-
-
{% endif %}
{% endif %}
...
...
circle/vm/models/node.py
View file @
3886665c
...
@@ -246,6 +246,7 @@ class Node(OperatedMixin, TimeStampedModel):
...
@@ -246,6 +246,7 @@ class Node(OperatedMixin, TimeStampedModel):
return
default
return
default
@node_available
@node_available
@method_cache
(
10
)
def
get_monitor_info
(
self
):
def
get_monitor_info
(
self
):
try
:
try
:
handler
=
GraphiteHandler
()
handler
=
GraphiteHandler
()
...
@@ -269,7 +270,7 @@ class Node(OperatedMixin, TimeStampedModel):
...
@@ -269,7 +270,7 @@ class Node(OperatedMixin, TimeStampedModel):
for
metric
in
metrics
:
for
metric
in
metrics
:
response
=
handler
.
pop
()
response
=
handler
.
pop
()
try
:
try
:
cache
=
response
[
0
][
"datapoints"
][
-
1
][
0
]
cache
=
response
[
0
][
"datapoints"
][
-
2
][
0
]
except
(
IndexError
,
KeyError
):
except
(
IndexError
,
KeyError
):
cache
=
0
cache
=
0
if
cache
is
None
:
if
cache
is
None
:
...
...
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