diff --git a/cypress/e2e/cloud/org-list.test.ts b/cypress/e2e/cloud/org-list.test.ts index 02b70edf73..20be3ac3c6 100644 --- a/cypress/e2e/cloud/org-list.test.ts +++ b/cypress/e2e/cloud/org-list.test.ts @@ -58,21 +58,18 @@ describe('Account / Organizations Tab', () => { cy.get('.account--organizations-tab-suspended-orgs-card') .should('have.length', 1) .and('be.visible') - .within(() => { - cy.getByTestID('question-mark-tooltip').click() - cy.contains('Deletion in progress') - }) + .contains('Deletion in progress') - cy.getByTestID('question-mark-tooltip--tooltip--dialog').contains( - 'Organizations can be reactivated within 7 days of deletion.' - ) + cy.getByTestID('question-mark-tooltip').click() cy.getByTestID('question-mark-tooltip--tooltip--dialog').within(() => { - cy.get('a') - .contains('https://support.influxdata.com/s/login') - .should('have.attr', 'href', 'https://support.influxdata.com/s/login') + cy.get('button').contains('contact support').trigger('click') }) + cy.getByTestID('contact-support-overlay-header').should('exist') + + cy.contains('button', 'Cancel').click() + cy.getByTestID('pagination-item') .should('have.length', 2) .contains('2') diff --git a/src/cloud/components/SeriesCardinalityIncreaseForm.tsx b/src/cloud/components/SeriesCardinalityIncreaseForm.tsx index b66dea20c6..0bb1c9c817 100644 --- a/src/cloud/components/SeriesCardinalityIncreaseForm.tsx +++ b/src/cloud/components/SeriesCardinalityIncreaseForm.tsx @@ -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 ( -
+
Request Series Cardinality Limit Increase -

- To request a series cardinality limit increase, please contact our - support team. -

+ + {status => ( +