Merge pull request #305 from eReuse/feature/3439-wb-iso
Feature/3439 wb iso
This commit is contained in:
commit
035ccc7315
|
@ -0,0 +1 @@
|
||||||
|
868e59911be73a941938644143d81f21a2fdbe82ea0841493c2d9fc04701e058334af5fecd69c1a1525ebd5c8c17ac3f49d8ecc53bbfc8a018f169be48fe79d6 USODY_2022.5.2-beta.iso
|
|
@ -95,7 +95,7 @@
|
||||||
<li>
|
<li>
|
||||||
<a class="dropdown-item d-flex align-items-center" href="{{ url_for('workbench.settings') }}">
|
<a class="dropdown-item d-flex align-items-center" href="{{ url_for('workbench.settings') }}">
|
||||||
<i class="bi bi-tools"></i>
|
<i class="bi bi-tools"></i>
|
||||||
<span>Workbench Settings</span>
|
<span>Workbench</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -28,6 +28,20 @@
|
||||||
<p class="small">Download the settings only for register devices.</p>
|
<p class="small">Download the settings only for register devices.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if iso %}
|
||||||
|
<div class="row pt-3">
|
||||||
|
<div class="col-5">
|
||||||
|
<a href="/static/iso/{{ iso }}" class="btn btn-primary">{{ iso }}</a>
|
||||||
|
</div>
|
||||||
|
<div class="col">
|
||||||
|
<p class="small">Download ISO workbench and burn it one one usb stick.</p>
|
||||||
|
<p class="small">
|
||||||
|
Download Checksum: <a style="color: #993365;" href="/static/iso/SHA512SUMS">SHA512SUMS</a> |
|
||||||
|
<a style="color: #993365;" href="/static/iso/SHA512SUMS.sign">Signature</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
@ -22,6 +23,7 @@ class SettingsView(GenericMixin):
|
||||||
|
|
||||||
def dispatch_request(self):
|
def dispatch_request(self):
|
||||||
self.get_context()
|
self.get_context()
|
||||||
|
self.get_iso()
|
||||||
self.context.update(
|
self.context.update(
|
||||||
{
|
{
|
||||||
'page_title': self.page_title,
|
'page_title': self.page_title,
|
||||||
|
@ -34,6 +36,20 @@ class SettingsView(GenericMixin):
|
||||||
|
|
||||||
return flask.render_template(self.template_name, **self.context)
|
return flask.render_template(self.template_name, **self.context)
|
||||||
|
|
||||||
|
def get_iso(self):
|
||||||
|
files = [
|
||||||
|
f
|
||||||
|
for f in os.listdir('ereuse_devicehub/static/iso/')
|
||||||
|
if f[-3:].lower() == 'iso'
|
||||||
|
]
|
||||||
|
|
||||||
|
self.context['iso'] = ''
|
||||||
|
self.context['iso_sha'] = ''
|
||||||
|
|
||||||
|
if files:
|
||||||
|
self.context['iso'] = files[0]
|
||||||
|
self.context['iso_sha'] = 'aaa'
|
||||||
|
|
||||||
def download(self):
|
def download(self):
|
||||||
url = "https://{}/api/inventory/".format(app.config['HOST'])
|
url = "https://{}/api/inventory/".format(app.config['HOST'])
|
||||||
self.wbContext = {
|
self.wbContext = {
|
||||||
|
|
Reference in New Issue