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
1eef65b6
authored
Sep 24, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix merge
parent
ed427beb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
22 deletions
+1
-22
circle/dashboard/views/node.py
+1
-22
No files found.
circle/dashboard/views/node.py
View file @
1eef65b6
...
...
@@ -38,7 +38,7 @@ from vm.models import Node, NodeActivity, Trait
from
..forms
import
TraitForm
,
HostForm
,
NodeForm
from
..tables
import
NodeListTable
from
.util
import
GraphViewBase
,
AjaxOperationMixin
,
OperationView
,
GraphMixin
from
.util
import
AjaxOperationMixin
,
OperationView
,
GraphMixin
def
get_operations
(
instance
,
user
):
...
...
@@ -351,24 +351,3 @@ class NodeStatus(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
else
:
messages
.
success
(
request
,
success_message
)
return
redirect
(
self
.
get_success_url
())
class
NodeGraphView
(
SuperuserRequiredMixin
,
GraphViewBase
):
metrics
=
{
'cpu'
:
(
'cactiStyle(alias(nonNegativeDerivative(
%(prefix)
s.cpu.times),'
'"cpu usage (
%%
)"))'
),
'memory'
:
(
'cactiStyle(alias(
%(prefix)
s.memory.usage,'
'"memory usage (
%%
)"))'
),
'network'
:
(
'cactiStyle(aliasByMetric('
'nonNegativeDerivative(
%(prefix)
s.network.bytes_*)))'
),
}
model
=
Node
def
get_prefix
(
self
,
instance
):
return
'circle.
%
s'
%
instance
.
host
.
hostname
def
get_title
(
self
,
instance
,
metric
):
return
'
%
s -
%
s'
%
(
instance
.
name
,
metric
)
def
get_object
(
self
,
request
,
pk
):
return
self
.
model
.
objects
.
get
(
id
=
pk
)
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