Skip to content

Commit

Permalink
Merge pull request #377 from vania-pooh/master
Browse files Browse the repository at this point in the history
Fixed broken UI and development docs
  • Loading branch information
vania-pooh authored Sep 22, 2020
2 parents c328fa2 + f805b40 commit 2364364
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
18 changes: 11 additions & 7 deletions docs/contributing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

[source,bash]
----
$ go generate ./ui ./...
$ yarn --cwd ui install
$ yarn --cwd ui build
$ go generate github.com/aerokube/selenoid-ui
----

3) Build (requires Golang 1.11 and above):
Expand All @@ -24,12 +26,14 @@ $ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build
$ docker build -t selenoid-ui:latest .
----

5) To run local development with hot reloads it's better to start Selenoid UI binary as `./selenoid-ui -allowed-origin="*"`
as well as `cd ui && yarn start`

NOTE: For some reason devserver can't proxy SSE properly and thus realtime updates can get stuck.
As a workaround you can change the path in the `Viewport` container from `/events` to `http://localhost:8080/events`,
but don't forget to ignore that change on commit!
5) To run local development with hot reloads:
[source,bash]
----
$ ./selenoid-ui -allowed-origin="*"
$ yarn --cwd ui start
----
NOTE: For some reason development server can't proxy SSE properly and thus realtime updates can get stuck.
As a workaround you can temporarily change the path in the `Viewport` container from `/events` to `http://localhost:8080/events`.
=== Documentation
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"react-transition-group": "^4.4.1",
"rxjs": "^6.6.3",
"rxjs-compat": "^6.6.3",
"rxjs-hooks": "^0.6.2",
"rxjs-hooks": "^0.5.2",
"styled-components": "^5.2.0",
"xterm": "^4.9.0",
"xterm-addon-fit": "^0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/Log/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class Log extends Component {
.pipe(
debounceTime(100),
startWith({}),
tap(() => this.term.fit())
tap(() => this.fitAddon.fit())
)
.subscribe();

Expand Down
8 changes: 4 additions & 4 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10828,10 +10828,10 @@ rxjs-compat@^6.6.3:
resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.6.3.tgz#141405fcee11f48718d428b99c8f01826f594e5c"
integrity sha512-y+wUqq7bS2dG+7rH2fNMoxsDiJ32RQzFxZQE/JdtpnmEZmwLQrb1tCiItyHxdXJHXjmHnnzFscn3b6PEmORGKw==

rxjs-hooks@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rxjs-hooks/-/rxjs-hooks-0.6.2.tgz#08428ea10739a8da50a9b45724faf7f81156e4cf"
integrity sha512-oFyjJhhZ4D8bWVNT36J9iCr7p+qVCO7Y6T3XzypXqJf2qxCuURJaCAmARy0mAKbckNQv/0R78mhQxfTcGgECjQ==
rxjs-hooks@^0.5.2:
version "0.5.2"
resolved "https://registry.yarnpkg.com/rxjs-hooks/-/rxjs-hooks-0.5.2.tgz#2b4f287d8d0c2b108e7a6f4eee628528c1d974f6"
integrity sha512-sm2FMw1CbcYM7x4CRQ9OLiDtwpgQaiG8owURC2rB/iw7txpGSMU3BN25/wm19cMctezZsTM2EeH7jiyBqSfuSw==
dependencies:
tslib "^1.10.0"
use-constant "^1.0.0"
Expand Down

0 comments on commit 2364364

Please sign in to comment.