-
Notifications
You must be signed in to change notification settings - Fork 50
feat: update support request references in C2 UI #7120
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b1b971c
fix: expand Contact Support access to paid customers
mnaqvi08 2d6de68
fix(ui): remove direct Salesforce link from SeriesCardinalityIncrease…
mnaqvi08 8796ef5
chore: remove remaining support link references
mnaqvi08 a35ddab
feat: trigger modal on support options
mnaqvi08 edb0854
chore: fix lint errors
mnaqvi08 307b540
chore: address feedback
mnaqvi08 206bedb
test: remove link check
mnaqvi08 b9528ba
chore: remove hardcoded links
mnaqvi08 af487af
test: open modal from within tooltip
mnaqvi08 153b612
fix: button type, default case for sfdc function
wdoconnell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,41 +1,97 @@ | ||
| // Libraries | ||
| import React, {FC} from 'react' | ||
| import React, {FC, useState} from 'react' | ||
| import {useDispatch, useSelector} from 'react-redux' | ||
|
|
||
| // Components | ||
| import { | ||
| Form, | ||
| Button, | ||
| Heading, | ||
| TextArea, | ||
| Button, | ||
| ButtonType, | ||
| ButtonShape, | ||
| InfluxColors, | ||
| ComponentSize, | ||
| ComponentColor, | ||
| HeadingElement, | ||
| ComponentStatus, | ||
| } from '@influxdata/clockface' | ||
|
|
||
| // Actions | ||
| import {showOverlay, dismissOverlay} from 'src/overlays/actions/overlays' | ||
|
|
||
| // Selectors | ||
| import {selectQuartzIdentity} from 'src/identity/selectors' | ||
|
|
||
| export const SeriesCardinalityIncreaseForm: FC = () => { | ||
| const dispatch = useDispatch() | ||
| const quartzIdentity = useSelector(selectQuartzIdentity) | ||
| const {org: identityOrg} = quartzIdentity.currentIdentity | ||
|
|
||
| const [requestDetails, setRequestDetails] = useState('') | ||
|
|
||
| const handleDetailsValidation = (value: string): string | null => { | ||
| if (!value) { | ||
| return 'Request details are required' | ||
| } | ||
| return null | ||
| } | ||
|
|
||
| const isFormValid = (): boolean => { | ||
| return Boolean(requestDetails) | ||
| } | ||
|
|
||
| const handleSubmit = (): void => { | ||
| window.open(`https://support.influxdata.com/s/login`) | ||
| const orgName = identityOrg.name | ||
| const orgID = identityOrg.id | ||
|
|
||
| dispatch( | ||
| showOverlay( | ||
| 'contact-support', | ||
| { | ||
| subject: `[Org: ${orgName}] [Org Id: ${orgID}] Request Series Cardinality Limit Increase`, | ||
| description: requestDetails, | ||
| }, | ||
| dismissOverlay | ||
| ) | ||
| ) | ||
| } | ||
|
|
||
| return ( | ||
| <div> | ||
| <Form onSubmit={handleSubmit}> | ||
| <Form.Divider lineColor={InfluxColors.Grey15} /> | ||
| <Heading element={HeadingElement.H4}> | ||
| Request Series Cardinality Limit Increase | ||
| </Heading> | ||
| <p> | ||
| To request a series cardinality limit increase, please contact our | ||
| support team. | ||
| </p> | ||
| <Form.ValidationElement | ||
| label="Request Details" | ||
| validationFunc={handleDetailsValidation} | ||
| value={requestDetails} | ||
| required={true} | ||
| > | ||
| {status => ( | ||
| <TextArea | ||
| name="Request Details" | ||
| placeholder="Tell us how much series cardinality you need, your use-case details, what you've tried so far, and why you need an increase." | ||
| status={status} | ||
| value={requestDetails} | ||
| onChange={e => setRequestDetails(e.target.value)} | ||
| testID="cardinality-request-details" | ||
| rows={10} | ||
| /> | ||
| )} | ||
| </Form.ValidationElement> | ||
| <Button | ||
| shape={ButtonShape.Default} | ||
| onClick={handleSubmit} | ||
| type={ButtonType.Submit} | ||
| size={ComponentSize.Medium} | ||
| color={ComponentColor.Primary} | ||
| className="rate-alert--request-increase-button" | ||
| text="Submit Request" | ||
| text="Create Request" | ||
| status={ | ||
| isFormValid() ? ComponentStatus.Default : ComponentStatus.Disabled | ||
| } | ||
| /> | ||
| </div> | ||
| </Form> | ||
| ) | ||
| } |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| export const RATE_LIMIT_ERROR_STATUS = 429 | ||
|
|
||
| export const RATE_LIMIT_ERROR_TEXT = | ||
| 'Oops. It looks like you have exceeded the query limits allowed as part of your plan. If you would like to increase your query limits, reach out at support.influxdata.com.' | ||
| 'Oops. It looks like you have exceeded the query limits allowed as part of your plan. If you would like to increase your query limits, please use the Contact Support option in the Help menu.' | ||
|
|
||
| export const ASSET_LIMIT_ERROR_STATUS = 403 | ||
|
|
||
| export const ASSET_LIMIT_ERROR_TEXT = | ||
| 'Oops. It looks like you have exceeded the asset limits allowed as part of your plan. If you would like to increase your limits, reach out at support.influxdata.com.' | ||
| 'Oops. It looks like you have exceeded the asset limits allowed as part of your plan. If you would like to increase your limits, please use the Contact Support option in the Help menu.' | ||
|
|
||
| export const REQUEST_TIMEOUT_STATUS = 408 | ||
| export const GATEWAY_TIMEOUT_STATUS = 504 |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This ensures the form is not submitted on cancelation.