Work on launcher and getting device info

This commit is contained in:
Scott Idem
2022-05-25 14:05:21 -04:00
parent 9b1fffe024
commit 9094b28376
2 changed files with 24 additions and 1 deletions

View File

@@ -583,3 +583,26 @@ exports.run_cmd = async function ({cmd=null}) {
console.log('Finished');
return true;
}
// Run raw command
// Updated 2022-05-25
exports.get_device_info = async function () {
console.log('*** Electron framework export: get_device_info() ***');
let data = {};
data['arch'] = os.arch();
data['hostname'] = os.hostname();
data['cpus'] = os.cpus();
data['freemem'] = os.freemem();
data['totalmem'] = os.totalmem();
data['loadavg'] = os.loadavg();
data['networkInterfaces'] = os.networkInterfaces();
data['platform'] = os.platform();
data['release'] = os.release();
data['uptime'] = os.uptime();
data['version'] = os.version();
console.log(data);
return data;
}

View File

@@ -66,7 +66,7 @@ function createWindow () {
win.loadFile('app/index.html');
// Open the DevTools.
// win.webContents.openDevTools();
win.webContents.openDevTools();
// Emitted when the window is closed.
win.on('closed', () => {