-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Error messages mapped for any action - Cleanup & optimization
- Loading branch information
1 parent
2353d6e
commit fd75cb8
Showing
5 changed files
with
92 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import styled from "@emotion/styled"; | ||
import { token } from "@atlaskit/tokens"; | ||
import { popup } from "../../../utils"; | ||
import Button from "@atlaskit/button"; | ||
|
||
const Paragraph = styled.div` | ||
color: ${token("color.text.subtle")}; | ||
`; | ||
const BulletSeparator = styled.span` | ||
padding: 0 ${token("space.100")}; | ||
`; | ||
const StyledLink = styled.a` | ||
cursor: pointer; | ||
`; | ||
|
||
/************************************************************************ | ||
* UI view for the 3 known errors | ||
************************************************************************/ | ||
export const ErrorForSSO = ({ orgName, accessUrl, resetCallback }: { orgName?: string; accessUrl: string; resetCallback: () => void;}) => <> | ||
<Paragraph> | ||
Can't connect, single sign-on(SSO) required{orgName && <span> for <b>{orgName}</b></span>}. | ||
</Paragraph> | ||
<Paragraph> | ||
1. <StyledLink onClick={() => popup(accessUrl)}>Log into GitHub with SSO</StyledLink>. | ||
</Paragraph> | ||
<Paragraph> | ||
2. <StyledLink onClick={resetCallback}>Retry connection in Jira</StyledLink> (once logged in). | ||
</Paragraph> | ||
</>; | ||
|
||
export const ErrorForNonAdmins = ({ orgName }: { orgName?: string; }) => <Paragraph> | ||
Can't connect, you're not the organization owner{orgName && <span> of <b>{orgName}</b></span>}.<br />Ask an owner to complete this step. | ||
</Paragraph>; | ||
|
||
export const ErrorForIPBlocked = ({ orgName, resetCallback }: { orgName?: string; resetCallback: () => void }) => <> | ||
<Paragraph> | ||
Can't connect{orgName && <span> to <b>{orgName}</b></span>}, blocked by your IP allow list. | ||
</Paragraph> | ||
<Button | ||
style={{ paddingLeft: 0, paddingRight: 0 }} | ||
appearance="link" | ||
onClick={() => popup("https://github.com/atlassian/github-for-jira/blob/main/docs/ip-allowlist.md")} | ||
> | ||
How to update allowlist | ||
</Button> | ||
<BulletSeparator>•</BulletSeparator> | ||
<StyledLink onClick={resetCallback}>Retry</StyledLink> | ||
</>; |
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