alsmanager_lib 3.0.181 → 3.0.182
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 +74 -13
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -2143,7 +2143,56 @@ function createPCPropertiesMySQLObj(id_device, dev_prop) {
|
|
|
2143
2143
|
|
|
2144
2144
|
function insertPCPropertiesSQLite(id_device, dev_prop) {
|
|
2145
2145
|
var query = "insert into device_pc (id_device, pc_name, os_platform, OS, OS_version, OS_arch, CPU, CPU_arch, RAM_GB, video_card, smartboard_ready, note, da_properties) values ";
|
|
2146
|
-
query += "(" + id_device + ",
|
|
2146
|
+
query += "(" + id_device + ", ";
|
|
2147
|
+
if (dev_prop.pc_name)
|
|
2148
|
+
query += "'" + dev_prop.pc_name + "', '";
|
|
2149
|
+
else
|
|
2150
|
+
query += ", ";
|
|
2151
|
+
if (dev_prop.os_platform)
|
|
2152
|
+
query += "'" + dev_prop.os_platform + "', ";
|
|
2153
|
+
else
|
|
2154
|
+
query += ", ";
|
|
2155
|
+
if (dev_prop.os)
|
|
2156
|
+
query += "'" + dev_prop.os + "', ";
|
|
2157
|
+
else
|
|
2158
|
+
query += ", ";
|
|
2159
|
+
if (dev_prop.os_version)
|
|
2160
|
+
query += "'" + dev_prop.os_version + "', ";
|
|
2161
|
+
else
|
|
2162
|
+
query += ", ";
|
|
2163
|
+
if (dev_prop.os_arch)
|
|
2164
|
+
query += "'" + dev_prop.os_arch + "', ";
|
|
2165
|
+
else
|
|
2166
|
+
query += ", ";
|
|
2167
|
+
if (dev_prop.cpu)
|
|
2168
|
+
query += "'" + dev_prop.cpu + "', ";
|
|
2169
|
+
else
|
|
2170
|
+
query += ", ";
|
|
2171
|
+
if (dev_prop.cpu_arch)
|
|
2172
|
+
query += "'" + dev_prop.cpu_arch + "', ";
|
|
2173
|
+
else
|
|
2174
|
+
query += ", ";
|
|
2175
|
+
if (dev_prop.ram_size)
|
|
2176
|
+
query += dev_prop.ram_size + ", ";
|
|
2177
|
+
else
|
|
2178
|
+
query += "0, ";
|
|
2179
|
+
if (dev_prop.video_card)
|
|
2180
|
+
query += dev_prop.video_card + ", ";
|
|
2181
|
+
else
|
|
2182
|
+
query += "0, ";
|
|
2183
|
+
if (dev_prop.smartboard_ready)
|
|
2184
|
+
query += dev_prop.smartboard_ready + ", ";
|
|
2185
|
+
else
|
|
2186
|
+
query += "0, ";
|
|
2187
|
+
if (dev_prop.note)
|
|
2188
|
+
query += "'" + dev_prop.note + "', ";
|
|
2189
|
+
else
|
|
2190
|
+
query += ", ";
|
|
2191
|
+
if (dev_prop.da_properties)
|
|
2192
|
+
query += dev_prop.da_properties;
|
|
2193
|
+
else
|
|
2194
|
+
query += "0";
|
|
2195
|
+
query += ")";
|
|
2147
2196
|
return query;
|
|
2148
2197
|
}
|
|
2149
2198
|
function insertPCPropertiesMySQL() {
|
|
@@ -2171,18 +2220,30 @@ function insertPCProperties(db_used, id_device, dev_prop) {
|
|
|
2171
2220
|
function updatePCPropertiesSQLite(id_device, dev_prop) {
|
|
2172
2221
|
var query = "update device_pc set ";
|
|
2173
2222
|
query += "id_device = " + id_device + ", ";
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2223
|
+
if (dev_prop.pc_name)
|
|
2224
|
+
query += "pc_name = '" + dev_prop.pc_name + "', ";
|
|
2225
|
+
if (dev_prop.os_platform)
|
|
2226
|
+
query += "os_platform = '" + dev_prop.os_platform + "', ";
|
|
2227
|
+
if (dev_prop.os)
|
|
2228
|
+
query += "OS = '" + dev_prop.os + "', ";
|
|
2229
|
+
if (dev_prop.os_version)
|
|
2230
|
+
query += "OS_version = '" + dev_prop.os_version + "', ";
|
|
2231
|
+
if (dev_prop.os_arch)
|
|
2232
|
+
query += "OS_arch = '" + dev_prop.os_arch + "', ";
|
|
2233
|
+
if (dev_prop.cpu)
|
|
2234
|
+
query += "CPU = '" + dev_prop.cpu + "', ";
|
|
2235
|
+
if (dev_prop.cpu_arch)
|
|
2236
|
+
query += "CPU_arch = '" + dev_prop.cpu_arch + "', ";
|
|
2237
|
+
if (dev_prop.ram_size)
|
|
2238
|
+
query += "RAM_GB = " + dev_prop.ram_size + ", ";
|
|
2239
|
+
if (dev_prop.video_card)
|
|
2240
|
+
query += "video_card = " + dev_prop.video_card + ", ";
|
|
2241
|
+
if (dev_prop.smartboard_ready)
|
|
2242
|
+
query += "smartboard_ready = " + dev_prop.smartboard_ready + ", ";
|
|
2243
|
+
if (dev_prop.note)
|
|
2244
|
+
query += "note = '" + dev_prop.note + "', ";
|
|
2245
|
+
if (dev_prop.da_properties)
|
|
2246
|
+
query += "da_properties = " + dev_prop.da_properties + " ";
|
|
2186
2247
|
query += "where id_device = " + id_device + " ";
|
|
2187
2248
|
query += "and id = " + dev_prop.id_prop;
|
|
2188
2249
|
return query;
|