diff --git a/.cypress/integration/9_integrations.spec.js b/.cypress/integration/9_integrations.spec.js index e9054e321..972457597 100644 --- a/.cypress/integration/9_integrations.spec.js +++ b/.cypress/integration/9_integrations.spec.js @@ -59,16 +59,6 @@ describe('Tests the add nginx integration instance flow', () => { cy.get('.euiToastHeader__title').should('contain', 'successfully'); }) - it('Navigates to nginx page and triggers the adds the create index template flow', () => { - moveToAvailableNginxIntegration(); - cy.get('[data-test-subj="add-integration-button"]').click(); - cy.get('[data-test-subj="addIntegrationFlyoutTitle"]').should('exist') - cy.get('[data-test-subj="data-choice"]').contains("No, I do not.").click(); - cy.get('[data-test-subj="create-indextemplate-name"]').type('test') - cy.get('[data-test-subj="create-index-template-button"]').click(); - cy.get('.euiToastHeader__title').should('contain', 'Successfully'); - }) - it('Navigates to installed integrations page and verifies that nginx-test exists', () => { moveToAddedIntegrations(); cy.contains(testInstance).should('exist'); diff --git a/common/constants/shared.ts b/common/constants/shared.ts index 8413bb6e0..ebf6703f7 100644 --- a/common/constants/shared.ts +++ b/common/constants/shared.ts @@ -54,7 +54,7 @@ export const observabilityPanelsPluginOrder = 5095; export const observabilityIntegrationsID = 'observability-integrations'; export const observabilityIntegrationsTitle = 'Integrations'; -export const observabilityIntegrationsPluginOrder = 9000; +export const observabilityIntegrationsPluginOrder = 9020; // Shared Constants export const SQL_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/search-plugins/sql/index/'; diff --git a/public/components/integrations/components/__tests__/__snapshots__/added_integration_flyout.test.tsx.snap b/public/components/integrations/components/__tests__/__snapshots__/added_integration_flyout.test.tsx.snap index 5fb03bd78..0ea45e4e8 100644 --- a/public/components/integrations/components/__tests__/__snapshots__/added_integration_flyout.test.tsx.snap +++ b/public/components/integrations/components/__tests__/__snapshots__/added_integration_flyout.test.tsx.snap @@ -80,61 +80,6 @@ exports[`Add Integration Flyout Test Renders add integration flyout with dummy i
-
- - - Do you have a SS4O compliant index name or wildcard pattern? - - -
- -
- -
-
- -
- -
-
-
-
- - - Do you have a SS4O compliant index name or wildcard pattern? - - -
- -
- -
-
- -
- -
-
-
-
- - - Do you have a SS4O compliant index name or wildcard pattern? - - -
- -
- -
-
- -
- -
-
-
-
- - - Do you have a SS4O compliant index name or wildcard pattern? - - -
- -
- -
-
- -
- -
-
-
-
- - - Do you have a SS4O compliant index name or wildcard pattern? - - -
- -
- -
-
- -
- -
-
-
- - Do you have a SS4O compliant index name or wildcard pattern? - , - "compressed": undefined, - } - } - name="radio group" - onChange={[Function]} - options={ - Array [ - Object { - "id": "0", - "label": "Yes, I do.", - }, - Object { - "id": "1", - "label": "No, I do not.", - }, - ] - } - > - - Do you have a SS4O compliant index name or wildcard pattern? - , - "compressed": undefined, - } - } - > -
- - - - Do you have a SS4O compliant index name or wildcard pattern? - - - - -
- -
- -
- - -
- -
- -
- -
-
-
- -
-
{ - setChecked(e.target.checked); - }; - const onCreateDatasourceChange = (e: React.ChangeEvent) => { setCreateDataSource(e.target.value); }; @@ -298,177 +290,50 @@ export function AddIntegrationFlyout(props: IntegrationFlyoutProps) { }; const formContent = () => { - switch (radioIdSelected) { - case '0': - return ( -
- - onDatasourceChange(e)} - value={dataSource} - isInvalid={!isDataSourceValid} - append={ - { - const validationResult = await doExistingDataSourceValidation(dataSource); - setDataSourceValid(validationResult); - }} - disabled={dataSource.length === 0} - > - Validate - - } - /> - - - onNameChange(e)} - value={name} - /> - -
- ); - case '1': - return ( -
- - onCreateDatasourceChange(e)} - value={createDataSource} - isInvalid={!isCreateDatasourceValid} - append={ - { - createDataSourceMappings(createDataSource); - }} - disabled={createDataSource.length === 0} - > - Create - - } - /> - - - onDatasourceChange(e)} - value={dataSource} - isInvalid={!isDataSourceValid} - append={ - { - const validationResult = await doExistingDataSourceValidation(dataSource); - setDataSourceValid(validationResult); - }} - disabled={dataSource.length === 0} - > - Validate - - } - /> - - - - onNameChange(e)} - value={name} - /> - - - - onCheckChange(e)} - /> - - - {!checked ? ( - -

- Without sample data, you will need to manually create an index that maps to the - ss4o schema{' '} - Learn more -

-
- ) : null} -
- ); - default: - return null; - } - }; - - const radios = [ - { - id: `0`, - label: 'Yes, I do.', - }, - { - id: `1`, - label: 'No, I do not.', - }, - ]; - - const [radioIdSelected, setRadioIdSelected] = useState(`0`); - - const onChange = (optionId: any) => { - setRadioIdSelected(optionId); + return ( +
+ + onDatasourceChange(e)} + value={dataSource} + isInvalid={!isDataSourceValid} + append={ + { + const validationResult = await doExistingDataSourceValidation(dataSource); + setDataSourceValid(validationResult); + }} + disabled={dataSource.length === 0} + > + Validate + + } + /> + + + onNameChange(e)} + value={name} + /> + +
+ ); }; const renderContent = () => { return ( <> - - onChange(id)} - data-test-subj="data-choice" - name="radio group" - legend={{ - children: Do you have a SS4O compliant index name or wildcard pattern?, - }} - /> - - - - {formContent()} - + {formContent()} ); }; diff --git a/public/plugin.ts b/public/plugin.ts index d5fb2d640..021a9f56a 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -192,7 +192,7 @@ export class ObservabilityPlugin core.application.register({ id: observabilityIntegrationsID, title: observabilityIntegrationsTitle, - category: DEFAULT_APP_CATEGORIES.opensearchDashboards, + category: DEFAULT_APP_CATEGORIES.management, order: observabilityIntegrationsPluginOrder, mount: appMountWithStartPage('integrations'), });