Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simone Rossi
main
Commits
2c849b65
Commit
2c849b65
authored
Jan 03, 2018
by
Daniele Venzano
Browse files
Color the border of essential services in the status page bottom section
parent
ef2a2b73
Changes
4
Hide whitespace changes
Inline
Side-by-side
zoe_api/web/static/zoe.css
View file @
2c849b65
...
...
@@ -243,6 +243,10 @@ div.running {
border-color
:
green
;
}
td
.running
{
border
:
1px
solid
green
;
}
div
.node_detail
{
width
:
48%
;
float
:
left
;
...
...
zoe_api/web/templates/status.html
View file @
2c849b65
...
...
@@ -209,6 +209,7 @@
</div>
<h3
class=
"section"
><a
name=
"service-distrib"
>
Service distribution
</a></h3>
<p>
Services marked with a green border are essential, elastic ones have no border.
</p>
<table
class=
"service-distrib"
>
<thead>
<tr>
...
...
@@ -222,7 +223,7 @@
<td
class=
"cell-host"
>
{{ node.name }}
</td>
{% for service in services_per_node[node.name] %}
{% if service.backend_status == "started" %}
<td><a
href=
"{{ reverse_url('execution_inspect', service['execution_id']) }}"
>
{{ service['name'] }}
</a>
(M:
<script>
format_bytes
({{
node
.
service_stats
[
service
[
'
id
'
]][
'
mem_limit
'
]
}});
</script>
C: {{ '%0.2f'|format(node.service_stats[service['id']]['core_limit']|float) }})
</td>
<td
class=
"{{ 'running' if service.essential }}"
><a
href=
"{{ reverse_url('execution_inspect', service['execution_id']) }}"
>
{{ service['name'] }}
</a>
(M:
<script>
format_bytes
({{
node
.
service_stats
[
service
[
'
id
'
]][
'
mem_limit
'
]
}});
</script>
C: {{ '%0.2f'|format(node.service_stats[service['id']]['core_limit']|float) }})
</td>
{% endif %}
{% endfor %}
</tr>
...
...
zoe_api/web/templates/zapp_start.html
View file @
2c849b65
...
...
@@ -25,6 +25,7 @@
{% endif %}
</li>
<li>
Suggested CPU core allocation limit: {{ service["resources"]["cores"]["min"] if service["resources"]["cores"]["min"] != None else "No limit" }}
</li>
</ul></li>
<li>
Image:
<code>
{{ service["image"] }}
</code></li>
{% endfor %}
</ul>
...
...
zoe_master/backends/docker/backend.py
View file @
2c849b65
...
...
@@ -213,7 +213,7 @@ class DockerEngineBackend(zoe_master.backends.base.BaseBackend):
image
=
{
'id'
:
dk_image
.
attrs
[
'Id'
],
'size'
:
dk_image
.
attrs
[
'Size'
],
'names'
:
dk_image
.
tags
'names'
:
dk_image
.
tags
# type: list
}
for
name
in
image
[
'names'
]:
if
name
[
-
7
:]
==
':latest'
:
# add an image with the name without 'latest' to fake Docker image lookup algorithm
...
...
@@ -225,7 +225,11 @@ class DockerEngineBackend(zoe_master.backends.base.BaseBackend):
def
update_service
(
self
,
service
,
cores
=
None
,
memory
=
None
):
"""Update a service reservation."""
conf
=
self
.
_get_config
(
service
.
backend_host
)
engine
=
DockerClient
(
conf
)
try
:
engine
=
DockerClient
(
conf
)
except
ZoeException
as
e
:
log
.
error
(
str
(
e
))
return
if
service
.
backend_id
is
not
None
:
info
=
engine
.
info
()
if
cores
is
not
None
and
cores
>
info
[
'NCPU'
]:
...
...
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