Skip to content
Closed
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions cypress/e2e/cloud/org-list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ describe('Account / Organizations Tab', () => {

cy.getByTestID('question-mark-tooltip--tooltip--dialog').within(() => {
cy.get('a')
.contains('support@influxdata.com')
.should('have.attr', 'href', 'mailto:support@influxdata.com')
.contains('https://support.influxdata.com/s/login')
.should('have.attr', 'href', 'https://support.influxdata.com/s/login')
})

cy.getByTestID('pagination-item')
Expand Down
17 changes: 1 addition & 16 deletions src/billing/components/PayAsYouGo/PricingAlert.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Libraries
import React, {useEffect} from 'react'
import {useSelector} from 'react-redux'

// Components
import {
Expand All @@ -15,23 +14,11 @@ import {SafeBlankLink} from 'src/utils/SafeBlankLink'
// Utils
import {event} from 'src/cloud/utils/reporting'

// Selectors
import {selectCurrentOrg, selectUser} from 'src/identity/selectors'

export const PricingAlert: React.FC = () => {
useEffect(() => {
event(`pricingAnnouncementBanner.displayed`)
}, [])

const org = useSelector(selectCurrentOrg)
const user = useSelector(selectUser)

const encodedSubject = encodeURI('PAYG Pricing Increase')
const encodedBody = encodeURI(`User ID: ${user.email}
Org ID: ${org.id}

Please describe your inquiry here.`)

const handleContactUsClick = () => {
event(`pricingAnnouncementBanner.contactUs.clicked`)
}
Expand All @@ -47,9 +34,7 @@ Please describe your inquiry here.`)
Starting on <b>December 1, 2023</b> there will be an increase in to
your usage-based pricing. Please feel free to{' '}
<SafeBlankLink
href={`mailto:payg-price-change@influxdata.com?
&subject=${encodedSubject}
&body=${encodedBody}`}
href="https://support.influxdata.com/s/login"
onClick={handleContactUsClick}
>
contact us
Expand Down
2 changes: 1 addition & 1 deletion src/cloud/components/CardinalityLimitOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const CardinalityLimitOverlayUnconnected: FC<Props> = ({onClose, orgID}) => {
</p>
</div>
</div>
{showForm && <SeriesCardinalityIncreaseForm orgID={orgID} />}
{showForm && <SeriesCardinalityIncreaseForm />}
</Overlay.Body>
</OverlayContainer>
)
Expand Down
87 changes: 10 additions & 77 deletions src/cloud/components/SeriesCardinalityIncreaseForm.tsx
Original file line number Diff line number Diff line change
@@ -1,108 +1,41 @@
// Libraries
import React, {FC, useState} from 'react'
import React, {FC} from 'react'

// Components
import {
Form,
Input,
Button,
Heading,
TextArea,
ButtonType,
ButtonShape,
InfluxColors,
ComponentSize,
ComponentColor,
HeadingElement,
ComponentStatus,
} from '@influxdata/clockface'

interface Props {
orgID: string
}

export const SeriesCardinalityIncreaseForm: FC<Props> = ({orgID}) => {
const [increaseAmount, onChangeIncreaseAmount] = useState<string>('')
const [requestDetails, onChangeRequestDetails] = useState<string>('')

const handleAmountValidation = (value: string): string | null => {
if (!value) {
return 'Amount is required'
}
return null
}

const handleDetailsValidation = (value: string): string | null => {
if (!value) {
return 'Use-case details are required'
}
return null
}

const isFormValid = (): boolean => {
return !!increaseAmount && !!requestDetails
}

export const SeriesCardinalityIncreaseForm: FC = () => {
const handleSubmit = (): void => {
window.open(
`mailto:support@influxdata.com?subject=Request%20Series%20Cardinality%20Increase&body=Organization ID%3A%20${orgID}%0D%0A%0D%0ARequested Series Cardinality Limit:%20${increaseAmount}%0D%0A%0D%0AUse-Case Details:%0D%0A${requestDetails}`
)
window.open(`https://support.influxdata.com/s/login`)
}

return (
<Form onSubmit={handleSubmit}>
<div>
<Form.Divider lineColor={InfluxColors.Grey15} />
<Heading element={HeadingElement.H4}>
Request Series Cardinality Limit Increase
</Heading>
<Form.ValidationElement
label="Approximate Series Cardinality Needed"
validationFunc={handleAmountValidation}
value={increaseAmount}
required={true}
>
{status => (
<Input
name="Approximate Series Cardinality Needed"
placeholder="Tell us how much series cardinality you need."
required={true}
status={status}
autoFocus={true}
value={increaseAmount}
onChange={e => onChangeIncreaseAmount(e.target.value)}
testID="rate-alert-form-amount"
/>
)}
</Form.ValidationElement>
<Form.ValidationElement
label="Use-Case Details"
validationFunc={handleDetailsValidation}
value={requestDetails}
required={true}
>
{status => (
<TextArea
name="Use-Case Details"
placeholder="Tell us about your use-case, what you've tried so far, and why you need an increase."
status={status}
value={requestDetails}
onChange={e => onChangeRequestDetails(e.target.value)}
testID="rate-alert-form-details"
rows={10}
/>
)}
</Form.ValidationElement>
<p>
To request a series cardinality limit increase, please contact our
support team.
</p>
<Button
shape={ButtonShape.Default}
type={ButtonType.Submit}
onClick={handleSubmit}
size={ComponentSize.Medium}
color={ComponentColor.Primary}
className="rate-alert--request-increase-button"
text="Submit Request"
status={
isFormValid() ? ComponentStatus.Default : ComponentStatus.Disabled
}
/>
</Form>
</div>
)
}
44 changes: 8 additions & 36 deletions src/cloud/components/WriteLimitOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,46 +1,32 @@
import React, {useState, useContext, FC} from 'react'
import {useSelector} from 'react-redux'
import React, {useContext, FC} from 'react'

import {
OverlayContainer,
Overlay,
Form,
Heading,
Input,
HeadingElement,
Button,
ButtonType,
ButtonShape,
ComponentSize,
ComponentColor,
ComponentStatus,
InputType,
} from '@influxdata/clockface'

import {OverlayContext} from 'src/overlays/components/OverlayController'

// Selectors
import {getOrg} from 'src/organizations/selectors'

// Reporting
import {event} from 'src/cloud/utils/reporting'

// Design
import './WriteLimitOverlay.scss'

const WriteLimitOverlay: FC = () => {
const [limitReason, setLimitReason] = useState('')

const {onClose} = useContext(OverlayContext)

const {id} = useSelector(getOrg)

const handleSubmit = (): void => {
event('limit.requestincrease.writes', {reason: limitReason})
event('limit.requestincrease.writes')

window.open(
`mailto:support@influxdata.com?subject=Request%20Query%20Write%20Limit%20Increase&body=Organization ID%3A%20${id}%0D%0A%0D%0AUse-Case Details:%0D%0A${limitReason}`
)
window.open(`https://support.influxdata.com/s/login`)
}
return (
<OverlayContainer
Expand All @@ -54,23 +40,14 @@ const WriteLimitOverlay: FC = () => {
wrapText={true}
/>
<Overlay.Body className="limits-increasewrites--body">
<Form onSubmit={handleSubmit} className="limits-increasewrites--form">
<div className="limits-increasewrites--form">
<Heading element={HeadingElement.H4}>
Request Query Write Limit Increase
</Heading>
<Form.Element label="Request Details" required={true}>
<Input
name="Write Limit Increase"
placeholder="Tell us how much you need your write limit raised"
required={true}
autoFocus={true}
value={limitReason}
onChange={e => setLimitReason(e.target.value)}
testID="rate-alert-form-amount"
type={InputType.Text}
/>
</Form.Element>
</Form>
<p>
To request a write limit increase, please contact our support team.
</p>
</div>
</Overlay.Body>
<Overlay.Footer>
<Button
Expand All @@ -88,11 +65,6 @@ const WriteLimitOverlay: FC = () => {
color={ComponentColor.Primary}
className="rate-alert--request-increase-button"
text="Submit Request"
status={
limitReason.length
? ComponentStatus.Default
: ComponentStatus.Disabled
}
/>
</Overlay.Footer>
</OverlayContainer>
Expand Down
4 changes: 2 additions & 2 deletions src/cloud/constants/index.ts
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 to 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, reach out at support.influxdata.com.'

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 to 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, reach out at support.influxdata.com.'

export const REQUEST_TIMEOUT_STATUS = 408
export const GATEWAY_TIMEOUT_STATUS = 504
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const tooltipContent = (
<p>
Organizations can be reactivated within 7 days of deletion. Contact support
at{' '}
<SafeBlankLink href="mailto:support@influxdata.com">
support@influxdata.com
<SafeBlankLink href="https://support.influxdata.com/s/login">
https://support.influxdata.com/s/login
</SafeBlankLink>{' '}
to reactivate.
</p>
Expand Down
3 changes: 2 additions & 1 deletion src/onboarding/containers/LoginPageContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ class LoginPageContents extends PureComponent<Props> {
const emailError = `The email and password combination you submitted don't match. Please try again`
this.setState({...errors, emailError})
} else {
const emailError = `We have been notified of an issue while accessing your account. If this issue persists, please contact support@influxdata.com`
const emailError =
'We have been notified of an issue while accessing your account. If this issue persists, please contact support at support.influxdata.com'
this.setState({...errors, emailError})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ const SupportLink = (): JSX.Element => {
return (
<a
data-testid="go-to-new-org--link"
href="mailto:support@influxdata.com"
href="https://support.influxdata.com/s/login"
style={linkStyle}
target="_blank"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we include rel="noopener noreferrer" here for security purposes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

rel="noopener noreferrer"
>
support@influxdata.com
https://support.influxdata.com/s/login
</a>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/components/NotFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const NotFoundNew: FC = () => (
your access to this page may have expired.&nbsp;
{/* Add rel options to avoid "tabnapping" */}
<a
href="mailto:support@influxdata.com"
href="https://support.influxdata.com/s/login"
target="_blank"
rel="noreferrer noopener"
>
Expand Down
2 changes: 1 addition & 1 deletion src/shared/copy/notifications/categories/limits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const writeLimitReached = (

export const resourceLimitReached = (resourceName: string): Notification => ({
...defaultErrorNotification,
message: `Oops. It looks like you have reached the maximum number of ${resourceName} allowed as part of your plan. If you would like to upgrade and remove this restriction, reach out to support@influxdata.com.`,
message: `Oops. It looks like you have reached the maximum number of ${resourceName} allowed as part of your plan. If you would like to upgrade and remove this restriction, reach out at support.influxdata.com.`,
duration: FIVE_SECONDS,
type: 'resourceLimitReached',
})
Expand Down