alsmanager_lib 3.0.83 → 3.0.85

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 -4
  2. package/package.json +1 -1
package/lib/modules.js CHANGED
@@ -4320,7 +4320,7 @@ function readDeviceProperties(db_used, id_device) {
4320
4320
  //Update Device Properties after import
4321
4321
  function updateDevicePropertiesSQLite(id_prop, is_imported, id_config) {
4322
4322
  var query = "update device_properties set ";
4323
- query += "is_imported " + is_imported + " ";
4323
+ query += "is_imported = " + is_imported + " ";
4324
4324
  if (id_config) {
4325
4325
  query += ", id_config = " + id_config + " ";
4326
4326
  }
@@ -4330,7 +4330,7 @@ function updateDevicePropertiesSQLite(id_prop, is_imported, id_config) {
4330
4330
 
4331
4331
  function updateDevicePropertiesMySQL(id_prop, is_imported, id_config) {
4332
4332
  var query = "update device_properties set ";
4333
- query += "is_imported :is_imported ";
4333
+ query += "is_imported = :is_imported ";
4334
4334
  if (id_config) {
4335
4335
  query += ", id_config = :id_config ";
4336
4336
  }
@@ -5790,12 +5790,22 @@ function getFreeLanPortsCombo(db_used, id_place, id_site, port_type){
5790
5790
  //end Get Network on device
5791
5791
  //
5792
5792
  function getImportedPropertiesByIdDeviceSQLite(id_device) {
5793
- var query = "select raw_properties as Dati from device_properties dp ";
5793
+ var query = "select dp.raw_properties as Dati, ";
5794
+ query += "case ";
5795
+ query += "when dp.is_imported = 1 then 'Importato' ";
5796
+ query += "else ''";
5797
+ query += "end as Stato ";
5798
+ query += "from device_properties dp ";
5794
5799
  query += "where dp.id_device = " + id_device;
5795
5800
  return query;
5796
5801
  }
5797
5802
  function getImportedPropertiesByIdDeviceMySQL(id_device) {
5798
- var query = "select raw_properties as Dati from device_properties dp ";
5803
+ var query = "select dp.raw_properties as Dati, ";
5804
+ query += "case ";
5805
+ query += "when dp.is_imported = 1 then 'Importato' ";
5806
+ query += "else ''";
5807
+ query += "end as Stato ";
5808
+ query += "from device_properties dp ";
5799
5809
  query += "where dp.id_device = :id_device";
5800
5810
  return query;
5801
5811
  }
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.83",
7
+ "version": "3.0.85",
8
8
  "description": "Funzioni per ALSManager",
9
9
  "license": "ISC",
10
10
  "author": "Luca Cattani",