init commit
This commit is contained in:
commit
dfd166bd3b
55 changed files with 18538 additions and 0 deletions
77
templates/frontend/base.html.j2
Normal file
77
templates/frontend/base.html.j2
Normal file
|
@ -0,0 +1,77 @@
|
|||
{% extends 'base.html.j2' %}
|
||||
|
||||
{% macro show_categories(categories) -%}
|
||||
<li>
|
||||
{% for category in categories %}
|
||||
<ul>
|
||||
<a href="{{ url_for('.sorts', category_id=category.id) }}">{{ category.name_de }}</a>
|
||||
{% if category.children %}
|
||||
{{ show_categories(category.children) }}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</li>
|
||||
{%- endmacro %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="modal fade" id="confirm-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||
<a class="btn btn-danger btn-ok">Process</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
|
||||
<div class="col-xs-1"><button id="sidebarCollapse" class="btn btn-primary d-xs-block d-md-none" ><i class="fa fa-bars fa-2x"></i></button></div>
|
||||
<div class="col-xs-11"><a class="navbar-brand col-xs-11 col-sm-3 col-md-2 mr-0" href="/">Lenticular Cloud</a></div>
|
||||
</nav>
|
||||
|
||||
|
||||
<div style="height: 40px"></div>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
{% if current_user.is_authenticated %}
|
||||
<nav class="col-md-2 d-none d-md-block bg-light sidebar fixed-top">
|
||||
<div class="sidebar-sticky active">
|
||||
{#<a href="/"><img alt="logo" class="container-fluid" src="/static/images/dog_main_small.png"></a>#}
|
||||
<li class="nav-item"><a class="nav-link" href="{{ url_for('frontend.index') }}">{{ gettext('Account') }}</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ url_for('auth.logout') }}">{{ gettext('Logout') }}</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ url_for('frontend.client_cert') }}">{{ gettext('Client Cert') }}</a></li>
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<main class="col-md-9 ml-sm-auto col-lg-10 px-4" role="main">
|
||||
<h1>{% block title %}{% endblock %}</h1>
|
||||
<div class="card">
|
||||
<div class="card-body mt-5 mb-5">
|
||||
<div class="tab-content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5 row justify-content-center">
|
||||
<footer>
|
||||
<span class="text-muted">Render Time: {{ g.request_time() }}</span> | <span class="text-muted">{{ gettext('All right reserved. ©2019') }}</span>
|
||||
</footer>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
51
templates/frontend/client_cert.html.j2
Normal file
51
templates/frontend/client_cert.html.j2
Normal file
|
@ -0,0 +1,51 @@
|
|||
{% extends 'frontend/base.html.j2' %}
|
||||
|
||||
{% block title %}{{ gettext('client certs') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
{% for service in services.values() %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link{{' active' if loop.first else ''}}" id="home-tab" data-toggle="tab" href="#{{ service.name }}" role="tab" aria-controls="home" aria-selected="true">{{ service.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
{% for service in services.values() if service.client_cert %}
|
||||
|
||||
<div class="tab-pane fade{{ ' show active' if loop.first else '' }}" id="{{ service.name }}" role="tabpanel" aria-labelledby="{{ service.name }}-tab">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>not valid before</th>
|
||||
<th>not valid after</th>
|
||||
<th>fingerprint<th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for cert in client_certs[service.name] %}
|
||||
<tr>
|
||||
<td>{{ cert.not_valid_before }}</td>
|
||||
<td>{{ cert.not_valid_after }}</td>
|
||||
<td>{{ cert.fingerprint().hex() }}</td>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<a class="btn btn-default" href="{{ url_for('frontend.client_cert_new', service_name=service.name) }}">
|
||||
New Certificate
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block script_js %}
|
||||
|
||||
client_certs.init_list();
|
||||
|
||||
|
||||
{% endblock %}
|
49
templates/frontend/client_cert_new.html.j2
Normal file
49
templates/frontend/client_cert_new.html.j2
Normal file
|
@ -0,0 +1,49 @@
|
|||
{% extends 'frontend/base.html.j2' %}
|
||||
|
||||
{% block title %}{{ gettext('new client cert - {service_name}').format(service_name=service.name) }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div id="sign-key">
|
||||
<h4>Sign Public Key</h4>
|
||||
{{ render_form(form) }}
|
||||
</div>
|
||||
<div id="gen-key">
|
||||
<h4>Generate new key in the browser</h4>
|
||||
<div id="gen-key-sign" style="display: none">
|
||||
{{ render_form(form) }}
|
||||
</div>
|
||||
<form id="gen-key-form">
|
||||
<div class="form-group">
|
||||
<label for="valid_time" class="control-label ">Key Password for .p12 (optional)</label>
|
||||
<div class="">
|
||||
<input class="form-control" id="cert-password" type="password" name="password"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="valid_time" class="control-label ">Key Size</label>
|
||||
<div class="">
|
||||
<select id="key-size" class="custom-select">
|
||||
<option value="4096" selected>4096</option>
|
||||
<option value="2048">2048</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group ">
|
||||
<label for="valid_time" class="control-label ">valid time in days</label>
|
||||
<div class="">
|
||||
<input class="form-control" name="valid_time" required type="text" value="365">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<button id="generate-key" class="btn btn-primary" onclick="client_cert.generate_private_key()">Generate Key</button>
|
||||
<a style="display: none" id="save-button" download="lenticular_cloud_{{ service.name }}.p12" class="btn btn-primary">Save Keypair</a>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block script_js %}
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
0
templates/frontend/fido2.html.j2
Normal file
0
templates/frontend/fido2.html.j2
Normal file
2
templates/frontend/index.html.j2
Normal file
2
templates/frontend/index.html.j2
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
{% extends 'frontend/base.html.j2' %}
|
18
templates/frontend/login.html.j2
Normal file
18
templates/frontend/login.html.j2
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends 'frontend/base.html.j2' %}
|
||||
|
||||
{% block title %}{{ gettext('Login') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="POST" action="/login">
|
||||
{{ form.csrf_token }}
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">{{ form.name.label }} </label>
|
||||
<div class="col-sm-10">
|
||||
{{ form.name(size=20) }}
|
||||
</div>
|
||||
</div>
|
||||
{{ form.submit() }}
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
13
templates/frontend/login_auth.html.j2
Normal file
13
templates/frontend/login_auth.html.j2
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'frontend/base.html.j2' %}
|
||||
|
||||
{% block title %}{{ gettext('Login') }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% for form in forms %}
|
||||
{{ render_form(form) }}
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
0
templates/frontend/totp.html.j2
Normal file
0
templates/frontend/totp.html.j2
Normal file
Loading…
Add table
Add a link
Reference in a new issue