Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #145 from vania-pooh/master
Browse files Browse the repository at this point in the history
Docs improvements
  • Loading branch information
vania-pooh authored Dec 19, 2017
2 parents bfe3ea0 + 3f02a41 commit 78ebb31
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Ggr is using two types of configuration files:
include::users-file.adoc[leveloffset=+1]
include::quota-files.adoc[leveloffset=+1]
include::quota-reload.adoc[leveloffset=+1]
include::video.adoc[leveloffset=+1]
include::how-it-works.adoc[leveloffset=+1]
include::multiple-instances.adoc[leveloffset=+1]
include::log-files.adoc[leveloffset=+1]
Expand Down
9 changes: 9 additions & 0 deletions docs/log-files.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,26 @@ The following statuses are available:
| Status | Description

| BAD_JSON | User request does not contain valid Selenium data
| BAD_RESPONSE | Upstream server returned data using unknown JSON protocol
| BROWSER_NOT_SET | Browser name is not present or empty string
| CLIENT_DISCONNECTED | User disconnected and doing session attempts was interrupted
| INVALID_HOST_VNC_URL | Failed to parse VNC host URL specified in quota configuration
| INVALID_VNC_REQUEST_URL | VNC request URL do not contain enough information to determine upstream host
| INVALID_VIDEO_REQUEST_URL | Video request URL do not contain enough information to determine upstream host
| INVALID_URL | Session ID does not contain information about host where it was created
| PROXYING_TO_VNC | Starting to proxy VNC traffic
| PROXYING_VIDEO | Starting to proxy video from upstream host
| ROUTE_NOT_FOUND | Trying to proxy session to unknown host. Usually means quota files inconsistency between multiple Ggr instances.
| SESSION_ATTEMPTED | New user request for session arrived
| SESSION_CREATED | A new session was created and returned to user
| SESSION_DELETED | Existing session was deleted by user request
| SESSION_FAILED | Session attempt on specified host failed
| SESSION_NOT_CREATED | Attempts to create a new session on all hosts failed. An error was returned to user.
| SHUTTING_DOWN | Server is shutting down and waiting graceful shutdown timeout for currently proxied requests to finish
| UNKNOWN_VNC_HOST | Requested to proxy VNC to host not present in quota
| UNKNOWN_VIDEO_HOST | Requested to proxy video to host not present in quota
| UNSUPPORTED_BROWSER | Requested browser name and version is not present in quota
| UNSUPPORTED_HOST_VNC_SCHEME | Invalid URL protocol specified for host in quota VNC configuration (should be vnc:// or ws://)
| VNC_CLIENT_DISCONNECTED | Client disconnected from VNC API
| VNC_ERROR | An error occurred when trying to proxy VNC traffic
| VNC_SESSION_CLOSED | Client closed VNC session
Expand Down
13 changes: 13 additions & 0 deletions docs/video.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
== Proxying Session Video

Ggr gives you an ability to view Selenium session videos captured directly from browser screen.

. Video files are expected to be stored on the hub hosts specified in quota files and accessible via the following URL:

http://hub-host.example.com:4444/video/<real-session-id>.mp4

+
This API for example is supported by http://aerokube.com/selenoid/latest[Selenoid].
. To download video file via Ggr just use the same request but with the session ID returned to test:

http://ggr-host.example.com:4444/video/<test-session-id>.mp4
1 change: 1 addition & 0 deletions proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ func video(w http.ResponseWriter, r *http.Request) {
r.URL.Scheme = "http"
r.URL.Host = h.net()
r.URL.Path = fmt.Sprintf("/video/%s.mp4", sessionId)
log.Printf("[PROXYING_VIDEO] [%s] [%s]\n", sessionId, r.URL)
}}).ServeHTTP(w, r)
} else {
log.Printf("[UNKNOWN_VIDEO_HOST] [%s]\n", sum)
Expand Down

0 comments on commit 78ebb31

Please sign in to comment.