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
7c17ba5d
authored
Mar 11, 2013
by
Bence Dányi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webui: pretty stat
parent
9a207877
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
29 deletions
+27
-29
one/static/style/base.less
+1
-5
one/templates/base.html
+26
-24
No files found.
one/static/style/base.less
View file @
7c17ba5d
...
@@ -287,6 +287,7 @@ body > footer {
...
@@ -287,6 +287,7 @@ body > footer {
box-shadow:0 0 30px rgba(0,0,0,0.4);
box-shadow:0 0 30px rgba(0,0,0,0.4);
margin:0;
margin:0;
background-color: white;
background-color: white;
height: 30px;
}
}
#http-error {
#http-error {
...
@@ -302,8 +303,3 @@ body > footer {
...
@@ -302,8 +303,3 @@ body > footer {
.irasmu p {
.irasmu p {
margin-top: 20px;
margin-top: 20px;
}
}
.stat {
margin: 0 auto;
width: 900px;
}
one/templates/base.html
View file @
7c17ba5d
...
@@ -73,47 +73,53 @@
...
@@ -73,47 +73,53 @@
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</div>
</div>
<footer>
<footer>
<p>
<div>
<div
style=
"float: left"
id=
"chart_cpu_div"
></div>
<a
href=
"/sites/legal/"
>
{% trans "Legal notice" %}
</a>
|
<a
href=
"/sites/legal/"
>
{% trans "Legal notice" %}
</a>
|
<a
href=
"/sites/policy/"
>
{% trans "Policy" %}
</a>
|
<a
href=
"/sites/policy/"
>
{% trans "Policy" %}
</a>
|
<a
href=
"/sites/help/"
>
{% trans "Help" %}
</a>
|
<a
href=
"/sites/help/"
>
{% trans "Help" %}
</a>
|
<a
href=
"/sites/support/"
>
{% trans "Support" %}
</a>
<a
href=
"/sites/support/"
>
{% trans "Support" %}
</a>
</p>
<div
style=
"float: right"
id=
"chart_mem_div"
></div>
</div>
{% if cloud_stat %}
{% if cloud_stat %}
<style
type=
"text/css"
>
#content
{
padding-bottom
:
150px
;}
</style>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
google
.
setOnLoadCallback
(
drawChart
);
google
.
setOnLoadCallback
(
drawChart
);
function
drawChart
()
{
function
drawChart
()
{
var
data_cpu
=
new
google
.
visualization
.
DataTable
();
var
data_cpu
=
new
google
.
visualization
.
DataTable
();
data_cpu
.
addColumn
(
'string'
,
'Topping'
);
data_cpu
.
addColumn
(
'string'
,
'Topping'
);
data_cpu
.
addColumn
(
'number'
,
'Free'
);
data_cpu
.
addColumn
(
'number'
,
'Allocated'
);
data_cpu
.
addColumn
(
'number'
,
'Used'
);
data_cpu
.
addColumn
(
'number'
,
'Used'
);
data_cpu
.
addColumn
(
'number'
,
'Allocated'
);
data_cpu
.
addColumn
(
'number'
,
'Free'
);
data_cpu
.
addRows
([
data_cpu
.
addRows
([
[
'CPU %'
,
{{
cloud_stat
.
CPU
.
FREE_CPU
}},{{
cloud_stat
.
CPU
.
ALLOC_CPU
}},{{
cloud_stat
.
CPU
.
USED_CPU
}}],
[
'CPU'
,
{{
cloud_stat
.
CPU
.
USED_CPU
}},
{{
cloud_stat
.
CPU
.
ALLOC_CPU
}},
{{
cloud_stat
.
CPU
.
FREE_CPU
}},]
]);
]);
var
cpu_options
=
{
var
cpu_options
=
{
'title'
:
'Cloud CPU usage percent (100/CPU)'
,
'width'
:
400
,
'width'
:
900
,
'height'
:
20
,
'height'
:
50
,
isStacked
:
true
,
isStacked
:
true
enableInteractivity
:
false
,
colors
:
[
'red'
,
'orange'
,
'blue'
]
};
};
var
data_mem
=
new
google
.
visualization
.
DataTable
();
var
data_mem
=
new
google
.
visualization
.
DataTable
();
data_mem
.
addColumn
(
'string'
,
'Topping'
);
data_mem
.
addColumn
(
'string'
,
'Topping'
);
data_mem
.
addColumn
(
'number'
,
'Free'
);
data_mem
.
addColumn
(
'number'
,
'Allocated'
);
data_mem
.
addColumn
(
'number'
,
'Used'
);
data_mem
.
addColumn
(
'number'
,
'Used'
);
data_mem
.
addColumn
(
'number'
,
'Allocated'
);
data_mem
.
addColumn
(
'number'
,
'Free'
);
data_mem
.
addRows
([
data_mem
.
addRows
([
[
'
Memory in {{cloud_stat.DIMENSION}}
'
,
[
'
RAM
'
,
{{
cloud_stat
.
MEM
.
FREE
_MEM
|
unlocalize
}},
{{
cloud_stat
.
MEM
.
USED
_MEM
|
unlocalize
}},
{{
cloud_stat
.
MEM
.
ALLOC_MEM
|
unlocalize
}},
{{
cloud_stat
.
MEM
.
ALLOC_MEM
|
unlocalize
}},
{{
cloud_stat
.
MEM
.
USED_MEM
|
unlocalize
}}],
{{
cloud_stat
.
MEM
.
FREE_MEM
|
unlocalize
}},]
]);
]);
var
mem_options
=
{
var
mem_options
=
{
'title'
:
'Memory in {{cloud_stat.DIMENSION}}'
,
'width'
:
400
,
'width'
:
900
,
'height'
:
20
,
'height'
:
50
,
isStacked
:
true
,
isStacked
:
true
enableInteractivity
:
false
,
colors
:
[
'red'
,
'orange'
,
'blue'
]
};
};
var
chart
=
new
google
.
visualization
.
BarChart
(
document
.
getElementById
(
'chart_cpu_div'
));
var
chart
=
new
google
.
visualization
.
BarChart
(
document
.
getElementById
(
'chart_cpu_div'
));
chart
.
draw
(
data_cpu
,
cpu_options
);
chart
.
draw
(
data_cpu
,
cpu_options
);
...
@@ -122,14 +128,10 @@
...
@@ -122,14 +128,10 @@
}
}
</script>
</script>
{% endif %}
{% endif %}
<div
class=
"stat"
id=
"chart_cpu_div"
></div>
<div
class=
"stat"
id=
"chart_mem_div"
></div>
</footer>
</footer>
<div
id=
"modal"
style=
"display: none"
>
<div
id=
"modal"
style=
"display: none"
>
<div
id=
"shadow"
></div>
<div
id=
"shadow"
></div>
<div
id=
"modal-container"
>
<div
id=
"modal-container"
></div>
</div>
</div>
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
_gaq
=
_gaq
||
[];
var
_gaq
=
_gaq
||
[];
...
...
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