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
Implement skeleton for Test Details Views #44
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ import middlebox from './middleboxes' | |
import performance from './performance' | ||
import websites from './websites' | ||
|
||
import web_connectivity from './websites/WebConnectivity' | ||
|
||
import { | ||
Cross, | ||
Tick | ||
|
@@ -89,6 +91,25 @@ export const testGroups = { | |
} | ||
} | ||
|
||
// Metadata for tests | ||
// Contains: { | ||
// name: Full descriptive name of the test, translated with <FormattedMessage> | ||
//} | ||
export const tests = { | ||
// TODO: (sarathms) Replace each one with their own implementations when ready | ||
web_connectivity, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is syntactic sugar for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's correct. |
||
http_header_field_manipulation: web_connectivity, | ||
http_invalid_request_line: web_connectivity, | ||
telegram: web_connectivity, | ||
whatsapp: web_connectivity, | ||
ndt: web_connectivity, | ||
dash: web_connectivity, | ||
vanilla_tor: web_connectivity, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If your goal is to later replace each of them, please add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added TODO |
||
'default': { | ||
'name': 'Default', | ||
} | ||
} | ||
|
||
export const testList = ['websites', 'im', 'performance', 'middlebox'].map(key => ({ | ||
name: testGroups[key].name, | ||
key: key, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react' | ||
import { FormattedMessage } from 'react-intl' | ||
import { Flex, Box, Text } from 'ooni-components' | ||
|
||
const WebConnectivity = ({measurement, render}) => { | ||
|
||
const WebDetails = () => ( | ||
<Flex justifyContent='center'> | ||
<Box> | ||
<Flex my={6}> | ||
<Box> Web Details </Box> | ||
<Box> </Box> | ||
</Flex> | ||
<Flex my={6}> | ||
<Box> More Details </Box> | ||
<Box> </Box> | ||
</Flex> | ||
<Flex my={6}> | ||
<Box> More Details </Box> | ||
<Box> </Box> | ||
</Flex> | ||
<Flex my={6}> | ||
<Box> More Details </Box> | ||
<Box> </Box> | ||
</Flex> | ||
</Box> | ||
</Flex> | ||
) | ||
|
||
return ( | ||
<div> | ||
{render({ | ||
heroBG: 'green8', // TODO: (sarathms) Determine color based on presence of anomaly | ||
details: <WebDetails /> | ||
})} | ||
</div> | ||
) | ||
} | ||
|
||
export { WebConnectivity } | ||
|
||
// Metadata for the nettest | ||
export default { | ||
name: <FormattedMessage id='Test.WebConnectivity.Fullname' /> | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that more will come later? If so, please add a
// TODO(sarathms): ...
comment to say thatThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added