alsmanager_lib 1.0.91 → 1.0.92

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/modules.js +14 -14
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -1540,23 +1540,23 @@ function existsPCProperties(db_used, id_device) {
1540
1540
  return query;
1541
1541
  }
1542
1542
  function getPCPropertiesSQLite(id_device) {
1543
- var query = "select d.id as Id, d.type as Tipo, d.manifacturer as Marca, d.model as Modello,";
1543
+ var query = "select dp.id as id_prop, d.id as Id, d.type as Tipo, d.manifacturer as Marca, d.model as Modello,";
1544
1544
  query += "dp.pc_name as Name, dp.CPU as CPU, dp.CPU_arch as CPUArch, dp.OS_arch as OSArch, dp.OS as OS, dp.OS_version as OSVersion, ";
1545
1545
  query += "dp.smartboard_ready as SB_Ready, dp.video_card as VideoCardAdded, ";
1546
1546
  query += "dp.RAM_GB as RAM, dp.note, dp.da_properties ";
1547
- query += "from devices d ";
1548
- query += "left join device_pc dp on d.id = dp.id_device ";
1549
- query += "where d.id = " + id_device;
1547
+ query += "from device_pc dp ";
1548
+ query += "left join devices d on dp.id_device = d.id ";
1549
+ query += "where dp.id = " + id_device;
1550
1550
 
1551
1551
  return query;
1552
1552
  }
1553
1553
  function getPCPropertiesMySQL(id_device) {
1554
- var query = "select d.id as Id, d.type as Tipo, d.manifacturer as Marca, d.model as Modello,";
1554
+ var query = "select dp.id as id_prop, d.id as Id, d.type as Tipo, d.manifacturer as Marca, d.model as Modello,";
1555
1555
  query += "dp.pc_name as Name, dp.CPU as CPU, dp.CPU_arch as CPUArch, dp.OS_arch as OSArch, dp.OS as OS, dp.OS_version as OSVersion, ";
1556
1556
  query += "dp.smartboard_ready as SB_Ready, dp.video_card as VideoCardAdded, ";
1557
1557
  query += "dp.RAM_GB as RAM, dp.note, dp.da_properties ";
1558
- query += "from devices d ";
1559
- query += "left join device_pc dp on d.id = dp.id_device ";
1558
+ query += "from device_pc dp ";
1559
+ query += "left join devices d on dp.id_device = d.id ";
1560
1560
  query += "where d.id = :id_device";
1561
1561
  return query;
1562
1562
  }
@@ -1577,7 +1577,7 @@ function getPCProperties(db_used, id_device) {
1577
1577
  }
1578
1578
  function createPCPropertiesMySQLObj(id_device, dev_prop) {
1579
1579
  var obj = {};
1580
- obj.id = dev_prop.id;
1580
+ obj.id = dev_prop.id_prop;
1581
1581
  obj.id_device = id_device;
1582
1582
  obj.pc_name = dev_prop.pc_name;
1583
1583
  obj.os = dev_prop.os;
@@ -1697,9 +1697,9 @@ function getPCPropertiesByConfigSQLite(id_device, id_conf) {
1697
1697
  query += "dp.pc_name as Name, dp.CPU as CPU, dp.CPU_arch as CPUArch, dp.OS_arch as OSArch, dp.OS as OS, dp.OS_version as OSVersion, ";
1698
1698
  query += "dp.smartboard_ready as SB_Ready, dp.video_card as VideoCardAdded, ";
1699
1699
  query += "dp.RAM_GB as RAM, dp.note, dp.da_properties ";
1700
- query += "from devices d ";
1701
- query += "left join device_pc dp on d.id = dp.id_device ";
1702
- query += "where d.id = " + id_device + " ";
1700
+ query += "from device_pc dp ";
1701
+ query += "left join devices d on dp.id_device = d.id ";
1702
+ query += "where dp.id_device = " + id_device + " ";
1703
1703
  if (id_conf > 0) {
1704
1704
  query += "and dp.id in (select id_part from change_config where id_conf = " + id_conf + ")";
1705
1705
  }
@@ -1713,9 +1713,9 @@ function getPCPropertiesByConfigMySQL(id_device, id_conf) {
1713
1713
  query += "dp.pc_name as Name, dp.CPU as CPU, dp.CPU_arch as CPUArch, dp.OS_arch as OSArch, dp.OS as OS, dp.OS_version as OSVersion, ";
1714
1714
  query += "dp.smartboard_ready as SB_Ready, dp.video_card as VideoCardAdded, ";
1715
1715
  query += "dp.RAM_GB as RAM, dp.note, dp.da_properties ";
1716
- query += "from devices d ";
1717
- query += "left join device_pc dp on d.id = dp.id_device ";
1718
- query += "where d.id = :id_device ";
1716
+ query += "from device_pc dp ";
1717
+ query += "left join devices d on dp.id_device = d.id ";
1718
+ query += "where dp.id_device = :id_device ";
1719
1719
  if (id_conf > 0) {
1720
1720
  query += "and dp.id in (select id_part from change_config where id_conf = :id_conf)";
1721
1721
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alsmanager_lib",
3
- "version": "1.0.91",
3
+ "version": "1.0.92",
4
4
  "description": "Funzioni per ALSManager",
5
5
  "license": "ISC",
6
6
  "author": "Luca Cattani",