d4-core/server/web/templates/registered_sensors.html

117 lines
3.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>D4-Project</title>
<link rel="icon" href="{{ url_for('static', filename='img/d4-logo.png')}}">
<!-- Core CSS -->
<link href="{{ url_for('static', filename='css/bootstrap.min.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='font-awesome/css/font-awesome.css') }}" rel="stylesheet">
<link href="{{ url_for('static', filename='css/dataTables.bootstrap.min.css') }}" rel="stylesheet">
<!-- JS -->
<script src="{{ url_for('static', filename='js/jquery.js')}}"></script>
<script src="{{ url_for('static', filename='js/popper.min.js')}}"></script>
<script src="{{ url_for('static', filename='js/bootstrap.min.js')}}"></script>
<script src="{{ url_for('static', filename='js/jquery.dataTables.min.js')}}"></script>
<script src="{{ url_for('static', filename='js/dataTables.bootstrap.min.js')}}"></script>
<style>
.popover{
max-width: 100%;
}
</style>
</head>
<body>
{% include 'navbar.html' %}
<div class="mx-2 py-3">
<table class="table table-striped table-bordered table-hover text-center" id="myTable_1">
<thead>
<tr>
<th class="bg-info text-white">UUID</th>
<th class="bg-info text-white">first seen</th>
<th class="bg-info text-white">last seen</th>
<th class="bg-info text-white">types</th>
<th class="bg-secondary text-white">Status</th>
<th class="bg-secondary text-white"></th>
</tr>
</thead>
<tbody>
{% for row_uuid in all_sensors %}
<tr data-trigger="hover" title="" data-content="test content" data-original-title="test title">
<td>
<a class="" href="{{ url_for('uuid_management') }}?uuid={{row_uuid['uuid']}}">
{{row_uuid['uuid']}}
</a>
{% if row_uuid['description'] %}
<div class="text-info"><small>{{row_uuid['description']}}</small></div>
{% endif %}
</td>
<td>
{% if row_uuid['first_seen'] %}
{{row_uuid['first_seen']}}
{% else %}
{{'-'}}
{% endif %}
</td>
<td>
{% if row_uuid['first_seen'] %}
{{row_uuid['first_seen']}}
{% else %}
{{'-'}}
{% endif %}
</td>
<td>
{{type_description}}
{% for uuid_type in row_uuid['types'] %}
<span class="badge badge-dark">
{{uuid_type['type']}}
</span>
{% endfor %}
</td>
<td
{% if not row_uuid['Error'] %}
div class="text-success">
OK -
{% else %}
div class="text-danger">
<i class="fa fa-times-circle"></i> {{row_uuid['Error']}}
{% endif %}
{% if row_uuid['active_connection'] %}
<i class="fa fa-check-circle"></i> Connected
{% endif %}
</td>
<td>
<a href="{{ url_for('delete_registered_sensor') }}?uuid={{row_uuid['uuid']}}">
<button type="button" class="btn btn-outline-danger"><i class="fa fa-trash"></i></button>
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% include 'navfooter.html' %}
</body>
<script>
$(document).ready(function(){
$("#nav-sensor").addClass("active");
table = $('#myTable_1').DataTable(
{
"aLengthMenu": [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"]],
"iDisplayLength": 10,
"order": [[ 0, "asc" ]]
}
);
});
</script>