mirror of
https://github.com/akuker/RASCSI.git
synced 2024-09-29 13:54:48 +00:00
1b10b123d2
- copy/move/delete file class methods now take Path objects as arguments - The file download endpoint in the Web UI uses the safer download from dir method - Simplified logging - Merged nested if statements - Removed naked handling of unknown error states - Added fallback empty list for drive_properties, to avoid errors when json file is missing or broken - Move drive_properties to env[] - Constants for common error messages - Dummy variable for list comprehension
118 lines
4.2 KiB
HTML
118 lines
4.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block content %}
|
|
<h2>{{ _("Disclaimer") }}</h2>
|
|
<p>{{ _("These device profiles are provided as-is with no guarantee to work equally to the actual physical device they are named after. You may need to provide appropirate device drivers and/or configuration parameters for them to function properly. If you would like to see data modified, or have additional devices to add to the list, please raise an issue ticket at <a href=\"%(url)s\">GitHub</a>.", url="https://github.com/akuker/RASCSI/issues") }}</p>
|
|
<h2>{{ _("Hard Disk Drives") }}</h2>
|
|
|
|
<table cellpadding="3" border="black" summary="List of hard drives">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="col">{{ _("Name") }}</th>
|
|
<th scope="col">{{ _("Size (MiB)") }}</th>
|
|
<th scope="col">{{ _("Description") }}</th>
|
|
<th scope="col">{{ _("Action") }}</th>
|
|
</tr>
|
|
{% for hd in env['drive_properties']['hd_conf']|sort(attribute='name') %}
|
|
<tr>
|
|
<td align="center">
|
|
{% if hd.url != "" %}
|
|
<a href="{{ hd.url }}">{{ hd.name }}</a>
|
|
{% else %}
|
|
{{ hd.name }}
|
|
{% endif %}
|
|
</td>
|
|
<td align="center">{{ hd.size_mb }}</td>
|
|
<td>{{ hd.description }}</td>
|
|
<td>
|
|
<form action="/drive/create" method="post">
|
|
<input type="hidden" name="drive_name" value="{{ hd.name }}">
|
|
<label for="file_name_{{ hd.name }}">{{ _("Save as:") }}</label>
|
|
<input type="text" name="file_name" id="file_name_{{ hd.name }}" value="{{ hd.secure_name }}" required />.{{ hd.file_type }}
|
|
<input type="submit" value="{{ _("Create") }}" />
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<hr/>
|
|
|
|
<h2>{{ _("CD/DVD Drives") }}</h2>
|
|
<p><em>{{ _("This will create a properties file for the given CD-ROM or DVD image. No new image file will be created.") }}</em></p>
|
|
<table cellpadding="3" border="black" summary="List of CD-ROM or DVD drives">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="col">{{ _("Name") }}</th>
|
|
<th scope="col">{{ _("Description") }}</th>
|
|
<th scope="col">{{ _("Action") }}</th>
|
|
</tr>
|
|
{% for cd in env['drive_properties']['cd_conf']|sort(attribute='name') %}
|
|
<tr>
|
|
<td align="center">
|
|
{% if cd.url != "" %}
|
|
<a href="{{ cd.url }}">{{ cd.name }}</a>
|
|
{% else %}
|
|
{{ cd.name }}
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ cd.description }}</td>
|
|
<td>
|
|
<form action="/drive/cdrom" method="post">
|
|
<input type="hidden" name="drive_name" value="{{ cd.name }}">
|
|
<label for="file_name_{{ cd.name }}">{{ _("Create for:") }}</label>
|
|
<select type="select" name="file_name" id="file_name_{{ cd.name }}">
|
|
{% for file in files|sort(attribute='name') %}
|
|
{% if file["name"].lower().endswith(env['cd_suffixes']) %}
|
|
<option value="{{ file["name"] }}">{{ file["name"].replace(env["image_dir"], '') }}</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
<input type="submit" value="{{ _("Create") }}" />
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<hr/>
|
|
|
|
<h2>{{ _("Removable Disk Drives") }}</h2>
|
|
<table cellpadding="3" border="black" summary="List of removable disk drives">
|
|
<tbody>
|
|
<tr>
|
|
<th scope="col">{{ _("Name") }}</th>
|
|
<th scope="col">{{ _("Size (MiB)") }}</th>
|
|
<th scope="col">{{ _("Description") }}</th>
|
|
<th scope="col">{{ _("Action") }}</th>
|
|
</tr>
|
|
{% for rm in env['drive_properties']['rm_conf']|sort(attribute='name') %}
|
|
<tr>
|
|
<td align="center">
|
|
{% if rm.url != "" %}
|
|
<a href="{{ rm.url }}">{{ rm.name }}</a>
|
|
{% else %}
|
|
{{ rm.name }}
|
|
{% endif %}
|
|
</td>
|
|
<td align="center">{{ rm.size_mb }}</td>
|
|
<td>{{ rm.description }}</td>
|
|
<td>
|
|
<form action="/drive/create" method="post">
|
|
<input type="hidden" name="drive_name" value="{{ rm.name }}">
|
|
<label for="file_name_{{ rm.name }}">{{ _("Save as:") }}</label>
|
|
<input type="text" name="file_name" id="file_name_{{ rm.name }}" value="{{ rm.secure_name }}" required />.{{ rm.file_type }}
|
|
<input type="submit" value="{{ _("Create") }}" />
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<p><small>{{ _("%(disk_space)s MiB disk space remaining on the Pi", disk_space=env["free_disk_space"]) }}</small></p>
|
|
<p><a href="/">{{ _("Go to Home") }}</a></p>
|
|
|
|
{% endblock content %}
|