Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ReactJS Web UI to extend the current UI #312

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7d6153a
Created a react project to have proxy for development and to add a se…
Sep 17, 2019
4b96b07
Fixed version of react-scripts and typescript.
Oct 8, 2019
d8d64ff
Proxy configuration for development.
Oct 11, 2019
8655dad
Now, you can select the Wall to display on.
Oct 14, 2019
681bde5
Automativ list of all available walls.
Oct 29, 2019
29ed2c4
Added redux to deal with walls status. Fix the problem of too narrow …
Oct 30, 2019
e64a53c
Get rid of too many console outputs.
Oct 30, 2019
e3918b7
Added a question mark in TV when the power status of a wall is undefi…
Oct 30, 2019
b197385
lock and unlock SVG are now material design ones.
Oct 30, 2019
6ae74ea
Fixed bug when no URL argument were passed. Provide a fallback for wh…
Dec 2, 2019
0fa72ab
fix: walls selection won't close with ESC key nor by clicking outside
Dec 2, 2019
9a36461
feat: new way of getting walls status by avoiding kibana
Dec 3, 2019
5046d72
fix: undefined walls were actually OFF
Dec 4, 2019
d46413e
fix: reduced wall pooling from 1sec to 3sec
Dec 4, 2019
445f7bf
cleanup: removed useless console
Dec 4, 2019
b0258d6
fix: more log removals and no more init() if no wall has been selected
Dec 4, 2019
76e3a9f
refactor: moved backend/ to development_scripts/
Dec 4, 2019
5f0a867
fix: default state for screen status is now undefined and not off
Dec 9, 2019
531e5c4
fix: when displaying list of walls, the query now starts immediatly
Dec 9, 2019
5bf68ff
fix: blue glowing instead of yellow
Dec 9, 2019
516fe2a
fix: homepage=.
Dec 11, 2019
cd0f4b6
fix: unable to save a session with a new name
Feb 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ build/
Deflect/
Rockets/
VirtualKeyboard/
Build/
23 changes: 23 additions & 0 deletions apps/ReactWebUI/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions apps/ReactWebUI/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tide web interface
7 changes: 7 additions & 0 deletions apps/ReactWebUI/config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const rewireYAML = require( 'react-app-rewire-yaml' );

module.exports = function override( config, env ) {
// Allow YAML import at compile time.
config = rewireYAML( config, env );
return config;
}
14 changes: 14 additions & 0 deletions apps/ReactWebUI/development_scripts/DEV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Tide web interface

## Starting Tide server in development environment

```
npm run tide
```

This will spawn a local Tide server which mimic the real wall in level 0.
It will listen on port 8890.

The tide web UI is intended to be connected on 3 possible walls: 0 (local), 5 (real 5th floor) and 6 (Open Deck).

There is a proxy configuration in file `src/setupProxy.js` that makes the DEV environment to be like the PROD one.
33 changes: 33 additions & 0 deletions apps/ReactWebUI/development_scripts/start.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
const Path = require('path')
const exec = require("child_process").exec

const cwd = process.cwd()
const pos = cwd.indexOf('/Tide/')
const root = Path.resolve(cwd.substr(0, pos))
const tidePath = Path.join(root, 'Tide/Build/bin/tide')
const configPath = Path.join(root, 'Tide/apps/ReactWebUI/development_scripts')

console.info("tidePath=", tidePath)
console.info("configPath=", configPath)
console.log("")

console.log("Starting fake Tide servers...")
console.log("+-------+------+")
console.log("| Level | Port |")
console.log("+-------+------+")
const levels = [0/*, 5, 6*/]
levels.forEach( level => {
console.log(`| ${level} | 889${level} |`)
const cmd = `"${tidePath}" --config "${configPath}/wall-${level}.json"`
exec(cmd, (err, stdout, stderr) => {
if (err) {
console.error('')
console.error(`### Failure on level ${level}!`)
console.error('>>>', cmd)
console.error(err)
}
})
})
console.log("| 5 | | 5th floor")
console.log("| 6 | | Open Deck")
console.log("+-------+------+")
34 changes: 34 additions & 0 deletions apps/ReactWebUI/development_scripts/wall-0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"folders": {
"contents": "/nfs4/bbp.epfl.ch/media/DisplayWall",
"sessions": "/nfs4/bbp.epfl.ch/media/DisplayWall/sessions",
"upload": "/nfs4/bbp.epfl.ch/media/DisplayWall/sessionFiles"
},

"background": {
"color": "#000000"
},
"master": {
"display": ":0",
"host": "localhost",
"webservicePort": 8890
},
"processes": [
{
"host": "localhost",
"screens": [
{
"display": ":0",
"y": 50
}
]
}
],
"surfaces": [
{
"displayHeight": 1600,
"displayWidth": 1200,
"screenCountY": 1
}
]
}
34 changes: 34 additions & 0 deletions apps/ReactWebUI/development_scripts/wall-5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"folders": {
"contents": "/nfs4/bbp.epfl.ch/media/DisplayWall",
"sessions": "/nfs4/bbp.epfl.ch/media/DisplayWall/sessions",
"upload": "/nfs4/bbp.epfl.ch/media/DisplayWall/sessionFiles"
},

"background": {
"color": "#333333"
},
"master": {
"display": ":0",
"host": "localhost",
"webservicePort": 8895
},
"processes": [
{
"host": "localhost",
"screens": [
{
"display": ":0",
"y": 50
}
]
}
],
"surfaces": [
{
"displayHeight": 1920,
"displayWidth": 1080,
"screenCountY": 1
}
]
}
34 changes: 34 additions & 0 deletions apps/ReactWebUI/development_scripts/wall-6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"folders": {
"contents": "/nfs4/bbp.epfl.ch/media/DisplayWall",
"sessions": "/nfs4/bbp.epfl.ch/media/DisplayWall/sessions",
"upload": "/nfs4/bbp.epfl.ch/media/DisplayWall/sessionFiles"
},

"background": {
"color": "#666666"
},
"master": {
"display": ":0",
"host": "localhost",
"webservicePort": 8896
},
"processes": [
{
"host": "localhost",
"screens": [
{
"display": ":0",
"y": 50
}
]
}
],
"surfaces": [
{
"displayHeight": 2160,
"displayWidth": 3840,
"screenCountY": 1
}
]
}
Loading