How to use the xterm/dist/xterm function in xterm

To help you get started, we’ve selected a few xterm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gravitational / teleport / web / src / app / lib / term / terminal.js View on Github external
open() {
    this._el.classList.add(GRV_CLASS);

    // render xtermjs with default values
    this.term = new XTerm({
      cols: 15,
      rows: 5,
      scrollback: this.scrollBack,
      cursorBlink: false
    });

    this.term.open(this._el);

    // fit xterm to available space
    this.resize(this.cols, this.rows);

    // subscribe to xtermjs output
    this.term.on('data', data => {
      this.tty.send(data)
    })
github gravitational / gravity / web / src / lib / term / terminal.js View on Github external
open() {
    this._el.classList.add(GRV_CLASS);

    // render xtermjs with default values
    this.term = new XTerm({
      cols: 15,
      rows: 5,
      scrollback: this.scrollBack,
      cursorBlink: false
    });

    this.term.open(this._el);

    // fit xterm to available space
    this.resize(this.cols, this.rows);

    // subscribe to xtermjs output
    this.term.on('data', data => {
      this.tty.send(data)
    })
github plesk / ext-ssh-terminal / src / frontend / containers / Term / Terminal.js View on Github external
open() {
        this._el.classList.add(GRV_CLASS);

        // render xtermjs with default values
        this.term = new XTerm({
            cols: 15,
            rows: 5,
            scrollback: this.scrollBack,
            cursorBlink: false,
        });

        this.term.open(this._el);

        // fit xterm to available space
        this.resize(this.cols, this.rows);

        // subscribe to xtermjs output
        this.term.on('data', data => {
            this.tty.send(data);
        });
github ovh / manager / packages / manager / modules / pci / src / projects / project / legacy / compute / infrastructure / openstackClient / controller.js View on Github external
CloudProjectComputeInfrastructureOpenstackClientService,
    CucControllerHelper,
    OvhApiCloudProjectOpenstackClient,
    OvhApiCloudProjectRegion,
  ) {
    this.$q = $q;
    this.$stateParams = $stateParams;
    this.$translate = $translate;
    this.CucCloudMessage = CucCloudMessage;
    this.Service = CloudProjectComputeInfrastructureOpenstackClientService;
    this.CucControllerHelper = CucControllerHelper;
    this.OvhApiCloudProjectOpenstackClient = OvhApiCloudProjectOpenstackClient;
    this.OvhApiCloudProjectRegion = OvhApiCloudProjectRegion;

    this.serviceName = this.$stateParams.projectId;
    this.term = new Terminal();
    this.messages = [];
    this.emptyOption = 'emptyOption';
    this.region = this.emptyOption;
    this.minimized = sessionStorage.getItem('CloudProjectComputeInfrastructureOpenstackClientCtrl.minimized') !== 'false';
    this.maximized = sessionStorage.getItem('CloudProjectComputeInfrastructureOpenstackClientCtrl.maximized') === 'true';
    this.actions = {
      help: 'openstack help | less',
      catalog: 'openstack catalog list',
      server: 'openstack server list',
      image: 'openstack image list',
      flavor: 'openstack flavor list',
      volume: 'openstack volume list',
      network: 'openstack network list',
      subnet: 'openstack subnet list',
      'create server': 'create-server.sh',
      'bigdata platform': 'bigdata-platform-cli',