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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
0107aa6d
authored
Sep 22, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add graph time options
parent
d3fb12c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
circle/dashboard/templates/dashboard/vm-detail/home.html
+11
-3
circle/dashboard/views/vm.py
+2
-2
No files found.
circle/dashboard/templates/dashboard/vm-detail/home.html
View file @
0107aa6d
...
@@ -123,9 +123,17 @@
...
@@ -123,9 +123,17 @@
</div>
</div>
<div
class=
"col-md-8"
>
<div
class=
"col-md-8"
>
{% if graphite_enabled %}
{% if graphite_enabled %}
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
cpu
"
"
6h
"
%}"
style=
"width:100%"
/>
<div
class=
"text-center"
>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
memory
"
"
6h
"
%}"
style=
"width:100%"
/>
{% for o in graph_time_options %}
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
network
"
"
6h
"
%}"
style=
"width:100%"
/>
<a
class=
"btn btn-default btn-xs"
href=
"?graph_time={{ o.time }}"
>
{{ o.name }}
</a>
{% endfor %}
</div>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
cpu
"
graph_time
%}"
style=
"width:100%"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
memory
"
graph_time
%}"
style=
"width:100%"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
network
"
graph_time
%}"
style=
"width:100%"
/>
{% endif %}
{% endif %}
</div>
</div>
</div>
</div>
circle/dashboard/views/vm.py
View file @
0107aa6d
...
@@ -52,7 +52,7 @@ from vm.models import (
...
@@ -52,7 +52,7 @@ from vm.models import (
)
)
from
.util
import
(
from
.util
import
(
CheckedDetailView
,
AjaxOperationMixin
,
OperationView
,
AclUpdateView
,
CheckedDetailView
,
AjaxOperationMixin
,
OperationView
,
AclUpdateView
,
FormOperationMixin
,
FilterMixin
,
search_user
,
FormOperationMixin
,
FilterMixin
,
search_user
,
GraphMixin
,
)
)
from
..forms
import
(
from
..forms
import
(
AclUserOrGroupAddForm
,
VmResourcesForm
,
TraitsForm
,
RawDataForm
,
AclUserOrGroupAddForm
,
VmResourcesForm
,
TraitsForm
,
RawDataForm
,
...
@@ -89,7 +89,7 @@ class VmDetailVncTokenView(CheckedDetailView):
...
@@ -89,7 +89,7 @@ class VmDetailVncTokenView(CheckedDetailView):
raise
Http404
()
raise
Http404
()
class
VmDetailView
(
CheckedDetailView
):
class
VmDetailView
(
GraphMixin
,
CheckedDetailView
):
template_name
=
"dashboard/vm-detail.html"
template_name
=
"dashboard/vm-detail.html"
model
=
Instance
model
=
Instance
...
...
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