Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
initializeTerminal() {
const domHeight = document.body.offsetHeight;
let rowNum = (domHeight * 0.75 - 104) / 21;
if (rowNum < 10) {
rowNum = 10;
}
this.xterm = new Terminal({
'cursorBlink': true,
'tabStopWidth': 8,
'cols': 80,
'rows': parseInt(rowNum.toFixed(),10),
'focus': true
});
this.xterm.open(this.container.nativeElement);
this.xterm.attach(this.ss);
this.xterm._initialized = true;
// this.xterm.send('attachconsole.py /dev/nmdm'+this.pk+'B\n')
this.xterm.send('cu -l /dev/nmdm'+this.pk+'B\n');
this.xterm.send('\r');
}