From 3751379f1e9a4c215fb6eb898b4ccc67659b9ace Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Tue, 10 May 2022 21:51:50 +0700 Subject: initial commit 2 --- .../hw_posbox_homepage/views/configure_wizard.html | 180 +++++++++++++++++++++ addons/hw_posbox_homepage/views/handler_list.html | 50 ++++++ addons/hw_posbox_homepage/views/homepage.html | 152 +++++++++++++++++ addons/hw_posbox_homepage/views/layout.html | 143 ++++++++++++++++ .../hw_posbox_homepage/views/list_credential.html | 68 ++++++++ addons/hw_posbox_homepage/views/loading.html | 14 ++ .../hw_posbox_homepage/views/remote_connect.html | 42 +++++ addons/hw_posbox_homepage/views/server_config.html | 60 +++++++ .../views/six_payment_terminal.html | 61 +++++++ addons/hw_posbox_homepage/views/upgrade_page.html | 95 +++++++++++ addons/hw_posbox_homepage/views/wifi_config.html | 71 ++++++++ 11 files changed, 936 insertions(+) create mode 100644 addons/hw_posbox_homepage/views/configure_wizard.html create mode 100644 addons/hw_posbox_homepage/views/handler_list.html create mode 100644 addons/hw_posbox_homepage/views/homepage.html create mode 100644 addons/hw_posbox_homepage/views/layout.html create mode 100644 addons/hw_posbox_homepage/views/list_credential.html create mode 100644 addons/hw_posbox_homepage/views/loading.html create mode 100644 addons/hw_posbox_homepage/views/remote_connect.html create mode 100644 addons/hw_posbox_homepage/views/server_config.html create mode 100644 addons/hw_posbox_homepage/views/six_payment_terminal.html create mode 100644 addons/hw_posbox_homepage/views/upgrade_page.html create mode 100644 addons/hw_posbox_homepage/views/wifi_config.html (limited to 'addons/hw_posbox_homepage/views') diff --git a/addons/hw_posbox_homepage/views/configure_wizard.html b/addons/hw_posbox_homepage/views/configure_wizard.html new file mode 100644 index 00000000..d492a500 --- /dev/null +++ b/addons/hw_posbox_homepage/views/configure_wizard.html @@ -0,0 +1,180 @@ +{% extends "layout.html" %} +{% from "loading.html" import loading_block_ui %} +{% block head %} + + +{% endblock %} +{% block content %} +

Configure IoT Box

+ +
+
+
+ + + + + + + + + +
IoT Box Name
Server token
+
+ Server token is not mandatory for the community version. +
+ +
+
+ + + + + + + + + + +
Wifi Network + +
Password
+ +
+
+

✔ Nice! Your configuration is done.

+

+

+
+ {{ loading_block_ui(loading_message) }} +
+{% endblock %} diff --git a/addons/hw_posbox_homepage/views/handler_list.html b/addons/hw_posbox_homepage/views/handler_list.html new file mode 100644 index 00000000..86e7487e --- /dev/null +++ b/addons/hw_posbox_homepage/views/handler_list.html @@ -0,0 +1,50 @@ +{% extends "layout.html" %} +{% from "loading.html" import loading_block_ui %} +{% block head %} + +{% endblock %} +{% block content %} +

Interfaces list

+ + {% for interfaces in interfaces_list -%} + + {%- endfor %} +
{{ interfaces }}
+

Drivers list

+ + {% for driver in drivers_list -%} + + {%- endfor %} +
{{ driver }}
+ {% if server %} +
+ Load handlers +
+
+ You can clear the handlers configuration +
+ +
+
+ {% endif %} + {{ loading_block_ui('Loading Handlers') }} +{% endblock %} diff --git a/addons/hw_posbox_homepage/views/homepage.html b/addons/hw_posbox_homepage/views/homepage.html new file mode 100644 index 00000000..482c5451 --- /dev/null +++ b/addons/hw_posbox_homepage/views/homepage.html @@ -0,0 +1,152 @@ +{% extends "layout.html" %} +{% block head %} + + +{% endblock %} +{% block content %} +

Your IoT Box is up and running

+ + + + + + + + + + + + + + + + + + + + + + + + + + {% if server_status != "Not Configured" %} + + + + + {% endif %} + + + + +
Name {{ hostname }} configure
Version {{ version }} update
IP Address{{ ip }}
Mac Address {{ mac }}
Network{{ network_status }} configure wifi
Server{{ server_status }}configure
Six payment terminal{{ six_terminal }} configure
IOT Device +
+ {% if iot_device_status|length == 0 %} + No Device Found + {% endif %} + {% for iot_devices in iot_device_status|groupby('type') %} +
+
{{ iot_devices.grouper|capitalize }}s
+
+ {% for device in iot_devices.list %} +
+ {{ device['name'] }} +
{{ device['identifier'] }}
+
+ {% endfor %} +
+
+ {% endfor %} +
+
handlers list
+
+
+ POS Display + Remote Debug + Printers server + {% if server_status != "Not Configured" %} + Credential + {% endif %} +
+{% endblock %} diff --git a/addons/hw_posbox_homepage/views/layout.html b/addons/hw_posbox_homepage/views/layout.html new file mode 100644 index 00000000..5d0d7c6e --- /dev/null +++ b/addons/hw_posbox_homepage/views/layout.html @@ -0,0 +1,143 @@ + + + + + + {{ title or "Odoo's IoT Box" }} + + + {% block head %}{% endblock %} + + + {%if breadcrumb %} + + {% endif %} +
+ {% block content %}{% endblock %} +

+

+ + + diff --git a/addons/hw_posbox_homepage/views/list_credential.html b/addons/hw_posbox_homepage/views/list_credential.html new file mode 100644 index 00000000..87a8f09f --- /dev/null +++ b/addons/hw_posbox_homepage/views/list_credential.html @@ -0,0 +1,68 @@ +{% extends "layout.html" %} +{% from "loading.html" import loading_block_ui %} +{% block head %} + +{% endblock %} +{% block content %} +

List Credential

+

+ Set the DB UUID and your Contract Number you want to use. +

+
+ + + + + + + + + + + + +
DB uuid
Contract Number
+
+ {{ loading_block_ui(loading_message) }} +
+ {% if db_uuid or enterprise_code %} +

+ Current DB uuid: {{ db_uuid }} +

+

+ Current Contract Number: {{ enterprise_code }} +

+
+ You can clear the credential configuration +
+ +
+
+ {% endif %} +{% endblock %} diff --git a/addons/hw_posbox_homepage/views/loading.html b/addons/hw_posbox_homepage/views/loading.html new file mode 100644 index 00000000..a4c040fc --- /dev/null +++ b/addons/hw_posbox_homepage/views/loading.html @@ -0,0 +1,14 @@ +{% macro loading_block_ui(message) %} +
+
+
+ Loading... +
+
+
+ Please wait..
+ {{ message }} +
+
+
+{% endmacro %} diff --git a/addons/hw_posbox_homepage/views/remote_connect.html b/addons/hw_posbox_homepage/views/remote_connect.html new file mode 100644 index 00000000..ab9628ec --- /dev/null +++ b/addons/hw_posbox_homepage/views/remote_connect.html @@ -0,0 +1,42 @@ +{% extends "layout.html" %} +{% block head %} + +{% endblock %} +{% block content %} +

Remote Debugging

+

+ This allows someone who give a ngrok authtoken to gain remote access to your IoT Box, and + thus your entire local network. Only enable this for someone + you trust. +

+
+
+ Enable Remote Debugging +
+{% endblock %} diff --git a/addons/hw_posbox_homepage/views/server_config.html b/addons/hw_posbox_homepage/views/server_config.html new file mode 100644 index 00000000..6824ee67 --- /dev/null +++ b/addons/hw_posbox_homepage/views/server_config.html @@ -0,0 +1,60 @@ +{% extends "layout.html" %} +{% from "loading.html" import loading_block_ui %} +{% block head %} + +{% endblock %} +{% block content %} +

Configure Odoo Server

+

+ Paste the token from the Connect wizard in your Odoo instance in the Server Token field. If you change the IoT Box Name, + your IoT Box will need a reboot. +

+
+ + + + + + + + + + + + +
IoT Box Name
Server Token
+
+

+ Your current server {{ server_status }} +

+ {{ loading_block_ui(loading_message) }} +
+
+ You can clear the server configuration +
+ +
+
+{% endblock %} diff --git a/addons/hw_posbox_homepage/views/six_payment_terminal.html b/addons/hw_posbox_homepage/views/six_payment_terminal.html new file mode 100644 index 00000000..622c6a84 --- /dev/null +++ b/addons/hw_posbox_homepage/views/six_payment_terminal.html @@ -0,0 +1,61 @@ +{% extends "layout.html" %} +{% from "loading.html" import loading_block_ui %} +{% block head %} + +{% endblock %} +{% block content %} +

Six Payment Terminal

+

+ Set the Terminal ID (TID) of the terminal you want to use. +

+
+ + + + + + + + +
Terminal ID
+
+ {{ loading_block_ui(loading_message) }} +
+ {% if terminalId %} +

+ Current Terminal Id: {{ terminalId }} +

+
+ You can clear the terminal configuration +
+ +
+
+ {% endif %} +{% endblock %} diff --git a/addons/hw_posbox_homepage/views/upgrade_page.html b/addons/hw_posbox_homepage/views/upgrade_page.html new file mode 100644 index 00000000..81fe2c3b --- /dev/null +++ b/addons/hw_posbox_homepage/views/upgrade_page.html @@ -0,0 +1,95 @@ +{% extends "layout.html" %} +{% from "loading.html" import loading_block_ui %} +{% block head %} + + + +{% endblock %} +{% block content %} +

IoT Box Software Upgrade

+

+ This tool will help you perform an upgrade of the IoTBox's software over the internet. + However the preferred method to upgrade the IoTBox is to flash the sd-card with + the latest image. The upgrade + procedure is explained into to the + IoTBox manual +

+

+ To upgrade the IoTBox, click on the upgrade button. The upgrade will take a few minutes. Do not reboot the IoTBox during the upgrade. +

+
+
+ Latest patch: +
+
{{ commit|safe }}
+
+
+ {% if flashToVersion %} + Upgrade to {{ flashToVersion }} + {% else %} + Upgrade + {% endif %} +
+ {{ loading_block_ui(loading_message) }} +{% endblock %} diff --git a/addons/hw_posbox_homepage/views/wifi_config.html b/addons/hw_posbox_homepage/views/wifi_config.html new file mode 100644 index 00000000..94e0579b --- /dev/null +++ b/addons/hw_posbox_homepage/views/wifi_config.html @@ -0,0 +1,71 @@ +{% extends "layout.html" %} +{% from "loading.html" import loading_block_ui %} +{% block head %} + +{% endblock %} +{% block content %} +

Configure Wifi

+

+ Here you can configure how the iotbox should connect to wireless networks. + Currently only Open and WPA networks are supported. When enabling the persistent checkbox, + the chosen network will be saved and the iotbox will attempt to connect to it every time it boots. +

+
+ + + + + + + + + + + + + + + + +
ESSID + +
Password
Persistent
+
+
+
+ You can clear the persistent configuration +
+ +
+
+ {{ loading_block_ui(loading_message) }} +{% endblock %} -- cgit v1.2.3