Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
26742917
authored
Sep 23, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: graph fixes
- change default button to simply represent a time - add max-width 100% for graphs
parent
9ffd1dbd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
circle/dashboard/static/dashboard/dashboard.css
+4
-0
circle/dashboard/templates/dashboard/node-detail/home.html
+1
-4
circle/dashboard/templates/dashboard/vm-detail/home.html
+1
-1
circle/dashboard/views/util.py
+1
-4
No files found.
circle/dashboard/static/dashboard/dashboard.css
View file @
26742917
...
@@ -991,3 +991,7 @@ textarea[name="new_members"] {
...
@@ -991,3 +991,7 @@ textarea[name="new_members"] {
.node-list-table-monitor
{
.node-list-table-monitor
{
width
:
250px
;
width
:
250px
;
}
}
.graph-images
img
{
max-width
:
100%
;
}
circle/dashboard/templates/dashboard/node-detail/home.html
View file @
26742917
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<div
class=
"text-center graph-buttons"
>
<div
class=
"text-center graph-buttons"
>
{% include "dashboard/_graph-time-buttons.html" %}
{% include "dashboard/_graph-time-buttons.html" %}
</div>
</div>
<div
class=
"graph-images"
>
<div
class=
"graph-images
text-center
"
>
<img
src=
"{% url "
dashboard
.
views
.
node-graph
"
node
.
pk
"
cpu
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
node-graph
"
node
.
pk
"
cpu
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
node-graph
"
node
.
pk
"
memory
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
node-graph
"
node
.
pk
"
memory
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
node-graph
"
node
.
pk
"
network
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
node-graph
"
node
.
pk
"
network
"
graph_time
%}"
/>
...
@@ -48,7 +48,4 @@
...
@@ -48,7 +48,4 @@
.form-group
{
.form-group
{
margin
:
0px
;
margin
:
0px
;
}
}
.graph-images
img
{
width
:
100%
;
}
</style>
</style>
circle/dashboard/templates/dashboard/vm-detail/home.html
View file @
26742917
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
<div
class=
"text-center graph-buttons"
>
<div
class=
"text-center graph-buttons"
>
{% include "dashboard/_graph-time-buttons.html" %}
{% include "dashboard/_graph-time-buttons.html" %}
</div>
</div>
<div
class=
"graph-images"
>
<div
class=
"graph-images
text-center
"
>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
cpu
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
cpu
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
memory
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
memory
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
network
"
graph_time
%}"
/>
<img
src=
"{% url "
dashboard
.
views
.
vm-graph
"
instance
.
pk
"
network
"
graph_time
%}"
/>
...
...
circle/dashboard/views/util.py
View file @
26742917
...
@@ -538,6 +538,7 @@ class AclUpdateView(LoginRequiredMixin, View, SingleObjectMixin):
...
@@ -538,6 +538,7 @@ class AclUpdateView(LoginRequiredMixin, View, SingleObjectMixin):
class
GraphMixin
(
object
):
class
GraphMixin
(
object
):
graph_time_options
=
[
graph_time_options
=
[
{
'time'
:
"1h"
,
'name'
:
_
(
"1 hour"
)},
{
'time'
:
"1h"
,
'name'
:
_
(
"1 hour"
)},
{
'time'
:
"6h"
,
'name'
:
_
(
"6 hours"
)},
{
'time'
:
"1d"
,
'name'
:
_
(
"1 day"
)},
{
'time'
:
"1d"
,
'name'
:
_
(
"1 day"
)},
{
'time'
:
"1w"
,
'name'
:
_
(
"1 week"
)},
{
'time'
:
"1w"
,
'name'
:
_
(
"1 week"
)},
{
'time'
:
"30d"
,
'name'
:
_
(
"1 month"
)},
{
'time'
:
"30d"
,
'name'
:
_
(
"1 month"
)},
...
@@ -555,10 +556,6 @@ class GraphMixin(object):
...
@@ -555,10 +556,6 @@ class GraphMixin(object):
"h, d, w, and y."
))
"h, d, w, and y."
))
graph_time
=
self
.
default_graph_time
graph_time
=
self
.
default_graph_time
context
[
'graph_time'
]
=
graph_time
context
[
'graph_time'
]
=
graph_time
self
.
graph_time_options
=
(
self
.
graph_time_options
+
[{
'time'
:
self
.
default_graph_time
,
'name'
:
_
(
"default"
)}]
)
context
[
'graph_time_options'
]
=
self
.
graph_time_options
context
[
'graph_time_options'
]
=
self
.
graph_time_options
return
context
return
context
...
...
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