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)} />
|
||||
</Route>
|
||||
<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 path="/connection">
|
||||
<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 itemsJson;
|
||||
export let scenarioTxt;
|
||||
export let userdata;
|
||||
|
||||
export let show;
|
||||
|
||||
@@ -211,6 +212,7 @@
|
||||
scenario: scenarioTxt,
|
||||
gallery: [],
|
||||
type: "iotmpost",
|
||||
username: userdata.username,
|
||||
};
|
||||
const JWT = Cookies.get("token_iotm2");
|
||||
try {
|
||||
@@ -227,8 +229,7 @@
|
||||
if (res.ok) {
|
||||
console.log(content.result);
|
||||
if (content.result.acknowledged) {
|
||||
window.open("http://localhost:4000/configs", "_blank");
|
||||
//insertedId
|
||||
window.open("http://localhost:4000/configs?username=" + userdata.username + "&id=" + content.result.insertedId, "_blank");
|
||||
}
|
||||
errors = [{ msg: "ok_success" }];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user