diff --git a/README.md b/README.md new file mode 100644 index 0000000..bda7c74 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +Dependencies + - flask + - pytest + - coverage diff --git a/src/applets/webui/NOTES.highvoltage b/src/applets/webui/NOTES.highvoltage new file mode 100644 index 0000000..e69de29 diff --git a/src/applets/webui/__init__.py b/src/applets/webui/__init__.py new file mode 100644 index 0000000..bd67c43 --- /dev/null +++ b/src/applets/webui/__init__.py @@ -0,0 +1,6 @@ +from flask import Blueprint + +bp = Blueprint('webui', __name__) + +from applets.webui import routes + diff --git a/src/applets/webui/__pycache__/__init__.cpython-311.pyc b/src/applets/webui/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000..36e87f1 Binary files /dev/null and b/src/applets/webui/__pycache__/__init__.cpython-311.pyc differ diff --git a/src/applets/webui/__pycache__/routes.cpython-311.pyc b/src/applets/webui/__pycache__/routes.cpython-311.pyc new file mode 100644 index 0000000..ab759ef Binary files /dev/null and b/src/applets/webui/__pycache__/routes.cpython-311.pyc differ diff --git a/src/applets/webui/routes.py b/src/applets/webui/routes.py new file mode 100644 index 0000000..f693b2b --- /dev/null +++ b/src/applets/webui/routes.py @@ -0,0 +1,33 @@ +from applets.webui import bp + + +@bp.route('/webui') +def webui_index(): + """ + The page you'd get if you access the root of + this app in a browser. + """ + return (""" + + + + + + +
+
+ 1 +



+ [Here Mouse, Mouse!] +



+ 2 +
+ + Welcome to System Installer Daemon POC
+ This is the WebUI Index + """) diff --git a/src/applets/welcome/__pycache__/routes.cpython-311.pyc b/src/applets/welcome/__pycache__/routes.cpython-311.pyc index 137bc75..d1a8796 100644 Binary files a/src/applets/welcome/__pycache__/routes.cpython-311.pyc and b/src/applets/welcome/__pycache__/routes.cpython-311.pyc differ diff --git a/src/applets/welcome/routes.py b/src/applets/welcome/routes.py index cb567a8..c649672 100644 --- a/src/applets/welcome/routes.py +++ b/src/applets/welcome/routes.py @@ -1,7 +1,7 @@ from applets.welcome import bp -@bp.route('/welcome') +@bp.route('/welcome',methods=['GET', 'POST', 'PUT']) def welcome_index(): """ The page you'd get if you access the root of @@ -11,6 +11,12 @@ def welcome_index(): "This is the Welcome Index") +@bp.route('/welcome2') +def welcome2_index(): + return ("Changins some text in our htmx front-end") + + + @bp.route('/api/') def api_home(): """ diff --git a/src/system-installer-daemon.py b/src/system-installer-daemon.py index 98294b2..20e8225 100755 --- a/src/system-installer-daemon.py +++ b/src/system-installer-daemon.py @@ -16,7 +16,6 @@ SECRET_KEY = "exampls" DEV_MODE = 1 APPS = "main welcome" - if DEV_MODE == 1: print("Note: Starting in devmode!") DEBUG = True @@ -34,11 +33,8 @@ from applets.main import bp as main_bp app.register_blueprint(main_bp) from applets.welcome import bp as welcome_bp app.register_blueprint(welcome_bp) - - -@app.errorhandler(404) -def not_found(error): - return '404 Not Found', 404 +from applets.webui import bp as webui_bp +app.register_blueprint(webui_bp) # configure logs