mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Merge branch 'master' into datepicker
This commit is contained in:
commit
b810c7ab32
@ -15,33 +15,11 @@ WORKDIR /app/frontend
|
||||
|
||||
RUN npm install -g npm serve
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
# Default ENV values
|
||||
# src/config/config.ts
|
||||
ENV SERVICE_SCHEME='http'
|
||||
ENV SERVICE_HOST='localhost'
|
||||
ENV SERVICE_PORT='4000'
|
||||
ENV NODE_SCHEME='http'
|
||||
ENV NODE_HOST='localhost'
|
||||
ENV NODE_PORT='8545'
|
||||
ENV AQUARIUS_SCHEME='http'
|
||||
ENV AQUARIUS_HOST='localhost'
|
||||
ENV AQUARIUS_PORT='5000'
|
||||
ENV BRIZO_SCHEME='http'
|
||||
ENV BRIZO_HOST='localhost'
|
||||
ENV BRIZO_PORT='8030'
|
||||
ENV BRIZO_ADDRESS='0x00bd138abd70e2f00903268f3db08f2d25677c9e'
|
||||
ENV PARITY_SCHEME='http'
|
||||
ENV PARITY_HOST='localhost'
|
||||
ENV PARITY_PORT='8545'
|
||||
ENV SECRET_STORE_SCHEME='http'
|
||||
ENV SECRET_STORE_HOST='localhost'
|
||||
ENV SECRET_STORE_PORT='12001'
|
||||
ENV FAUCET_SCHEME='http'
|
||||
ENV FAUCET_HOST='localhost'
|
||||
ENV FAUCET_PORT='3001'
|
||||
|
||||
ENV LISTEN_ADDRESS='0.0.0.0'
|
||||
ENV LISTEN_PORT='3000'
|
||||
|
||||
ENTRYPOINT ["/app/frontend/scripts/docker-entrypoint.sh"]
|
||||
|
||||
|
@ -1,37 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
SERVICE_SCHEME=${SERVICE_SCHEME:-http}
|
||||
SERVICE_HOST=${SERVICE_HOST:-localhost}
|
||||
SERVICE_PORT=${SERVICE_PORT:-8545}
|
||||
|
||||
NODE_SCHEME=${NODE_SCHEME:-http}
|
||||
NODE_HOST=${NODE_HOST:-localhost}
|
||||
NODE_PORT=${NODE_PORT:-8545}
|
||||
AQUARIUS_SCHEME=${AQUARIUS_SCHEME:-http}
|
||||
AQUARIUS_HOST=${AQUARIUS_HOST:-localhost}
|
||||
AQUARIUS_PORT=${AQUARIUS_PORT:-5000}
|
||||
BRIZO_SCHEME=${BRIZO_SCHEME:-http}
|
||||
BRIZO_HOST=${BRIZO_HOST:-localhost}
|
||||
BRIZO_PORT=${BRIZO_PORT:-8030}
|
||||
BRIZO_PASSWORD=${BRIZO_PASSWORD:-0x00bd138abd70e2f00903268f3db08f2d25677c9e}
|
||||
PARITY_SCHEME=${PARITY_SCHEME:-http}
|
||||
PARITY_HOST=${PARITY_HOST:-localhost}
|
||||
PARITY_PORT=${PARITY_PORT:-8545}
|
||||
SECRET_STORE_SCHEME=${SECRET_STORE_SCHEME:-http}
|
||||
SECRET_STORE_HOST=${SECRET_STORE_HOST:-localhost}
|
||||
SECRET_STORE_PORT=${SECRET_STORE_PORT:-12001}
|
||||
|
||||
FAUCET_SCHEME=${FAUCET_SCHEME:-http}
|
||||
FAUCET_HOST=${FAUCET_HOST:-localhost}
|
||||
FAUCET_PORT=${FAUCET_PORT:-443}
|
||||
|
||||
envsubst < /app/frontend/src/config/config.ts.template > /app/frontend/src/config/config.ts
|
||||
if [ "${LOCAL_CONTRACTS}" = "true" ]; then
|
||||
echo "Waiting for contracts to be generated..."
|
||||
while [ ! -f "/app/frontend/node_modules/@oceanprotocol/keeper-contracts/artifacts/ready" ]; do
|
||||
sleep 2
|
||||
done
|
||||
fi
|
||||
echo "Starting Commons..."
|
||||
npm run build
|
||||
echo "Starting Commons..."
|
||||
serve -l tcp://"${LISTEN_ADDRESS}":"${LISTEN_PORT}" -s /app/frontend/build/
|
||||
|
@ -5,5 +5,5 @@
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
margin-bottom: $spacer / $line-height;
|
||||
background-color: $brand-grey-lighter;
|
||||
background-color: $body-background;
|
||||
}
|
||||
|
@ -33,75 +33,108 @@ import theology from '../../img/categories/theology.jpg'
|
||||
import transport from '../../img/categories/transport.jpg'
|
||||
import urbanplanning from '../../img/categories/urbanplanning.jpg'
|
||||
import visualart from '../../img/categories/visualart.jpg'
|
||||
import fallback from '@oceanprotocol/art/jellyfish/jellyfish-back.svg'
|
||||
|
||||
const categoryImageFile = (category: string) => {
|
||||
switch (category) {
|
||||
case 'Agriculture & Bio Engineering':
|
||||
case 'agriculture':
|
||||
return agriculture
|
||||
case 'Anthropology & Archeology':
|
||||
case 'anthroarche':
|
||||
return anthroarche
|
||||
case 'Space & Astronomy':
|
||||
case 'astronomy':
|
||||
return astronomy
|
||||
case 'Biology':
|
||||
case 'biology':
|
||||
return biology
|
||||
case 'Business & Management':
|
||||
case 'business':
|
||||
return business
|
||||
case 'Chemistry':
|
||||
case 'chemistry':
|
||||
return chemistry
|
||||
case 'Communication & Journalism':
|
||||
case 'communication':
|
||||
return communication
|
||||
case 'Computer Technology':
|
||||
case 'computer':
|
||||
return computer
|
||||
case 'Dataset Of Datasets':
|
||||
case 'dataofdata':
|
||||
return dataofdata
|
||||
case 'Deep Learning':
|
||||
case 'deeplearning':
|
||||
return deeplearning
|
||||
case 'Demography':
|
||||
case 'demographics':
|
||||
return demographics
|
||||
case 'Earth & Climate':
|
||||
case 'earth':
|
||||
return earth
|
||||
case 'Economics & Finance':
|
||||
case 'economics-and-finance':
|
||||
return economics
|
||||
case 'Engineering':
|
||||
case 'engineering':
|
||||
return engineering
|
||||
case 'History':
|
||||
case 'history':
|
||||
return history
|
||||
case 'Image Recognition':
|
||||
case 'imagesets':
|
||||
return imagesets
|
||||
case 'Language':
|
||||
case 'language':
|
||||
return language
|
||||
case 'Law':
|
||||
case 'law':
|
||||
return law
|
||||
case 'Mathematics':
|
||||
case 'mathematics':
|
||||
return mathematics
|
||||
case 'Medicine':
|
||||
case 'medicine':
|
||||
return medicine
|
||||
case 'Other':
|
||||
case 'other':
|
||||
return other
|
||||
case 'Performing Arts':
|
||||
case 'performingarts':
|
||||
return performingarts
|
||||
case 'Philosophy':
|
||||
case 'philosophy':
|
||||
return philosophy
|
||||
case 'Physics & Energy':
|
||||
case 'physics':
|
||||
return physics
|
||||
case 'Politics':
|
||||
case 'politics':
|
||||
return politics
|
||||
case 'Psychology':
|
||||
case 'psychology':
|
||||
return psychology
|
||||
case 'Sociology':
|
||||
case 'sociology':
|
||||
return sociology
|
||||
case 'Sports & Recreation':
|
||||
case 'sports':
|
||||
return sports
|
||||
case 'Theology':
|
||||
case 'theology':
|
||||
return theology
|
||||
case 'Transportation':
|
||||
case 'transport':
|
||||
return transport
|
||||
case 'Urban Plannin':
|
||||
case 'urbanplanning':
|
||||
return urbanplanning
|
||||
case 'Visual Arts & Design':
|
||||
case 'visualart':
|
||||
return visualart
|
||||
default:
|
||||
break
|
||||
return fallback
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,12 +105,7 @@ export default class Input extends PureComponent<InputProps, InputState> {
|
||||
options
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
.map((option: string, index: number) => (
|
||||
<option
|
||||
key={index}
|
||||
value={slugify(option, {
|
||||
lower: true
|
||||
})}
|
||||
>
|
||||
<option key={index} value={option}>
|
||||
{option}
|
||||
</option>
|
||||
))}
|
||||
|
@ -1,37 +1,37 @@
|
||||
//
|
||||
// commons-server connection
|
||||
//
|
||||
export const serviceScheme = 'http'
|
||||
export const serviceHost = 'localhost'
|
||||
export const servicePort = 4000
|
||||
export const serviceScheme = process.env.REACT_APP_SERVICE_SCHEME || 'http'
|
||||
export const serviceHost = process.env.REACT_APP_SERVICE_HOST || 'localhost'
|
||||
export const servicePort = process.env.REACT_APP_SERVICE_PORT || 4000
|
||||
|
||||
//
|
||||
// OCEAN REMOTE CONNECTIONS
|
||||
//
|
||||
export const nodeScheme = 'https'
|
||||
export const nodeHost = 'nile.dev-ocean.com'
|
||||
export const nodePort = 443
|
||||
export const nodeScheme = process.env.REACT_APP_NODE_SCHEME || 'https'
|
||||
export const nodeHost = process.env.REACT_APP_NODE_HOST || 'nile.dev-ocean.com'
|
||||
export const nodePort = process.env.REACT_APP_NODE_PORT || 443
|
||||
|
||||
export const aquariusScheme = 'https'
|
||||
export const aquariusHost = 'nginx-aquarius.dev-ocean.com'
|
||||
export const aquariusPort = 443
|
||||
export const aquariusScheme = process.env.REACT_APP_AQUARIUS_SCHEME || 'https'
|
||||
export const aquariusHost = process.env.REACT_APP_AQUARIUS_HOST || 'nginx-aquarius.dev-ocean.com'
|
||||
export const aquariusPort = process.env.REACT_APP_AQUARIUS_PORT || 443
|
||||
|
||||
export const brizoScheme = 'https'
|
||||
export const brizoHost = 'nginx-brizo.dev-ocean.com'
|
||||
export const brizoPort = 443
|
||||
export const brizoAddress = '0x376817c638d2a04f475a73af37f7b51a2862d567'
|
||||
export const brizoScheme = process.env.REACT_APP_BRIZO_SCHEME || 'https'
|
||||
export const brizoHost = process.env.REACT_APP_BRIZO_HOST || 'nginx-brizo.dev-ocean.com'
|
||||
export const brizoPort = process.env.REACT_APP_BRIZO_PORT || 443
|
||||
export const brizoAddress = process.env.REACT_APP_BRIZO_ADDRESS || '0x376817c638d2a04f475a73af37f7b51a2862d567'
|
||||
|
||||
export const parityScheme = 'https'
|
||||
export const parityHost = 'nile.dev-ocean.com'
|
||||
export const parityPort = 443
|
||||
export const parityScheme = process.env.REACT_APP_PARITY_SCHEME || 'https'
|
||||
export const parityHost = process.env.REACT_APP_PARITY_HOST || 'nile.dev-ocean.com'
|
||||
export const parityPort = process.env.REACT_APP_PARITY_PORT || 443
|
||||
|
||||
export const secretStoreScheme = 'https'
|
||||
export const secretStoreHost = 'secret-store.dev-ocean.com'
|
||||
export const secretStorePort = 443
|
||||
export const secretStoreScheme = process.env.REACT_APP_SECRET_STORE_SCHEME || 'https'
|
||||
export const secretStoreHost = process.env.REACT_APP_SECRET_STORE_HOST || 'secret-store.dev-ocean.com'
|
||||
export const secretStorePort = process.env.REACT_APP_SECRET_STORE_PORT || 443
|
||||
|
||||
export const faucetScheme = 'https'
|
||||
export const faucetHost = 'faucet.nile.dev-ocean.com'
|
||||
export const faucetPort = 443
|
||||
export const faucetScheme = process.env.REACT_APP_FAUCET_SCHEME || 'https'
|
||||
export const faucetHost = process.env.REACT_APP_FAUCET_HOST || 'faucet.nile.dev-ocean.com'
|
||||
export const faucetPort = process.env.REACT_APP_FAUCET_PORT || 443
|
||||
|
||||
//
|
||||
// OCEAN LOCAL CONNECTIONS
|
||||
@ -65,3 +65,4 @@ export const faucetPort = 443
|
||||
// export const faucetPort = 3001
|
||||
|
||||
export const verbose = true
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
//
|
||||
// commons-server connection
|
||||
//
|
||||
export const serviceScheme = '${SERVICE_SCHEME}'
|
||||
export const serviceHost = '${SERVICE_HOST}'
|
||||
export const servicePort = '${SERVICE_PORT}'
|
||||
|
||||
//
|
||||
// OCEAN REMOTE CONNECTIONS
|
||||
//
|
||||
export const nodeScheme = '${NODE_SCHEME}'
|
||||
export const nodeHost = '${NODE_HOST}'
|
||||
export const nodePort = '${NODE_PORT}'
|
||||
|
||||
export const aquariusScheme = '${AQUARIUS_SCHEME}'
|
||||
export const aquariusHost = '${AQUARIUS_HOST}'
|
||||
export const aquariusPort = '${AQUARIUS_PORT}'
|
||||
|
||||
export const brizoScheme = '${BRIZO_SCHEME}'
|
||||
export const brizoHost = '${BRIZO_HOST}'
|
||||
export const brizoPort = '${BRIZO_ADDRESS}'
|
||||
export const brizoAddress = '${BRIZO_ADDRESS}'
|
||||
|
||||
export const parityScheme = '${PARITY_SCHEME}'
|
||||
export const parityHost = '${PARITY_HOST}'
|
||||
export const parityPort = '${PARITY_PORT}'
|
||||
|
||||
export const secretStoreScheme = '${SECRET_STORE_SCHEME}'
|
||||
export const secretStoreHost = '${SECRET_STORE_HOST}'
|
||||
export const secretStorePort = '${SECRET_STORE_PORT}'
|
||||
|
||||
export const faucetScheme = '${FAUCET_SCHEME}'
|
||||
export const faucetHost = '${FAUCET_HOST}'
|
||||
export const faucetPort = '${FAUCET_PORT}'
|
||||
|
||||
export const verbose = true
|
@ -6,14 +6,14 @@
|
||||
"fields": {
|
||||
"name": {
|
||||
"label": "Title",
|
||||
"placeholder": "i.e. Almond sales data",
|
||||
"placeholder": "e.g. Almond sales data",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"help": "Enter a concise title. You will be able to enter a more thorough description in the next step."
|
||||
},
|
||||
"files": {
|
||||
"label": "Files",
|
||||
"placeholder": "i.e. https://file.com/file.json",
|
||||
"placeholder": "e.g. https://file.com/file.json",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"help": "Provide one or multiple urls to your data set files."
|
||||
@ -27,7 +27,7 @@
|
||||
"description": {
|
||||
"label": "Description",
|
||||
"help": "Add a thorough description with as much detail as possible.",
|
||||
"placeholder": "i.e. Almond sales data ",
|
||||
"placeholder": "e.g. Almond sales data ",
|
||||
"type": "textarea",
|
||||
"required": true,
|
||||
"rows": 5
|
||||
@ -68,6 +68,8 @@
|
||||
"Business & Management",
|
||||
"Sports & Recreation",
|
||||
"Communication & Journalism",
|
||||
"Deep Learning",
|
||||
"Law",
|
||||
"Other"
|
||||
]
|
||||
},
|
||||
@ -85,13 +87,13 @@
|
||||
"fields": {
|
||||
"author": {
|
||||
"label": "Author",
|
||||
"placeholder": "i.e. Jelly McJellyfish",
|
||||
"placeholder": "e.g. Jelly McJellyfish",
|
||||
"type": "text",
|
||||
"required": true
|
||||
},
|
||||
"copyrightHolder": {
|
||||
"label": "Copyright Holder",
|
||||
"placeholder": "i.e. Marine Institute of Jellyfish",
|
||||
"placeholder": "e.g. Marine Institute of Jellyfish",
|
||||
"type": "text",
|
||||
"required": true
|
||||
},
|
||||
|
@ -4,20 +4,20 @@
|
||||
"fields": {
|
||||
"name": {
|
||||
"label": "Your name",
|
||||
"placeholder": "i.e. Jelly McJellyfish",
|
||||
"placeholder": "e.g. Jelly McJellyfish",
|
||||
"type": "text",
|
||||
"required": true,
|
||||
"help": "Help me"
|
||||
},
|
||||
"email": {
|
||||
"label": "Your email",
|
||||
"placeholder": "i.e. jelly@mcjellyfish.com",
|
||||
"placeholder": "e.g. jelly@mcjellyfish.com",
|
||||
"type": "email",
|
||||
"required": true
|
||||
},
|
||||
"message": {
|
||||
"label": "Your message",
|
||||
"placeholder": "i.e. jelly@mcjellyfish.com",
|
||||
"placeholder": "e.g. jelly@mcjellyfish.com",
|
||||
"type": "textarea",
|
||||
"required": true
|
||||
},
|
||||
@ -41,7 +41,7 @@
|
||||
},
|
||||
"date": {
|
||||
"label": "Date",
|
||||
"placeholder": "i.e. 2019-08-12",
|
||||
"placeholder": "e.g. 2019-08-12",
|
||||
"type": "date",
|
||||
"required": true
|
||||
}
|
||||
|
@ -30,7 +30,8 @@
|
||||
margin-bottom: $spacer / 2;
|
||||
text-align: left;
|
||||
position: relative;
|
||||
min-height: 100px;
|
||||
height: 8rem;
|
||||
width: 6rem;
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
|
@ -31,7 +31,7 @@ class Home extends Component<HomeProps, HomeState> {
|
||||
type="search"
|
||||
name="search"
|
||||
label="Search for data sets"
|
||||
placeholder="i.e. almond sales data"
|
||||
placeholder="e.g. almond sales data"
|
||||
value={this.state.search}
|
||||
onChange={this.inputChange}
|
||||
group={
|
||||
|
@ -7,10 +7,6 @@
|
||||
max-width: 100%;
|
||||
|
||||
@media (min-width: $break-point--small) {
|
||||
grid-template-columns: 2fr 2fr;
|
||||
}
|
||||
|
||||
@media (min-width: $break-point--medium) {
|
||||
grid-template-columns: 2fr 2fr 2fr;
|
||||
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,4 @@ services:
|
||||
dockerfile: ./Dockerfile
|
||||
ports:
|
||||
- 4000:4000
|
||||
command: npm run start
|
||||
|
||||
|
@ -8,3 +8,6 @@ COPY . .
|
||||
RUN npm install
|
||||
|
||||
RUN npm run build
|
||||
|
||||
ENTRYPOINT ["npm", "run", "start"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user