From c69f570b69cb1e951dbcf1ea3731ce9f75e7d144 Mon Sep 17 00:00:00 2001 From: Jonathan Carter Date: Sat, 7 Sep 2024 20:09:42 +0200 Subject: [PATCH] Add some previously uncommitted stuff --- .../__pycache__/__init__.cpython-311.pyc | Bin 376 -> 0 bytes .../__pycache__/routes.cpython-311.pyc | Bin 1155 -> 0 bytes src/applets/welcome/routes.py | 9 +++-- src/applets/welcome/static/welcome.css | 1 + src/static/welcome.css | 1 + src/system-installer-daemon.py | 5 +++ src/templates/welcome.html | 33 ++++++++++++++++++ 7 files changed, 47 insertions(+), 2 deletions(-) delete mode 100644 src/applets/welcome/__pycache__/__init__.cpython-311.pyc delete mode 100644 src/applets/welcome/__pycache__/routes.cpython-311.pyc create mode 100644 src/applets/welcome/static/welcome.css create mode 100644 src/static/welcome.css create mode 100644 src/templates/welcome.html diff --git a/src/applets/welcome/__pycache__/__init__.cpython-311.pyc b/src/applets/welcome/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 909e5abff01399f405a3f08a685299b9ead4195a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 376 zcmZuqy-EW?5T3ou#;8QW*3LAhFxy#)h!0?6qiL2kJ4sG=_m167Bwb41K%YPnUnYWu zTotgg6Vjz}f@dN4G5_<;H&4yx1`u{aqu;0ev1)!%tBS=T75AV)GXs`&8G{6n=>(I< z1mK1I2i=r7si|4sNl-sH(493u@?mQ>XGb~oh%L}1ZRN^{!Dh`zs8pmkFFdGcVxru6k zB1}R=dyu&hl`-h)0B!C>@I6r}i%MBYnYk=V*(oN=#*xkS$l$SW(j!J5PAGh(jInpv eo&B{r-W_3~lgq_7xO_kqQS2cfZ)1!M#PFVx22!JisQD3p&76X-_s^d_L8lPZO9RoiIh2_@ z1=Jp#!J;EKGBQIM`Js%_8yQ(z*g}=DU%F%khsJKZo3{>_*Wf;@n4$UVMLo>aHn-}b zS$k85h!LMDhf~=|Sj0b?lL_Y{2L`&wP}AtXE)ZCChmp43V&sT-rYUJLMck(TAa7%vMcz3WMU!ytNZfZfErPpY#m9(e6k)$WqTeIqp+07xZ`R_Q3R|E9H}qIC@SL8OoYG) z{i?d7X@$kxmEGvhtO3&&5F!!=MHD*(RRh91f;h@QBu&8sHO~SX_c<^cMvQ?8#}j6Y z3AJ%>>Lc@Dj?s_eQopz~pp}INUF&vA-BLUtPEdy2m05-AY_$sPD`CiqC1sW2<5k zLiD4RpTI;W#`rsW)W5!?95M>W<&*pGXZsJIBpX-HaP=HlBO`|^5d!nuM8?xAPdUw* uJHu1wcq%e5UWPH_WgU0#%2P<=rq6Ks9G4>_gJ&ZIM#oKF^Th6W9De~9SPrKE diff --git a/src/applets/welcome/routes.py b/src/applets/welcome/routes.py index c649672..01587ca 100644 --- a/src/applets/welcome/routes.py +++ b/src/applets/welcome/routes.py @@ -1,4 +1,7 @@ from applets.welcome import bp +from flask import Flask, request, session, redirect, \ + url_for, render_template, flash, Blueprint +import dmm.lsblk as lsblk @bp.route('/welcome',methods=['GET', 'POST', 'PUT']) @@ -7,8 +10,10 @@ def welcome_index(): The page you'd get if you access the root of this app in a browser. """ - return ("Welcome to System Installer Daemon POC
" - "This is the Welcome Index") + blkid = lsblk.list_scsi_devices() + return render_template('welcome.html', blkid=blkid) + #return ("Welcome to System Installer Daemon POC
" + # "This is the Welcome Index") @bp.route('/welcome2') diff --git a/src/applets/welcome/static/welcome.css b/src/applets/welcome/static/welcome.css new file mode 100644 index 0000000..e901b4d --- /dev/null +++ b/src/applets/welcome/static/welcome.css @@ -0,0 +1 @@ +test: diff --git a/src/static/welcome.css b/src/static/welcome.css new file mode 100644 index 0000000..e901b4d --- /dev/null +++ b/src/static/welcome.css @@ -0,0 +1 @@ +test: diff --git a/src/system-installer-daemon.py b/src/system-installer-daemon.py index 20e8225..2d0eda5 100755 --- a/src/system-installer-daemon.py +++ b/src/system-installer-daemon.py @@ -9,6 +9,7 @@ from flask import Flask, request, session, redirect, \ url_for, render_template, flash, Blueprint from waitress import serve import logging +import dmm.lsblk as lsblk # configuration VERSION = "0.00" @@ -45,6 +46,10 @@ if DEV_MODE == "1": logger.debug("logger set to DEBUG") +# Justtry doing something with dmm +lsblk.list_scsi_devices() + + if __name__ == '__main__': if DEV_MODE: serve(app, diff --git a/src/templates/welcome.html b/src/templates/welcome.html new file mode 100644 index 0000000..4f5052d --- /dev/null +++ b/src/templates/welcome.html @@ -0,0 +1,33 @@ + + + + + + + + + + +
+
+

+ Hello world! +

+ +
+ Welcome to system installer daemon + BLK is {{ blkid }} +
+ + +