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

Merge branch 'feat/webui' into 'develop'

Integrate minor corrections in WebUI

See merge request teraflow-h2020/controller!75
parents c421913a 2eba2a50
No related branches found
No related tags found
1 merge request!54Release 2.0.0
# for development purposes only # for development purposes only
export CONTEXT_SERVICE_ADDRESS=`kubectl get service/contextservice -n tf-dev -o jsonpath='{.spec.clusterIP}'` export CONTEXTSERVICE_SERVICE_HOST=`kubectl get service/contextservice -n tf-dev -o jsonpath='{.spec.clusterIP}'`
echo $CONTEXT_SERVICE_ADDRESS echo Context IP: $CONTEXTSERVICE_SERVICE_HOST
export DEVICE_SERVICE_ADDRESS=`kubectl get service/deviceservice -n tf-dev -o jsonpath='{.spec.clusterIP}'` export DEVICESERVICE_SERVICE_HOST=`kubectl get service/deviceservice -n tf-dev -o jsonpath='{.spec.clusterIP}'`
echo $DEVICE_SERVICE_ADDRESS echo Device IP: $DEVICESERVICE_SERVICE_HOST
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION='python'
export HOST="127.0.0.1" export HOST="127.0.0.1"
export FLASK_ENV="development" export FLASK_ENV="development"
# python3 -m webbrowser http://${HOST}:8004
python -m webui.service python -m webui.service
...@@ -91,9 +91,11 @@ ...@@ -91,9 +91,11 @@
{% endwith %} {% endwith %}
</div> </div>
</div> </div>
<div class="bg-light p-5 rounded"> <div class="row">
<div class="col-xxl-12">
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div> </div>
</div>
</main> </main>
<footer class="footer" style="background-color: darkgrey;"> <footer class="footer" style="background-color: darkgrey;">
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<h1>Devices</h1> <h1>Devices</h1>
<div class="row"> <div class="row">
<!-- <div class="col"> <div class="col">
<a href="{{ url_for('device.add') }}" class="btn btn-primary" style="margin-bottom: 10px;"> <a href="{{ url_for('device.add') }}" class="btn btn-primary" style="margin-bottom: 10px;">
<i class="bi bi-plus"></i> <i class="bi bi-plus"></i>
Add New Device Add New Device
</a> </a>
</div> --> </div>
<div class="col"> <div class="col">
{{ devices | length }} devices found in context <i>{{ session['context_uuid'] }}</i> {{ devices | length }} devices found in context <i>{{ session['context_uuid'] }}</i>
</div> </div>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<th scope="col">Drivers</th> <th scope="col">Drivers</th>
<th scope="col">Status</th> <th scope="col">Status</th>
<th scope="col">Configuration</th> <th scope="col">Configuration</th>
<!-- <th scope="col"></th> --> <th scope="col"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -57,11 +57,11 @@ ...@@ -57,11 +57,11 @@
<td> <td>
<ul> <ul>
{% for driver in device.device_drivers %} {% for driver in device.device_drivers %}
<li>{{ dde.Name(driver) }}</li> <li>{{ dde.Name(driver).replace('DEVICEDRIVER_', '') }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
</td> </td>
<td>{{ dose.Name(device.device_operational_status) }}</td> <td>{{ dose.Name(device.device_operational_status).replace('DEVICEOPERATIONALSTATUS_', '') }}</td>
<td> <td>
<ul> <ul>
{% for config in device.device_config.config_rules %} {% for config in device.device_config.config_rules %}
...@@ -72,14 +72,14 @@ ...@@ -72,14 +72,14 @@
{% endfor %} {% endfor %}
</ul> </ul>
</td> </td>
<!-- <td> <td>
<a href="{{ url_for('device.detail', device_uuid=device.device_id.device_uuid.uuid) }}"> <a href="{{ url_for('device.detail', device_uuid=device.device_id.device_uuid.uuid) }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
</svg> </svg>
</a> </a>
</td> --> </td>
</tr> </tr>
{% endfor %} {% endfor %}
{% else %} {% else %}
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<!-- </a> --> <!-- </a> -->
</td> </td>
<td> <td>
{{ ste.Name(service.service_type) }} {{ ste.Name(service.service_type).replace('SERVICETYPE_', '') }}
</td> </td>
<td> <td>
<ul> <ul>
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
{% endfor %} {% endfor %}
</ul> </ul>
</td> </td>
<td>{{ sse.Name(service.service_status.service_status) }}</td> <td>{{ sse.Name(service.service_status.service_status).replace('SERVICESTATUS_', '') }}</td>
<td> <td>
<ul> <ul>
{% for rule in service.service_config.config_rules %} {% for rule in service.service_config.config_rules %}
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</ul> </ul>
</td> </td>
<!-- <td> <!-- <td>
<a href="{{ url_for('service.detail', service_uuid=service.service_id.service_uuid.uuid) }}"> <a href="{{ url_for('service.detail', service_uuid=service.service_id.service_uuid.uuid.replace('/', '_')) }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
......
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