Skip to content

Commit

Permalink
Merge pull request #376 from aerokube/dependabot/npm_and_yarn/ui/xter…
Browse files Browse the repository at this point in the history
…m-4.9.0

Bump xterm from 3.14.5 to 4.9.0 in /ui
  • Loading branch information
vania-pooh authored Sep 18, 2020
2 parents a07225b + ccb1ec9 commit c328fa2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
3 changes: 2 additions & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"rxjs-compat": "^6.6.3",
"rxjs-hooks": "^0.6.2",
"styled-components": "^5.2.0",
"xterm": "^3.14.5"
"xterm": "^4.9.0",
"xterm-addon-fit": "^0.4.0"
},
"scripts": {
"start": "react-scripts start",
Expand Down
12 changes: 8 additions & 4 deletions ui/src/components/Log/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import React, { Component } from "react";
import { Terminal } from "xterm";
import { FitAddon } from "xterm-addon-fit";
import urlTo from "../../util/urlTo";
import isSecure from "../../util/isSecure";

import "xterm/dist/xterm.css";
import "xterm/css/xterm.css";
import { StyledLog } from "./style.css";
import colors from "ansi-256-colors";
import { BehaviorSubject, defer, fromEvent, Observable } from "rxjs";
import { debounceTime, distinctUntilChanged, filter, map, startWith, switchMap, tap } from "rxjs/operators";
import * as fit from "xterm/lib/addons/fit/fit";

export default class Log extends Component {
constructor(props) {
super(props);

Terminal.applyAddon(fit);
this.term = new Terminal({
const terminal = new Terminal({
cursorBlink: false,
tabStopWidth: 4,
disableStdin: true,
Expand All @@ -26,6 +25,10 @@ export default class Log extends Component {
background: "#151515",
},
});
const fitAddon = new FitAddon();
terminal.loadAddon(fitAddon);
this.term = terminal;
this.fitAddon = fitAddon;
this.props$ = new BehaviorSubject(props);
}

Expand All @@ -35,6 +38,7 @@ export default class Log extends Component {

componentDidMount() {
this.term.open(this.termel);
this.fitAddon.fit();
this.term.writeln(colors.fg.getRgb(2, 3, 4) + "Initialize...\n\r" + colors.reset);

this.resize = fromEvent(window, "resize")
Expand Down
13 changes: 9 additions & 4 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12755,10 +12755,15 @@ xtend@^4.0.0, xtend@~4.0.1:
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68=

xterm@^3.14.5:
version "3.14.5"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.14.5.tgz#c9d14e48be6873aa46fb429f22f2165557fd2dea"
integrity sha512-DVmQ8jlEtL+WbBKUZuMxHMBgK/yeIZwkXB81bH+MGaKKnJGYwA+770hzhXPfwEIokK9On9YIFPRleVp/5G7z9g==
xterm-addon-fit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/xterm-addon-fit/-/xterm-addon-fit-0.4.0.tgz#06e0c5d0a6aaacfb009ef565efa1c81e93d90193"
integrity sha512-p4BESuV/g2L6pZzFHpeNLLnep9mp/DkF3qrPglMiucSFtD8iJxtMufEoEJbN8LZwB4i+8PFpFvVuFrGOSpW05w==

xterm@^4.9.0:
version "4.9.0"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.9.0.tgz#7a4c097a433d565339b5533b468bbc60c6c87969"
integrity sha512-wGfqufmioctKr8VkbRuZbVDfjlXWGZZ1PWHy1yqqpGT3Nm6yaJx8lxDbSEBANtgaiVPTcKSp97sxOy5IlpqYfw==

"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0:
version "4.0.0"
Expand Down

0 comments on commit c328fa2

Please sign in to comment.