From 9094b28376387032741543a6d2415ac35c1be32a Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Wed, 25 May 2022 14:05:21 -0400 Subject: [PATCH] Work on launcher and getting device info --- app/js/aether_native_app_v3.js | 23 +++++++++++++++++++++++ index.js | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/app/js/aether_native_app_v3.js b/app/js/aether_native_app_v3.js index 44837f2..ee9a7fc 100644 --- a/app/js/aether_native_app_v3.js +++ b/app/js/aether_native_app_v3.js @@ -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; +} diff --git a/index.js b/index.js index 510acc9..4da949d 100644 --- a/index.js +++ b/index.js @@ -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', () => {