Skip to content

Commit

Permalink
Manage datasources (#967)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
derek-ho authored Sep 7, 2023
1 parent 941eb60 commit 73becc4
Show file tree
Hide file tree
Showing 24 changed files with 1,832 additions and 5 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/datasources`);
};

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



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

export const OPENSEARCH_DOCUMENTATION_URL =
'https://opensearch.org/docs/latest/data-connections/index';
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 DATASOURCES_BASE = '/api/datasources';
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 DATASOURCES_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 observabilityDatasourcesID = 'datasources';
export const observabilityDatasourcesTitle = 'Datasources';
export const observabilityDatasourcesPluginOrder = 9030;

// Shared Constants
export const SQL_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/search-plugins/sql/index/';
export const PPL_DOCUMENTATION_URL =
Expand All @@ -74,10 +80,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_DATASOURCES_URI = '/_plugins/_query/_datasources';
export const OPENSEARCH_PANELS_API = {
OBJECT: `${BASE_OBSERVABILITY_URI}/object`,
};
export const OPENSEARCH_DATASOURCES_API = {
DATASOURCE: `${BASE_DATASOURCES_URI}`,
};

// Saved Objects
export const SAVED_OBJECT = '/object';
Expand Down
3 changes: 3 additions & 0 deletions opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"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 DatasourcesHome } from './data_connections/home';

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

export const App = ({
Expand Down
Loading

0 comments on commit 73becc4

Please sign in to comment.