smaller improvements
This commit is contained in:
parent
93cf83abb5
commit
3c62cb367f
@ -970,7 +970,7 @@ function versions(apps, callback) {
|
|||||||
if (_windows) {
|
if (_windows) {
|
||||||
util.powerShell('$PSVersionTable').then(stdout => {
|
util.powerShell('$PSVersionTable').then(stdout => {
|
||||||
const lines = stdout.toString().split('\n').map(line => line.replace(/ +/g, ' ').replace(/ +/g, ':'));
|
const lines = stdout.toString().split('\n').map(line => line.replace(/ +/g, ' ').replace(/ +/g, ':'));
|
||||||
appsObj.versions.powershell = util.getVersion(lines, 'psversion');
|
appsObj.versions.powershell = util.getValue(lines, 'psversion');
|
||||||
functionProcessed();
|
functionProcessed();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -814,6 +814,10 @@ function chassis(callback) {
|
|||||||
result.serial = util.getValue(lines, 'serialnumber', '=');
|
result.serial = util.getValue(lines, 'serialnumber', '=');
|
||||||
result.assetTag = util.getValue(lines, 'partnumber', '=');
|
result.assetTag = util.getValue(lines, 'partnumber', '=');
|
||||||
result.sku = util.getValue(lines, 'sku', '=');
|
result.sku = util.getValue(lines, 'sku', '=');
|
||||||
|
if (result.manufacturer.toLowerCase().indexOf('o.e.m.') !== -1) { result.manufacturer = '-'; }
|
||||||
|
if (result.version.toLowerCase().indexOf('o.e.m.') !== -1) { result.version = '-'; }
|
||||||
|
if (result.serial.toLowerCase().indexOf('o.e.m.') !== -1) { result.serial = '-'; }
|
||||||
|
if (result.assetTag.toLowerCase().indexOf('o.e.m.') !== -1) { result.assetTag = '-'; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callback) { callback(result); }
|
if (callback) { callback(result); }
|
||||||
|
|||||||
@ -579,7 +579,7 @@ function wifiConnections(callback) {
|
|||||||
const type = util.getValue(lines, 'Radio type', ':', true) || util.getValue(lines, 'Type de radio', ':', true) || util.getValue(lines, 'Funktyp', ':', true) || null;
|
const type = util.getValue(lines, 'Radio type', ':', true) || util.getValue(lines, 'Type de radio', ':', true) || util.getValue(lines, 'Funktyp', ':', true) || null;
|
||||||
const security = util.getValue(lines, 'authentication', ':', true) || util.getValue(lines, 'Authentification', ':', true) || util.getValue(lines, 'Authentifizierung', ':', true) || null;
|
const security = util.getValue(lines, 'authentication', ':', true) || util.getValue(lines, 'Authentification', ':', true) || util.getValue(lines, 'Authentifizierung', ':', true) || null;
|
||||||
const channel = util.getValue(lines, 'Channel', ':', true) || util.getValue(lines, 'Canal', ':', true) || util.getValue(lines, 'Kanal', ':', true) || null;
|
const channel = util.getValue(lines, 'Channel', ':', true) || util.getValue(lines, 'Canal', ':', true) || util.getValue(lines, 'Kanal', ':', true) || null;
|
||||||
const txRate = util.getValue(lines, 'Transmit rate (mbps)', ':', true) || util.getValue(lines, 'Transmission (mbit/s)', ':', true) || util.getValue(lines, 'Übertragungsrate (MBit/s)', ':', true) || null;
|
const txRate = util.getValue(lines, 'Transmit rate (mbps)', ':', true) || util.getValue(lines, 'Transmission (mbit/s)', ':', true) || util.getValue(lines, 'Empfangsrate (MBit/s)', ':', true) || null;
|
||||||
if (model && id && ssid && bssid) {
|
if (model && id && ssid && bssid) {
|
||||||
result.push({
|
result.push({
|
||||||
id,
|
id,
|
||||||
@ -592,7 +592,7 @@ function wifiConnections(callback) {
|
|||||||
type,
|
type,
|
||||||
security,
|
security,
|
||||||
signalLevel,
|
signalLevel,
|
||||||
txRate
|
txRate: util.toInt(txRate) || null
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -669,7 +669,9 @@ function wifiInterfaces(callback) {
|
|||||||
const iface = lines[0].indexOf(':') >= 0 ? lines[0].split(':')[1].trim() : '';
|
const iface = lines[0].indexOf(':') >= 0 ? lines[0].split(':')[1].trim() : '';
|
||||||
const model = lines[1].indexOf(':') >= 0 ? lines[1].split(':')[1].trim() : '';
|
const model = lines[1].indexOf(':') >= 0 ? lines[1].split(':')[1].trim() : '';
|
||||||
const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : '';
|
const id = lines[2].indexOf(':') >= 0 ? lines[2].split(':')[1].trim() : '';
|
||||||
const mac = lines[3].indexOf(':') >= 0 ? lines[3].split(':')[1].trim() : '';
|
const macParts = lines[3].indexOf(':') >= 0 ? lines[3].split(':') : [];
|
||||||
|
macParts.shift();
|
||||||
|
const mac = macParts.join(':').trim();
|
||||||
const vendor = getVendor(model);
|
const vendor = getVendor(model);
|
||||||
if (iface && model && id && mac) {
|
if (iface && model && id && mac) {
|
||||||
result.push({
|
result.push({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user