diff --git a/src/cleanAnalysis.ts b/src/cleanAnalysis.ts index 2a60f80..5bcb500 100644 --- a/src/cleanAnalysis.ts +++ b/src/cleanAnalysis.ts @@ -15,7 +15,7 @@ const config: IExport = { // Entities that will be copied from the application. // entities: ["dictionaries"], entities: ["devices", "analysis", "dashboards", "accessManagement", "run_buttons", "actions", "dictionaries"], - data: ["list_devtype_id"], + data: ["list_devtype_id", "alert_settings"], // added alert_settings for the alert feature in RTLS Marker kickstarter // Account that entities will be copied from. export: { diff --git a/src/services/devicesExport.ts b/src/services/devicesExport.ts index 0feb04b..0dcb845 100644 --- a/src/services/devicesExport.ts +++ b/src/services/devicesExport.ts @@ -41,6 +41,15 @@ async function deviceExport(account: Account, import_account: Account, export_ho variables: config.data, qty: 9999, }); + + console.log({ + variables: config.data, + qty: 9999, + }); + + console.log(device.info.name); + console.log(data); + if (data.length > 0) { device.sendData(data).catch(console.error); } diff --git a/src/start.ts b/src/start.ts index e407171..8c738a3 100644 --- a/src/start.ts +++ b/src/start.ts @@ -32,7 +32,7 @@ async function startImport() { if (import_rule.includes("run_buttons")) { const run = await import_account.run.info(); if (!run || !run.name) { - throw "Exported account doesn't have RUN enabled. Not possible to import RUN Buttons."; + throw "Exported account doesn't have RUN published. Not possible to import RUN Buttons."; } } diff --git a/src/startAnalysis.ts b/src/startAnalysis.ts index 5fc879d..13b1ab1 100644 --- a/src/startAnalysis.ts +++ b/src/startAnalysis.ts @@ -23,7 +23,7 @@ const config: IExport = { // Entities that will be copied from the application. // entities: ["dictionaries"], entities: ["devices", "analysis", "dashboards", "accessManagement", "run_buttons", "actions", "dictionaries"], - data: ["list_devtype_id"], + data: ["list_devtype_id", "alert_settings"], // added alert_settings for the alert feature in RTLS Marker kickstarter // Account that entities will be copied from. export: { @@ -121,7 +121,7 @@ async function startImport(context: TagoContext, scope: Data[]): Promise { if (import_rule.includes("run_buttons")) { const run = await import_account.run.info(); if (!run || !run.name) { - return Promise.reject(await validate("The account doesn't have RUN enabled. Not possible to import RUN Buttons.", "danger")); + return Promise.reject(await validate("The account doesn't have RUN published. Not possible to import RUN Buttons.", "danger")); } }