2022-01-14 10:12:07 +00:00
|
|
|
{% extends "ereuse_devicehub/base_site.html" %}
|
|
|
|
{% block main %}
|
|
|
|
|
|
|
|
<div class="pagetitle">
|
2022-02-02 11:21:30 +00:00
|
|
|
<h1>Inventory</h1>
|
2022-01-14 10:12:07 +00:00
|
|
|
<nav>
|
|
|
|
<ol class="breadcrumb">
|
2022-02-02 11:21:30 +00:00
|
|
|
<li class="breadcrumb-item"><a href="{{ url_for('inventory.devices.devicelist')}}">Inventory</a></li>
|
|
|
|
<li class="breadcrumb-item active">{{ page_title }}</li>
|
2022-01-14 10:12:07 +00:00
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
</div><!-- End Page Title -->
|
|
|
|
|
|
|
|
<section class="section profile">
|
|
|
|
<div class="row">
|
2022-01-18 10:23:18 +00:00
|
|
|
<div class="col-xl-8">
|
2022-01-14 10:12:07 +00:00
|
|
|
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
|
|
|
|
<div class="pt-4 pb-2">
|
|
|
|
<h5 class="card-title text-center pb-0 fs-4">Upload Snapshot</h5>
|
|
|
|
<p class="text-center small">Please select a file snapshot.</p>
|
|
|
|
{% if form.form_errors %}
|
|
|
|
<p class="text-danger">
|
|
|
|
{% for error in form.form_errors %}
|
|
|
|
{{ error }}<br/>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
2022-01-17 13:18:16 +00:00
|
|
|
<form method="post" enctype="multipart/form-data" class="row g-3 needs-validation" novalidate>
|
2022-01-14 10:12:07 +00:00
|
|
|
{{ form.csrf_token }}
|
|
|
|
|
2022-03-04 17:50:47 +00:00
|
|
|
<div>
|
2022-01-17 13:18:16 +00:00
|
|
|
<label for="name" class="form-label">Select a Snapshot file</label>
|
2022-01-14 10:12:07 +00:00
|
|
|
<div class="input-group has-validation">
|
2022-01-17 13:18:16 +00:00
|
|
|
{{ form.snapshot }}
|
2022-01-14 10:12:07 +00:00
|
|
|
<div class="invalid-feedback">You can select multiple files Snapshots JSON.</div>
|
|
|
|
</div>
|
2022-01-17 13:18:16 +00:00
|
|
|
{% if form.result %}
|
|
|
|
{% for filename, result in form.result.items() %}
|
|
|
|
{% if result == 'Ok' %}
|
|
|
|
<p class="text-success">
|
|
|
|
{{ filename }}: {{ result }}<br/>
|
|
|
|
</p>
|
|
|
|
{% else %}
|
|
|
|
<p class="text-danger">
|
|
|
|
{{ filename }}: {{ result }}<br/>
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2022-01-14 10:12:07 +00:00
|
|
|
</div>
|
|
|
|
|
2022-03-04 17:50:47 +00:00
|
|
|
<div>
|
2022-01-14 10:12:07 +00:00
|
|
|
<a href="{{ url_for('inventory.devices.devicelist') }}" class="btn btn-danger">Cancel</a>
|
|
|
|
<button class="btn btn-primary" type="submit">Send</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-xl-8">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{% endblock main %}
|