Skip to content

Commit

Permalink
Update Namespaces/APIs/Documentation for OpenSearch (#55)
Browse files Browse the repository at this point in the history
Signed-off-by: David Cui <davidcui@amazon.com>
  • Loading branch information
davidcui1225 authored May 24, 2021
1 parent 1260f6b commit fa2d7dc
Show file tree
Hide file tree
Showing 110 changed files with 1,862 additions and 594 deletions.
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

0 comments on commit fa2d7dc

Please sign in to comment.