merge
This commit is contained in:
@@ -17,6 +17,12 @@ Recommended:
|
|||||||
- sass-stylesheets-bulma (needed if the web front-end is to be used)
|
- sass-stylesheets-bulma (needed if the web front-end is to be used)
|
||||||
- libxapp-gtk3-module
|
- libxapp-gtk3-module
|
||||||
|
|
||||||
|
On Debian-based systems, you should get everything with the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
apt install python3-flask python3-command-runner python3-pytest python3-dmm gettext libjs-htmx sass-stylesheets-bulma fonts-fork-awesome
|
||||||
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
**Please Note:** This project is in early development, and if you have stumbled across this page, please note that it is nowhere near ready for production use yet. Hopefully that changes over the next few months!
|
**Please Note:** This project is in early development, and if you have stumbled across this page, please note that it is nowhere near ready for production use yet. Hopefully that changes over the next few months!
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ def on_closed():
|
|||||||
|
|
||||||
window = webview.create_window('System Installer', LOCATION,
|
window = webview.create_window('System Installer', LOCATION,
|
||||||
transparent=True, easy_drag=False, frameless=True,
|
transparent=True, easy_drag=False, frameless=True,
|
||||||
width=1050, focus=True, zoomable=True,
|
width=1050, height=650, focus=True, zoomable=True,
|
||||||
confirm_close=True, resizable=True, shadow=True,
|
confirm_close=True, resizable=True, shadow=True,
|
||||||
text_select=False, draggable=False
|
text_select=False, draggable=False
|
||||||
)
|
)
|
||||||
@@ -31,4 +31,5 @@ webview.settings = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.events.closed += on_closed
|
window.events.closed += on_closed
|
||||||
webview.start(icon='/usr/share/icons/yasi.png')
|
#webview.start(icon='/usr/share/icons/yasi.png')
|
||||||
|
webview.start()
|
||||||
|
|||||||
BIN
src/yasi_applets/disks/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
src/yasi_applets/disks/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
src/yasi_applets/disks/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
src/yasi_applets/disks/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
src/yasi_applets/disks/__pycache__/routes.cpython-312.pyc
Normal file
BIN
src/yasi_applets/disks/__pycache__/routes.cpython-312.pyc
Normal file
Binary file not shown.
BIN
src/yasi_applets/disks/__pycache__/routes.cpython-313.pyc
Normal file
BIN
src/yasi_applets/disks/__pycache__/routes.cpython-313.pyc
Normal file
Binary file not shown.
@@ -27,10 +27,8 @@
|
|||||||
-->
|
-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="columns" width="100%">
|
|
||||||
<div class="column"><p> <br>Current layout: </p></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
<!--
|
<!--
|
||||||
<div style="">
|
<div style="">
|
||||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px;">
|
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px;">
|
||||||
@@ -88,33 +86,57 @@ fssize: {{ child['fssize'] }}
|
|||||||
<div style=""> <!-- partition bars -->
|
<div style=""> <!-- partition bars -->
|
||||||
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px;">
|
<div style="background-color: gray; padding: 4px 6px 7px 6px; border-radius: 10px;">
|
||||||
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">
|
<p> <span style="width: 100%; border-radius: 8px 8px 0 0;" class="tag is-black">
|
||||||
<small><small>{{ disk['name'] }} ({{(disk['size']/1024000000)|round(0)|int }} GB) - Serial: {{ disk['serial'] }}</small></small>
|
<b>{{ disk['name'] }}: </b> {{ disk['model'] }} - {{ disk['tran'] }} disk ({{(disk['size']/1024000000)|round(0)|int }} GB) - Serial: {{ disk['serial'] }} </p>
|
||||||
<div class="columns">
|
<center style="padding: 5px; padding-bottom: 5px;">
|
||||||
{% for child in disk['children'] %}
|
<td><a hx-get="/disks/details/{{ disk['name'] }}" hx-swap="outerHTML"><span class="tag is-link"> Disk Details </span></a></td>
|
||||||
<a hx-get="/disks/partition/{{ child['name'] }}" hx-swap="outerHTML"/>
|
<td><a hx-get="/disks/wipe_table/{{ disk['name'] }}" hx-swap="outerHTML"><span class="tag is-link"> Wipe Disk </span></a></td>
|
||||||
<div class="column is-narrow is-primary">
|
<td><a hx-get="/disks/new_partition/{{ disk['name'] }}" hx-swap="outerHTML"><span class="tag is-link"> New Partition </span></a></td>
|
||||||
<div class="box" style="min-width: 220px; border-radius: 0 0 0px 5px; height: 60px; padding-top: 5px;">
|
<td><a hx-get="/disks/replicate/{{ disk['name'] }}" hx-swap="outerHTML"><span class="tag is-link"> Replicate Layout </span></a></td>
|
||||||
<p class="is-tiny">{{ child['name'] }} ({{ (child['size']/1024000000)|round(2) }} GiB) </p>
|
<td><a hx-get="/disks/diagnostics/{{ disk['name'] }}" hx-swap="outerHTML"><span class="tag is-link"> Diagnostics </span></a></td>
|
||||||
<p class="title is-5"><span class="tag is-black">{{ child['mountpoint'] }}</span>
|
</center>
|
||||||
<span class="tag is-link">{{ child['fstype'] }}</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
{% endfor %}
|
|
||||||
{% if disk['maj:min'] == "252:0" %}
|
{% if disk['maj:min'] == "252:0" %}
|
||||||
<div class="column is-narrow is-primary">
|
<div class="column">
|
||||||
<div class="box" style="width: 100%; border-radius: 0 0 0px 5px; height: 60px; padding-top: 5px; right: 0px;">
|
<div class="box" style="width: 100%; border-radius: 0 0 0px 5px; height: 60px; padding-top: 5px; right: 0px;">
|
||||||
<p class="is-tiny"> {{ disk['name'] }} ({{ (disk['size']/1024000000)|round(2) }} GiB) </p>
|
|
||||||
<p class="title is-5"><span class="tag is-black">/dev/{{ disk['name'] }}</span>
|
|
||||||
<span class="tag is-link">swap</span>
|
<span class="tag is-link">swap</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% set colors = ['teal', '#E69F00', '#56B4E9', '#009E73', '#0072B2', '#D55E00', '#CC79A7'] %}
|
||||||
|
|
||||||
|
<div id="percentagebar" style="width: 100%; height: 50px; background-color: transparent; display: inline-block; margin: 5; padding: 5; overflow: hidden; display: flex;">
|
||||||
|
{% for child in disk['children'] %}
|
||||||
|
<a hx-get="/disks/partition/{{ child['name'] }}" hx-swap="outerHTML">
|
||||||
|
<div style="min-width: 100px; width: {{ (((child['size'] / disk['size'])*100)|round(0)|int) }}%; height: 100%; background-color: {{ colors[loop.index0 % colors|length] }}; display: inline-block; margin: 1; padding: 1; border-radius: 8px;">
|
||||||
|
<a hx-get="/disks/partition/{{ child['name'] }}" hx-swap="outerHTML"> <font color="white">{{ child['name'] }} </font>
|
||||||
|
</div></a>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<table width="100%">
|
||||||
|
<th>Partition</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Mount Point</th>
|
||||||
|
<th>Label</th>
|
||||||
|
<th>Size</th>
|
||||||
|
<th>Used</th>
|
||||||
|
{% for child in disk['children'] %}
|
||||||
|
<tr>
|
||||||
|
<td><a hx-get="/disks/partition/{{ child['name'] }}" hx-swap="outerHTML"><span class="tag is-link">{{ child['name'] }}</span></a></td>
|
||||||
|
<td>{{ child['fstype'] }}</td>
|
||||||
|
<td>{{ child['mountpoint'] }}</td>
|
||||||
|
<td>{{ child['label'] }} </td>
|
||||||
|
<td>{{ (child['size']/1024000000)|round(2) }} GiB </td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br />
|
||||||
<!--
|
<!--
|
||||||
<p> Diskname: {{ disk['name'] }} </p>
|
<p> Diskname: {{ disk['name'] }} </p>
|
||||||
<p> Model: {{ disk['model'] }} </p>
|
<p> Model: {{ disk['model'] }} </p>
|
||||||
@@ -128,6 +150,7 @@ fssize: {{ child['fssize'] }}
|
|||||||
<p> There are {{ disk['children']|count }} Children </p>
|
<p> There are {{ disk['children']|count }} Children </p>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
{% for child in disk['children'] %}
|
{% for child in disk['children'] %}
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
40
src/yasi_applets/disks/disks_details.html
Normal file
40
src/yasi_applets/disks/disks_details.html
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
<div class="modal is-active">
|
||||||
|
<div class="modal-background"></div>
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<div style="background-color: #424242; padding: 15px; border-radius: 15px; boders: none; color: white;">
|
||||||
|
<h1 class="is-size-4"> Disk: {{ disk }} </h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
|
||||||
|
{% for pdisk in blockdevs["blockdevices"] if pdisk["name"] != "zram0" and "loop" not in pdisk["name"] and pdisk["name"] != "sr0" %}
|
||||||
|
{% if pdisk['name'] == disk %}
|
||||||
|
|
||||||
|
<p> Model: {{ pdisk['model'] }} </p>
|
||||||
|
<p> Revision: {{ pdisk['rev'] }} </p>
|
||||||
|
<p> Serial: {{ pdisk['serial'] }} </p>
|
||||||
|
<p> Link: {{ pdisk['id-link'] }} </p>
|
||||||
|
<p> Path: {{ pdisk['path'] }} </p>
|
||||||
|
<p> Label: {{ pdisk['label'] }} </p>
|
||||||
|
<p> Partition type: {{ pdisk['pttype'] }} </p>
|
||||||
|
<p> Interface: {{ pdisk['tran'] }} </p>
|
||||||
|
<p> Size: {{ pdisk['size'] }} </p>
|
||||||
|
<p> Flags: {{ pdisk['flags'] }} </p>
|
||||||
|
<p> UUID: {{ pdisk['uuid'] }} </p>
|
||||||
|
<p> Partitions: {{ pdisk['children']|count }} </p>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="columns">
|
||||||
|
<a href="/disks">
|
||||||
|
<div class="column"><button class="button is-light">Cancel</button></div>
|
||||||
|
</a>
|
||||||
|
<a href="/disks"><div class="column"><button class="button is-link">Continue</button></div></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -11,12 +11,11 @@
|
|||||||
<div class="select">
|
<div class="select">
|
||||||
<select>
|
<select>
|
||||||
<option>Local file system</option>
|
<option>Local file system</option>
|
||||||
<option>Remote file system</option>
|
|
||||||
<option>Logical volume for ZFS zpool</option>
|
<option>Logical volume for ZFS zpool</option>
|
||||||
<option>Logical volume for LVM</option>
|
<option>Logical volume for LVM</option>
|
||||||
<option>Logical volume for LUKS encryption</option>
|
<option>Logical volume for LUKS encryption</option>
|
||||||
<option>Logical volume for Linux (mdadm) RAID</option>
|
<option>Logical volume for Linux (mdadm) RAID</option>
|
||||||
<option>Logical volume for Microsoft LDM RAID</option>
|
<option>Logical volume for (existing) Microsoft LDM RAID</option>
|
||||||
<option>Swap partition</option>
|
<option>Swap partition</option>
|
||||||
<option>Do not configure</option>
|
<option>Do not configure</option>
|
||||||
</select>
|
</select>
|
||||||
@@ -49,9 +48,6 @@
|
|||||||
<option>jfs</option>
|
<option>jfs</option>
|
||||||
<option>ntfs</option>
|
<option>ntfs</option>
|
||||||
<option>vfat</option>
|
<option>vfat</option>
|
||||||
<option>nfs</option>
|
|
||||||
<option>nbd</option>
|
|
||||||
<option>samba</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
24
src/yasi_applets/disks/disks_wipe_partition.html
Normal file
24
src/yasi_applets/disks/disks_wipe_partition.html
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<div class="modal is-active">
|
||||||
|
<div class="modal-background"></div>
|
||||||
|
<div class="modal-content">
|
||||||
|
|
||||||
|
<div style="background-color: #424242; padding: 15px; border-radius: 15px; boders: none; color: white;">
|
||||||
|
<h1 class="is-size-4"> Wipe partition: {{ disk }} </h1>
|
||||||
|
|
||||||
|
<p>Warning: wiping the partition table effectively destroys all data on the disk.</p>
|
||||||
|
|
||||||
|
<p>What kind of partition would you like to create? </p>
|
||||||
|
|
||||||
|
<p>DOS/MBR (Only use for legacy purposes, disks smaller than 2TB</p>
|
||||||
|
<p>GPT (Usable on all disk sizes, modern systems)</p>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="columns">
|
||||||
|
<a href="/disks">
|
||||||
|
<div class="column"><button class="button is-light">Cancel</button></div>
|
||||||
|
</a>
|
||||||
|
<a href="/disks"><div class="column"><button class="button is-link">Continue</button></div></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -47,6 +47,23 @@ def disks_partition(part):
|
|||||||
partition=partition)
|
partition=partition)
|
||||||
|
|
||||||
|
|
||||||
|
@bp.route('/disks/details/<disk>')
|
||||||
|
def disks_details(disk):
|
||||||
|
"""
|
||||||
|
Show some details about a disk.
|
||||||
|
"""
|
||||||
|
blockdevs = lsblk.list_block_devices()
|
||||||
|
return render_template('disks_details.html', disk=disk, blockdevs=blockdevs)
|
||||||
|
|
||||||
|
|
||||||
|
@bp.route('/disks/wipe_table/<disk>')
|
||||||
|
def disks_wipe_table(disk):
|
||||||
|
"""
|
||||||
|
Create a new partition table
|
||||||
|
"""
|
||||||
|
return render_template('disks_wipe_partition.html', disk=disk)
|
||||||
|
|
||||||
|
|
||||||
def build_menu():
|
def build_menu():
|
||||||
"""
|
"""
|
||||||
Define menu items and paths.
|
Define menu items and paths.
|
||||||
|
|||||||
Reference in New Issue
Block a user