diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index a09f4f5b..f089dc63 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -505,6 +505,18 @@ class ExportsView(View): return flask.render_template('inventory/erasure.html', **params) +class SnapshotListView(GenericMixView): + methods = ['GET'] + decorators = [login_required] + template_name = 'inventory/snapshots_list.html' + + def dispatch_request(self, id): + self.get_context() + self.context['page_title'] = "Snapshots" + self.context['snapshots'] = [] + return flask.render_template(self.template_name, **self.context) + + devices.add_url_rule('/action/add/', view_func=NewActionView.as_view('action_add')) devices.add_url_rule('/action/trade/add/', view_func=NewTradeView.as_view('trade_add')) devices.add_url_rule( @@ -551,3 +563,4 @@ devices.add_url_rule( devices.add_url_rule( '/export//', view_func=ExportsView.as_view('export') ) +devices.add_url_rule('/snapshots/', view_func=SnapshotListView.as_view('snapshotslist')) diff --git a/ereuse_devicehub/templates/inventory/snapshots_list.html b/ereuse_devicehub/templates/inventory/snapshots_list.html new file mode 100644 index 00000000..e6004f63 --- /dev/null +++ b/ereuse_devicehub/templates/inventory/snapshots_list.html @@ -0,0 +1,63 @@ +{% extends "ereuse_devicehub/base_site.html" %} +{% block main %} + +
+

Inventory

+ +
+ +
+
+ +
+ +
+
+ + +
+ +
+ +
Snapshot
+ + + + + + + + + + + + {% for snap in snapshots %} + + + + + + + + {% endfor %} + +
SidWorkbench VersionErrorsDHIDUploaded
{{ snap.sid }}{{ snap.version }}{{ snap.status }}{{ snap.device.devicehub_id }}{{ snap.created }}
+ +
+ +
+
+ +
+
+
+ + + +{% endblock main %}