-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2.x' into backport/backport-1068-to-2.x
Signed-off-by: Peter Fitzgibbons <[email protected]>
- Loading branch information
Showing
167 changed files
with
28,035 additions
and
13,230 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,42 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/// <reference types="cypress" /> | ||
|
||
|
||
const moveToDatasourcesHome = () => { | ||
cy.visit(`${Cypress.env('opensearchDashboards')}/app/datasources`); | ||
}; | ||
|
||
const moveToNewDatasourcesPage = () => { | ||
cy.visit(`${Cypress.env('opensearchDashboards')}/app/datasources#/new`); | ||
}; | ||
|
||
const moveToCreatePrometheusDatasourcePage = () => { | ||
cy.visit(`${Cypress.env('opensearchDashboards')}/app/datasources#/configure/PROMETHEUS`); | ||
}; | ||
|
||
describe('Integration tests for datasources plugin', () => { | ||
const testPrometheusSuffix = (Math.random() + 1).toString(36).substring(7); | ||
const testPrometheusInstance = `Prometheus_${testPrometheusSuffix}`; | ||
const testS3Suffix = (Math.random() + 1).toString(36).substring(7); | ||
const testS3Instance = `S3_${testS3Suffix}`; | ||
it('Navigates to datasources plugin and expects the correct header', () => { | ||
moveToDatasourcesHome(); | ||
cy.get('[data-test-subj="dataconnections-header"]').should('exist'); | ||
}); | ||
|
||
it('Tests navigation between tabs and goes to Prometheus creation flow', () => { | ||
moveToDatasourcesHome(); | ||
cy.get('[data-test-subj="new"]').click(); | ||
cy.url().should('include', '/new') | ||
cy.get('[data-test-subj="datasource_card_prometheus"]').click(); | ||
cy.url().should('include', '/configure/PROMETHEUS'); | ||
}); | ||
|
||
}); | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { DatasourceType } from '../../common/types/data_connections'; | ||
|
||
export const OPENSEARCH_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/data-sources/index'; | ||
|
||
export const QUERY_RESTRICTED = 'query-restricted'; | ||
export const QUERY_ALL = 'query-all'; | ||
|
||
export const DatasourceTypeToDisplayName: { [key in DatasourceType]: string } = { | ||
PROMETHEUS: 'Prometheus', | ||
S3GLUE: 'S3', | ||
}; | ||
|
||
export type AuthMethod = 'noauth' | 'basicauth' | 'awssigv4'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { EuiComboBoxOptionOption } from '@elastic/eui'; | ||
|
||
export interface PermissionsConfigurationProps { | ||
roles: Role[]; | ||
selectedRoles: Role[]; | ||
setSelectedRoles: React.Dispatch<React.SetStateAction<Role[]>>; | ||
layout: 'horizontal' | 'vertical'; | ||
} | ||
|
||
export type Role = EuiComboBoxOptionOption; | ||
|
||
export type DatasourceType = 'S3GLUE' | 'PROMETHEUS'; |
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
Oops, something went wrong.