From 405a17a9fdd420faa7af90f769e72eb21fda73ce Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 13 Sep 2023 09:34:49 +0300 Subject: save --- web/kbn_templates/base.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 web/kbn_templates/base.html (limited to 'web/kbn_templates') diff --git a/web/kbn_templates/base.html b/web/kbn_templates/base.html new file mode 100644 index 0000000..e567a90 --- /dev/null +++ b/web/kbn_templates/base.html @@ -0,0 +1,23 @@ + + + + {{ title }} + + + + {{ head_static }} + + +
+ +{% if js %} + +{% endif %} + +
+ + -- cgit v1.2.3 From 54ddea4614dbd31dad577ae5fdb8ec4821490199 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 24 Sep 2023 03:35:51 +0300 Subject: save --- web/kbn_templates/base.html | 4 +++- web/kbn_templates/index.html | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 web/kbn_templates/index.html (limited to 'web/kbn_templates') diff --git a/web/kbn_templates/base.html b/web/kbn_templates/base.html index e567a90..43f7d2a 100644 --- a/web/kbn_templates/base.html +++ b/web/kbn_templates/base.html @@ -9,11 +9,13 @@ window.console && console.error(error); } - {{ head_static }} + {{ head_static | safe }}
+{% block content %} {% endblock %} + {% if js %} {% endif %} diff --git a/web/kbn_templates/index.html b/web/kbn_templates/index.html new file mode 100644 index 0000000..1921b87 --- /dev/null +++ b/web/kbn_templates/index.html @@ -0,0 +1,39 @@ +{% extends "base.html" %} + +{% block content %} +
+ + + + + + + + +
Интернет
+ + +
Другое
+ + +
Все камеры (HQ)
+ +
+{% endblock %} \ No newline at end of file -- cgit v1.2.3 From 05c5d18f7619c28e620d42c0921f81ced780cc2d Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 10 Jan 2024 03:20:10 +0300 Subject: save --- web/kbn_templates/base.html | 25 ------------------------- web/kbn_templates/base.j2 | 44 ++++++++++++++++++++++++++++++++++++++++++++ web/kbn_templates/index.html | 39 --------------------------------------- web/kbn_templates/index.j2 | 39 +++++++++++++++++++++++++++++++++++++++ web/kbn_templates/loading.j2 | 14 ++++++++++++++ web/kbn_templates/modems.j2 | 12 ++++++++++++ 6 files changed, 109 insertions(+), 64 deletions(-) delete mode 100644 web/kbn_templates/base.html create mode 100644 web/kbn_templates/base.j2 delete mode 100644 web/kbn_templates/index.html create mode 100644 web/kbn_templates/index.j2 create mode 100644 web/kbn_templates/loading.j2 create mode 100644 web/kbn_templates/modems.j2 (limited to 'web/kbn_templates') diff --git a/web/kbn_templates/base.html b/web/kbn_templates/base.html deleted file mode 100644 index 43f7d2a..0000000 --- a/web/kbn_templates/base.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - {{ title }} - - - - {{ head_static | safe }} - - -
- -{% block content %} {% endblock %} - -{% if js %} - -{% endif %} - -
- - diff --git a/web/kbn_templates/base.j2 b/web/kbn_templates/base.j2 new file mode 100644 index 0000000..d43a08b --- /dev/null +++ b/web/kbn_templates/base.j2 @@ -0,0 +1,44 @@ +{% macro breadcrumbs(history) %} + +{% endmacro %} + + + + + {{ title }} + + + + {{ head_static | safe }} + + +
+ +{% block content %}{% endblock %} + +{% if js %} + +{% endif %} + +
+ + diff --git a/web/kbn_templates/index.html b/web/kbn_templates/index.html deleted file mode 100644 index 1921b87..0000000 --- a/web/kbn_templates/index.html +++ /dev/null @@ -1,39 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -
- - - - - - - - -
Интернет
- - -
Другое
- - -
Все камеры (HQ)
- -
-{% endblock %} \ No newline at end of file diff --git a/web/kbn_templates/index.j2 b/web/kbn_templates/index.j2 new file mode 100644 index 0000000..e3ab421 --- /dev/null +++ b/web/kbn_templates/index.j2 @@ -0,0 +1,39 @@ +{% extends "base.j2" %} + +{% block content %} +
+ + + + + + + + +
Интернет
+ + +
Другое
+ + +
Все камеры (HQ)
+ +
+{% endblock %} \ No newline at end of file diff --git a/web/kbn_templates/loading.j2 b/web/kbn_templates/loading.j2 new file mode 100644 index 0000000..d064a48 --- /dev/null +++ b/web/kbn_templates/loading.j2 @@ -0,0 +1,14 @@ +
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/web/kbn_templates/modems.j2 b/web/kbn_templates/modems.j2 new file mode 100644 index 0000000..f148140 --- /dev/null +++ b/web/kbn_templates/modems.j2 @@ -0,0 +1,12 @@ +{% extends "base.j2" %} + +{% block content %} +{{ breadcrumbs([{'text': 'Модемы'}]) }} + +{% for modem in modems %} +
{{ modems.getfullname(modem) }}
+
+ {% include "loading.j2" %} +
+{% endfor %} +{% endblock %} \ No newline at end of file -- cgit v1.2.3 From 7058d0f5063dc9b065248d0a906cf874788caecf Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 13 Sep 2023 09:34:49 +0300 Subject: save --- web/kbn_templates/base.j2 | 44 ++++++++++++++++++++++++++++++++++++++++++++ web/kbn_templates/index.j2 | 39 +++++++++++++++++++++++++++++++++++++++ web/kbn_templates/loading.j2 | 14 ++++++++++++++ web/kbn_templates/modems.j2 | 12 ++++++++++++ 4 files changed, 109 insertions(+) create mode 100644 web/kbn_templates/base.j2 create mode 100644 web/kbn_templates/index.j2 create mode 100644 web/kbn_templates/loading.j2 create mode 100644 web/kbn_templates/modems.j2 (limited to 'web/kbn_templates') diff --git a/web/kbn_templates/base.j2 b/web/kbn_templates/base.j2 new file mode 100644 index 0000000..d43a08b --- /dev/null +++ b/web/kbn_templates/base.j2 @@ -0,0 +1,44 @@ +{% macro breadcrumbs(history) %} + +{% endmacro %} + + + + + {{ title }} + + + + {{ head_static | safe }} + + +
+ +{% block content %}{% endblock %} + +{% if js %} + +{% endif %} + +
+ + diff --git a/web/kbn_templates/index.j2 b/web/kbn_templates/index.j2 new file mode 100644 index 0000000..e3ab421 --- /dev/null +++ b/web/kbn_templates/index.j2 @@ -0,0 +1,39 @@ +{% extends "base.j2" %} + +{% block content %} +
+ + + + + + + + +
Интернет
+ + +
Другое
+ + +
Все камеры (HQ)
+ +
+{% endblock %} \ No newline at end of file diff --git a/web/kbn_templates/loading.j2 b/web/kbn_templates/loading.j2 new file mode 100644 index 0000000..d064a48 --- /dev/null +++ b/web/kbn_templates/loading.j2 @@ -0,0 +1,14 @@ +
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/web/kbn_templates/modems.j2 b/web/kbn_templates/modems.j2 new file mode 100644 index 0000000..f148140 --- /dev/null +++ b/web/kbn_templates/modems.j2 @@ -0,0 +1,12 @@ +{% extends "base.j2" %} + +{% block content %} +{{ breadcrumbs([{'text': 'Модемы'}]) }} + +{% for modem in modems %} +
{{ modems.getfullname(modem) }}
+
+ {% include "loading.j2" %} +
+{% endfor %} +{% endblock %} \ No newline at end of file -- cgit v1.2.3 From da5db8bc280deab0e2081f39d2f32aabb2372afe Mon Sep 17 00:00:00 2001 From: Evgeny Sorokin Date: Tue, 16 Jan 2024 02:05:00 +0300 Subject: wip --- web/kbn_templates/base.j2 | 6 +++--- web/kbn_templates/modem_data.j2 | 13 +++++++++++++ web/kbn_templates/modem_verbose.j2 | 18 ++++++++++++++++++ web/kbn_templates/modems.j2 | 4 ++++ web/kbn_templates/signal_level.j2 | 5 +++++ 5 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 web/kbn_templates/modem_data.j2 create mode 100644 web/kbn_templates/modem_verbose.j2 create mode 100644 web/kbn_templates/signal_level.j2 (limited to 'web/kbn_templates') diff --git a/web/kbn_templates/base.j2 b/web/kbn_templates/base.j2 index d43a08b..e2e29e3 100644 --- a/web/kbn_templates/base.j2 +++ b/web/kbn_templates/base.j2 @@ -35,9 +35,9 @@ {% block content %}{% endblock %} -{% if js %} - -{% endif %} +
diff --git a/web/kbn_templates/modem_data.j2 b/web/kbn_templates/modem_data.j2 new file mode 100644 index 0000000..7f97b77 --- /dev/null +++ b/web/kbn_templates/modem_data.j2 @@ -0,0 +1,13 @@ +{% with level=modem_data.level %} + Сигнал: {% include 'signal_level.j2' %}
+{% endwith %} + +Тип сети: {{ modem_data.type }}
+RSSI: {{ modem_data.rssi }}
+{% if modem_data.sinr %} +SINR: {{ modem_data.sinr }}
+{% endif %} +Время соединения: {{ modem_data.connected_time }}
+Принято/передано: {{ modem_data.downloaded }} / {{ modem_data.uploaded }} +
+Подробная информация diff --git a/web/kbn_templates/modem_verbose.j2 b/web/kbn_templates/modem_verbose.j2 new file mode 100644 index 0000000..7c6c930 --- /dev/null +++ b/web/kbn_templates/modem_verbose.j2 @@ -0,0 +1,18 @@ +{% extends "base.j2" %} + +{% block content %} +{{ breadcrumbs([ + {'link': '/modems.cgi', 'text': "Модемы"}, + {'text': modem_name} +]) }} + +{% for item in data %} + {% set item_name = item[0] %} + {% set item_data = item[1] %} +
{{ item_name }}
+ {% for k, v in item_data.items() %} + {{ k }} = {{ v }}
+ {% endfor %} +{% endfor %} + +{% endblock %} \ No newline at end of file diff --git a/web/kbn_templates/modems.j2 b/web/kbn_templates/modems.j2 index f148140..4ff9cf8 100644 --- a/web/kbn_templates/modems.j2 +++ b/web/kbn_templates/modems.j2 @@ -9,4 +9,8 @@ {% include "loading.j2" %} {% endfor %} +{% endblock %} + +{% block js %} +ModemStatus.init({{ modems.getkeys()|tojson }}); {% endblock %} \ No newline at end of file diff --git a/web/kbn_templates/signal_level.j2 b/web/kbn_templates/signal_level.j2 new file mode 100644 index 0000000..93c9abf --- /dev/null +++ b/web/kbn_templates/signal_level.j2 @@ -0,0 +1,5 @@ +
+ {% for i in range(5) %} +
+ {% endfor %} + \ No newline at end of file -- cgit v1.2.3 From 8a89dd77be03ca8eb9cdc378ba8e912292494fa9 Mon Sep 17 00:00:00 2001 From: Evgeny Sorokin Date: Tue, 16 Jan 2024 03:31:55 +0300 Subject: inverter page --- web/kbn_templates/inverter.j2 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 web/kbn_templates/inverter.j2 (limited to 'web/kbn_templates') diff --git a/web/kbn_templates/inverter.j2 b/web/kbn_templates/inverter.j2 new file mode 100644 index 0000000..26491f3 --- /dev/null +++ b/web/kbn_templates/inverter.j2 @@ -0,0 +1,20 @@ +{% extends "base.j2" %} + +{% block content %} +{{ breadcrumbs([{'text': 'Инвертор'}]) }} + +
Статус
+
+ {{ html|safe }} +
+ + +{% endblock %} + +{% block js %} +Inverter.poll(); +{% endblock %} \ No newline at end of file -- cgit v1.2.3 From a9a241ad19449c29b68cd4a5b539bcbec816e341 Mon Sep 17 00:00:00 2001 From: Evgeny Sorokin Date: Wed, 17 Jan 2024 03:35:59 +0300 Subject: lws: pump page rewritten to python --- web/kbn_templates/pump.j2 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 web/kbn_templates/pump.j2 (limited to 'web/kbn_templates') diff --git a/web/kbn_templates/pump.j2 b/web/kbn_templates/pump.j2 new file mode 100644 index 0000000..28d5c9d --- /dev/null +++ b/web/kbn_templates/pump.j2 @@ -0,0 +1,17 @@ +{% extends "base.j2" %} + +{% block content %} +{{ breadcrumbs([{'text': 'Насос'}]) }} + +
+ + Сейчас насос + {% if status == 'on' %} + включен.

+ + {% else %} + выключен.

+ + {% endif %} +
+{% endblock %} -- cgit v1.2.3 From d237e81873a9e043f579e7f6a979f00510ddce08 Mon Sep 17 00:00:00 2001 From: Evgeny Sorokin Date: Thu, 18 Jan 2024 04:14:38 +0300 Subject: lws: sms page rewrite --- web/kbn_templates/index.j2 | 4 +-- web/kbn_templates/sms.j2 | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 web/kbn_templates/sms.j2 (limited to 'web/kbn_templates') diff --git a/web/kbn_templates/index.j2 b/web/kbn_templates/index.j2 index e3ab421..c356326 100644 --- a/web/kbn_templates/index.j2 +++ b/web/kbn_templates/index.j2 @@ -23,9 +23,9 @@
Другое
Все камеры (HQ)
diff --git a/web/kbn_templates/sms.j2 b/web/kbn_templates/sms.j2 new file mode 100644 index 0000000..6de9d42 --- /dev/null +++ b/web/kbn_templates/sms.j2 @@ -0,0 +1,63 @@ +{% extends "base.j2" %} + +{% block content %} +{{ breadcrumbs([{'text': 'SMS-сообщения'}]) }} + + + +
Отправить SMS
+ +{% if is_sent %} + +{% elif error %} + +{% endif %} + +
+
+ +
+ + +
+
+ + +
+
+ +
+
+
+ +
+ Последние + {% if not is_outbox %} + входящие | исходящие + {% else %} + входящие | исходящие + {% endif %} +
+ +{% for m in messages %} +
+ {{ m.Phone }} ({{ m.Date }})
+ {{ m.Content }} +
+{% else %} + Сообщений нет. +{% endfor %} + +{% endblock %} \ No newline at end of file -- cgit v1.2.3