bluetooth windows, fixes, improvements

This commit is contained in:
Sebastian Hildebrandt
2021-01-18 19:38:20 +01:00
parent 143b1abe86
commit 6fdf5ea2ac
9 changed files with 101 additions and 67 deletions
+4 -2
View File
@@ -3,6 +3,7 @@ const si = require('../lib/index');
function test(f) {
return new Promise((resolve) => {
process.nextTick(() => {
f = f.replace(/'/g, '');
// console.log(f);
if (f === 'a') { si.audio().then(data => { if (data !== null) { resolve({ data, title: 'Audio' }); } else { resolve('not_supported') } }) }
else if (f === 'b') { si.bios().then(data => { if (data !== null) { resolve({ data, title: 'BIOS' }); } else { resolve('not_supported') } }) }
@@ -34,8 +35,10 @@ function test(f) {
else if (f === 'u') { si.usb().then(data => { if (data !== null) { resolve({ data, title: 'USB' }); } else { resolve('not_supported') } }) }
else if (f === 'U') { si.uuid().then(data => { if (data !== null) { resolve({ data, title: 'UUID' }); } else { resolve('not_supported') } }) }
else if (f === 'v') { si.versions().then(data => { if (data !== null) { resolve({ data, title: 'Versions' }); } else { resolve('not_supported') } }) }
else if (f === 'V') { si.vboxInfo().then(data => { if (data !== null) { resolve({ data, title: 'Virtual Box' }); } else { resolve('not_supported') } }) }
else if (f === 'w') { si.wifiNetworks().then(data => { if (data !== null) { resolve({ data, title: 'WIFI Networks' }); } else { resolve('not_supported') } }) }
else if (f === 'y') { si.battery().then(data => { if (data !== null) { resolve({ data, title: 'Battery' }); } else { resolve('not_supported') } }) }
else if (f === 'y') { si.system().then(data => { if (data !== null) { resolve({ data, title: 'System' }); } else { resolve('not_supported') } }) }
else if (f === 'Y') { si.battery().then(data => { if (data !== null) { resolve({ data, title: 'Battery' }); } else { resolve('not_supported') } }) }
else if (f === 'z') { si.users().then(data => { if (data !== null) { resolve({ data, title: 'Users' }); } else { resolve('not_supported') } }) }
else if (f === '1') { si.networkInterfaceDefault().then(data => { if (data !== null) { resolve({ data, title: 'NET Iface Default' }); } else { resolve('not_supported') } }) }
else if (f === '2') { si.networkGatewayDefault().then(data => { if (data !== null) { resolve({ data, title: 'NET Gateway Default' }); } else { resolve('not_supported') } }) }
@@ -47,7 +50,6 @@ function test(f) {
else if (f === '8') { si.dockerContainerStats('1').then(data => { if (data !== null) { resolve({ data, title: 'Docker Cont Stats' }); } else { resolve('not_supported') } }) }
else if (f === '9') { si.dockerContainerProcesses('1').then(data => { if (data !== null) { resolve({ data, title: 'Docker Cont Processes' }); } else { resolve('not_supported') } }) }
else if (f === '0') { si.dockerAll().then(data => { if (data !== null) { resolve({ data, title: 'Docker All' }); } else { resolve('not_supported') } }) }
else if (f === '-') { si.vboxInfo().then(data => { if (data !== null) { resolve({ data, title: 'Virtual Box' }); } else { resolve('not_supported') } }) }
else if (f === ',') { si.getStaticData().then(data => { if (data !== null) { resolve({ data, title: 'All Static Data' }); } else { resolve('not_supported') } }) }
else if (f === '.') { si.getDynamicData('apache2, postgres').then(data => { if (data !== null) { resolve({ data, title: 'All Dynamic Data' }); } else { resolve('not_supported') } }) }
else if (f === '/') { si.getAllData('apache2, postgres').then(data => { if (data !== null) { resolve({ data, title: 'All Data' }); } else { resolve('not_supported') } }) }
+12 -11
View File
@@ -16,17 +16,18 @@ function printHeader() {
function printMenu() {
console.log('');
console.log('┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐');
console.log('│ a ... Audio g ... Graphics r ... Printer 1 ... NET Iface Default ? ... Get Object │');
console.log('│ b ... BIOS h ... Bluetooth s ... Services 2 ... NET Gateway Default , ... All Static │');
console.log('│ B ... Baseboard i ... INET Latency S ... Shell 3 ... NET Interfaces . ... All Dynamic │');
console.log('│ C ... Chassis I ... INET Check Site t ... time 4 ... NET Stats / ... All │');
console.log('│ c ... CPU l ... CPU Load T ... CPU Temperature 5 ... NET Connections │');
console.log('│ d ... DiskLayout L ... Full Load u ... USB 6 ... Docker Info │');
console.log('│ D ... DiskIO m ... Memory U ... UUID 7 ... Docker Container │');
console.log('│ e ... Block Devices M ... MEM Layout v ... Versions 8 ... Docker Cont Stats │');
console.log('│ E ... Open Files o ... OS Info w ... WIFI networks 9 ... Docker Cont Proc │');
console.log('│ f ... FS Size p ... Processes y ... Battery 0 ... Docker All │');
console.log('│ F ... FS Stats P ... Process Load z ... Users - ... Virtual Box q >>> QUIT │');
console.log('│ a ... Audio h ... Bluetooth S ... Shell 1 ... NET Iface Default ? ... Get Object │');
console.log('│ b ... BIOS i ... INET Latency t ... time 2 ... NET Gateway Default , ... All Static │');
console.log('│ B ... Baseboard I ... INET Check Site T ... CPU Temperature 3 ... NET Interfaces . ... All Dynamic │');
console.log('│ C ... Chassis l ... CPU Load u ... USB 4 ... NET Stats / ... All │');
console.log('│ c ... CPU L ... Full Load U ... UUID 5 ... NET Connections │');
console.log('│ d ... DiskLayout m ... Memory v ... Versions │');
console.log('│ D ... DiskIO M ... MEM Layout V ... Virtual Box 6 ... Docker Info │');
console.log('│ e ... Block Devices o ... OS Info w ... WIFI networks 7 ... Docker Container │');
console.log('│ E ... Open Files p ... Processes y ... System 8 ... Docker Cont Stats │');
console.log('│ f ... FS Size P ... Process Load Y ... Battery 9 ... Docker Cont Proc │');
console.log('│ F ... FS Stats r ... Printer z ... Users 0 ... Docker All │');
console.log('│ g ... Graphics s ... Services q >>> QUIT │');
console.log('└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘');
}