new settins page

This commit is contained in:
Cayo Puigdefabregas 2022-08-04 14:09:59 +02:00
parent 5593425c60
commit a3a8f377f0
2 changed files with 9 additions and 13 deletions

View File

@ -18,26 +18,22 @@
<div class="card-body">
<div class="pt-6 pb-2">
<h5 class="card-title text-center pb-0 fs-4">Download your settings for Workbench</h5>
<p class="text-center small">Please select one of this options</p>
<h5 class="card-title text-center pb-0 fs-4">Workbench 2022</h5>
<div class="row pt-3">
<div class="col-5">
<a href="{{ url_for('workbench.settings') }}?opt=register" class="btn btn-primary">Register devices</a>
<a href="{{ url_for('workbench.settings') }}?opt=register" class="btn btn-primary">Get settings for register devices</a>
</div>
<div class="col">
<p class="small">Download the settings only for register devices.</p>
</div>
</div>
{% if iso %}
{% if 2022_iso %}
<div class="row pt-3">
<div class="col-5">
<a href="/static/iso/{{ iso }}" class="btn btn-primary">{{ iso }}</a>
<a href="/static/iso/2022/{{ 2022_iso }}" class="btn btn-primary">Get {{ 2022_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>
Download Checksum: <a style="color: #993365;" href="/static/iso/2022/SHA512SUMS">SHA512SUMS</a> |
</p>
</div>
</div>

View File

@ -20,7 +20,7 @@ workbench = Blueprint('workbench', __name__, url_prefix='/workbench')
class SettingsView(GenericMixin):
decorators = [login_required]
template_name = 'workbench/settings.html'
page_title = "Workbench Settings"
page_title = "Workbench"
def dispatch_request(self):
self.get_context()
@ -43,8 +43,8 @@ class SettingsView(GenericMixin):
f for f in os.listdir(f'{path}/static/iso/') if f[-3:].lower() == 'iso'
]
self.context['iso'] = ''
self.context['iso_sha'] = ''
self.context['2022_iso'] = ''
self.context['2022_iso_sha'] = ''
if files:
self.context['iso'] = files[0]
@ -89,4 +89,4 @@ class SettingsView(GenericMixin):
return token
workbench.add_url_rule('/settings/', view_func=SettingsView.as_view('settings'))
workbench.add_url_rule('/', view_func=SettingsView.as_view('settings'))