Move the manual and go back elements into footer; log controls in log page

This commit is contained in:
Daniel Markstedt 2023-11-08 12:36:48 +09:00
parent cad3df690e
commit f2686dd742
12 changed files with 47 additions and 42 deletions

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-book"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevrons-left"><polyline points="11 17 6 12 11 7"></polyline><polyline points="18 17 13 12 18 7"></polyline></svg>

Before

Width:  |  Height:  |  Size: 345 B

After

Width:  |  Height:  |  Size: 318 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-book"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>

Before

Width:  |  Height:  |  Size: 345 B

View File

@ -948,27 +948,6 @@ section#system div.power-control {
}
}
/*
------------------------------------------------------------------------------
Index > Section: Manual
------------------------------------------------------------------------------
*/
section#manual {
margin: 2rem 0 1rem;
}
section#manual a {
margin: auto;
display: block;
padding: 0.25rem 0 0.25rem 2rem;
background: url("icons/manual.svg") no-repeat left center;
font-weight: bold;
}
section#manual a p {
margin: 0;
}
/*
------------------------------------------------------------------------------
Admin > Section: Services
@ -1072,3 +1051,14 @@ body.page-manpage div.content p.home {
margin-top: 2rem;
font-weight: bold;
}
/*
------------------------------------------------------------------------------
Base > Back
------------------------------------------------------------------------------
*/
a.back {
padding: 0.25rem 0 0.25rem 2rem;
font-weight: bold;
background: url("icons/chevrons-left.svg") no-repeat left center;
}

View File

@ -189,6 +189,4 @@
</div>
</section>
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>
{% endblock content %}

View File

@ -105,7 +105,15 @@
{{ content_class }}
{% block content %}{% endblock content %}
</div>
{% if not is_root_page %}
<div class="content">
<a class="back" href="/">{{ _("Go to Home") }}</a>
</div>
{% endif %}
<div align="center" class="footer">
<div>
<a href="/sys/manpage?app=piscsi">{{ _("Read the PiSCSI Manual") }}</a>
</div>
<div>
{{ _("PiSCSI software version:") }} <b>{{ env["version"] }}</b>
</div>

View File

@ -52,6 +52,4 @@
</table>
</p>
{% endfor %}
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>
{% endblock content %}

View File

@ -3,6 +3,4 @@
{% block content %}
<h2>{{ _("Disk Image Details: %(file_name)s", file_name=file_name) }}</h2>
<p><pre>{{ diskinfo }}</pre></p>
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>
{% endblock content %}

View File

@ -112,6 +112,4 @@
</tbody>
</table>
<p><small>{{ _("%(disk_space)s MiB disk space remaining on the Pi", disk_space=env["free_disk_space"]) }}</small></p>
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>
{% endblock content %}

View File

@ -667,11 +667,4 @@
{% endfor %}
</table>
</section>
<hr/>
<section id="manual">
<a href="/sys/manpage?app=piscsi"><p>{{ _("Read the PiSCSI Manual") }}</p></a>
</section>
{% endblock content %}

View File

@ -2,7 +2,30 @@
{% block content %}
<h2>{{ _("System Logs: %(scope)s %(lines)s lines", scope=scope, lines=lines) }}</h2>
<div>
<form action="/logs/show" method="post">
<label for="log_lines">{{ _("Log Lines:") }}</label>
<input name="lines" id="log_lines" type="number" value="200" min="0" max="99999" step="100">
<label for="log_scope">{{ _("Scope:") }}</label>
<select name="scope" id="log_scope">
<option value="">
{{ _("All logs") }}
</option>
<option value="piscsi">
piscsi
</option>
<option value="piscsi-web">
piscsi-web
</option>
<option value="piscsi-oled">
piscsi-oled
</option>
<option value="piscsi-ctrlboard">
piscsi-ctrlboard
</option>
</select>
<input type="submit" value="{{ _("Show Logs") }}">
</form>
</div>
<p><pre>{{ logs }}</pre></p>
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>
{% endblock content %}

View File

@ -6,6 +6,4 @@
<div id="manpage-content">
{{ manpage | safe }}
</div>
<p class="home"><a href="/">{{ _("Go to Home") }}</a></p>
{% endblock content %}

View File

@ -261,6 +261,7 @@ def index():
return response(
template="index.html",
page_title=_("PiSCSI Control Page"),
is_root_page=True,
netinfo=piscsi_cmd.get_network_info(),
bridge_configured=sys_cmd.is_bridge_setup(),
devices=formatted_devices,
@ -347,6 +348,7 @@ def upload_page():
return response(
template="upload.html",
page_title=_("PiSCSI File Upload"),
is_root_page=True,
images_subdirs=file_cmd.list_subdirs(server_info["image_dir"]),
shared_subdirs=file_cmd.list_subdirs(FILE_SERVER_DIR),
file_server_dir_exists=Path(FILE_SERVER_DIR).exists(),