alsmanager_lib 3.0.148 → 3.0.149
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 +29 -55
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -3184,18 +3184,27 @@ function getDevicesByDetailsSelectSQLite(search_criteria, details) {
|
|
|
3184
3184
|
if (search_criteria.in_consegna)
|
|
3185
3185
|
query += "left join consegna_beni cb on d.id = cb.id_bene ";
|
|
3186
3186
|
if (details) {
|
|
3187
|
-
if (search_criteria.
|
|
3187
|
+
if (search_criteria.dev_type == "DESKTOP" || search_criteria.dev_type == "NOTEBOOK" || search_criteria.dev_type == "TABLET" || search_criteria.dev_type == "SMART TV" || search_criteria.dev_type == "SERVER") {
|
|
3188
3188
|
query += "left join device_pc dd on d.id = dd.id_device ";
|
|
3189
3189
|
}
|
|
3190
|
-
else if (search_criteria.
|
|
3190
|
+
else if (search_criteria.dev_type == "A") {
|
|
3191
3191
|
|
|
3192
3192
|
}
|
|
3193
|
-
else if (search_criteria.
|
|
3193
|
+
else if (search_criteria.dev_type == "B") {
|
|
3194
3194
|
|
|
3195
3195
|
}
|
|
3196
|
-
else if (search_criteria.
|
|
3196
|
+
else if (search_criteria.dev_type == "C") {
|
|
3197
3197
|
|
|
3198
3198
|
}
|
|
3199
|
+
if (details.network || details.mac_address) {
|
|
3200
|
+
query += "left join device_networks dn on d.id = dn.id_device ";
|
|
3201
|
+
}
|
|
3202
|
+
if (details.storage) {
|
|
3203
|
+
query += "left join device_storages dr on d.id = dr.id_device ";
|
|
3204
|
+
}
|
|
3205
|
+
if (details.addon) {
|
|
3206
|
+
query += "left join device_addons don on d.id = don.id_device ";
|
|
3207
|
+
}
|
|
3199
3208
|
}
|
|
3200
3209
|
|
|
3201
3210
|
var where_clause = " where (d.is_removed is null or d.is_removed = 0) ";
|
|
@@ -3265,32 +3274,10 @@ function getDevicesByDetailsSelectSQLite(search_criteria, details) {
|
|
|
3265
3274
|
}
|
|
3266
3275
|
}
|
|
3267
3276
|
}
|
|
3268
|
-
|
|
3269
|
-
if (search_criteria.search_type == "DESKTOP" || search_criteria.search_type == "NOTEBOOK") {
|
|
3270
|
-
query += "left join device_pc dd on d.id = dd.id_device ";
|
|
3271
|
-
}
|
|
3272
|
-
else if (search_criteria.search_type == "A") {
|
|
3273
|
-
|
|
3274
|
-
}
|
|
3275
|
-
else if (search_criteria.search_type == "B") {
|
|
3276
|
-
|
|
3277
|
-
}
|
|
3278
|
-
else if (search_criteria.search_type == "C") {
|
|
3279
|
-
|
|
3280
|
-
}
|
|
3281
|
-
if (details.network || details.mac_address) {
|
|
3282
|
-
query += "left join device_networks dn on d.id = dn.id_device ";
|
|
3283
|
-
}
|
|
3284
|
-
if (details.storage) {
|
|
3285
|
-
query += "left join device_storages dr on d.id = dr.id_device ";
|
|
3286
|
-
}
|
|
3287
|
-
if (details.addon) {
|
|
3288
|
-
query += "left join device_addons don on d.id = don.id_device ";
|
|
3289
|
-
}
|
|
3290
|
-
}
|
|
3277
|
+
|
|
3291
3278
|
// Filtro su dettagli...
|
|
3292
3279
|
if (details) {
|
|
3293
|
-
if (search_criteria.
|
|
3280
|
+
if (search_criteria.dev_type == "DESKTOP" || search_criteria.dev_type == "NOTEBOOK" || search_criteria.dev_type == "TABLET" || search_criteria.dev_type == "SMART TV" || search_criteria.dev_type == "SERVER") {
|
|
3294
3281
|
where_clause += " and ";
|
|
3295
3282
|
if (details.os) {
|
|
3296
3283
|
where_clause += "(dd.os = '" + details.os + "') ";
|
|
@@ -3372,18 +3359,27 @@ function getDevicesByDetailsSelectMySQL(search_criteria, details) {
|
|
|
3372
3359
|
query += "left join consegna_beni cb on d.id = cb.id_bene ";
|
|
3373
3360
|
|
|
3374
3361
|
if (details) {
|
|
3375
|
-
if (search_criteria.
|
|
3362
|
+
if (search_criteria.dev_type == "DESKTOP" || search_criteria.dev_type == "NOTEBOOK" || search_criteria.dev_type == "TABLET" || search_criteria.dev_type == "SMART TV" || search_criteria.dev_type == "SERVER") {
|
|
3376
3363
|
query += "left join device_pc dd on d.id = dd.id_device ";
|
|
3377
3364
|
}
|
|
3378
|
-
else if (search_criteria.
|
|
3365
|
+
else if (search_criteria.dev_type == "A") {
|
|
3379
3366
|
|
|
3380
3367
|
}
|
|
3381
|
-
else if (search_criteria.
|
|
3368
|
+
else if (search_criteria.dev_type == "B") {
|
|
3382
3369
|
|
|
3383
3370
|
}
|
|
3384
|
-
else if (search_criteria.
|
|
3371
|
+
else if (search_criteria.dev_type == "C") {
|
|
3385
3372
|
|
|
3386
3373
|
}
|
|
3374
|
+
if (details.network || details.mac_address) {
|
|
3375
|
+
query += "left join device_networks dn on d.id = dn.id_device ";
|
|
3376
|
+
}
|
|
3377
|
+
if (details.storage) {
|
|
3378
|
+
query += "left join device_storages dr on d.id = dr.id_device ";
|
|
3379
|
+
}
|
|
3380
|
+
if (details.addon) {
|
|
3381
|
+
query += "left join device_addons don on d.id = don.id_device ";
|
|
3382
|
+
}
|
|
3387
3383
|
}
|
|
3388
3384
|
|
|
3389
3385
|
var where_clause = " where (d.is_removed is null or d.is_removed = 0) ";
|
|
@@ -3454,29 +3450,7 @@ function getDevicesByDetailsSelectMySQL(search_criteria, details) {
|
|
|
3454
3450
|
}
|
|
3455
3451
|
}
|
|
3456
3452
|
|
|
3457
|
-
|
|
3458
|
-
if (search_criteria.search_type == "DESKTOP" || search_criteria.search_type == "NOTEBOOK") {
|
|
3459
|
-
query += "left join device_pc dd on d.id = dd.id_device ";
|
|
3460
|
-
}
|
|
3461
|
-
else if (search_criteria.search_type == "A") {
|
|
3462
|
-
|
|
3463
|
-
}
|
|
3464
|
-
else if (search_criteria.search_type == "B") {
|
|
3465
|
-
|
|
3466
|
-
}
|
|
3467
|
-
else if (search_criteria.search_type == "C") {
|
|
3468
|
-
|
|
3469
|
-
}
|
|
3470
|
-
if (details.network || details.mac_address) {
|
|
3471
|
-
query += "left join device_networks dn on d.id = dn.id_device ";
|
|
3472
|
-
}
|
|
3473
|
-
if (details.storage) {
|
|
3474
|
-
query += "left join device_storages dr on d.id = dr.id_device ";
|
|
3475
|
-
}
|
|
3476
|
-
if (details.addon) {
|
|
3477
|
-
query += "left join device_addons don on d.id = don.id_device ";
|
|
3478
|
-
}
|
|
3479
|
-
}
|
|
3453
|
+
|
|
3480
3454
|
// Filtro su dettagli...
|
|
3481
3455
|
if (details) {
|
|
3482
3456
|
if (search_criteria.search_type == "DESKTOP" || search_criteria.search_type == "NOTEBOOK" || search_criteria.search_type == "TABLET" || search_criteria.search_type == "SMART TV" || search_criteria.search_type == "SERVER") {
|