alsmanager_lib 2.0.81 → 2.0.83
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 +11 -7
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -2380,13 +2380,15 @@ function queryDeviceModels() {
|
|
|
2380
2380
|
//
|
|
2381
2381
|
function queryDeviceManifacturesByFilterSQLite(dev_type) {
|
|
2382
2382
|
var query = "SELECT DISTINCT manifacturer as search_manifacturer from devices ";
|
|
2383
|
-
query += "where
|
|
2383
|
+
query += "where (d.is_removed is null or d.is_removed = 0) ";
|
|
2384
|
+
query += "and devices.type = '" + dev_type + "' ";
|
|
2384
2385
|
query += "order by search_manifacturer ";
|
|
2385
2386
|
return query;
|
|
2386
2387
|
}
|
|
2387
2388
|
function queryDeviceManifacturesByFilterMySQL(dev_type) {
|
|
2388
2389
|
var query = "SELECT DISTINCT manifacturer as search_manifacturer from devices ";
|
|
2389
|
-
query += "where
|
|
2390
|
+
query += "where (d.is_removed is null or d.is_removed = 0) ";
|
|
2391
|
+
query += "and devices.type = :dev_type ";
|
|
2390
2392
|
query += "order by search_manifacturer ";
|
|
2391
2393
|
return query;
|
|
2392
2394
|
}
|
|
@@ -2395,13 +2397,13 @@ function queryDeviceManifacturesByFilter(db_used, dev_type) {
|
|
|
2395
2397
|
if (db_used) {
|
|
2396
2398
|
switch (db_used) {
|
|
2397
2399
|
case 'SQLITE':
|
|
2398
|
-
query = queryDeviceManifacturesByFilterSQLite(dev_type
|
|
2400
|
+
query = queryDeviceManifacturesByFilterSQLite(dev_type);
|
|
2399
2401
|
break;
|
|
2400
2402
|
case 'MYSQL':
|
|
2401
|
-
query = queryDeviceManifacturesByFilterMySQL(dev_type
|
|
2403
|
+
query = queryDeviceManifacturesByFilterMySQL(dev_type);
|
|
2402
2404
|
break;
|
|
2403
2405
|
case 'MYSQL2':
|
|
2404
|
-
query = queryDeviceManifacturesByFilterSQLite(dev_type
|
|
2406
|
+
query = queryDeviceManifacturesByFilterSQLite(dev_type);
|
|
2405
2407
|
break;
|
|
2406
2408
|
}
|
|
2407
2409
|
}
|
|
@@ -2410,7 +2412,8 @@ function queryDeviceManifacturesByFilter(db_used, dev_type) {
|
|
|
2410
2412
|
//
|
|
2411
2413
|
function queryDeviceModelsByFilterSQLite(manifacturer, dev_type) {
|
|
2412
2414
|
var query = "SELECT DISTINCT model from devices ";
|
|
2413
|
-
query += "where
|
|
2415
|
+
query += "where (d.is_removed is null or d.is_removed = 0) ";
|
|
2416
|
+
query += "and manifacturer = '" + manifacturer + "' ";
|
|
2414
2417
|
if (dev_type && dev_type != '') {
|
|
2415
2418
|
query += "and type = '" + dev_type + "' ";
|
|
2416
2419
|
}
|
|
@@ -2420,7 +2423,8 @@ function queryDeviceModelsByFilterSQLite(manifacturer, dev_type) {
|
|
|
2420
2423
|
|
|
2421
2424
|
function queryDeviceModelsByFilterMySQL(manifacturer, dev_type) {
|
|
2422
2425
|
var query = "SELECT DISTINCT model from devices ";
|
|
2423
|
-
query += "where
|
|
2426
|
+
query += "where (d.is_removed is null or d.is_removed = 0) ";
|
|
2427
|
+
query += "and manifacturer = :manifacturer ";
|
|
2424
2428
|
if (dev_type && dev_type != '') {
|
|
2425
2429
|
query += "and type = :dev_type ";
|
|
2426
2430
|
}
|