-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vijay Kumar
committed
Mar 10, 2021
0 parents
commit fde554f
Showing
50 changed files
with
26,301 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NODE_PATH=./src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 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* | ||
|
||
# VS Code | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM node:12.16.0-alpine AS builder | ||
|
||
WORKDIR /opt/iso-sim-ui | ||
ENV PATH /opt/iso-sim-ui/node_modules/.bin:$PATH | ||
|
||
RUN apk add --no-cache -t build-dependencies git make gcc g++ python libtool autoconf automake \ | ||
&& cd $(npm root -g)/npm \ | ||
&& npm config set unsafe-perm true \ | ||
&& npm install -g node-gyp | ||
|
||
COPY package.json package-lock.json* /opt/iso-sim-ui/ | ||
RUN npm install --silent | ||
#RUN npm install [email protected] -g --silent | ||
|
||
COPY src /opt/iso-sim-ui/src | ||
COPY public /opt/iso-sim-ui/public | ||
RUN npm run build | ||
|
||
FROM nginx:1.16.0-alpine | ||
|
||
WORKDIR /usr/share/nginx/html | ||
|
||
COPY --from=builder /opt/iso-sim-ui/build /usr/share/nginx/html | ||
RUN rm /etc/nginx/conf.d/default.conf /etc/nginx/nginx.conf | ||
COPY nginx/nginx.conf /etc/nginx/nginx.conf | ||
COPY nginx/start.sh /usr/share/nginx/start.sh | ||
|
||
EXPOSE 6060 | ||
CMD ["sh", "/usr/share/nginx/start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Creative Tim | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# LICENSE | ||
|
||
Copyright © 2017 Bill & Melinda Gates Foundation | ||
|
||
The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 | ||
(the "License") and you may not use these files except in compliance with the [License](http://www.apache.org/licenses/LICENSE-2.0). You may obtain a copy of the License at | ||
|
||
[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) | ||
|
||
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the [License](http://www.apache.org/licenses/LICENSE-2.0). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# ISO UI simulator | ||
|
||
## 1. Running | ||
|
||
The following software should be installed on your system to run the toolkit. | ||
|
||
* Git | ||
* Docker | ||
|
||
Please execute the following lines to build and run the application. | ||
|
||
```bash | ||
git clone https://github.com/vijayg10/iso-sim-ui | ||
cd ml-testing-toolkit-ui | ||
docker-compose up | ||
``` | ||
|
||
To update the testing-toolkit-ui to the latest version and rebuild, please run the following | ||
```bash | ||
cd iso-sim-ui | ||
git pull | ||
docker-compose build | ||
docker-compose up | ||
``` | ||
|
||
## 2. Ports | ||
|
||
You can get the web interface on http://localhost:7070/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"decisions": { | ||
"1589|electron>@electron/get>global-tunnel-ng>npm-conf>config-chain>ini": { | ||
"decision": "postpone", | ||
"madeAt": 1612460138627 | ||
}, | ||
"1589|react-scripts>react-dev-utils>global-modules>global-prefix>ini": { | ||
"decision": "postpone", | ||
"madeAt": 1612460138627 | ||
}, | ||
"1594|axios": { | ||
"decision": "postpone", | ||
"madeAt": 1612460139290 | ||
}, | ||
"1603|react-scripts>react-dev-utils>immer": { | ||
"decision": "postpone", | ||
"madeAt": 1615217321199 | ||
}, | ||
"1615|electron": { | ||
"decision": "postpone", | ||
"madeAt": 1615217321760 | ||
}, | ||
"1638|redoc>prismjs": { | ||
"decision": "postpone", | ||
"madeAt": 1615217322361 | ||
} | ||
}, | ||
"rules": {}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: "3.7" | ||
|
||
services: | ||
iso-sim-ui: | ||
image: iso-sim-ui:local | ||
build: | ||
context: . | ||
ports: | ||
- "7070:6060" | ||
environment: | ||
- TTK_API_BASE_URL=http://localhost:5050 | ||
command: | ||
- sh | ||
- /usr/share/nginx/start.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# auto detects a good number of processes to run | ||
worker_processes auto; | ||
|
||
#Provides the configuration file context in which the directives that affect connection processing are specified. | ||
events { | ||
# Sets the maximum number of simultaneous connections that can be opened by a worker process. | ||
worker_connections 8000; | ||
# Tells the worker to accept multiple connections at a time | ||
multi_accept on; | ||
} | ||
|
||
|
||
http { | ||
# what times to include | ||
include /etc/nginx/mime.types; | ||
# what is the default one | ||
default_type application/octet-stream; | ||
|
||
# Sets the path, format, and configuration for a buffered log write | ||
log_format compression '$remote_addr - $remote_user [$time_local] ' | ||
'"$request" $status $upstream_addr ' | ||
'"$http_referer" "$http_user_agent"'; | ||
|
||
server { | ||
# listen on port 6060 | ||
listen 6060; | ||
|
||
gzip on; | ||
gzip_types text/plain application/xml text/css application/javascript; | ||
gzip_proxied no-cache no-store private expired auth; | ||
gzip_min_length 1000; | ||
|
||
# where the root here | ||
root /usr/share/nginx/html; | ||
# what file to server as index | ||
index index.html index.htm; | ||
|
||
location / { | ||
# First attempt to serve request as file, then | ||
# as directory, then fall back to redirecting to index.html | ||
try_files $uri $uri/ /index.html; | ||
} | ||
|
||
# Media: images, icons, video, audio, HTC | ||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { | ||
expires 1M; | ||
access_log off; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
# Javascript and CSS files | ||
location ~* \.(?:css|js)$ { | ||
try_files $uri =404; | ||
expires 1y; | ||
access_log off; | ||
add_header Cache-Control "public"; | ||
} | ||
|
||
# Any route containing a file extension (e.g. /devicesfile.js) | ||
location ~ ^.+\..+$ { | ||
try_files $uri =404; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if [[ ! -z "${TTK_API_BASE_URL}" ]]; then | ||
find /usr/share/nginx/html -type f -name "*.*" -exec sed -i -e "s|TTK_API_BASE_URL|$TTK_API_BASE_URL|g" {} \; | ||
fi | ||
nginx -g "daemon off;" |
Oops, something went wrong.