Skip to content

Commit

Permalink
Merge the develop branch to the master branch, preparation to v2.3.0-rc0
Browse files Browse the repository at this point in the history
  • Loading branch information
akolotov authored Jul 6, 2020
2 parents d512b98 + caf2e2b commit ffd88f6
Show file tree
Hide file tree
Showing 77 changed files with 5,639 additions and 566 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ submodules
coverage
lib
dist
build
10 changes: 10 additions & 0 deletions alm/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ COMMON_FOREIGN_BRIDGE_ADDRESS=0xFe446bEF1DbF7AFE24E81e05BC8B271C1BA9a560

COMMON_HOME_RPC_URL=https://sokol.poa.network
COMMON_FOREIGN_RPC_URL=https://kovan.infura.io/v3/

ALM_HOME_NETWORK_NAME=Sokol Testnet
ALM_FOREIGN_NETWORK_NAME=Kovan Testnet

ALM_HOME_EXPLORER_TX_TEMPLATE=https://blockscout.com/poa/sokol/tx/%s
ALM_FOREIGN_EXPLORER_TX_TEMPLATE=https://blockscout.com/eth/kovan/tx/%s

ALM_HOME_EXPLORER_API=https://blockscout.com/poa/sokol/api
ALM_FOREIGN_EXPLORER_API=https://kovan.etherscan.io/api?apikey=YourApiKeyToken
PORT=8080
12 changes: 9 additions & 3 deletions alm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12
FROM node:12 as alm-builder

WORKDIR /mono
COPY package.json .
Expand All @@ -19,5 +19,11 @@ ARG DOT_ENV_PATH=./alm/.env
COPY ${DOT_ENV_PATH} ./alm/.env

WORKDIR /mono/alm
CMD echo "To start the application run:" \
"yarn start"
RUN yarn run build


FROM node:12 as alm-production
RUN yarn global add serve
WORKDIR /app
COPY --from=alm-builder /mono/alm/build .
CMD serve -p $PORT -s .
4 changes: 3 additions & 1 deletion alm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ services:
build:
context: ..
dockerfile: alm/Dockerfile
ports:
- "${PORT}:${PORT}"
env_file: ./.env
environment:
- NODE_ENV=production
restart: unless-stopped
entrypoint: yarn start
entrypoint: serve -p ${PORT} -s .
14 changes: 13 additions & 1 deletion alm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,31 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@react-hook/window-size": "^3.0.6",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@types/jest": "^24.0.0",
"@types/node": "^12.0.0",
"@types/promise-retry": "^1.1.3",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@types/react-router-dom": "^5.1.5",
"@types/styled-components": "^5.1.0",
"@use-it/interval": "^0.1.3",
"customize-cra": "^1.0.0",
"date-fns": "^2.14.0",
"fast-memoize": "^2.5.2",
"promise-retry": "^2.0.1",
"react": "^16.13.1",
"react-app-rewired": "^2.1.6",
"react-dom": "^16.13.1",
"react-router-dom": "^5.2.0",
"react-scripts": "3.0.1",
"typescript": "^3.5.2"
"styled-components": "^5.1.1",
"typescript": "^3.5.2",
"web3": "1.2.7",
"web3-eth-contract": "1.2.7"
},
"scripts": {
"start": "./load-env.sh react-app-rewired start",
Expand Down
6 changes: 4 additions & 2 deletions alm/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
content="AMB Live Monitoring"
/>
<link rel="stylesheet" href="https://unpkg.com/chota@latest">
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand All @@ -24,7 +25,8 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,700" rel="stylesheet">
<title>AMB Live Monitoring</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file removed alm/public/logo192.png
Binary file not shown.
Binary file removed alm/public/logo512.png
Binary file not shown.
14 changes: 2 additions & 12 deletions alm/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "ALM",
"name": "AMB Live Monitoring",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
Expand Down
14 changes: 0 additions & 14 deletions alm/src/App.css

This file was deleted.

6 changes: 1 addition & 5 deletions alm/src/App.test.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import React from 'react'
import { render } from '@testing-library/react'
import App from './App'

test('renders learn react link', () => {
const { getByText } = render(<App />)
const linkElement = getByText(/AMB Live Monitoring/i)
expect(linkElement).toBeInTheDocument()
// Removed basic test from setup. Keeping this so CI passes until we add unit tests.
})
14 changes: 8 additions & 6 deletions alm/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React from 'react'
import './App.css'
import { BrowserRouter } from 'react-router-dom'
import { MainPage } from './components/MainPage'
import { StateProvider } from './state/StateProvider'

function App() {
return (
<div className="App">
<header className="App-header">
<p>AMB Live Monitoring</p>
</header>
</div>
<BrowserRouter>
<StateProvider>
<MainPage />
</StateProvider>
</BrowserRouter>
)
}

Expand Down
Loading

0 comments on commit ffd88f6

Please sign in to comment.