Initial commit
This commit is contained in:
commit
7523a19d1f
40 changed files with 3984 additions and 0 deletions
23
templates/remote/add.html
Normal file
23
templates/remote/add.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% extends "base.html" %}
|
||||
{% from 'utils.html' import custom_render_form_row,make_tabs %}
|
||||
{% from 'bootstrap/form.html' import render_form, render_field, render_form_row %}
|
||||
|
||||
{% block app_content %}
|
||||
|
||||
{% if form %}
|
||||
<h1>Grant remote access</h1>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg">
|
||||
<form method="post" class="form">
|
||||
{{form.csrf_token()}}
|
||||
{{custom_render_form_row([form.name])}}
|
||||
{{custom_render_form_row([form.ssh_key])}}
|
||||
{{custom_render_form_row([form.add])}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
78
templates/remote/index.html
Normal file
78
templates/remote/index.html
Normal file
|
@ -0,0 +1,78 @@
|
|||
{% extends "base.html" %}
|
||||
{% from 'utils.html' import custom_render_form_row,make_tabs %}
|
||||
{% from 'bootstrap/utils.html' import render_icon %}
|
||||
{% from 'bootstrap/form.html' import render_form, render_field, render_form_row %}
|
||||
|
||||
{% block app_content %}
|
||||
|
||||
<h1>
|
||||
Remote access <a href={{url_for("remote_add")}}>{{render_icon("person-plus-fill")}}</a>
|
||||
</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg">
|
||||
<h4>SSH</h4>
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Type</th>
|
||||
<th>Key fingerprint</th>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
{% for key in ssh %}
|
||||
<tr {{ {"class":"text-muted" if key.disabled else none}|xmlattr }}>
|
||||
<td>
|
||||
{% if key.disabled %}
|
||||
<a href="{{url_for("remote",enabled=True,key=key.key)}}">{{render_icon("person-x-fill",color='danger')}}</a>
|
||||
{% else %}
|
||||
<a href="{{url_for("remote",enabled=False,key=key.key)}}">{{render_icon("person-check-fill",color='success')}}</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{key.type}}</td>
|
||||
<td title="{{key.key}}">{{key.fingerprint}}</td>
|
||||
<td>{{key.name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg">
|
||||
<h4><a href="{{cfg().jellyfin_url}}web/index.html#!/userprofiles.html">Jellyfin</a></h4>
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Last Login</th>
|
||||
<th>Last Active</th>
|
||||
<th>Bandwidth Limit</th>
|
||||
</tr>
|
||||
{% for user in jf|sort(attribute="LastLoginDate",reverse=True) %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{cfg().jellyfin_url}}web/index.html#!/useredit.html?userId={{user.Id}}">
|
||||
{{user.Name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if "LastLoginDate" in user %}
|
||||
{{user.LastLoginDate|fromiso|ago_dt_utc(2)}} ago
|
||||
{% else %}
|
||||
Never
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if "LastActivityDate" in user %}
|
||||
{{user.LastActivityDate|fromiso|ago_dt_utc(2)}} ago
|
||||
{% else %}
|
||||
Never
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{user.Policy.RemoteClientBitrateLimit|filesizeformat(binary=False)}}/s</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue