change templates

This commit is contained in:
Cayo Puigdefabregas 2022-05-18 11:01:23 +02:00
parent e96c2c122d
commit 99309162e3
2 changed files with 49 additions and 28 deletions

View File

@ -111,6 +111,15 @@
</a> </a>
</li><!-- End Dashboard Nav --> </li><!-- End Dashboard Nav -->
<li class="nav-heading">Snapshots</li>
<li class="nav-item">
<a class="nav-link collapsed" href="{{ url_for('inventory.snapshotslist') }}">
<i class="bi-menu-button-wide"></i>
<span>Uploaded Snapshots</span>
</a>
</li>
<li class="nav-heading">Devices</li> <li class="nav-heading">Devices</li>
<li class="nav-item"> <li class="nav-item">
@ -120,13 +129,6 @@
</a> </a>
</li> </li>
<li class="nav-item">
<a class="nav-link collapsed" href="{{ url_for('inventory.snapshotslist') }}">
<i class="bi-menu-button-wide"></i>
<span>Uploaded Snapshots</span>
</a>
</li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link collapsed" href="{{ url_for('inventory.devicelist') }}"> <a class="nav-link collapsed" href="{{ url_for('inventory.devicelist') }}">
<i class="bi-menu-button-wide"></i> <i class="bi-menu-button-wide"></i>

View File

@ -5,7 +5,8 @@
<h1>Inventory</h1> <h1>Inventory</h1>
<nav> <nav>
<ol class="breadcrumb"> <ol class="breadcrumb">
<li class="breadcrumb-item active">{{ page_title }}</li> <li class="breadcrumb-item"><a href="{{ url_for('inventory.devicelist')}}">Inventory</a></li>
<li class="breadcrumb-item active">Snapshots</li>
</ol> </ol>
</nav> </nav>
</div><!-- End Page Title --> </div><!-- End Page Title -->
@ -16,34 +17,47 @@
<div class="col-xl-12"> <div class="col-xl-12">
<div class="card"> <div class="card">
<div class="card-body pt-3"> <div class="card-body pt-3" style="min-height: 650px;">
<!-- Bordered Tabs --> <!-- Bordered Tabs -->
<div class="tab-content pt-5">
<div class="tab-content pt-2"> <div id="devices-list" class="tab-pane fade devices-list active show">
<div class="tab-content pt-2">
<div class="tab-pane fade show active profile-overview" id="profile-overview">
<h5 class="card-title">Snapshot</h5>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
<th scope="col">Sid</th> <th scope="col">SID</th>
<th scope="col">Workbench Version</th> <th scope="col">Snapshot id</th>
<th scope="col">Errors</th> <th scope="col">Version</th>
<th scope="col">DHID</th> <th scope="col">Device</th>
<th scope="col">Uploaded</th> <th scope="col">Status</th>
<th scope="col">Description</th>
<th scope="col" data-type="date" data-format="DD-MM-YYYY">Time</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for snap in snapshots %} {% for snap in snapshots_log %}
<tr> <tr>
<td>{{ snap.sid or ''}}</td>
<td>{{ snap.version }}</td>
<td>{{ snap.status }}</td>
<td> <td>
<a href="{{ url_for('inventory.device_details', id=snap.device.devicehub_id)}}"> {{ snap.sid }}
{{ snap.device.devicehub_id }} </td>
</a> <td>
{{ snap.snapshot_uuid }}
</td>
<td>
{{ snap.workbench_version }}
</td>
<td>
{% if snap.snapshot %}
<a href="{{ url_for('inventory.device_details', id=snap.snapshot.device.devicehub_id)}}">
{{ snap.snapshot.device.devicehub_id }}
</a>
{% endif %}
</td>
<td>
{{ snap.severity }}
</td>
<td>
{{ snap.description }}
</td> </td>
<td>{{ snap.created.strftime('%H:%M %d-%m-%Y') }}</td> <td>{{ snap.created.strftime('%H:%M %d-%m-%Y') }}</td>
</tr> </tr>
@ -51,11 +65,16 @@
</tbody> </tbody>
</table> </table>
</div><!-- End Bordered Tabs --> </div>
</div>
</div><!-- End Bordered Tabs -->
</div>
</div> </div>
</div> </div>
<div id="NotificationsContainer" style="position: absolute; bottom: 0; right: 0; margin: 10px; margin-top: 70px; width: calc(100% - 310px);"></div>
</div> </div>
</div> </div>
</section> </section>