Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat new variable #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cleanAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
9 changes: 9 additions & 0 deletions src/services/devicesExport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.";
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/startAnalysis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -121,7 +121,7 @@ async function startImport(context: TagoContext, scope: Data[]): Promise<void> {
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"));
}
}

Expand Down
Loading