alsmanager_lib 3.0.17 → 3.0.18
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.
- package/lib/modules.js +10 -8
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -2118,7 +2118,7 @@ function existsSwitchPatchProperties(db_used, id_device) {
|
|
|
2118
2118
|
}
|
|
2119
2119
|
function getSwitchPatchPropertiesSQLite(id_device) {
|
|
2120
2120
|
var query = "select d.id as Id, d.type as Tipo, d.manifacturer as Marca, d.model as Modello,";
|
|
2121
|
-
query += "ds.num_ports as NumeroPorte ";
|
|
2121
|
+
query += "ds.num_ports as NumeroPorte, ds.num_poe as NumPOE ";
|
|
2122
2122
|
query += "from devices d ";
|
|
2123
2123
|
query += "left join device_switch ds on d.id = ds.id_device ";
|
|
2124
2124
|
query += "where d.id = " + id_device;
|
|
@@ -2126,7 +2126,7 @@ function getSwitchPatchPropertiesSQLite(id_device) {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
function getSwitchPatchPropertiesMySQL(id_device) {
|
|
2128
2128
|
var query = "select d.id as Id, d.type as Tipo, d.manifacturer as Marca, d.model as Modello,";
|
|
2129
|
-
query += "ds.num_ports as NumeroPorte ";
|
|
2129
|
+
query += "ds.num_ports as NumeroPorte, ds.num_poe as NumPOE ";
|
|
2130
2130
|
query += "from devices d ";
|
|
2131
2131
|
query += "left join device_switch ds on d.id = ds.id_device ";
|
|
2132
2132
|
query += "where d.id = :id_device";
|
|
@@ -2156,13 +2156,13 @@ function createSwitchPatchPropertiesMySQLObj(id_device, dev_prop) {
|
|
|
2156
2156
|
return obj;
|
|
2157
2157
|
}
|
|
2158
2158
|
function insertSwitchPatchPropertiesSQLite(id_device, dev_prop) {
|
|
2159
|
-
var query = "insert into device_switch (id_device, num_ports) values ";
|
|
2160
|
-
query += "(" + id_device + ", " + dev_prop.num_ports + ")";
|
|
2159
|
+
var query = "insert into device_switch (id_device, num_ports, num_poe) values ";
|
|
2160
|
+
query += "(" + id_device + ", " + dev_prop.num_ports + ", " + dev_prop.num_poe + ", '" + dev_prop.tipo + "')";
|
|
2161
2161
|
return query;
|
|
2162
2162
|
}
|
|
2163
2163
|
function insertSwitchPatchPropertiesMySQL() {
|
|
2164
|
-
var query = "insert into device_switch (id_device, num_ports) values ";
|
|
2165
|
-
query += "(:id_device, :num_ports)";
|
|
2164
|
+
var query = "insert into device_switch (id_device, num_ports, num_poe, tipo) values ";
|
|
2165
|
+
query += "(:id_device, :num_ports, :num_poe, :tipo)";
|
|
2166
2166
|
}
|
|
2167
2167
|
function insertSwitchPatchProperties(db_used, id_device, dev_prop) {
|
|
2168
2168
|
var query = "";
|
|
@@ -2185,7 +2185,8 @@ function insertSwitchPatchProperties(db_used, id_device, dev_prop) {
|
|
|
2185
2185
|
function updateSwitchPatchPropertiesSQLite(id_device, dev_prop) {
|
|
2186
2186
|
var query = "update device_switch set ";
|
|
2187
2187
|
query += "id_device = " + id_device + ", ";
|
|
2188
|
-
query += "num_ports = " + dev_prop.num_ports + " ";
|
|
2188
|
+
query += "num_ports = " + dev_prop.num_ports + ", ";
|
|
2189
|
+
query += "num_poe = " + dev_prop.num_poe + " ";
|
|
2189
2190
|
query += "where id_device = " + id_device;
|
|
2190
2191
|
return query;
|
|
2191
2192
|
}
|
|
@@ -2193,7 +2194,8 @@ function updateSwitchPatchPropertiesSQLite(id_device, dev_prop) {
|
|
|
2193
2194
|
function updateSwitchPatchPropertiesMySQL() {
|
|
2194
2195
|
var query = "update device_switch set ";
|
|
2195
2196
|
query += "id_device = :id_device, ";
|
|
2196
|
-
query += "num_ports = :num_ports ";
|
|
2197
|
+
query += "num_ports = :num_ports, ";
|
|
2198
|
+
query += "num_poe = :num_poe ";
|
|
2197
2199
|
query += "where id_device = :id_device";
|
|
2198
2200
|
return query;
|
|
2199
2201
|
}
|