From ce20c57d11cb3dd9a6b406c337e50d5fd7ec48b2 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Wed, 5 Nov 2025 01:13:22 +1100 Subject: [PATCH] added health check, forgot to add template/cset <- allows deletion of comparison sets in earlier commit, and added a new TODO --- TODO | 5 ++-- main.py | 5 ++++ templates/cset.html | 66 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 templates/cset.html diff --git a/TODO b/TODO index 755faea..bf03801 100644 --- a/TODO +++ b/TODO @@ -3,8 +3,9 @@ CALC: differently, but hard to calc - slides around with tax brackets in future UI: - * I *COULD* have a basic date check/workflow, e.g. it now>last_update+14 (and its more than a paydate <- need to think that bit through) - then the question mark can be more prominent -> use an that suggests updating as per ? + * allow changing comparison when in tab with graph of comparisons - remember to force redraw page and then come to graph again + * I *COULD* have a basic date check/workflow, e.g. it now>last_update+14 (and its more than a paydate <- need to think that bit through) + then the question mark can be more prominent -> use an that suggests updating as per ? For bills: * might need to be able to mark a specific bill as an outlier: diff --git a/main.py b/main.py index 9db9efb..bf9c1fe 100644 --- a/main.py +++ b/main.py @@ -252,6 +252,11 @@ def DeleteCSet(): delete_cset( data['id'] ) return "200" +# quick health route so traefik knows we are up +@app.route('/health') +def health(): + return {"status": "ok"}, 200 + # Main program if __name__ == '__main__': app.run(debug=True) diff --git a/templates/cset.html b/templates/cset.html new file mode 100644 index 0000000..cd36424 --- /dev/null +++ b/templates/cset.html @@ -0,0 +1,66 @@ + + + + + + + + + Finance Form (Comparison Sets) + + + + + + + + +
+

Comparison Sets (go to Finance Tracker)

+ +
+
+ + + + + + {% for d in comp_data[finance['COMP_SETS'][1][0]]['vars'] %} + {% if d != 'id' %} + + {% endif %} + {% endfor %} + + + {% for c in finance['COMP_SETS'] %} + {% if c[0] != 0 %} + + + {% for d in comp_data[c[0]]['vars'] %} + {% if d != 'id' %} + {% if d == 'name' %} + + {% else %} + + {% endif %} + {% endif %} + {% endfor %} + + {% endif %} + {% endfor %} +
Action{{ d|replace('_', '
')|safe }}
{{comp_data[c[0]]['vars'][d]}}{{comp_data[c[0]]['vars'][d]}}
+ + + + +