Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 117 additions & 78 deletions frontend/schema.faker.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -411,27 +411,6 @@ type DmarcReportDetailTables {
detailTables: DetailTables
}

"""
Input object containing fields which map to the required arguments for
dmarcReportDetailTablesInput
"""
input DmarcReportDetailTablesInput {
"""
The slugified version of the domain you wish to retrieve data for.
"""
domainSlug: Slug!

"""
The period in which the returned data is relevant to.
"""
period: PeriodEnums!

"""
The year in which the returned data is relevant to.
"""
year: Year!
}

"""
A query object used to grab the data to create dmarc report doughnuts
"""
Expand All @@ -452,21 +431,6 @@ type DmarcReportSummary {
categoryTotals: CategoryTotals
}

"""
This object is used to define the various arguments used in the dmarc report
summary query
"""
input DmarcReportSummaryInput {
"""The slugified version of the domain you wish to retrieve data for."""
domainSlug: Slug!

"""The period in which the returned data is relevant to."""
period: PeriodEnums!

"""The year in which the returned data is relevant to."""
year: Year!
}

"""
A query object used to grab the data to create dmarc report bar graph
"""
Expand All @@ -487,15 +451,6 @@ type DmarcReportSummaryList {
categoryTotals: CategoryTotals
}

"""
This object is used to define the various arguments used in the dmarc report
summary list query
"""
input DmarcReportSummaryListInput {
"""The slugified version of the domain you wish to retrieve data for."""
domainSlug: Slug!
}

type Domain implements Node {
organization: Organizations

Expand Down Expand Up @@ -774,11 +729,6 @@ enum LanguageEnums {
The central gathering point for all of the GraphQL mutations.
"""
type Mutation {
updatePassword(
confirmPassword: String!
password: String!
userName: EmailAddress!
): UpdateUserPassword
authenticateTwoFactor(
otpCode: String!
userName: EmailAddress!
Expand Down Expand Up @@ -918,6 +868,26 @@ type Mutation {
"""
userName: EmailAddress!
): SendEmailVerification

"""
Allows users to update their password, using a token sent to them via email.
"""
updatePassword(
"""
An input object containing all fields for this mutation.
"""
input: UpdateUserPasswordInput!
): UpdateUserPassword

"""
Allows the user to request an email to reset their account password.
"""
sendPasswordResetLink(
"""
User name for the account you would like to receive a password reset link for.
"""
userName: EmailAddress!
): SendPasswordResetLink
}

"""
Expand Down Expand Up @@ -1276,77 +1246,108 @@ type PolicyPublished {
fo: Int @examples(values: [0])
}

type SummaryCategory {
name: String @examples(values: ["strong", "moderate", "weak"])
count: Int @examples(values: [33, 33, 33])
percentage: Int @examples(values: [33, 33, 33])
}

type CategorizedSummary {
categories: [SummaryCategory]
total: Int @examples(values: [100])
}

"""
The central gathering point for all of the GraphQL queries.
"""
type Query {
webSummary: CategorizedSummary
emailSummary: CategorizedSummary
"""
A query object used to grab the data to create dmarc report bar graph.
"""
dmarcReportSummaryList(
"""
Input argument with various input fields required for the dmarc report summary list query
The slugified version of the domain you wish to retrieve data for.
"""
input: DmarcReportSummaryListInput!
domainSlug: Slug!
): [DmarcReportSummaryList] @listLength(min: 13, max: 13)

"""
A query object used to grab the data to create dmarc report bar graph.
"""
demoDmarcReportSummaryList(
"""
Input argument with various input fields required for the dmarc report summary list query
The slugified version of the domain you wish to retrieve data for.
"""
input: DmarcReportSummaryListInput!
domainSlug: Slug!
): [DmarcReportSummaryList] @listLength(min: 13, max: 13)

"""
Query used for gathering data for dmarc report detail tables.
"""
dmarcReportDetailTables(
"""
Input object containing fields which map to the required arguments for dmarcReportDetailTablesInput
The slugified version of the domain you wish to retrieve data for.
"""
domainSlug: Slug!

"""
The period in which the returned data is relevant to.
"""
period: PeriodEnums!

"""
The year in which the returned data is relevant to.
"""
input: DmarcReportDetailTablesInput!
year: Year!
): DmarcReportDetailTables

"""
Query used for gathering data for dmarc report detail tables.
"""
demoDmarcReportDetailTables(
"""
Input object containing fields which map to the required arguments for dmarcReportDetailTablesInput
The slugified version of the domain you wish to retrieve data for.
"""
domainSlug: Slug!

"""
The period in which the returned data is relevant to.
"""
period: PeriodEnums!

"""
input: DmarcReportDetailTablesInput!
The year in which the returned data is relevant to.
"""
year: Year!
): DmarcReportDetailTables

"""A query object used to grab the data to create dmarc report doughnuts"""
"""
A query object used to grab the data to create dmarc report doughnuts
"""
dmarcReportSummary(
"""
Input argument with various input fields required for the dmarc report summary query
The slugified version of the domain you wish to retrieve data for.
"""
domainSlug: Slug!

"""
The period in which the returned data is relevant to.
"""
input: DmarcReportSummaryInput!
period: PeriodEnums!

"""
The year in which the returned data is relevant to.
"""
year: Year!
): DmarcReportSummary

"""A query object used to grab the data to create dmarc report doughnuts"""
"""
A query object used to grab the data to create dmarc report doughnuts
"""
demoDmarcReportSummary(
"""
Input argument with various input fields required for the dmarc report summary query
The slugified version of the domain you wish to retrieve data for.
"""
domainSlug: Slug!

"""
The period in which the returned data is relevant to.
"""
period: PeriodEnums!

"""
The year in which the returned data is relevant to.
"""
input: DmarcReportSummaryInput!
year: Year!
): DmarcReportSummary

"""
Expand Down Expand Up @@ -1574,6 +1575,17 @@ type SendEmailVerification {
status: Boolean
}

"""
This mutation allows a user to provide their username and request that a
password reset email be sent to their account with a reset token in a url.
"""
type SendPasswordResetLink {
"""
Status of a successful password reset email.
"""
status: String
}

"""
This method allows for new users to sign up for our sites services.
"""
Expand Down Expand Up @@ -1842,8 +1854,35 @@ input UpdateOrganizationInput {
city: String
}

"""
This mutation allows users to use a token sent to them by email to update
their account password.
"""
type UpdateUserPassword {
user: User
"""
Informs the user if the password update was successful.
"""
status: String
}

"""
Input object containing all fields for the UpdateUserPassword mutation
"""
input UpdateUserPasswordInput {
"""
Reset token found in the url, which was sent to the users inbox, by the sendPasswordReset mutation.
"""
resetToken: String!

"""
The new password the user wishes to change to.
"""
password: String!

"""
A confirmation of the password field to ensure the user has entered the new password correctly.
"""
confirmPassword: String!
}

type UpdateUserRole {
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ export default function App() {
<Trans>Sign In</Trans>
</Link>
)}
{/* <Link to="/user-list">
<Trans>User List</Trans>
</Link> */}

<Link to="/dmarc-report">
<Trans>Report</Trans>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/LandingPage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { Trans } from '@lingui/macro'
import { Layout } from './Layout'
import { Heading, Text, Stack } from '@chakra-ui/core'
import { Heading, Text, Stack, Divider } from '@chakra-ui/core'
import { SummaryGroup } from './SummaryGroup'

export function LandingPage() {
Expand All @@ -27,6 +27,7 @@ export function LandingPage() {
<SummaryGroup name="dashboard" />
</Stack>
</Stack>
<Divider />
<Text>
<Trans>
*All data represented is mocked for demonstration purposes
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/Organization.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ export function Organization({ name, slug, domainCount, ...rest }) {
return (
<ListItem {...rest}>
<Stack spacing={4} padding={[1, 2, 3]} flexWrap="wrap">
<Link as={RouteLink} to={`${path}/${slug}`}>
<Text fontWeight="bold">{name}</Text>
</Link>
<Stack isInline>
<Link as={RouteLink} to={`${path}/${slug}`}>
<Text fontWeight="bold" fontSize="xl">
{name}
</Text>
</Link>
</Stack>
<Text>
<Trans>Internet facing services: {domainCount}</Trans>
</Text>
Expand Down
Loading