alsmanager_lib 2.0.82 → 2.0.84
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 +16 -12
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -2379,14 +2379,16 @@ function queryDeviceModels() {
|
|
|
2379
2379
|
}
|
|
2380
2380
|
//
|
|
2381
2381
|
function queryDeviceManifacturesByFilterSQLite(dev_type) {
|
|
2382
|
-
var query = "SELECT DISTINCT manifacturer as search_manifacturer from devices ";
|
|
2383
|
-
query += "where
|
|
2382
|
+
var query = "SELECT DISTINCT d.manifacturer as search_manifacturer from devices d ";
|
|
2383
|
+
query += "where (d.is_removed is null or d.is_removed = 0) ";
|
|
2384
|
+
query += "and d.type = '" + dev_type + "' ";
|
|
2384
2385
|
query += "order by search_manifacturer ";
|
|
2385
2386
|
return query;
|
|
2386
2387
|
}
|
|
2387
2388
|
function queryDeviceManifacturesByFilterMySQL(dev_type) {
|
|
2388
|
-
var query = "SELECT DISTINCT manifacturer as search_manifacturer from devices ";
|
|
2389
|
-
query += "where
|
|
2389
|
+
var query = "SELECT DISTINCT d.manifacturer as search_manifacturer from devices d ";
|
|
2390
|
+
query += "where (d.is_removed is null or d.is_removed = 0) ";
|
|
2391
|
+
query += "and d.type = :dev_type ";
|
|
2390
2392
|
query += "order by search_manifacturer ";
|
|
2391
2393
|
return query;
|
|
2392
2394
|
}
|
|
@@ -2409,22 +2411,24 @@ function queryDeviceManifacturesByFilter(db_used, dev_type) {
|
|
|
2409
2411
|
}
|
|
2410
2412
|
//
|
|
2411
2413
|
function queryDeviceModelsByFilterSQLite(manifacturer, dev_type) {
|
|
2412
|
-
var query = "SELECT DISTINCT model from devices ";
|
|
2413
|
-
query += "where
|
|
2414
|
+
var query = "SELECT DISTINCT d.model from devices d ";
|
|
2415
|
+
query += "where (d.is_removed is null or d.is_removed = 0) ";
|
|
2416
|
+
query += "and d.manifacturer = '" + manifacturer + "' ";
|
|
2414
2417
|
if (dev_type && dev_type != '') {
|
|
2415
|
-
query += "and type = '" + dev_type + "' ";
|
|
2418
|
+
query += "and d.type = '" + dev_type + "' ";
|
|
2416
2419
|
}
|
|
2417
|
-
query += "order by model";
|
|
2420
|
+
query += "order by d.model";
|
|
2418
2421
|
return query;
|
|
2419
2422
|
}
|
|
2420
2423
|
|
|
2421
2424
|
function queryDeviceModelsByFilterMySQL(manifacturer, dev_type) {
|
|
2422
|
-
var query = "SELECT DISTINCT model from devices ";
|
|
2423
|
-
query += "where
|
|
2425
|
+
var query = "SELECT DISTINCT d.model from devices d ";
|
|
2426
|
+
query += "where (d.is_removed is null or d.is_removed = 0) ";
|
|
2427
|
+
query += "and d.manifacturer = :manifacturer ";
|
|
2424
2428
|
if (dev_type && dev_type != '') {
|
|
2425
|
-
query += "and type = :dev_type ";
|
|
2429
|
+
query += "and d.type = :dev_type ";
|
|
2426
2430
|
}
|
|
2427
|
-
query += "order by model";
|
|
2431
|
+
query += "order by d.model";
|
|
2428
2432
|
return query;
|
|
2429
2433
|
}
|
|
2430
2434
|
|