From 9b40fbdd31f9366cf4fba4db04e85aa26e7c8a04 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Mon, 18 Jul 2022 16:29:20 +0300 Subject: lws: sms sending, inbox/outbox view, verbose modem info --- localwebsite/templates-web/index.twig | 4 +-- localwebsite/templates-web/modem_data.twig | 20 ++++++----- localwebsite/templates-web/modem_status_page.twig | 3 +- localwebsite/templates-web/modem_verbose_page.twig | 15 ++++++++ localwebsite/templates-web/sms_page.twig | 40 ++++++++++++++++++++-- 5 files changed, 68 insertions(+), 14 deletions(-) create mode 100644 localwebsite/templates-web/modem_verbose_page.twig (limited to 'localwebsite/templates-web') diff --git a/localwebsite/templates-web/index.twig b/localwebsite/templates-web/index.twig index 620ad40..4527911 100644 --- a/localwebsite/templates-web/index.twig +++ b/localwebsite/templates-web/index.twig @@ -13,9 +13,9 @@
Интернет
Другое
diff --git a/localwebsite/templates-web/modem_data.twig b/localwebsite/templates-web/modem_data.twig index 55440ea..a2c00e5 100644 --- a/localwebsite/templates-web/modem_data.twig +++ b/localwebsite/templates-web/modem_data.twig @@ -1,12 +1,14 @@ {% if not loading %} -Сигнал: {% include 'signal_level.twig' with {'level': modem_data.level} %}
-Тип сети: {{ 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 }} + Сигнал: {% include 'signal_level.twig' with {'level': modem_data.level} %}
+ Тип сети: {{ 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 }} +
+ Подробная информация {% else %} -{% include 'spinner.twig' %} + {% include 'spinner.twig' %} {% endif %} \ No newline at end of file diff --git a/localwebsite/templates-web/modem_status_page.twig b/localwebsite/templates-web/modem_status_page.twig index f2b999b..3f20b86 100644 --- a/localwebsite/templates-web/modem_status_page.twig +++ b/localwebsite/templates-web/modem_status_page.twig @@ -8,7 +8,8 @@
{{ modem.label }}
{% include 'modem_data.twig' with { - loading: true + loading: true, + modem: modem_key } %}
{% endfor %} diff --git a/localwebsite/templates-web/modem_verbose_page.twig b/localwebsite/templates-web/modem_verbose_page.twig new file mode 100644 index 0000000..3b4c25e --- /dev/null +++ b/localwebsite/templates-web/modem_verbose_page.twig @@ -0,0 +1,15 @@ +{% include 'bc.twig' with { + history: [ + {link: '/modem/', 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 %} + {{ k }} = {{ v }}
+ {% endfor %} +{% endfor %} \ No newline at end of file diff --git a/localwebsite/templates-web/sms_page.twig b/localwebsite/templates-web/sms_page.twig index f60d223..112fa64 100644 --- a/localwebsite/templates-web/sms_page.twig +++ b/localwebsite/templates-web/sms_page.twig @@ -7,14 +7,50 @@ -
Последние входящие
+
Отправить SMS
+ +{% if is_sent %} + +{% elseif error %} + +{% endif %} + +
+
+ +
+ + +
+
+ + +
+
+ +
+
+
+ +
+ Последние + {% if not is_outbox %} + входящие | исходящие + {% else %} + входящие | исходящие + {% endif %} +
{% for m in messages %}
-- cgit v1.2.3