Skip to content

Commit

Permalink
fix issue with more than 10 sessions (#93)
Browse files Browse the repository at this point in the history
Fixes #91, #92
  • Loading branch information
lanwen authored Dec 3, 2017
1 parent d1497b8 commit 5e09443
Show file tree
Hide file tree
Showing 6 changed files with 280 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"react-router-dom": "next",
"react-select": "1.0.0-rc.4",
"rx": "^4.1.0",
"rx-connect": "^0.6.2",
"rx-connect": "0.7.0",
"rxjs": "^5.4.2",
"xterm": "~2.8.1"
},
Expand Down
4 changes: 4 additions & 0 deletions web/src/containers/Viewport/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ export default class Viewport extends Component {
{href: "/capabilities/", title: "CAPABILITIES", exact: true},
];

/*
// can be checked offline with simple
const {origin, sse, status, state, browsers = {}, sessions = {}} = require("../../../sse-example.json");
*/
const {origin, sse, status, state, browsers = {}, sessions = {}} = this.props;

return (
Expand Down
1 change: 0 additions & 1 deletion web/src/containers/Viewport/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ body {
}

.viewport {
height: 100%;
width: 100%;
display: flex;
flex-wrap: wrap;
Expand Down
4 changes: 0 additions & 4 deletions web/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ import Viewport from "containers/Viewport";

import "static/dripicons.css"

import { rxConnect } from "rx-connect";
import rx5Adapter from "rx-connect/lib/rx5Adapter";
rxConnect.adapter = rx5Adapter;

ReactDOM.render(
<Viewport/>,
document.getElementById('root')
Expand Down
262 changes: 262 additions & 0 deletions web/sse-example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
{
"sse": "ok",
"status": "ok",
"state": {
"total": 5,
"used": 3,
"queued": 0,
"pending": 0,
"browsers": {
"firefox": {
"": {
"unknown": {
"count": 3,
"sessions": [
{
"id": "dcf57935-ba86-4c33-949a-7a6f34b6150f",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
}
},
{
"id": "dcf57935-ba86-4c33-949a-7a6f34b61501",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
{
"id": "dcf57935-ba86-4c33-949a-7a6f34b61503",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
}
]
}
},
"57.0": {}
}
}
},
"origin": "http://localhost:4444",
"browsers": {
"firefox": 3
},
"sessions": {
"dcf57935-ba86-4c33-949a-7a6f34b6150f": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b6150f",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61501": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61501",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61502": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61502",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61503": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61503",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61504": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61504",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61505": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61505",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61506": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61506",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61507": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61507",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61508": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61508",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61509": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61509",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61510": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61510",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61511": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61511",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61512": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61512",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61513": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61513",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
},
"dcf57935-ba86-4c33-949a-7a6f34b61514": {
"id": "dcf57935-ba86-4c33-949a-7a6f34b61514",
"container": "63c12b1d28baedc5ace0b189e40864a4ad7d703bc695be049346c666b20709d9",
"caps": {
"browserName": "firefox",
"version": "",
"screenResolution": "1920x1080x24",
"enableVNC": true,
"name": "com.aerokube.selenoid.DemoTest",
"timeZone": ""
},
"quota": "unknown"
}
},
"errors": []
}
16 changes: 13 additions & 3 deletions web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3145,6 +3145,14 @@ lodash.cond@^4.3.0:
version "4.5.2"
resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5"

lodash.isarray@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-4.0.0.tgz#2aca496b28c4ca6d726715313590c02e6ea34403"

lodash.isobject@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d"

lodash.isplainobject@^4.0.6:
version "4.0.6"
resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
Expand Down Expand Up @@ -4509,10 +4517,12 @@ run-async@^0.1.0:
dependencies:
once "^1.3.0"

rx-connect@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rx-connect/-/rx-connect-0.6.2.tgz#085d3bc25305e3464ee660adab44f646013087b8"
rx-connect@0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/rx-connect/-/rx-connect-0.7.0.tgz#4fbf67f9630b78ebee5338ba80aa0e52b2ce7e24"
dependencies:
lodash.isarray "^4.0.0"
lodash.isobject "^3.0.2"
lodash.isplainobject "^4.0.6"
symbol-observable "^1.0.4"

Expand Down

0 comments on commit 5e09443

Please sign in to comment.