rename s-i-d, add siwc

This commit is contained in:
Jonathan Carter
2024-12-05 15:53:01 +02:00
parent 6a5905374d
commit a61cc67a34
23 changed files with 118 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="16.98286657496" x2="113.51232281881" y1="91.79046347784" y2="91.79046347784">
<stop offset="0" stop-color="#e6f0fc"/>
<stop offset="0.0383542" stop-color="#cadff8" stop-opacity="0.996078"/>
<stop offset="0.124655" stop-color="#d4e5f9" stop-opacity="0.992157"/>
<stop offset="0.901364" stop-color="#b2d0f4" stop-opacity="0.964706"/>
<stop offset="0.9589" stop-color="#d0e3f9" stop-opacity="0.964706"/>
<stop offset="1" stop-color="#98c1f1" stop-opacity="0.964706"/>
</linearGradient>
<linearGradient id="b" gradientUnits="userSpaceOnUse" x1="35.05556157496" x2="88.56691281881" y1="91.79046347784" y2="91.79046347784">
<stop offset="0" stop-color="#e6f0fc"/>
<stop offset="0.230125" stop-color="#cadff8" stop-opacity="0.996078"/>
<stop offset="0.383542" stop-color="#d4e5f9" stop-opacity="0.992157"/>
<stop offset="0.588996" stop-color="#b2d0f4" stop-opacity="0.964706"/>
<stop offset="0.753397" stop-color="#d0e3f9" stop-opacity="0.964706"/>
<stop offset="1" stop-color="#98c1f1" stop-opacity="0.964706"/>
</linearGradient>
<path d="m 65.007812 67.363281 c -24.257812 0.027344 -44.703124 16.957031 -49.898437 39.847657 c -1.597656 5.96875 1.65625 9.007812 5.269531 9.007812 h 88.402344 c 4.75 0 7.4375 -4.191406 6.222656 -8.734375 c -5.097656 -23.042969 -25.625 -40.109375 -49.996094 -40.121094 z m 0 0" fill="url(#a)"/>
<path d="m 89.351562 33.375 c 0 14.257812 -11.554687 25.8125 -25.8125 25.8125 c -14.257812 0 -25.816406 -11.554688 -25.816406 -25.8125 s 11.558594 -25.816406 25.816406 -25.816406 c 14.257813 0 25.8125 11.558594 25.8125 25.816406 z m 0 0" fill="url(#b)"/>
<path d="m 65.007812 64.082031 c -24.257812 0.03125 -44.703124 16.074219 -49.898437 38.96875 c -1.597656 5.96875 1.65625 9.007813 5.269531 9.007813 h 88.402344 c 4.75 0 7.4375 -4.191406 6.222656 -8.734375 c -5.097656 -23.042969 -25.625 -39.226563 -49.996094 -39.242188 z m 24.34375 -34.046875 c 0 14.257813 -11.554687 25.8125 -25.8125 25.8125 c -14.257812 0 -25.816406 -11.554687 -25.816406 -25.8125 c 0 -14.257812 11.558594 -25.816406 25.816406 -25.816406 c 14.257813 0 25.8125 11.558594 25.8125 25.816406 z m 0 0" fill="#f6f9fe" fill-opacity="0.996078"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
src/static/icons/debian.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 8 0 c -4.40625 0 -8 3.59375 -8 8 s 3.59375 8 8 8 s 8 -3.59375 8 -8 s -3.59375 -8 -8 -8 z m 3.398438 4.507812 c 0.265624 -0.027343 0.527343 0.050782 0.734374 0.21875 c 0.425782 0.351563 0.488282 0.980469 0.140626 1.40625 l -4.5 5.5 c -0.179688 0.21875 -0.441407 0.351563 -0.722657 0.367188 c -0.28125 0.011719 -0.558593 -0.09375 -0.757812 -0.292969 l -2.5 -2.5 c -0.390625 -0.390625 -0.390625 -1.023437 0 -1.414062 s 1.023437 -0.390625 1.414062 0 l 1.71875 1.71875 l 3.800781 -4.644531 c 0.167969 -0.203126 0.410157 -0.335938 0.671876 -0.363282 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 719 B

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 3 0 c -1.644531 0 -3 1.355469 -3 3 v 10 c 0 1.644531 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355469 3 -3 v -10 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 2 h 10 c 0.570312 0 1 0.429688 1 1 v 10 c 0 0.570312 -0.429688 1 -1 1 h -10 c -0.570312 0 -1 -0.429688 -1 -1 v -10 c 0 -0.570312 0.429688 -1 1 -1 z m 0 0"/>
<path d="m 4 7 h 8 v 2 h -8 z m 0 0"/>
<path d="m 9 4 v 8 h -2 v -8 z m 0 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 585 B

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 3 1 c -1.644531 0 -3 1.355469 -3 3 v 6 c 0 1.644531 1.355469 3 3 3 h 1 v 3 l 3 -3 h 6 c 1.644531 0 3 -1.355469 3 -3 v -6 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 329 B

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 3 1 c -1.644531 0 -3 1.355469 -3 3 v 6 c 0 1.644531 1.355469 3 3 3 h 1 v 3 l 3 -3 h 6 c 1.644531 0 3 -1.355469 3 -3 v -6 c 0 -1.644531 -1.355469 -3 -3 -3 z m 0 2 h 10 c 0.554688 0 1 0.445312 1 1 v 6 c 0 0.554688 -0.445312 1 -1 1 h -10 c -0.570312 0 -1 -0.429688 -1 -1 v -6 c 0 -0.554688 0.445312 -1 1 -1 z m 0 0" fill="#2e3436" fill-opacity="0.34902"/>
</svg>

After

Width:  |  Height:  |  Size: 502 B

4
src/static/mem Executable file
View File

@@ -0,0 +1,4 @@
mem()
{
ps -eo rss,pid,euser,args:100 --sort %mem | grep -v grep | grep -i $@ | awk '{printf $1/1024 "MB"; $1=""; print }'
}

50
src/system-installer-daemon Executable file
View File

@@ -0,0 +1,50 @@
#!/usr/bin/env python3
"""
Welcome to SID - The System Installer Daemon!
"""
from flask import Flask, request, session, redirect, \
url_for, render_template, flash, Blueprint
from waitress import serve
import logging
import dmm.lsblk as lsblk
import importlib
# configuration
VERSION = "0.00"
SECRET_KEY = "exampls"
DEV_MODE = True
APPS = "main welcome users disks software summary"
if DEV_MODE:
print("Note: Starting in devmode!")
DEBUG = True
tracebacks = True
# create our application in flask
app = Flask(__name__)
app.config.from_object(__name__)
# Register blueprints here
for APP in APPS.split(" "):
print(f"Loading applet: {APP} ")
# Dynamically import the blueprint module
module = importlib.import_module(f"applets.{APP}")
# Get the blueprint (bp) from the imported module
bp = getattr(module, "bp")
# Register the blueprint with the app
app.register_blueprint(bp)
# configure logs
# logging.basicConfig()
logger = logging.getLogger('waitress')
if DEV_MODE == "1":
logger.setLevel(logging.DEBUG)
logger.debug("logger set to DEBUG")
if __name__ == '__main__':
serve(app,
host='0.0.0.0',
port=8080,
url_scheme='http',
expose_tracebacks=DEV_MODE)

20
src/system-installer-web-client Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env python3
import webview
LOCATION = "http://10.10.99.22:8080/welcome"
def on_closed():
"""
Actions to take when System Installer is closed.
"""
print('pywebview window is closed')
window = webview.create_window('System Installer', LOCATION,
transparent=True, easy_drag=False, frameless=True,
width=1030, focus=True, zoomable=True,
confirm_close=True)
window.events.closed += on_closed
webview.start()

View File

@@ -7,7 +7,7 @@
<a href="/disks"><button class="button is-{% if request.path == "/disks" %}info{% else %}dark{% endif %}">Disks</button></a> <a href="/disks"><button class="button is-{% if request.path == "/disks" %}info{% else %}dark{% endif %}">Disks</button></a>
<a href="/software"><button class="button is-{% if request.path == "/software" %}info{% else %}dark{% endif %}">Software</button></a> <a href="/software"><button class="button is-{% if request.path == "/software" %}info{% else %}dark{% endif %}">Software</button></a>
<a href="/summary"><button class="button is-{% if request.path == "/summary" %}info{% else %}dark{% endif %}">Summary</button></a> <a href="/summary"><button class="button is-{% if request.path == "/summary" %}info{% else %}dark{% endif %}">Summary</button></a>
<a href="/quit"> <button class="button is-danger" style="float: right;"> 🗙 </button></a> <button onclick="closeApp()" class="button is-danger" style="float: right;"> 🗙 </button>
<a href="/help"> <button class="button is-light" style="float: right; margin-right: 5px;"> <b> ? </b> </button></a> <a href="/help"> <button class="button is-light" style="float: right; margin-right: 5px;"> <b> ? </b> </button></a>
</span> </span>
</div> <!-- end pywebview-drag-region --> </div> <!-- end pywebview-drag-region -->

View File

@@ -9,7 +9,7 @@
</head> </head>
<body> <body>
<div style="border-radius: 10px; padding: 12px;" class="notification is-dark"> <div style="border-radius: 10px; padding: 13px;" class="notification is-dark">
{% include "header.html" %} {% include "header.html" %}
{% block body %} {% block body %}