Skip to content

Commit

Permalink
Create Data sources plugin with Manage Datasources Flow (#1035)
Browse files Browse the repository at this point in the history
* Manage datasources (#967)

* fix name change bug and modify test to test behavior

Signed-off-by: Derek Ho <dxho@amazon.com>

* get rid of lint

Signed-off-by: Derek Ho <dxho@amazon.com>

* test for flyout

Signed-off-by: Derek Ho <dxho@amazon.com>

* flyout to medium size

Signed-off-by: Derek Ho <dxho@amazon.com>

* make accelerate extensible

Signed-off-by: Derek Ho <dxho@amazon.com>

* get datasources and hook up to pplservice

Signed-off-by: Derek Ho <dxho@amazon.com>

* get flint working

Signed-off-by: Derek Ho <dxho@amazon.com>

* add datasource page with steps and buttons on bottom bar

Signed-off-by: Derek Ho <dxho@amazon.com>

* datasources as a new plugin and mostly working

Signed-off-by: Derek Ho <dxho@amazon.com>

* hook up manage to show datasources call

Signed-off-by: Derek Ho <dxho@amazon.com>

* update two tables with descriptions

Signed-off-by: Derek Ho <dxho@amazon.com>

* make some updates to the page

Signed-off-by: Derek Ho <dxho@amazon.com>

* cleanup unused files for data connections

Signed-off-by: Derek Ho <dxho@amazon.com>

* cleanup and add overview panel columns

Signed-off-by: Derek Ho <dxho@amazon.com>

* render tabs

Signed-off-by: Derek Ho <dxho@amazon.com>

* add unit tests

Signed-off-by: Derek Ho <dxho@amazon.com>

* update data test subj and snapshot

Signed-off-by: Derek Ho <dxho@amazon.com>

* Add datasources to management overview

Signed-off-by: Derek Ho <dxho@amazon.com>

* remove spark logo and update snapshot

Signed-off-by: Derek Ho <dxho@amazon.com>

* refactor routes out

Signed-off-by: Derek Ho <dxho@amazon.com>

* separate out the roles

Signed-off-by: Derek Ho <dxho@amazon.com>

* bump version back to 3.0

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>

* Add acceleration management UI  (#989)

* add acceleration management UI skeleton

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* Create new documentation link for acc

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* fix typos and minor bugs

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update snapshot

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* update window location to hash

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* remove unused headers

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

* Rename data sources to data connections (#1004)

* rename data sources to data connections

Signed-off-by: Derek Ho <dxho@amazon.com>

* final cleanup

Signed-off-by: Derek Ho <dxho@amazon.com>

* update acceleration breadcrumb

Signed-off-by: Derek Ho <dxho@amazon.com>

* fix API call for data connection page

Signed-off-by: Derek Ho <dxho@amazon.com>

* fix integ test and data test subj and snapshot

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>

* Add fallback to show if user does not have datasource API permissions (#1008)

* add fallback ui for manage and view datasources

Signed-off-by: Derek Ho <dxho@amazon.com>

* always show datasources via pplservice

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>

* Add access control tab content (#992)

* basic rendering for the access control tab

Signed-off-by: Derek Ho <dxho@amazon.com>

* hook up basic radio groups and euicombo boxes for query and acceleration permissions

Signed-off-by: Derek Ho <dxho@amazon.com>

* refactor and clean up unuseed inports

Signed-off-by: Derek Ho <dxho@amazon.com>

* remove unused import

Signed-off-by: Derek Ho <dxho@amazon.com>

* fix import and snapshot

Signed-off-by: Derek Ho <dxho@amazon.com>

* fix test

Signed-off-by: Derek Ho <dxho@amazon.com>

* Address PR comments

Signed-off-by: Derek Ho <dxho@amazon.com>

* Address PR comments

Signed-off-by: Derek Ho <dxho@amazon.com>

* Remove unused files and variables

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>

* Delete datasource and Connection Configuration Tab (#1024)

* Address previous PR comments and implement rudimentary delete

Signed-off-by: Derek Ho <dxho@amazon.com>

* Implement modal and instant delete showing up in list

Signed-off-by: Derek Ho <dxho@amazon.com>

* Refactor save or cancel to a shared component, implement hard coded datasource configurations tab

Signed-off-by: Derek Ho <dxho@amazon.com>

* Update test with mock role data

Signed-off-by: Derek Ho <dxho@amazon.com>

* Add most functionality of edit connectiondetails

Signed-off-by: Derek Ho <dxho@amazon.com>

* Address PR comments

Signed-off-by: Derek Ho <dxho@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>

* remove acceleration components

Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>

---------

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Shenoy Pratik <sgguruda@amazon.com>
Co-authored-by: Shenoy Pratik <sgguruda@amazon.com>
  • Loading branch information
2 people authored and pjfitzgibbons committed Sep 26, 2023
1 parent 143f520 commit 7994fb7
Show file tree
Hide file tree
Showing 33 changed files with 3,344 additions and 8 deletions.
20 changes: 20 additions & 0 deletions .cypress/integration/10_datasources.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

/// <reference types="cypress" />

const moveToDatasourcesHome = () => {
cy.visit(`${Cypress.env('opensearchDashboards')}/app/dataconnections`);
};

describe('Basic sanity test for datasources plugin', () => {
it('Navigates to datasources plugin and expects the correct header', () => {
moveToDatasourcesHome();
cy.get('[data-test-subj="dataconnections-header"]').should('exist');
});
});



10 changes: 10 additions & 0 deletions common/constants/data_connections.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

export const OPENSEARCH_DOCUMENTATION_URL =
'https://opensearch.org/docs/latest/data-connections/index';

export const QUERY_RESTRICTED = 'query-restricted';
export const QUERY_ALL = 'query-all';
11 changes: 10 additions & 1 deletion common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const DSL_CAT = '/cat.indices';
export const DSL_MAPPING = '/indices.getFieldMapping';
export const OBSERVABILITY_BASE = '/api/observability';
export const INTEGRATIONS_BASE = '/api/integrations';
export const DATACONNECTIONS_BASE = '/api/dataconnections';
export const EVENT_ANALYTICS = '/event_analytics';
export const SAVED_OBJECTS = '/saved_objects';
export const SAVED_QUERY = '/query';
Expand All @@ -23,6 +24,7 @@ export const SAVED_VISUALIZATION = '/vis';
export const PPL_ENDPOINT = '/_plugins/_ppl';
export const SQL_ENDPOINT = '/_plugins/_sql';
export const DSL_ENDPOINT = '/_plugins/_dsl';
export const DATACONNECTIONS_ENDPOINT = '/_plugins/_query/_datasources';

export const observabilityID = 'observability-logs';
export const observabilityTitle = 'Observability';
Expand Down Expand Up @@ -56,6 +58,10 @@ export const observabilityIntegrationsID = 'integrations';
export const observabilityIntegrationsTitle = 'Integrations';
export const observabilityIntegrationsPluginOrder = 9020;

export const observabilityDataConnectionsID = 'dataconnections';
export const observabilityDataConnectionsTitle = 'Data Connections';
export const observabilityDataConnectionsPluginOrder = 9030;

// Shared Constants
export const SQL_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/search-plugins/sql/index/';
export const PPL_DOCUMENTATION_URL =
Expand All @@ -75,10 +81,13 @@ export const PPL_NEWLINE_REGEX = /[\n\r]+/g;

// Observability plugin URI
const BASE_OBSERVABILITY_URI = '/_plugins/_observability';
const BASE_INTEGRATIONS_URI = '/_plugins/_integrations'; // Used later in front-end for routing
const BASE_DATACONNECTIONS_URI = '/_plugins/_query/_datasources';
export const OPENSEARCH_PANELS_API = {
OBJECT: `${BASE_OBSERVABILITY_URI}/object`,
};
export const OPENSEARCH_DATACONNECTIONS_API = {
DATACONNECTION: `${BASE_DATACONNECTIONS_URI}`,
};

// Saved Objects
export const SAVED_OBJECT = '/object';
Expand Down
10 changes: 10 additions & 0 deletions common/types/data_connections.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/

export interface PermissionsConfigurationProps {
roles: Array<{ label: string }>;
selectedRoles: Array<{ label: string }>;
setSelectedRoles: React.Dispatch<React.SetStateAction<Array<{ label: string }>>>;
}
5 changes: 3 additions & 2 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"uiActions",
"urlForwarding",
"visualizations"
]
}
],
"optionalPlugins": ["managementOverview"]
}
2 changes: 2 additions & 0 deletions public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { EventAnalytics } from './event_analytics';
import { Home as MetricsHome } from './metrics/index';
import { Main as NotebooksHome } from './notebooks/components/main';
import { Home as TraceAnalyticsHome } from './trace_analytics/home';
import { Home as DataConnectionsHome } from './data_connections/home';

interface ObservabilityAppDeps {
CoreStartProp: CoreStart;
Expand All @@ -44,6 +45,7 @@ const pages = {
notebooks: NotebooksHome,
dashboards: CustomPanelsHome,
integrations: IntegrationsHome,
dataconnections: DataConnectionsHome,
};

export const App = ({
Expand Down
Loading

0 comments on commit 7994fb7

Please sign in to comment.