Work on launcher and getting device info
This commit is contained in:
@@ -583,3 +583,26 @@ exports.run_cmd = async function ({cmd=null}) {
|
|||||||
console.log('Finished');
|
console.log('Finished');
|
||||||
return true;
|
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;
|
||||||
|
}
|
||||||
|
|||||||
2
index.js
2
index.js
@@ -66,7 +66,7 @@ function createWindow () {
|
|||||||
win.loadFile('app/index.html');
|
win.loadFile('app/index.html');
|
||||||
|
|
||||||
// Open the DevTools.
|
// Open the DevTools.
|
||||||
// win.webContents.openDevTools();
|
win.webContents.openDevTools();
|
||||||
|
|
||||||
// Emitted when the window is closed.
|
// Emitted when the window is closed.
|
||||||
win.on('closed', () => {
|
win.on('closed', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user