mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-30 20:09:24 +03:00
парсинг данных страниц
This commit is contained in:
127
src/App.svelte
127
src/App.svelte
@@ -45,25 +45,57 @@
|
|||||||
//dashboard
|
//dashboard
|
||||||
let pages = [];
|
let pages = [];
|
||||||
|
|
||||||
|
//ready flags
|
||||||
|
let dashReady = false;
|
||||||
|
let configReady = false;
|
||||||
|
let connectionReady = false;
|
||||||
|
let listReady = false;
|
||||||
|
let systemReady = false;
|
||||||
|
|
||||||
//configuration
|
//configuration
|
||||||
let configJson = [];
|
let configJson = [];
|
||||||
let configJsonFlag = false;
|
let configJsonFlag = false;
|
||||||
|
let configJsonParced = false;
|
||||||
|
|
||||||
let widgetsJson = [];
|
let widgetsJson = [];
|
||||||
let widgetsJsonFlag = false;
|
let widgetsJsonFlag = false;
|
||||||
|
let widgetsJsonParced = false;
|
||||||
|
|
||||||
let itemsJson = [];
|
let itemsJson = [];
|
||||||
let itemsJsonFlag = false;
|
let itemsJsonFlag = false;
|
||||||
|
let itemsJsonParced = false;
|
||||||
|
|
||||||
let layoutJson = [];
|
let layoutJson = [];
|
||||||
let layoutJsonFlag = false;
|
let layoutJsonFlag = false;
|
||||||
|
let layoutJsonParced = false;
|
||||||
|
|
||||||
let settingsJson = {};
|
let settingsJson = {};
|
||||||
let settingsJsonFlag = false;
|
let settingsJsonFlag = false;
|
||||||
|
let settingsJsonParced = false;
|
||||||
|
|
||||||
let errorsJson = {};
|
let errorsJson = {};
|
||||||
|
let errorsJsonParced = false;
|
||||||
|
|
||||||
let ssidJson = {};
|
let ssidJson = {};
|
||||||
|
let ssidJsonParced = false;
|
||||||
|
|
||||||
|
let paramsJson = {};
|
||||||
|
let paramsJsonParced = false;
|
||||||
|
|
||||||
|
let statusJsonParced = false;
|
||||||
|
|
||||||
|
let incDeviceList = [];
|
||||||
|
let incDeviceListParced = false;
|
||||||
|
|
||||||
|
let deviceList = [];
|
||||||
|
deviceList = [
|
||||||
|
{
|
||||||
|
name: "--",
|
||||||
|
id: "--",
|
||||||
|
ip: myip,
|
||||||
|
status: false,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
//web sockets
|
//web sockets
|
||||||
let socket = [];
|
let socket = [];
|
||||||
@@ -77,19 +109,6 @@
|
|||||||
|
|
||||||
let oneOfJsonPackageError = false;
|
let oneOfJsonPackageError = false;
|
||||||
|
|
||||||
let deviceList = [];
|
|
||||||
deviceList = [
|
|
||||||
{
|
|
||||||
name: "--",
|
|
||||||
id: "--",
|
|
||||||
ip: myip,
|
|
||||||
status: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
let incDeviceList = [];
|
|
||||||
let incDeviceListParced = false;
|
|
||||||
|
|
||||||
//***********************************************************blob**************************************************************/
|
//***********************************************************blob**************************************************************/
|
||||||
var MyBlobBuilder = function () {
|
var MyBlobBuilder = function () {
|
||||||
this.parts = [];
|
this.parts = [];
|
||||||
@@ -235,16 +254,16 @@
|
|||||||
udateStatusOfWidget(statusJson);
|
udateStatusOfWidget(statusJson);
|
||||||
wigetsUpdate();
|
wigetsUpdate();
|
||||||
if (debug) console.log("✔", "statusJson parced");
|
if (debug) console.log("✔", "statusJson parced");
|
||||||
|
statusJsonParced = true;
|
||||||
onParced("status");
|
onParced("status");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//сборщик paramsJson сообщений======================================
|
//сборщик paramsJson сообщений======================================
|
||||||
if (data.includes("params")) {
|
if (data.includes("params")) {
|
||||||
if (IsJsonParse(data)) {
|
if (IsJsonParse(data)) {
|
||||||
let paramsJson = JSON.parse(data);
|
paramsJson = JSON.parse(data);
|
||||||
udateStatusOfAllWidgets(paramsJson);
|
|
||||||
wigetsUpdate();
|
|
||||||
if (debug) console.log("✔", "paramsJson parced");
|
if (debug) console.log("✔", "paramsJson parced");
|
||||||
|
paramsJsonParced = true;
|
||||||
onParced("params");
|
onParced("params");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -254,6 +273,7 @@
|
|||||||
ssidJson = JSON.parse(data);
|
ssidJson = JSON.parse(data);
|
||||||
ssidJson = ssidJson;
|
ssidJson = ssidJson;
|
||||||
if (debug) console.log("✔", "ssidJson parced");
|
if (debug) console.log("✔", "ssidJson parced");
|
||||||
|
ssidJsonParced = true;
|
||||||
onParced("ssid");
|
onParced("ssid");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -267,6 +287,7 @@
|
|||||||
deviceList = deviceList;
|
deviceList = deviceList;
|
||||||
whenDeviceListWasUpdated();
|
whenDeviceListWasUpdated();
|
||||||
connectToAllDevices();
|
connectToAllDevices();
|
||||||
|
|
||||||
if (debug) console.log("✔", "incDeviceList json parced");
|
if (debug) console.log("✔", "incDeviceList json parced");
|
||||||
onParced("devicelist");
|
onParced("devicelist");
|
||||||
}
|
}
|
||||||
@@ -276,8 +297,8 @@
|
|||||||
if (IsJsonParse(data)) {
|
if (IsJsonParse(data)) {
|
||||||
errorsJson = JSON.parse(data);
|
errorsJson = JSON.parse(data);
|
||||||
errorsJson = errorsJson;
|
errorsJson = errorsJson;
|
||||||
|
errorsJsonParced = true;
|
||||||
if (debug) console.log("✔", "errorsJson json parced");
|
if (debug) console.log("✔", "errorsJson json parced");
|
||||||
//dataReceived();
|
|
||||||
onParced("errors");
|
onParced("errors");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -295,6 +316,7 @@
|
|||||||
if (IsJsonParse(configJsonResult)) {
|
if (IsJsonParse(configJsonResult)) {
|
||||||
configJson = JSON.parse(configJsonResult);
|
configJson = JSON.parse(configJsonResult);
|
||||||
configJson = configJson;
|
configJson = configJson;
|
||||||
|
configJsonParced = true;
|
||||||
if (debug) console.log("✔", "configJson parced");
|
if (debug) console.log("✔", "configJson parced");
|
||||||
onParced("config");
|
onParced("config");
|
||||||
}
|
}
|
||||||
@@ -314,6 +336,7 @@
|
|||||||
if (IsJsonParse(widgetsJsonResult)) {
|
if (IsJsonParse(widgetsJsonResult)) {
|
||||||
widgetsJson = JSON.parse(widgetsJsonResult);
|
widgetsJson = JSON.parse(widgetsJsonResult);
|
||||||
widgetsJson = widgetsJson;
|
widgetsJson = widgetsJson;
|
||||||
|
widgetsJsonParced = true;
|
||||||
if (debug) console.log("✔", "widgetsJson parced");
|
if (debug) console.log("✔", "widgetsJson parced");
|
||||||
onParced("widgets");
|
onParced("widgets");
|
||||||
}
|
}
|
||||||
@@ -333,6 +356,7 @@
|
|||||||
if (IsJsonParse(itemsJsonResult)) {
|
if (IsJsonParse(itemsJsonResult)) {
|
||||||
itemsJson = JSON.parse(itemsJsonResult);
|
itemsJson = JSON.parse(itemsJsonResult);
|
||||||
itemsJson = itemsJson;
|
itemsJson = itemsJson;
|
||||||
|
itemsJsonParced = true;
|
||||||
if (debug) console.log("✔", "itemsJson parced");
|
if (debug) console.log("✔", "itemsJson parced");
|
||||||
onParced("items");
|
onParced("items");
|
||||||
}
|
}
|
||||||
@@ -353,6 +377,7 @@
|
|||||||
layoutJson = JSON.parse(layoutJsonResult);
|
layoutJson = JSON.parse(layoutJsonResult);
|
||||||
layoutJson = layoutJson;
|
layoutJson = layoutJson;
|
||||||
wigetsUpdate();
|
wigetsUpdate();
|
||||||
|
layoutJsonParced = true;
|
||||||
if (debug) console.log("✔", "layoutJson parced");
|
if (debug) console.log("✔", "layoutJson parced");
|
||||||
onParced("layout");
|
onParced("layout");
|
||||||
}
|
}
|
||||||
@@ -374,6 +399,7 @@
|
|||||||
settingsJson = settingsJson;
|
settingsJson = settingsJson;
|
||||||
wigetsUpdate();
|
wigetsUpdate();
|
||||||
updateThisDeviceInList();
|
updateThisDeviceInList();
|
||||||
|
settingsJsonParced = true;
|
||||||
if (debug) console.log("✔", "settingsJson parced");
|
if (debug) console.log("✔", "settingsJson parced");
|
||||||
onParced("settings");
|
onParced("settings");
|
||||||
}
|
}
|
||||||
@@ -401,6 +427,36 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onParced(file) {
|
||||||
|
if (currentPageName === "/|" && layoutJsonParced && paramsJsonParced) {
|
||||||
|
clearParcedFlags();
|
||||||
|
if (debug) console.log("✔✔", "dashboard data parced");
|
||||||
|
udateStatusOfAllWidgets(paramsJson);
|
||||||
|
wigetsUpdate();
|
||||||
|
dashReady = true;
|
||||||
|
}
|
||||||
|
if (currentPageName === "/config|" && itemsJsonParced && widgetsJsonParced && configJsonParced && settingsJsonParced) {
|
||||||
|
clearParcedFlags();
|
||||||
|
if (debug) console.log("✔✔", "config data parced");
|
||||||
|
configReady = true;
|
||||||
|
}
|
||||||
|
if (currentPageName === "/connection|" && ssidJsonParced && settingsJsonParced && errorsJsonParced) {
|
||||||
|
clearParcedFlags();
|
||||||
|
if (debug) console.log("✔✔", "connection data parced");
|
||||||
|
connectionReady = true;
|
||||||
|
}
|
||||||
|
if (currentPageName === "/list|" && incDeviceListParced) {
|
||||||
|
clearParcedFlags();
|
||||||
|
if (debug) console.log("✔✔", "list data parced");
|
||||||
|
listReady = true;
|
||||||
|
}
|
||||||
|
if (currentPageName === "/system|" && errorsJsonParced) {
|
||||||
|
clearParcedFlags();
|
||||||
|
if (debug) console.log("✔✔", "system data parced");
|
||||||
|
systemReady = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function saveConfig() {
|
function saveConfig() {
|
||||||
wsSendMsg(selectedWs, "/tuoyal|" + JSON.stringify(generateLayout()));
|
wsSendMsg(selectedWs, "/tuoyal|" + JSON.stringify(generateLayout()));
|
||||||
wsSendMsg(selectedWs, "/gifnoc|" + JSON.stringify(configJson));
|
wsSendMsg(selectedWs, "/gifnoc|" + JSON.stringify(configJson));
|
||||||
@@ -501,9 +557,30 @@
|
|||||||
|
|
||||||
errorsJson = {};
|
errorsJson = {};
|
||||||
|
|
||||||
|
dashReady = false;
|
||||||
|
configReady = false;
|
||||||
|
connectionReady = false;
|
||||||
|
listReady = false;
|
||||||
|
systemReady = false;
|
||||||
|
|
||||||
|
clearParcedFlags();
|
||||||
|
|
||||||
if (debug) console.log("[i]", "all app data cleared");
|
if (debug) console.log("[i]", "all app data cleared");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearParcedFlags() {
|
||||||
|
configJsonParced = false;
|
||||||
|
widgetsJsonParced = false;
|
||||||
|
itemsJsonParced = false;
|
||||||
|
layoutJsonParced = false;
|
||||||
|
settingsJsonParced = false;
|
||||||
|
errorsJsonParced = false;
|
||||||
|
ssidJsonParced = false;
|
||||||
|
paramsJsonParced = false;
|
||||||
|
statusJsonParced = false;
|
||||||
|
incDeviceListParced = false;
|
||||||
|
}
|
||||||
|
|
||||||
function wsPush(ws, topic, status) {
|
function wsPush(ws, topic, status) {
|
||||||
let msg = topic + " " + status;
|
let msg = topic + " " + status;
|
||||||
if (debug) console.log("[i]", "send to ws msg:", msg);
|
if (debug) console.log("[i]", "send to ws msg:", msg);
|
||||||
@@ -802,8 +879,6 @@
|
|||||||
wsSendMsg(selectedWs, '/rorre|{"' + alarmKey + '":0}');
|
wsSendMsg(selectedWs, '/rorre|{"' + alarmKey + '":0}');
|
||||||
}
|
}
|
||||||
|
|
||||||
function onParced(file) {}
|
|
||||||
|
|
||||||
//*******************************************************initialisation********************************************************************/
|
//*******************************************************initialisation********************************************************************/
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
console.log("[i]", "mounted");
|
console.log("[i]", "mounted");
|
||||||
@@ -879,16 +954,19 @@
|
|||||||
<Alarm title="Нет соединения" />
|
<Alarm title="Нет соединения" />
|
||||||
{:else}
|
{:else}
|
||||||
<Route path="/">
|
<Route path="/">
|
||||||
<DashboardPage layoutJson={layoutJson} pages={pages} wsPush={(ws, topic, status) => wsPush(ws, topic, status)} />
|
<DashboardPage show={dashReady} layoutJson={layoutJson} pages={pages} wsPush={(ws, topic, status) => wsPush(ws, topic, status)} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/config">
|
<Route path="/config">
|
||||||
<ConfigPage configJson={configJson} widgetsJson={widgetsJson} itemsJson={itemsJson} saveConfig={() => saveConfig()} />
|
<ConfigPage show={configReady} configJson={configJson} widgetsJson={widgetsJson} itemsJson={itemsJson} saveConfig={() => saveConfig()} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/connection">
|
<Route path="/connection">
|
||||||
<ConnectionPage rebootEsp={() => rebootEsp()} ssidClick={() => ssidClick()} saveSett={() => saveSett()} saveMqtt={() => saveMqtt()} settingsJson={settingsJson} errorsJson={errorsJson} ssidJson={ssidJson} />
|
<ConnectionPage show={connectionReady} rebootEsp={() => rebootEsp()} ssidClick={() => ssidClick()} saveSett={() => saveSett()} saveMqtt={() => saveMqtt()} settingsJson={settingsJson} errorsJson={errorsJson} ssidJson={ssidJson} />
|
||||||
|
</Route>
|
||||||
|
<Route path="/list">
|
||||||
|
<ListPage show={listReady} deviceList={deviceList} showInput={showInput} addDevInList={() => addDevInList()} newDevice={newDevice} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/system">
|
<Route path="/system">
|
||||||
<SystemPage settingsJson={settingsJson} errorsJson={errorsJson} rebootEsp={() => rebootEsp()} cancelAlarm={(alarmKey) => cancelAlarm(alarmKey)} version={version} />
|
<SystemPage show={systemReady} settingsJson={settingsJson} errorsJson={errorsJson} rebootEsp={() => rebootEsp()} cancelAlarm={(alarmKey) => cancelAlarm(alarmKey)} version={version} />
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
<!--<Route path="/utilities">-->
|
<!--<Route path="/utilities">-->
|
||||||
@@ -901,9 +979,6 @@
|
|||||||
<!--<AboutPage wigetsUpdate={wigetsUpdate} layoutJson={layoutJson} showModal={() => showModal()} syntaxHighlight={(json) => syntaxHighlight(json)} />-->
|
<!--<AboutPage wigetsUpdate={wigetsUpdate} layoutJson={layoutJson} showModal={() => showModal()} syntaxHighlight={(json) => syntaxHighlight(json)} />-->
|
||||||
<!--</Route>-->
|
<!--</Route>-->
|
||||||
{/if}
|
{/if}
|
||||||
<Route path="/list">
|
|
||||||
<ListPage deviceList={deviceList} showInput={showInput} addDevInList={() => addDevInList()} newDevice={newDevice} />
|
|
||||||
</Route>
|
|
||||||
</div>
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -2,11 +2,14 @@
|
|||||||
import Card from "../components/Card.svelte";
|
import Card from "../components/Card.svelte";
|
||||||
import CrossIcon from "../svg/Cross.svelte";
|
import CrossIcon from "../svg/Cross.svelte";
|
||||||
import OpenIcon from "../svg/Open.svelte";
|
import OpenIcon from "../svg/Open.svelte";
|
||||||
|
import Alarm from "../components/Alarm.svelte";
|
||||||
|
|
||||||
export let configJson;
|
export let configJson;
|
||||||
export let widgetsJson;
|
export let widgetsJson;
|
||||||
export let itemsJson;
|
export let itemsJson;
|
||||||
|
|
||||||
|
export let show;
|
||||||
|
|
||||||
let itemsJsonBind = 0;
|
let itemsJsonBind = 0;
|
||||||
let debug = true;
|
let debug = true;
|
||||||
|
|
||||||
@@ -41,8 +44,8 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!--{#if itemsJsonParced && widgetsJsonParced && configJsonParced && settingsJsonParced}-->
|
{#if show}
|
||||||
<div class="grd-1col1">
|
<div class="grd-1col1">
|
||||||
<Card>
|
<Card>
|
||||||
<div class="grd-2col2">
|
<div class="grd-2col2">
|
||||||
<select class="slct-lg" bind:value={itemsJsonBind} on:change={() => elementsDropdownChange()}>
|
<select class="slct-lg" bind:value={itemsJsonBind} on:change={() => elementsDropdownChange()}>
|
||||||
@@ -112,9 +115,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<button class="btn-lg" on:click={() => saveConfig()}>{"Сохранить"}</button>
|
<button class="btn-lg" on:click={() => saveConfig()}>{"Сохранить"}</button>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
<!--{:else if !itemsJsonParced && !widgetsJsonParced && !configJsonParced && !settingsJsonParced}-->
|
{:else}
|
||||||
<!--<div class="flex justify-center items-center">-->
|
<Alarm title="Загрузка..." />
|
||||||
<!--<div style="border-top-color:transparent" class="w-20 h-20 border-4 border-blue-400 border-solid rounded-full animate-spin" />-->
|
{/if}
|
||||||
<!--</div>-->
|
|
||||||
<!--{/if}-->
|
|
||||||
|
|||||||
@@ -6,13 +6,16 @@
|
|||||||
export let errorsJson;
|
export let errorsJson;
|
||||||
export let ssidJson;
|
export let ssidJson;
|
||||||
|
|
||||||
|
export let show;
|
||||||
|
|
||||||
export let ssidClick = () => {};
|
export let ssidClick = () => {};
|
||||||
export let saveSett = () => {};
|
export let saveSett = () => {};
|
||||||
export let saveMqtt = () => {};
|
export let saveMqtt = () => {};
|
||||||
export let rebootEsp = () => {};
|
export let rebootEsp = () => {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="grd-2col1">
|
{#if show}
|
||||||
|
<div class="grd-2col1">
|
||||||
<Card title="Подключение к WiFi">
|
<Card title="Подключение к WiFi">
|
||||||
<div class="crd-itm-psn">
|
<div class="crd-itm-psn">
|
||||||
<div class="w-4/6">
|
<div class="w-4/6">
|
||||||
@@ -128,9 +131,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<button class="btn-lg" on:click={() => saveMqtt()}>{"Сохранить"}</button>
|
<button class="btn-lg" on:click={() => saveMqtt()}>{"Сохранить"}</button>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
<div class="grd-1col1">
|
<div class="grd-1col1">
|
||||||
<Card>
|
<Card>
|
||||||
<button class="btn-lg" on:click={() => rebootEsp()}>{"Перезагрузить устройство"}</button>
|
<button class="btn-lg" on:click={() => rebootEsp()}>{"Перезагрузить устройство"}</button>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
{:else}
|
||||||
|
<Alarm title="Загрузка..." />
|
||||||
|
{/if}
|
||||||
|
|||||||
@@ -3,14 +3,18 @@
|
|||||||
import Input from "../widgets/Input.svelte";
|
import Input from "../widgets/Input.svelte";
|
||||||
import Toggle from "../widgets/Toggle.svelte";
|
import Toggle from "../widgets/Toggle.svelte";
|
||||||
import Anydata from "../widgets/Anydata.svelte";
|
import Anydata from "../widgets/Anydata.svelte";
|
||||||
|
import Alarm from "../components/Alarm.svelte";
|
||||||
|
|
||||||
export let layoutJson;
|
export let layoutJson;
|
||||||
export let pages;
|
export let pages;
|
||||||
|
|
||||||
|
export let show;
|
||||||
|
|
||||||
export let wsPush = (ws, topic, status) => {};
|
export let wsPush = (ws, topic, status) => {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="grd-3col1">
|
{#if show}
|
||||||
|
<div class="grd-3col1">
|
||||||
{#if layoutJson === []}
|
{#if layoutJson === []}
|
||||||
<Card title={"Ваша панель управления пуста, вначале добавьте новые элементы в конфигураторе!"} />
|
<Card title={"Ваша панель управления пуста, вначале добавьте новые элементы в конфигураторе!"} />
|
||||||
{/if}
|
{/if}
|
||||||
@@ -31,4 +35,7 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</Card>
|
</Card>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
{:else}
|
||||||
|
<Alarm title="Загрузка..." />
|
||||||
|
{/if}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
import CrossIcon from "../svg/Cross.svelte";
|
import CrossIcon from "../svg/Cross.svelte";
|
||||||
import OpenIcon from "../svg/Open.svelte";
|
import OpenIcon from "../svg/Open.svelte";
|
||||||
|
|
||||||
|
export let show;
|
||||||
|
|
||||||
export let deviceList;
|
export let deviceList;
|
||||||
export let showInput;
|
export let showInput;
|
||||||
export let newDevice = {};
|
export let newDevice = {};
|
||||||
@@ -25,7 +27,8 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="grd-1col1">
|
{#if show}
|
||||||
|
<div class="grd-1col1">
|
||||||
<Card title={"Список устройств"}>
|
<Card title={"Список устройств"}>
|
||||||
<table class="tbl">
|
<table class="tbl">
|
||||||
<thead class="bg-gray-100">
|
<thead class="bg-gray-100">
|
||||||
@@ -62,4 +65,7 @@
|
|||||||
<Alarm>
|
<Alarm>
|
||||||
<p>Список устройств будет обновляться автоматически. Подключенные к одному роутеру устройства будут появляться в списке в течении двух минут. Ручное добавление сделано в целях проверки для разработчика.</p>
|
<p>Список устройств будет обновляться автоматически. Подключенные к одному роутеру устройства будут появляться в списке в течении двух минут. Ручное добавление сделано в целях проверки для разработчика.</p>
|
||||||
</Alarm>
|
</Alarm>
|
||||||
</div>
|
</div>
|
||||||
|
{:else}
|
||||||
|
<Alarm title="Загрузка..." />
|
||||||
|
{/if}
|
||||||
|
|||||||
@@ -124,10 +124,13 @@
|
|||||||
export let errorsJson;
|
export let errorsJson;
|
||||||
export let rebootEsp = () => {};
|
export let rebootEsp = () => {};
|
||||||
|
|
||||||
|
export let show;
|
||||||
|
|
||||||
export let cancelAlarm = (alarmKey) => {};
|
export let cancelAlarm = (alarmKey) => {};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="grd-2col1">
|
{#if show}
|
||||||
|
<div class="grd-2col1">
|
||||||
<Card title="Системная информация">
|
<Card title="Системная информация">
|
||||||
<div class="crd-itm-psn">
|
<div class="crd-itm-psn">
|
||||||
<div class="w-3/4">
|
<div class="w-3/4">
|
||||||
@@ -213,9 +216,12 @@
|
|||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
<div class="grd-1col1">
|
<div class="grd-1col1">
|
||||||
<Card>
|
<Card>
|
||||||
<button class="btn-lg" on:click={() => rebootEsp()}>{"Перезагрузить устройство"}</button>
|
<button class="btn-lg" on:click={() => rebootEsp()}>{"Перезагрузить устройство"}</button>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
{:else}
|
||||||
|
<Alarm title="Загрузка..." />
|
||||||
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user