From 32d044c7216dcd74c956d6551a7b5416655f8a0b Mon Sep 17 00:00:00 2001 From: Mateusz779 Date: Wed, 19 Apr 2023 12:12:38 +0200 Subject: [PATCH] zmiana wygladu strony --- config.py | 3 ++- db.py | 2 +- templates/index.html | 60 +++++++++++++++++++++----------------------- 3 files changed, 32 insertions(+), 33 deletions(-) diff --git a/config.py b/config.py index 04b0d42..fd8df32 100644 --- a/config.py +++ b/config.py @@ -4,4 +4,5 @@ user="praktyki" password="2a7driUITXFy73tO" port="5432" default_file = "default.squashfs" -webssh_port = "8000" \ No newline at end of file +webssh_port = "8000" +timezone = "UTC" \ No newline at end of file diff --git a/db.py b/db.py index 05991f3..1b6eb6c 100644 --- a/db.py +++ b/db.py @@ -17,7 +17,7 @@ def connect(): cur = conn.cursor() with conn.cursor() as cur: - cur.execute("SET TIMEZONE='UTC';") + cur.execute("SET TIMEZONE='%s'",(config.timezone,)) conn.commit() cur.execute(""" CREATE TABLE IF NOT EXISTS image ( diff --git a/templates/index.html b/templates/index.html index c1df1f7..9905e79 100644 --- a/templates/index.html +++ b/templates/index.html @@ -2,6 +2,7 @@ Panel administracyjny + -

Lista maszyn

- - - - - - - - - - - - - {% for machine in machines %} +
+

Lista maszyn

+
Nazwa maszynyObrazCzas uruchomieniaIP uVPNIP lokalne
+ - - - - - - + + + + + + - {% endfor %} - -
{{ machine.name }}{{ machine.image_name }}{{ machine.start_time }}{{ machine.ipvpn }}{{ machine.iplocal }}Nazwa maszynyObrazCzas uruchomieniaIP uVPNIP lokalne
+ + + {% for machine in machines %} + + {{ machine.name }} + {{ machine.image_name }} + {{ machine.start_time }} + {{ machine.ipvpn }} + {{ machine.iplocal }} + + + {% endfor %} + + +