Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
columnWidth: [12, 8, 12, 12, 12, 8, 12, 12, 8, 8, 8, 8], // in chars
})
ui.trade_table = contrib.table({
keys: true,
fg: 'yellow',
interactive: false,
label: 'Trade Buckets',
width: '48%',
height: '82%',
top: '16%',
left: '50%',
border: {type: "line", fg: "yellow"},
columnSpacing: 4, //in chars
columnWidth: [4, 12, 12, 4, 17], /*in chars*/
})
ui.gdax_log = contrib.log({
fg: "yellow",
selectedFg: "yellow",
label: 'GDAX Log',
left: '2%',
top: '16%',
width: '46%',
height: '28%',
border: {type: "line", fg: "yellow"}
})
ui.sys_log = contrib.log({
fg: "yellow",
selectedFg: "yellow",
label: 'System Log',
left: '2%',
top: '47%',
width: '46%',
const backendCompilerWindow = screenGrid.set(0, 0, 1, 1, Log, {
fg: 'green',
label: ' Backend Server Compiler ',
});
const linterWindow = screenGrid.set(0, 1, 2, 2, Log, {
fg: 'blue',
label: ' Linter ',
});
const backendServerWindow = screenGrid.set(2, 0, 2, 2, Log, {
fg: 'green',
label: ' Backend Server (debugger: chrome://inspect/#devices) ',
});
const frontendWindow = screenGrid.set(1, 0, 1, 1, Log, {
fg: 'cyan',
label: ' Frontend Server (http://localhost:8080/) ',
});
screen.render();
writeToWindow(frontendWindow, 'npm', ['run', 'dev:frontend']);
writeToWindow(backendCompilerWindow, 'npm', ['run', 'dev:backend:es6compiler']);
writeToWindow(linterWindow, 'npm', ['run', 'dev:linter:ci']);
setTimeout(() => {
writeToWindow(backendServerWindow, 'npm', ['run', 'dev:backend:server']);
}, 5000);
// private
private createLog() {
const logBox = blessed.box({ top: '100%-6', height: 6, width: '100%' })
this.log = contrib.log({
border: { type: 'line', fg: 'cyan' },
fg: 'green',
height: 6,
label: 'Logs',
width: '100%',
})
logBox.append(this.log)
this.screen.append(logBox)
}
}
left: '50%',
border: {type: "line", fg: "yellow"},
columnSpacing: 4, //in chars
columnWidth: [4, 12, 12, 4, 17], /*in chars*/
})
ui.gdax_log = contrib.log({
fg: "yellow",
selectedFg: "yellow",
label: 'GDAX Log',
left: '2%',
top: '16%',
width: '46%',
height: '28%',
border: {type: "line", fg: "yellow"}
})
ui.sys_log = contrib.log({
fg: "yellow",
selectedFg: "yellow",
label: 'System Log',
left: '2%',
top: '47%',
width: '46%',
height: '51%',
border: {type: "line", fg: "yellow"}
})
screen.append(ui.overview_table)
screen.append(ui.trade_table)
screen.append(ui.gdax_log)
screen.append(ui.sys_log)
setInterval( () => {
const blessed = require('blessed');
const Grid = require('blessed-contrib').grid;
const Log = require('blessed-contrib').log;
const spawn = require('child_process').spawn;
const screen = blessed.screen();
const screenGrid = new Grid({ rows: 4, cols: 2, screen: screen });
const backendCompilerWindow = screenGrid.set(0, 0, 1, 1, Log, {
fg: 'green',
label: ' Backend Server Compiler ',
});
const linterWindow = screenGrid.set(0, 1, 2, 2, Log, {
fg: 'blue',
label: ' Linter ',
});
const backendServerWindow = screenGrid.set(2, 0, 2, 2, Log, {
fg: 'green',
label: ' Backend Server (debugger: chrome://inspect/#devices) ',
});
const frontendWindow = screenGrid.set(1, 0, 1, 1, Log, {
fg: 'cyan',