alsmanager_lib 3.0.9 → 3.0.11

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 +5 -8
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -2124,9 +2124,8 @@ function getSwitchPatchProperties(db_used, id_device) {
2124
2124
  }
2125
2125
  function createSwitchPatchPropertiesMySQLObj(id_device, dev_prop) {
2126
2126
  var obj = {};
2127
- obj.id_prop = dev_prop.id_prop;
2128
2127
  obj.id_device = id_device;
2129
- obj.num_ports = dev_prop.num_porte;
2128
+ obj.num_ports = dev_prop.num_ports;
2130
2129
  return obj;
2131
2130
  }
2132
2131
  function insertSwitchPatchPropertiesSQLite(id_device, dev_prop) {
@@ -2160,8 +2159,7 @@ function updateSwitchPatchPropertiesSQLite(id_device, dev_prop) {
2160
2159
  var query = "update device_pc set ";
2161
2160
  query += "id_device = " + id_device + ", ";
2162
2161
  query += "num_ports = " + dev_prop.num_ports + " ";
2163
- query += "where id_device = " + id_device + " ";
2164
- query += "and id = " + dev_prop.id_prop;
2162
+ query += "where id_device = " + id_device;
2165
2163
  return query;
2166
2164
  }
2167
2165
 
@@ -2169,8 +2167,7 @@ function updateSwitchPatchPropertiesMySQL() {
2169
2167
  var query = "update device_pc set ";
2170
2168
  query += "id_device = :id_device, ";
2171
2169
  query += "num_ports = :num_ports ";
2172
- query += "where id_device = :id_device ";
2173
- query += "and id = :id_prop";
2170
+ query += "where id_device = :id_device";
2174
2171
  return query;
2175
2172
  }
2176
2173
  function updateSwitchPatchProperties(db_used, id_device, dev_prop) {
@@ -2194,7 +2191,7 @@ function updateSwitchPatchProperties(db_used, id_device, dev_prop) {
2194
2191
 
2195
2192
  // Manage Display Part Properties
2196
2193
  function getDisplayPartPropertiesSQLite(id_device) {
2197
- var query = "select d.id as Id, ";
2194
+ var query = "select d.id as Id, dm.id as id_prop, ";
2198
2195
  query += "dm.size_inch as Dimensione, dm.format as Formato, dm.technology as Tecnologia, dm.touch as Touch, dm.is_removable as Removibile ";
2199
2196
  query += "from devices d ";
2200
2197
  query += "left join display_part dm on d.id = dm.id_device ";
@@ -2202,7 +2199,7 @@ function getDisplayPartPropertiesSQLite(id_device) {
2202
2199
  return query;
2203
2200
  }
2204
2201
  function getDisplayPartPropertiesMySQL(id_device) {
2205
- var query = "select d.id as Id, ";
2202
+ var query = "select d.id as Id, dm.id as id_prop, ";
2206
2203
  query += "dm.size_inch as Dimensione, dm.format as Formato, dm.technology as Tecnologia, dm.touch as Touch, dm.is_removable as Removibile ";
2207
2204
  query += "from devices d ";
2208
2205
  query += "left join display_part dm on d.id = dm.id_device ";
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  ".": "./lib/modules.js",
5
5
  "./dbconn": "./lib/dbconn.js"
6
6
  },
7
- "version": "3.0.9",
7
+ "version": "3.0.11",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",