-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #486 from ooni/use-get-measurement
Refactored measurement page using refactored API
- Loading branch information
Showing
11 changed files
with
416 additions
and
111 deletions.
There are no files selected for viewing
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
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
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
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 @@ | ||
/* global process */ | ||
import React from 'react' | ||
import NavBar from '../NavBar' | ||
import { Container, Flex, Box, Heading, Text } from 'ooni-components' | ||
import { useRouter } from 'next/router' | ||
|
||
import OONI404 from '../../static/images/OONI_404.svg' | ||
|
||
const MeasurementNotFound = () => { | ||
const { asPath } = useRouter() | ||
return ( | ||
<React.Fragment> | ||
<NavBar /> | ||
<Container> | ||
<Flex justifyContent='space-around' alignItems='center' my={5}> | ||
<OONI404 height='200px' /> | ||
<Box width={1/2}> | ||
<Heading h={4}>Measurement Not Found</Heading> | ||
<Text color='gray8'> | ||
{`${process.env.EXPLORER_URL}${asPath}`} | ||
</Text> | ||
</Box> | ||
</Flex> | ||
</Container> | ||
</React.Fragment> | ||
) | ||
} | ||
|
||
export default MeasurementNotFound |
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
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
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
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ module.exports = withSourceMaps(withCSS({ | |
webpack: (config, {isServer}) => { | ||
config.plugins.push( | ||
new webpack.DefinePlugin({ | ||
'process.env.MEASUREMENTS_URL': JSON.stringify(process.env.MEASUREMENTS_URL || 'https://api.ooni.io'), | ||
'process.env.MEASUREMENTS_URL': JSON.stringify(process.env.MEASUREMENTS_URL || 'https://ams-pg.ooni.org'), | ||
'process.env.EXPLORER_URL': JSON.stringify(process.env.EXPLORER_URL || 'http://127.0.0.1:' + process.env.PORT), | ||
'process.env.SENTRY_DSN': JSON.stringify(process.env.SENTRY_DSN || 'https://[email protected]/1427510'), | ||
}) | ||
|
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 |
---|---|---|
|
@@ -74,15 +74,15 @@ | |
"start-server-and-test": "^1.10.8" | ||
}, | ||
"scripts": { | ||
"dev": "NODE_ENV=development MEASUREMENTS_URL=http://api.ooni.io SENTRY_DSN=https://[email protected]/1427510 node index.js", | ||
"dev": "NODE_ENV=development MEASUREMENTS_URL=https://ams-pg.ooni.org SENTRY_DSN=https://[email protected]/1427510 node index.js", | ||
"build-translations": "node ./scripts/build-translations.js", | ||
"extract-i18n-keys": "yarn build && node ./scripts/extract-react-intl-keys.js", | ||
"build": "next build", | ||
"export": "next export", | ||
"lint": "eslint --ignore-path .gitignore --ignore-pattern components/vendor .", | ||
"test:e2e": "start-server-and-test dev http://localhost:3100 cypress:run", | ||
"test:e2e": "yarn build && start-server-and-test start http://localhost:3100 cypress:run", | ||
"cypress:run": "cypress run", | ||
"test": "echo nothing interesting", | ||
"start": "node index.js" | ||
"start": "MEASUREMENTS_URL=https://ams-pg.ooni.org node index.js" | ||
} | ||
} |
Oops, something went wrong.