mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-26 15:02:21 +03:00
публикация конфигов
This commit is contained in:
@@ -1377,7 +1377,7 @@
|
|||||||
<DashboardPage show={pageReady.dash} layoutJson={layoutJson} pages={pages} wsPush={(ws, topic, status) => wsPush(ws, topic, status)} />
|
<DashboardPage show={pageReady.dash} layoutJson={layoutJson} pages={pages} wsPush={(ws, topic, status) => wsPush(ws, topic, status)} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/config">
|
<Route path="/config">
|
||||||
<ConfigPage show={pageReady.config} bind:configJson={configJson} bind:scenarioTxt={scenarioTxt} widgetsJson={widgetsJson} itemsJson={itemsJson} saveConfig={() => saveConfig()} cleanLogs={() => cleanLogs()} rebootEsp={() => rebootEsp()} moduleOrder={(id, key, value) => moduleOrder(id, key, value)} />
|
<ConfigPage show={pageReady.config} bind:configJson={configJson} bind:scenarioTxt={scenarioTxt} widgetsJson={widgetsJson} itemsJson={itemsJson} saveConfig={() => saveConfig()} cleanLogs={() => cleanLogs()} rebootEsp={() => rebootEsp()} moduleOrder={(id, key, value) => moduleOrder(id, key, value)} userdata={userdata} />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/connection">
|
<Route path="/connection">
|
||||||
<ConnectionPage show={pageReady.connection} rebootEsp={() => rebootEsp()} ssidClick={() => ssidClick()} saveSett={() => saveSett()} saveMqtt={() => saveMqtt()} settingsJson={settingsJson} errorsJson={errorsJson} ssidJson={ssidJson} />
|
<ConnectionPage show={pageReady.connection} rebootEsp={() => rebootEsp()} ssidClick={() => ssidClick()} saveSett={() => saveSett()} saveMqtt={() => saveMqtt()} settingsJson={settingsJson} errorsJson={errorsJson} ssidJson={ssidJson} />
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
export let widgetsJson;
|
export let widgetsJson;
|
||||||
export let itemsJson;
|
export let itemsJson;
|
||||||
export let scenarioTxt;
|
export let scenarioTxt;
|
||||||
|
export let userdata;
|
||||||
|
|
||||||
export let show;
|
export let show;
|
||||||
|
|
||||||
@@ -211,6 +212,7 @@
|
|||||||
scenario: scenarioTxt,
|
scenario: scenarioTxt,
|
||||||
gallery: [],
|
gallery: [],
|
||||||
type: "iotmpost",
|
type: "iotmpost",
|
||||||
|
username: userdata.username,
|
||||||
};
|
};
|
||||||
const JWT = Cookies.get("token_iotm2");
|
const JWT = Cookies.get("token_iotm2");
|
||||||
try {
|
try {
|
||||||
@@ -227,8 +229,7 @@
|
|||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
console.log(content.result);
|
console.log(content.result);
|
||||||
if (content.result.acknowledged) {
|
if (content.result.acknowledged) {
|
||||||
window.open("http://localhost:4000/configs", "_blank");
|
window.open("http://localhost:4000/configs?username=" + userdata.username + "&id=" + content.result.insertedId, "_blank");
|
||||||
//insertedId
|
|
||||||
}
|
}
|
||||||
errors = [{ msg: "ok_success" }];
|
errors = [{ msg: "ok_success" }];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user