Skip to content
Snippets Groups Projects
Commit 3091a572 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

WebUI component:

- Rounded SLA values to 2 decimal digits
parent dd6cc334
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!62Add relese/2.0.1 fixes
...@@ -98,6 +98,7 @@ def create_app(use_config=None, web_app_root=None): ...@@ -98,6 +98,7 @@ def create_app(use_config=None, web_app_root=None):
app.jinja_env.globals.update({ # pylint: disable=no-member app.jinja_env.globals.update({ # pylint: disable=no-member
'enumerate' : enumerate, 'enumerate' : enumerate,
'json_to_list' : json_to_list, 'json_to_list' : json_to_list,
'round' : round,
'get_working_context' : get_working_context, 'get_working_context' : get_working_context,
'get_working_topology': get_working_topology, 'get_working_topology': get_working_topology,
}) })
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<td>SLA Capacity</td> <td>SLA Capacity</td>
<td>-</td> <td>-</td>
<td> <td>
{{ constraint.sla_capacity.capacity_gbps }} Gbps {{ round(constraint.sla_capacity.capacity_gbps, ndigits=2) }} Gbps
</td> </td>
</tr> </tr>
{% elif constraint.WhichOneof('constraint')=='sla_latency' %} {% elif constraint.WhichOneof('constraint')=='sla_latency' %}
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<td>SLA E2E Latency</td> <td>SLA E2E Latency</td>
<td>-</td> <td>-</td>
<td> <td>
{{ constraint.sla_latency.e2e_latency_ms }} ms {{ round(constraint.sla_latency.e2e_latency_ms, ndigits=2) }} ms
</td> </td>
</tr> </tr>
{% elif constraint.WhichOneof('constraint')=='sla_availability' %} {% elif constraint.WhichOneof('constraint')=='sla_availability' %}
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<td>SLA Capacity</td> <td>SLA Capacity</td>
<td>-</td> <td>-</td>
<td> <td>
{{ constraint.sla_capacity.capacity_gbps }} Gbps {{ round(constraint.sla_capacity.capacity_gbps, ndigits=2) }} Gbps
</td> </td>
</tr> </tr>
{% elif constraint.WhichOneof('constraint')=='sla_latency' %} {% elif constraint.WhichOneof('constraint')=='sla_latency' %}
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<td>SLA E2E Latency</td> <td>SLA E2E Latency</td>
<td>-</td> <td>-</td>
<td> <td>
{{ constraint.sla_latency.e2e_latency_ms }} ms {{ round(constraint.sla_latency.e2e_latency_ms, ndigits=2) }} ms
</td> </td>
</tr> </tr>
{% elif constraint.WhichOneof('constraint')=='sla_availability' %} {% elif constraint.WhichOneof('constraint')=='sla_availability' %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment