Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebasing to main #381

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d72e632
Update tests, builds and doc (#318)
ps48 Dec 13, 2021
154de24
Rename trace-analytics to observability (#341)
joshuali925 Dec 14, 2021
352316f
Event analytics unit tests (#342)
mengweieric Dec 14, 2021
d1cbfa0
Update service map parsing results for testing (#345)
joshuali925 Dec 14, 2021
249c6b6
bumping version to 1.2.2 (#346)
ps48 Dec 15, 2021
fff303a
updating readme and badges (#352)
ps48 Dec 20, 2021
ab3a385
Update Workflow (#360)
ps48 Dec 22, 2021
2727c7e
bumping main to 1.3 (#361)
ps48 Dec 27, 2021
c46b74d
Add observability visualization to notebooks (#351)
ps48 Dec 27, 2021
e3f1e66
Add .whitesource configuration file (#365)
mend-for-github-com[bot] Jan 10, 2022
9774a6c
CVE fix:json-schema, gson & glob-parent (#368)
ps48 Jan 11, 2022
a809809
Update Release Notes 1.2.4 (#370)
ps48 Jan 12, 2022
b0a1264
jcenter removed from gradle.build (#374)
ps48 Jan 14, 2022
ba23dcc
Application Analytics (#299)
eugenesk24 Dec 14, 2021
19b9707
Fix merge conflict
eugenesk24 Dec 21, 2021
811c6b9
#321: Add clear modal for services (#355)
eugenesk24 Dec 21, 2021
794cd35
#322: Add clear modal for traces (#356)
eugenesk24 Dec 21, 2021
5082e03
Adds tests for application creation (#357)
eugenesk24 Dec 22, 2021
e2f3328
Application Analytics (#299)
eugenesk24 Dec 14, 2021
5afdf4f
Add create route for app analytics
eugenesk24 Dec 23, 2021
273e109
#325: Return to app table on cancel
eugenesk24 Jan 19, 2022
512f4e3
Remove unnecessary import
eugenesk24 Jan 19, 2022
46cb877
#340: Apps selectable, actions correctly disabled
eugenesk24 Jan 19, 2022
f225967
Fix mapping update
eugenesk24 Jan 19, 2022
df47614
#327: Rename application
eugenesk24 Jan 19, 2022
4fd270e
#376: Fetch all applications for home page
eugenesk24 Jan 20, 2022
4216135
#343: Enable deletion of application
eugenesk24 Jan 21, 2022
8511d3d
Merge branch 'application-analytics' into rebase-main
eugenesk24 Jan 21, 2022
9fbee0f
Add exception catch
eugenesk24 Jan 21, 2022
ee8ed1e
More specific exception
eugenesk24 Jan 21, 2022
bc0c451
Log error instead of warn
eugenesk24 Jan 21, 2022
1b1ac1c
Remove generic exception
eugenesk24 Jan 21, 2022
187e8e4
Debug assert
eugenesk24 Jan 21, 2022
9d1539b
Fix type
eugenesk24 Jan 21, 2022
950aaa6
Fix Lint
eugenesk24 Jan 21, 2022
92b436f
Address comments
eugenesk24 Jan 21, 2022
17365df
343: Enable deletion of application
eugenesk24 Jan 21, 2022
b508fc2
Remove duplicate import
eugenesk24 Jan 21, 2022
c689175
Connected Application Analytics (#379)
eugenesk24 Jan 24, 2022
5f79098
Remove branch
eugenesk24 Jan 24, 2022
2138e28
Remove trace if selected
eugenesk24 Jan 24, 2022
462c7ac
Merge branch 'application-analytics' into rebase-main
eugenesk24 Jan 24, 2022
88e2246
Rename trace-analytics to observability (#341)
joshuali925 Dec 14, 2021
7594ac2
updating readme and badges (#352)
ps48 Dec 20, 2021
938a205
Update tests and snapshots
eugenesk24 Jan 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on: [pull_request, push]
env:
PLUGIN_NAME: dashboards-observability
OPENSEARCH_VERSION: '1.x'
OPENSEARCH_PLUGIN_VERSION: 1.2.0.0
OPENSEARCH_PLUGIN_VERSION: 1.3.0.0

jobs:

Expand Down Expand Up @@ -51,11 +51,10 @@ jobs:
cd OpenSearch-Dashboards/plugins/dashboards-observability
yarn osd bootstrap

# TODO enable unit tests when ready
- name: Test Panels
- name: Test all dashboards-observability modules
run: |
cd OpenSearch-Dashboards/plugins/dashboards-observability
yarn test ./public/components/custom_panels/ --coverage
yarn test --coverage

- name: Upload coverage
uses: codecov/codecov-action@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on: [pull_request, push]

env:
OPENSEARCH_VERSION: '1.3.0-SNAPSHOT'
OPENSEARCH_BRANCH: '1.3'
COMMON_UTILS_BRANCH: 'main'

jobs:
build:
Expand Down
15 changes: 15 additions & 0 deletions .whitesource
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"scanSettings": {
"configMode": "AUTO",
"configExternalURL": "",
"projectToken": "",
"baseBranches": []
},
"checkRunSettings": {
"vulnerableCheckRunConclusionLevel": "failure",
"displayMode": "diff"
},
"issueSettings": {
"minSeverityLevel": "LOW"
}
}
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ Observability is collection of plugins and applications that let you visualize d
[bug-link]: https://github.com/opensearch-project/observability/issues?q=is%3Aopen+is%3Aissue+label%3Abug+
[enhancement-badge]: https://img.shields.io/github/issues/opensearch-project/observability/enhancement.svg
[enhancement-link]: https://github.com/opensearch-project/observability/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement+
<<<<<<< HEAD
<<<<<<< HEAD
=======
>>>>>>> fff303a (updating readme and badges (#352))
[untriaged-badge]: https://img.shields.io/github/issues/opensearch-project/observability/untriaged.svg
[untriaged-link]: https://github.com/opensearch-project/observability/issues?q=is%3Aopen+is%3Aissue+label%3Auntriaged+
[nolabel-badge]: https://img.shields.io/github/issues-search/opensearch-project/observability?color=yellow&label=no%20label%20issues&query=is%3Aopen%20is%3Aissue%20no%3Alabel
Expand All @@ -89,6 +93,11 @@ Observability is collection of plugins and applications that let you visualize d
## Plugin Components

The Observability plugin has four components: Trace Analytics, Event Analytics, Operational Panels, and Notebooks.
<<<<<<< HEAD
=======
>>>>>>> 154de24 (Rename trace-analytics to observability (#341))
=======
>>>>>>> fff303a (updating readme and badges (#352))

### Trace Analytics

Expand Down Expand Up @@ -116,7 +125,7 @@ Dashboards offer a solution for a few selected use cases, and are great tools if

## Documentation

Please see our technical [documentation](https://opensearch.org/docs/latest/observability-plugins/index/) to learn more about its features.
Please see our technical [documentation](https://opensearch.org/docs/latest/observability/index/) to learn more about its features.

## Contributing

Expand Down
3 changes: 2 additions & 1 deletion dashboards-observability/.cypress/CYPRESS_TESTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ The observability plugin currently has 4 modules in it. Each of the modules have
* Renders input only mode
* Renders output only mode
* Duplicates paragraphs
* Adds a visualization paragraph
* Adds a dashboards visualization paragraph
* Adds an observability visualization paragraph
* Adds a SQL query paragraph
* Adds a PPL query paragraph
* Clears outputs
Expand Down
92 changes: 67 additions & 25 deletions dashboards-observability/.cypress/integration/notebooks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,35 @@ import {
MARKDOWN_TEXT,
SAMPLE_URL,
SQL_QUERY_TEXT,
PPL_QUERY_TEXT
} from "../utils/constants";
PPL_QUERY_TEXT,
} from '../utils/constants';

import { skipOn } from '@cypress/skip-test'
import { SAMPLE_PANEL } from '../utils/panel_constants';

import { skipOn } from '@cypress/skip-test';

describe('Adding sample data and visualization', () => {
it('Adds sample flights data for visualization paragraph', () => {
cy.visit(`${Cypress.env('opensearchDashboards')}/app/home#/tutorial_directory/sampleData`);
cy.get('div[data-test-subj="sampleDataSetCardflights"]').contains(/(Add|View) data/).click();
cy.get('div[data-test-subj="sampleDataSetCardflights"]')
.contains(/(Add|View) data/)
.click();
});
})

it('Add sample observability data', () => {
cy.visit(
`${Cypress.env('opensearchDashboards')}/app/observability-dashboards#/operational_panels/`
);
cy.get('.euiButton__text').contains('Actions').click();
cy.get('.euiContextMenuItem__text').contains('Add samples').click();
cy.get('.euiModalHeader__title[data-test-subj="confirmModalTitleText"]')
.contains('Add samples')
.should('exist');
cy.get('.euiButton__text').contains('Yes').click();
cy.wait(delay * 5);
cy.get('.euiTableCellContent').contains(SAMPLE_PANEL).should('exist');
});
});

describe('Testing notebooks table', () => {
beforeEach(() => {
Expand All @@ -31,7 +49,9 @@ describe('Testing notebooks table', () => {
it('Displays error toast for invalid notebook name', () => {
cy.get('.euiButton__text').contains('Create notebook').click();
cy.wait(delay);
cy.get('.euiButton__text').contains(/^Create$/).click();
cy.get('.euiButton__text')
.contains(/^Create$/)
.click();
cy.wait(delay);

cy.get('.euiToastHeader__title').contains('Invalid notebook name').should('exist');
Expand All @@ -41,7 +61,9 @@ describe('Testing notebooks table', () => {
cy.get('.euiButton__text').contains('Create notebook').click();
cy.wait(delay);
cy.get('input.euiFieldText').type(TEST_NOTEBOOK);
cy.get('.euiButton__text').contains(/^Create$/).click();
cy.get('.euiButton__text')
.contains(/^Create$/)
.click();
cy.wait(delay);

cy.contains(TEST_NOTEBOOK).should('exist');
Expand Down Expand Up @@ -81,7 +103,9 @@ describe('Testing notebooks table', () => {
cy.get('input.euiFieldSearch').type(TEST_NOTEBOOK + ' (copy) (rename)');
cy.wait(delay);

cy.get('a.euiLink').contains(TEST_NOTEBOOK + ' (copy) (rename)').should('exist');
cy.get('a.euiLink')
.contains(TEST_NOTEBOOK + ' (copy) (rename)')
.should('exist');
});

it('Deletes notebooks', () => {
Expand All @@ -104,7 +128,9 @@ describe('Testing notebooks table', () => {
cy.get('.euiButton__text').contains('Create notebook').click();
cy.wait(delay);
cy.get('input.euiFieldText').type(TEST_NOTEBOOK);
cy.get('.euiButton__text').contains(/^Create$/).click();
cy.get('.euiButton__text')
.contains(/^Create$/)
.click();
cy.wait(delay * 2);
});
});
Expand All @@ -114,7 +140,7 @@ describe('Test reporting integration if plugin installed', () => {
cy.visit(`${Cypress.env('opensearchDashboards')}/app/observability-dashboards#/notebooks`);
cy.get('.euiTableCellContent').contains(TEST_NOTEBOOK).click();
cy.wait(delay * 3);
cy.get('body').then($body => {
cy.get('body').then(($body) => {
skipOn($body.find('#reportingActionsButton').length <= 0);
});
});
Expand All @@ -138,24 +164,18 @@ describe('Test reporting integration if plugin installed', () => {
cy.wait(delay);
cy.get('button.euiContextMenuItem:nth-child(3)').contains('Create report definition').click();
cy.wait(delay);
cy.location('pathname', { timeout: 60000 }).should(
'include',
'/reports-dashboards'
);
cy.location('pathname', { timeout: 60000 }).should('include', '/reports-dashboards');
cy.wait(delay);
cy.get('#reportSettingsName').type('Create notebook on-demand report');
cy.get('#createNewReportDefinition').click({ force: true });
});

it ('View reports homepage from context menu', () => {
it('View reports homepage from context menu', () => {
cy.get('#reportingActionsButton').click();
cy.wait(delay);
cy.get('button.euiContextMenuItem:nth-child(4)').contains('View reports').click();
cy.wait(delay);
cy.location('pathname', { timeout: 60000 }).should(
'include',
'/reports-dashboards'
);
cy.location('pathname', { timeout: 60000 }).should('include', '/reports-dashboards');
});
});

Expand Down Expand Up @@ -235,7 +255,7 @@ describe('Testing paragraphs', () => {
cy.get(`a[href="${SAMPLE_URL}"]`).should('have.length.gte', 2);
});

it('Adds a visualization paragraph', () => {
it('Adds a dashboards visualization paragraph', () => {
cy.contains('Add paragraph').click();
cy.wait(delay);
cy.get('.euiContextMenuItem__text').contains('Visualization').click();
Expand All @@ -247,13 +267,12 @@ describe('Testing paragraphs', () => {

cy.get('.euiButton__text').contains('Browse').click();
cy.wait(delay);
cy.get('.euiFieldSearch').focus().type('{uparrow}{uparrow}{enter}')
cy.get('.euiFieldSearch').focus().type('[Flights] Flight Count and Average Ticket Price{enter}');
cy.wait(delay);
cy.get('.euiButton__text').contains('Select').click();
cy.wait(delay);
cy.get('.euiButton__text').contains('Run').click();
cy.wait(delay);

cy.get('div.visualization').should('exist');
});

Expand All @@ -273,6 +292,27 @@ describe('Testing paragraphs', () => {
cy.get('.euiDataGrid__overflow').should('exist');
});

it('Adds an observability visualization paragraph', () => {
cy.contains('Add paragraph').click();
cy.wait(delay);
cy.get('.euiContextMenuItem__text').contains('Visualization').click();
cy.wait(delay);

cy.get('.euiButton__text').contains('Run').click();
cy.wait(delay);
cy.get('.euiTextColor').contains('Visualization is required.').should('exist');

cy.get('.euiButton__text').contains('Browse').click();
cy.wait(delay);
cy.get('.euiFieldSearch').focus().type('[Logs] Count total requests by tags{enter}');
cy.wait(delay);
cy.get('.euiButton__text').contains('Select').click();
cy.wait(delay);
cy.get('.euiButton__text').contains('Run').click();
cy.wait(delay);
cy.get('h5').contains('[Logs] Count total requests by tags').should('exist');
});

it('Adds a PPL query paragraph', () => {
cy.contains('Add paragraph').click();
cy.wait(delay);
Expand Down Expand Up @@ -326,7 +366,7 @@ describe('Testing paragraphs', () => {
cy.get('.euiContextMenuItem__text').contains('Code block').click();
cy.wait(delay);

cy.get('.euiText').contains('[4] OpenSearch Dashboards visualization').should('exist');
cy.get('.euiText').contains('[4] Visualization').should('exist');
cy.get('.euiText').contains('[5] Code block').should('exist');
});

Expand All @@ -337,7 +377,7 @@ describe('Testing paragraphs', () => {
cy.get('.euiContextMenuItem__text').contains('Move to bottom').click();
cy.wait(delay);

cy.get('.euiText').contains('[3] OpenSearch Dashboards visualization').should('exist');
cy.get('.euiText').contains('[3] Visualization').should('exist');
});

it('Duplicates and renames the notebook', () => {
Expand All @@ -359,7 +399,9 @@ describe('Testing paragraphs', () => {
cy.reload();
cy.wait(delay * 3);

cy.get('.euiTitle').contains(TEST_NOTEBOOK + ' (copy) (rename)').should('exist');
cy.get('.euiTitle')
.contains(TEST_NOTEBOOK + ' (copy) (rename)')
.should('exist');
cy.get(`a[href="${SAMPLE_URL}"]`).should('have.length.gte', 2);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ describe('Add samples and clean up all test data', () => {

it('Delete visualizations from event analytics', () => {
moveToEventsHome();
cy.get('.euiButtonEmpty__text').contains('Rows per page: 10').click();
cy.get('span.euiButtonEmpty__text').contains('Rows per page: 10').click();
cy.get('.euiContextMenuItem__text').contains('50 rows').click();
cy.get('.euiCheckbox__input[data-test-subj="checkboxSelectAll"]').click();
cy.wait(delay);
Expand Down
2 changes: 1 addition & 1 deletion dashboards-observability/common/constants/custom_panels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
*/

export const CUSTOM_PANELS_API_PREFIX = '/api/observability/operational_panels';
export const CUSTOM_PANELS_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/observability-plugins/operational-panels/';
export const CUSTOM_PANELS_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/observability/operational-panels/';
export const CREATE_PANEL_MESSAGE = 'Enter a name to describe the purpose of this custom panel.';
2 changes: 1 addition & 1 deletion dashboards-observability/common/constants/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

export const EVENT_ANALYTICS_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/observability-plugins/event-analytics/'
export const EVENT_ANALYTICS_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/observability/event-analytics/'
export const RAW_QUERY = 'rawQuery';
export const FINAL_QUERY = 'finalQuery';
export const SELECTED_DATE_RANGE = 'selectedDateRange';
Expand Down
2 changes: 1 addition & 1 deletion dashboards-observability/common/constants/notebooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const NOTEBOOKS_API_PREFIX = '/api/observability/notebooks';
export const NOTEBOOKS_SELECTED_BACKEND = 'DEFAULT'; // ZEPPELIN || DEFAULT
export const NOTEBOOKS_FETCH_SIZE = 1000;
export const CREATE_NOTE_MESSAGE = 'Enter a name to describe the purpose of this notebook.';
export const NOTEBOOKS_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/observability-plugins/notebooks/';
export const NOTEBOOKS_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/observability/notebooks/';

export const zeppelinURL = 'http://localhost:8080';

Expand Down
3 changes: 2 additions & 1 deletion dashboards-observability/common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export const observabilityTitle = 'Observability';
export const observabilityPluginOrder = 6000;

// Shared Constants
export const PPL_DOCUMENTATION_URL ='https://opensearch.org/docs/latest/observability-plugins/ppl/commands/'
export const SQL_DOCUMENTATION_URL ='https://opensearch.org/docs/latest/search-plugins/sql/index/'
export const PPL_DOCUMENTATION_URL ='https://opensearch.org/docs/latest/observability/ppl/commands/'
export const UI_DATE_FORMAT = 'MM/DD/YYYY hh:mm A';
export const PPL_DATE_FORMAT = 'YYYY-MM-DD HH:mm:ss';
export const PPL_STATS_REGEX = /\|\s*stats/i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const SERVICE_MAP_MAX_NODES = 500;
// size limit when requesting edge related queries, not necessarily the number of edges
export const SERVICE_MAP_MAX_EDGES = 1000;
export const TRACES_MAX_NUM = 3000;
export const TRACE_ANALYTICS_DOCUMENTATION_LINK = 'https://opensearch.org/docs/latest/observability-plugins/trace/index/';
export const TRACE_ANALYTICS_DOCUMENTATION_LINK = 'https://opensearch.org/docs/latest/observability/trace/index/';

export const TRACE_ANALYTICS_INDICES_ROUTE = '/api/observability/trace_analytics/indices';
export const TRACE_ANALYTICS_DSL_ROUTE = '/api/observability/trace_analytics/query';
4 changes: 2 additions & 2 deletions dashboards-observability/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "observabilityDashboards",
"version": "1.2.0.0",
"opensearchDashboardsVersion": "1.2.0",
"version": "1.3.0.0",
"opensearchDashboardsVersion": "1.3.0",
"server": true,
"ui": true,
"requiredPlugins": [
Expand Down
7 changes: 4 additions & 3 deletions dashboards-observability/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "observability-dashboards",
"version": "1.2.0.0",
"version": "1.3.0.0",
"main": "index.ts",
"license": "Apache-2.0",
"scripts": {
Expand Down Expand Up @@ -37,7 +37,8 @@
"prismjs": "^1.22.0",
"trim": "^1.0.0",
"lodash": "^4.17.21",
"glob-parent": "^5.1.2",
"ansi-regex": "^5.0.1"
"glob-parent": "^6.0.1",
"ansi-regex": "^5.0.1",
"json-schema": "^0.4.0"
}
}
1 change: 1 addition & 0 deletions dashboards-observability/public/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const App = ({
DepsStart.dashboard.DashboardContainerByValueRenderer
}
http={http}
pplService={pplService}
setBreadcrumbs={chrome.setBreadcrumbs}
parentBreadcrumb={parentBreadcrumb}
notifications={notifications}
Expand Down
Loading