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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
7ed87388
authored
Mar 25, 2014
by
Oláh István Gergely
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-110' into issue-110-merged
parents
f068fe84
e76e772d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
6 deletions
+73
-6
circle/dashboard/tables.py
+4
-4
circle/dashboard/templates/dashboard/node-list.html
+7
-2
circle/dashboard/templates/dashboard/node-list/column-monitor.html
+62
-0
No files found.
circle/dashboard/tables.py
View file @
7ed87388
...
@@ -77,12 +77,12 @@ class NodeListTable(Table):
...
@@ -77,12 +77,12 @@ class NodeListTable(Table):
number_of_VMs
=
TemplateColumn
(
number_of_VMs
=
TemplateColumn
(
template_name
=
'dashboard/node-list/column-vm.html'
,
template_name
=
'dashboard/node-list/column-vm.html'
,
attrs
=
{
'th'
:
{
'class'
:
'node-list-table-
adm
in'
}},
attrs
=
{
'th'
:
{
'class'
:
'node-list-table-
th
in'
}},
)
)
admin
=
TemplateColumn
(
monitor
=
TemplateColumn
(
template_name
=
'dashboard/node-list/column-
admin
.html'
,
template_name
=
'dashboard/node-list/column-
monitor
.html'
,
attrs
=
{
'th'
:
{
'class'
:
'node-list-table-
admin
'
}},
attrs
=
{
'th'
:
{
'class'
:
'node-list-table-
monitor
'
}},
)
)
details
=
TemplateColumn
(
details
=
TemplateColumn
(
...
...
circle/dashboard/templates/dashboard/node-list.html
View file @
7ed87388
...
@@ -19,6 +19,11 @@
...
@@ -19,6 +19,11 @@
</div>
</div>
</div>
</div>
<style>
<style>
.node-list-table
tbody
>
tr
>
td
{
vertical-align
:
middle
;
}
.popover
{
.popover
{
max-width
:
600px
;
max-width
:
600px
;
}
}
...
@@ -39,8 +44,8 @@
...
@@ -39,8 +44,8 @@
width
:
10px
;
width
:
10px
;
}
}
.node-list-table-
admin
{
.node-list-table-
monitor
{
width
:
13
0px
;
width
:
20
0px
;
}
}
</style>
</style>
{% endblock %}
{% endblock %}
...
...
circle/dashboard/templates/dashboard/node-list/column-monitor.html
0 → 100644
View file @
7ed87388
{%load sizefieldtags %}
{% load i18n %}
<i
class=
"icon-gears"
></i>
{% trans "CPU" %}
<div
class=
"progress pull-right"
>
<div
class=
"progress-bar progress-bar-success"
role=
"progressbar"
aria-valuenow=
"{{ record.cpu_usage }}"
aria-valuemin=
"0"
aria-valuemax=
"1"
style=
"width: 80%"
>
<span
class=
"progress-bar-text"
>
{% if record.cpu_usage != None %}
{{ record.cpu_usage|floatformat:1 }} %
{% else %} - {% endif %}
</span>
</div>
</div>
<br>
<i
class=
"icon-ticket"
></i>
{% trans "Memory" %}
<div
class=
"progress pull-right"
>
<div
class=
"progress-bar progress-bar-info"
role=
"progressbar"
aria-valuenow=
"{{ record.ram_usage}}"
aria-valuemin=
"0"
aria-valuemax=
"1"
>
<span
class=
"progress-bar-text"
>
{% if record.byte_ram_usage != None %}
{% widthratio record.byte_ram_usage 1048576 1 %} MB
{% else %} - {% endif %}
</span>
</div>
</div>
{% block "extra-js" %}
<script>
$
(
'.progress-bar'
).
each
(
function
()
{
var
min
=
$
(
this
).
attr
(
'aria-valuemin'
);
var
max
=
$
(
this
).
attr
(
'aria-valuemax'
);
var
now
=
$
(
this
).
attr
(
'aria-valuenow'
);
var
siz
=
(
now
-
min
)
*
100
/
(
max
-
min
);
$
(
this
).
css
(
'width'
,
siz
+
'%'
);
});
</script>
{% endblock %}
<style>
.progress
{
position
:
relative
;
width
:
100px
;
height
:
12px
;
margin-bottom
:
0px
;
margin-top
:
5px
;
background-image
:
linear-gradient
(
to
bottom
,
#BBEBEB
0px
,
#F5F5F5
100%
);
}
.progress-bar-text
{
position
:
absolute
;
display
:
block
;
width
:
100%
;
color
:
white
;
/* outline */
text-shadow
:
-1px
-1px
0
#000
,
1px
-1px
0
#000
,
-1px
1px
0
#000
,
1px
1px
0
#000
;
font-size
:
10px
;
}
</style>
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