alsmanager_lib 3.0.181 → 3.0.183
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 -14
- 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() {
|
|
@@ -2170,19 +2219,30 @@ function insertPCProperties(db_used, id_device, dev_prop) {
|
|
|
2170
2219
|
|
|
2171
2220
|
function updatePCPropertiesSQLite(id_device, dev_prop) {
|
|
2172
2221
|
var query = "update device_pc set ";
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2222
|
+
if (dev_prop.pc_name)
|
|
2223
|
+
query += "pc_name = '" + dev_prop.pc_name + "', ";
|
|
2224
|
+
if (dev_prop.os_platform)
|
|
2225
|
+
query += "os_platform = '" + dev_prop.os_platform + "', ";
|
|
2226
|
+
if (dev_prop.os)
|
|
2227
|
+
query += "OS = '" + dev_prop.os + "', ";
|
|
2228
|
+
if (dev_prop.os_version)
|
|
2229
|
+
query += "OS_version = '" + dev_prop.os_version + "', ";
|
|
2230
|
+
if (dev_prop.os_arch)
|
|
2231
|
+
query += "OS_arch = '" + dev_prop.os_arch + "', ";
|
|
2232
|
+
if (dev_prop.cpu)
|
|
2233
|
+
query += "CPU = '" + dev_prop.cpu + "', ";
|
|
2234
|
+
if (dev_prop.cpu_arch)
|
|
2235
|
+
query += "CPU_arch = '" + dev_prop.cpu_arch + "', ";
|
|
2236
|
+
if (dev_prop.ram_size)
|
|
2237
|
+
query += "RAM_GB = " + dev_prop.ram_size + ", ";
|
|
2238
|
+
if (dev_prop.video_card)
|
|
2239
|
+
query += "video_card = " + dev_prop.video_card + ", ";
|
|
2240
|
+
if (dev_prop.smartboard_ready)
|
|
2241
|
+
query += "smartboard_ready = " + dev_prop.smartboard_ready + ", ";
|
|
2242
|
+
if (dev_prop.note)
|
|
2243
|
+
query += "note = '" + dev_prop.note + "', ";
|
|
2244
|
+
if (dev_prop.da_properties)
|
|
2245
|
+
query += "da_properties = " + dev_prop.da_properties + " ";
|
|
2186
2246
|
query += "where id_device = " + id_device + " ";
|
|
2187
2247
|
query += "and id = " + dev_prop.id_prop;
|
|
2188
2248
|
return query;
|