diff --git a/WEBUI_SRC/src/components/webguicomp/CardActions.vue b/WEBUI_SRC/src/components/webguicomp/CardActions.vue deleted file mode 100644 index 49a65d2..0000000 --- a/WEBUI_SRC/src/components/webguicomp/CardActions.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/EssentialLink.vue b/WEBUI_SRC/src/components/webguicomp/EssentialLink.vue deleted file mode 100644 index 1a32006..0000000 --- a/WEBUI_SRC/src/components/webguicomp/EssentialLink.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - - - diff --git a/WEBUI_SRC/src/components/webguicomp/SelectWiFiDialog.vue b/WEBUI_SRC/src/components/webguicomp/SelectWiFiDialog.vue deleted file mode 100644 index 7b56675..0000000 --- a/WEBUI_SRC/src/components/webguicomp/SelectWiFiDialog.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/EthSetCard.vue b/WEBUI_SRC/src/components/webguicomp/cards/EthSetCard.vue deleted file mode 100644 index d668947..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/EthSetCard.vue +++ /dev/null @@ -1,45 +0,0 @@ - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/FirmwareCard.vue b/WEBUI_SRC/src/components/webguicomp/cards/FirmwareCard.vue deleted file mode 100644 index 75d37e3..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/FirmwareCard.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/HomeCard.vue b/WEBUI_SRC/src/components/webguicomp/cards/HomeCard.vue deleted file mode 100644 index 8ae266f..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/HomeCard.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/MQTT1Card.vue b/WEBUI_SRC/src/components/webguicomp/cards/MQTT1Card.vue deleted file mode 100644 index c709556..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/MQTT1Card.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/MQTT2Card.vue b/WEBUI_SRC/src/components/webguicomp/cards/MQTT2Card.vue deleted file mode 100644 index b694b9a..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/MQTT2Card.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/SNTPCard.vue b/WEBUI_SRC/src/components/webguicomp/cards/SNTPCard.vue deleted file mode 100644 index b1048ec..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/SNTPCard.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/StatCard.vue b/WEBUI_SRC/src/components/webguicomp/cards/StatCard.vue deleted file mode 100644 index 601ddcf..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/StatCard.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/SystemCard.vue b/WEBUI_SRC/src/components/webguicomp/cards/SystemCard.vue deleted file mode 100644 index d4c2165..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/SystemCard.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/cards/WifiSetCard.vue b/WEBUI_SRC/src/components/webguicomp/cards/WifiSetCard.vue deleted file mode 100644 index 0624e7e..0000000 --- a/WEBUI_SRC/src/components/webguicomp/cards/WifiSetCard.vue +++ /dev/null @@ -1,80 +0,0 @@ - - - diff --git a/WEBUI_SRC/src/components/webguicomp/network.js b/WEBUI_SRC/src/components/webguicomp/network.js deleted file mode 100644 index 50ed1bb..0000000 --- a/WEBUI_SRC/src/components/webguicomp/network.js +++ /dev/null @@ -1,64 +0,0 @@ -import { api } from "boot/axios"; -import { sha256 } from "js-sha256"; -import { Notify, Dialog } from "quasar"; - -const API_URL = "/api"; -const SHA256_HMAC_KEY = "mykey"; - -function ShowSaveDialog(apltype) { - const opername = ['Data applying...', 'Data saving...', 'Data saving and reboot...']; - let step = (apltype == 2) ? 1 : 10; - let percentage = 0; - const dialog = Dialog.create({ message: opername[apltype], progress: true, persistent: true, ok: false }) - const interval = setInterval(() => { - percentage = Math.min(100, percentage + step); - dialog.update({ - message: `${opername[apltype]} ${percentage}%` - }) - if (percentage === 100) { - clearInterval(interval); - setTimeout(() => { dialog.hide() }, 350) - } - }, 100) -} - - - -function PostData(varlist, messtype, applytype, onfinished) { - var pld = {}; - var data = {}; - data.msgid = Math.floor(Date.now() / 1000); - data.time = new Date().toISOString(); - data.msgtype = messtype; - data.payloadtype = 1; - data.payload = {}; - data.payload.applytype = applytype; - data.payload.variables = varlist; - pld.data = data; - pld.signature = sha256.hmac(SHA256_HMAC_KEY, JSON.stringify(data)); - - api - .post(API_URL, JSON.stringify(pld), { - headers: { "Content-Type": "application/json" }, - }) - .then((response) => { - var resp = response.data.data.payload.variables; - for (var k in resp) varlist[k] = resp[k]; - if (onfinished) onfinished(); - }) - .catch((err) => { - Notify.create({ color: "negative", position: "top", message: err.message, icon: "report_problem", }); - }); - -} - -function SendAndRequest(varlist, mstp, apltp, shakey, okreport) { - var onfinish = (okreport) ? () => { ShowSaveDialog(apltp) } : null; - PostData(varlist, mstp, apltp, onfinish); -} - -export { SendAndRequest, PostData }; - - - -