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

Update Namespaces/APIs/Documentation for OpenSearch #55

Merged
merged 24 commits into from
May 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dc3799b
rename namespace and api paths, replace opendistro occurrences with o…
davidcui1225 May 18, 2021
689ac75
update jest snapshots with opensearch doc links
davidcui1225 May 18, 2021
4d4a610
rename API endpoints to _plugins
davidcui1225 May 19, 2021
f9b9ba4
Merge branch 'odfe-backward-compatibility' of https://github.com/open…
davidcui1225 May 19, 2021
3a3c4e5
update common utils dependency var
davidcui1225 May 20, 2021
9b9906d
update reports scheduler test distribution to INTEG_TEST and update j…
davidcui1225 May 20, 2021
ba03d5b
update common-utils and job-scheduler dependencies refs in reports-sc…
davidcui1225 May 20, 2021
344be31
remove beta version identifier from job scheduler
davidcui1225 May 20, 2021
e2b4e43
use 1.x OpenSearch
davidcui1225 May 20, 2021
f3aee16
update version to rc1
davidcui1225 May 21, 2021
ddb255a
add version qualifier for job scheduler build
davidcui1225 May 21, 2021
e913553
undo changes in reports scheduler flow
davidcui1225 May 21, 2021
98d8956
fix scheduler workflow
davidcui1225 May 21, 2021
e3db6ad
add version in job scheduler build
davidcui1225 May 21, 2021
4c8e38a
rename remaining instances of open distro to opensearch
davidcui1225 May 21, 2021
102927e
add backward compatibility for Settings
davidcui1225 May 21, 2021
d327485
remove extra Open Search from dashboards reports plugin name
davidcui1225 May 21, 2021
885bfc1
revert opensearch name back to opendistro pending security plugin change
davidcui1225 May 21, 2021
2401dde
add backward compatibility for rest APIs and legacy api test cases
davidcui1225 May 24, 2021
f91549f
merge from origin/dev
davidcui1225 May 24, 2021
8a703b3
use 1.x version for OpenSearch Dashboards in workflows
davidcui1225 May 24, 2021
9a80b9b
update opensearch version in scheduler build to 1.0.0-rc1
davidcui1225 May 24, 2021
4300e81
update common-utils and job scheduler spi reference to rc1
davidcui1225 May 24, 2021
f31e02b
rename job scheduler test resource to rc1
davidcui1225 May 24, 2021
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
4 changes: 2 additions & 2 deletions .github/workflows/dashboards-reports-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:

env:
PLUGIN_NAME: reportsDashboards
OPENSEARCH_VERSION: 1.0.0-beta1
OPENSEARCH_PLUGIN_VERSION: 1.0.0.0-beta1
OPENSEARCH_VERSION: 1.x
OPENSEARCH_PLUGIN_VERSION: 1.0.0.0-rc1

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: [pull_request, push]

env:
PLUGIN_NAME: reportsDashboards
OPENSEARCH_VERSION: 1.0.0-beta1
OPENSEARCH_PLUGIN_VERSION: 1.0.0.0-beta1
OPENSEARCH_VERSION: 1.x
OPENSEARCH_PLUGIN_VERSION: 1.0.0.0-rc1

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reports-scheduler-release-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Release Reports Scheduler Artifacts
# This workflow is triggered on creating tags to master or an opendistro release branch
# This workflow is triggered on creating tags to master or an opensearch release branch
on:
push:
tags:
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/reports-scheduler-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ jobs:
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: '1.0.0-beta1'
ref: '1.x'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal -Dbuild.version_qualifier=beta1 -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dbuild.version_qualifier=rc1 -Dbuild.snapshot=false

# dependencies: common-utils
- name: Checkout common-utils
uses: actions/checkout@v2
with:
repository: 'opensearch-project/common-utils'
ref: '1.0.0-beta1'
ref: 'main'
path: common-utils
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-rc1

# dependencies: job-scheduler
- name: Checkout job-scheduler
uses: actions/checkout@v2
with:
repository: 'opensearch-project/job-scheduler'
ref: '1.0.0-beta1'
ref: 'main'
path: job-scheduler
- name: Build job-scheduler
working-directory: ./job-scheduler
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-beta1 -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-rc1 -Dbuild.snapshot=false

# reports-scheduler
- name: Checkout Reports Scheduler
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Build with Gradle
run: |
cd reports-scheduler
./gradlew build -Dopensearch.version=1.0.0-beta1
./gradlew build -Dopensearch.version=1.0.0-rc1

- name: Create Artifact Path
run: |
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[![OpenSearch Dashboards Reports CI](https://github.com/opensearch-project/dashboards-reports/workflows/Test%20and%20Build%20OpenSearch%20Dashboards%20Reports/badge.svg)](https://github.com/opensearch-project/dashboards-reports/actions?query=workflow%3A%22Test+and+Build+OpenSearch+Dashboards+Reports%22)
[![Reports Scheduler CI](https://github.com/opensearch-project/dashboards-reports/workflows/Test%20and%20Build%20Reports%20Scheduler/badge.svg)](https://github.com/opensearch-project/dashboards-reports/actions?query=workflow%3A%22Test+and+Build+Reports+Scheduler%22)
[![codecov](https://codecov.io/gh/opensearch-project/dashboards-reports/branch/dev/graph/badge.svg?token=FBVYQSZD3B)](https://codecov.io/gh/opensearch-project/dashboards-reports)
[![Documentation](https://img.shields.io/badge/documentation-blue.svg)](https://opendistro.github.io/for-elasticsearch-docs/docs/kibana/reporting/)
[![Documentation](https://img.shields.io/badge/documentation-blue.svg)](https://docs-beta.opensearch.org/docs/opensearch-dashboards/reporting/)
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)

# OpenSearch Dashboards Reports for Open Distro
# OpenSearch Dashboards Reports

OpenSearch Dashboards Reports for Open Distro allows ‘Report Owner’ (engineers, including but not limited to developers, DevOps, IT Engineer, and IT admin) export and share reports from OpenSearch Dashboards dashboards, saved search, alerts and visualizations. It helps automate the process of scheduling reports on an on-demand or a periodical basis (on cron schedules as well). Further, it also automates the process of exporting and sharing reports triggered for various alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. Scheduled reports can be sent to (shared with) self or various stakeholders within the organization such as, including but not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email, slack, Amazon Chime. However, in order to export, schedule and share reports, report owners should have the necessary permissions as defined under Roles and Privileges.
OpenSearch Dashboards Reports allows ‘Report Owner’ (engineers, including but not limited to developers, DevOps, IT Engineer, and IT admin) export and share reports from OpenSearch Dashboards dashboards, saved search, alerts and visualizations. It helps automate the process of scheduling reports on an on-demand or a periodical basis (on cron schedules as well). Further, it also automates the process of exporting and sharing reports triggered for various alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. Scheduled reports can be sent to (shared with) self or various stakeholders within the organization such as, including but not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email, slack, Amazon Chime. However, in order to export, schedule and share reports, report owners should have the necessary permissions as defined under Roles and Privileges.

# Request for Comments ( RFC )

Expand All @@ -29,13 +29,13 @@ There could be two reasons for this problem

2. Missing additional dependencies. Please refer to [additional dependencies section](./dashboards-reports/rendering-engine/headless-chrome/README.md#additional-libaries) to install required dependencies according to your operating system.

## Contributing to OpenSearch Dashboards reports for Open Distro
## Contributing to OpenSearch Dashboards reports

We welcome you to get involved in development, documentation, testing the OpenSearch Dashboards reports plugin. See our [CONTRIBUTING.md](./CONTRIBUTING.md) and join in.

## Code of Conduct

This project has adopted an [Open Source Code of Conduct](https://opendistro.github.io/for-elasticsearch/codeofconduct.html).
This project has adopted an [Open Source Code of Conduct](https://github.com/opensearch-project/project-website/blob/main/CONTRIBUTING.md#code-of-conduct).

## Security issue notifications

Expand Down
6 changes: 3 additions & 3 deletions dashboards-reports/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenSearch Dashboards Reports

OpenSearch Dashboards Reports for Open Distro allows ‘Report Owner’ (engineers, including but not limited to developers, DevOps, IT Engineer, and IT admin) export and share reports from OpenSearch Dashboards dashboards, saved search, alerts and visualizations. It helps automate the process of scheduling reports on an on-demand or a periodical basis (on cron schedules as well). Further, it also automates the process of exporting and sharing reports triggered for various alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. Scheduled reports can be sent to (shared with) self or various stakeholders within the organization such as, including but not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email, slack, Amazon Chime. However, in order to export, schedule and share reports, report owners should have the necessary permissions as defined under Roles and Privileges.
OpenSearch Dashboards Reports allows ‘Report Owner’ (engineers, including but not limited to developers, DevOps, IT Engineer, and IT admin) export and share reports from OpenSearch Dashboards dashboards, saved search, alerts and visualizations. It helps automate the process of scheduling reports on an on-demand or a periodical basis (on cron schedules as well). Further, it also automates the process of exporting and sharing reports triggered for various alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. Scheduled reports can be sent to (shared with) self or various stakeholders within the organization such as, including but not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email, slack, Amazon Chime. However, in order to export, schedule and share reports, report owners should have the necessary permissions as defined under Roles and Privileges.

# Request for Comments ( RFC )

Expand Down Expand Up @@ -49,13 +49,13 @@ Example output: `./build/reports-dashboards-0.0.1.zip`

Runs the plugin tests.

## Contributing to OpenSearch Dashboards reports for Open Distro
## Contributing to OpenSearch Dashboards reports

We welcome you to get involved in development, documentation, testing the OpenSearch Dashboards reports plugin. See our [CONTRIBUTING.md](./CONTRIBUTING.md) and join in.

## Code of Conduct

This project has adopted an [Open Source Code of Conduct](https://opendistro.github.io/for-elasticsearch/codeofconduct.html).
This project has adopted an [Open Source Code of Conduct](https://github.com/opensearch-project/project-website/blob/main/CONTRIBUTING.md#code-of-conduct).

## Security issue notifications

Expand Down
4 changes: 2 additions & 2 deletions dashboards-reports/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ export const PLUGIN_NAME = 'reports-dashboards';
export const API_PREFIX = '/api/reporting';

export const NOTIFICATION_API = {
SEND: '/_opendistro/_notifications/send',
SEND: '/_plugins/_notifications/send',
};

const BASE_REPORTS_URI = '/_opendistro/_reports';
const BASE_REPORTS_URI = '/_plugins/_reports';

export const OPENSEARCH_REPORTS_API = {
ON_DEMAND_REPORT: `${BASE_REPORTS_URI}/on_demand`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This plugin will introduce the ability to generate reports, as well as enable th

### 1.2 Introduction

OpenSearch Dashboards Reports for Open Distro allows ‘Report Owner’ (engineers, including but not limited to developers, DevOps, IT Engineer, and IT admin) export and share reports from OpenSearch Dashboards dashboards, saved search, alerts and visualizations. It helps automate the process of scheduling reports on an on-demand or a periodical basis (on cron schedules as well). Further, it also automates the process of exporting and sharing reports triggered for various alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. Scheduled reports can be sent to (shared with) self or various stakeholders within the organization such as, including but not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email, slack, Amazon Chime. However, in order to export, schedule and share reports, report owners should have the necessary permissions as defined under Roles and Privileges.
OpenSearch Dashboards Reports allows ‘Report Owner’ (engineers, including but not limited to developers, DevOps, IT Engineer, and IT admin) export and share reports from OpenSearch Dashboards dashboards, saved search, alerts and visualizations. It helps automate the process of scheduling reports on an on-demand or a periodical basis (on cron schedules as well). Further, it also automates the process of exporting and sharing reports triggered for various alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. Scheduled reports can be sent to (shared with) self or various stakeholders within the organization such as, including but not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email, slack, Amazon Chime. However, in order to export, schedule and share reports, report owners should have the necessary permissions as defined under Roles and Privileges.


## 2. Requirements
Expand Down Expand Up @@ -192,10 +192,10 @@ List of curated headless browsers https://github.com/dhamaniasad/HeadlessBrowser
|Java |[Selenium](https://www.selenium.dev/) |No support for PDF generation |
| |[jBrowserDriver](https://github.com/MachinePublishers/jBrowserDriver) |No support for PDF generation |

**(II)** To generate CSV reports based on SQL queries, we will be leveraging OpenDistro SQL plugin with **`format=csv`**
**(II)** To generate CSV reports based on SQL queries, we will be leveraging OpenSearch SQL plugin with **`format=csv`**

```
POST _opendistro/_sql?format=csv
POST _plugins/_sql?format=csv
{
"query" : "SELECT ... FROM ... WHERE ... ORDER BY ..."
}
Expand Down Expand Up @@ -423,7 +423,7 @@ listReportEvents()

### 4.3 Job Scheduler APIs

https://github.com/opendistro-for-elasticsearch/job-scheduler
https://github.com/opensearch-project/job-scheduler

**(A) createSchedule**

Expand All @@ -439,12 +439,12 @@ Scheduled Report Creation workflow

### 4.4 Alerting Integration

https://opendistro.github.io/for-elasticsearch-docs/docs/alerting/
https://docs-beta.opensearch.org/docs/alerting/

ODFE Alerting can be used as an external trigger. To generate the report the `generateReport()` API can be utilized as `custom_webhook` destination.

```
POST _opendistro/_alerting/destinations
POST _plugins/_alerting/destinations

{
"type": "custom_webhook",
Expand Down Expand Up @@ -486,7 +486,7 @@ TODO

### (II) Security reference

* https://opendistro.github.io/for-elasticsearch-docs/docs/security-configuration/concepts/
* https://opendistro.github.io/for-elasticsearch-docs/docs/security-access-control/
* https://opendistro.github.io/for-elasticsearch-docs/docs/security-access-control/api/
* https://docs-beta.opensearch.org/docs/security/configuration/
* https://docs-beta.opensearch.org/docs/security/access-control/
* https://docs-beta.opensearch.org/docs/security/access-control/api/

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OpenSearch Dashboards Reporting
## Overview
OpenSearch Dashboards Reports for Open Distro allows `report owners` (including but not limited to Developers, DevOps, IT Engineers, and IT admins) to export and share reports from OpenSearch Dashboards dashboards, saved queries, alerts and visualizations. It helps automate the process of scheduling reports via on-demand or periodic basis (including cron schedules). It also automates exporting and sharing reports from triggers, such as alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. Scheduled reports can be sent to (shared with) self or various stakeholders within the organization such as, including but not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email or the OpenSearch Dashboards reporting plugin.
OpenSearch Dashboards Reports allows `report owners` (including but not limited to Developers, DevOps, IT Engineers, and IT admins) to export and share reports from OpenSearch Dashboards dashboards, saved queries, alerts and visualizations. It helps automate the process of scheduling reports via on-demand or periodic basis (including cron schedules). It also automates exporting and sharing reports from triggers, such as alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. Scheduled reports can be sent to (shared with) self or various stakeholders within the organization such as, including but not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email or the OpenSearch Dashboards reporting plugin.

## Key user flows
### From source
Expand Down
4 changes: 2 additions & 2 deletions dashboards-reports/opensearch_dashboards.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "reportsDashboards",
"version": "1.0.0.0-beta1",
"opensearchDashboardsVersion": "1.0.0-beta1",
"version": "1.0.0.0-rc1",
"opensearchDashboardsVersion": "1.0.0-rc1",
"requiredPlugins": ["navigation", "data", "opensearchDashboardsUtils"],
"optionalPlugins": ["share"],
"server": true,
Expand Down
6 changes: 3 additions & 3 deletions dashboards-reports/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "reports_dashboards",
"version": "1.0.0.0-beta1",
"version": "1.0.0.0-rc1",
"description": "OpenSearch Dashboards Reports Plugin",
"license": "Apache-2.0",
"main": "index.ts",
"opensearchDashboards": {
"version": "1.0.0-beta1",
"templateVersion": "1.0.0-beta1"
"version": "1.0.0-rc1",
"templateVersion": "1.0.0-rc1"
},
"scripts": {
"osd": "node ../../scripts/osd",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ async function getTenantInfoIfExists() {
// helper function to add tenant info to url(if tenant is available)
function addTenantToURL(url, userRequestedTenant) {
// build fake url from relative url
const fakeUrl = `http://opendistro.com${url}`;
const fakeUrl = `http://opensearch.com${url}`;
const tenantKey = 'security_tenant';
const tenantKeyAndValue =
tenantKey + '=' + encodeURIComponent(userRequestedTenant);
Expand Down
Loading