Add some previously uncommitted stuff

This commit is contained in:
Jonathan Carter
2024-09-07 20:09:42 +02:00
parent 1b0e2f0483
commit c69f570b69
7 changed files with 47 additions and 2 deletions

View File

@@ -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 <br />"
"This is the Welcome Index")
blkid = lsblk.list_scsi_devices()
return render_template('welcome.html', blkid=blkid)
#return ("Welcome to System Installer Daemon POC <br />"
# "This is the Welcome Index")
@bp.route('/welcome2')

View File

@@ -0,0 +1 @@
test:

1
src/static/welcome.css Normal file
View File

@@ -0,0 +1 @@
test:

View File

@@ -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,

View File

@@ -0,0 +1,33 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/static/welcome.css" rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
clifford: '#da373d',
}
}
}
}
</script>
</head>
<body>
<div class="bg">
</div>
<h1 class="text-3xl font-bold underline">
Hello world!
</h1>
<div class="lg:content-auto">
Welcome to system installer daemon
BLK is {{ blkid }}
</div>
</body>
</html>