Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into release-notes-1.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongnansu committed Jun 30, 2021
2 parents d23294c + 5c12180 commit d3f5445
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dashboards-reports-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "10.23.1"
node-version: "10.24.1"

- name: Move Dashboards Reports to Plugins Dir
run: mv dashboards-reports OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: "10.23.1"
node-version: "10.24.1"

- name: Move Dashboards Reports to Plugins Dir
run: mv dashboards-reports OpenSearch-Dashboards/plugins/${{ env.PLUGIN_NAME }}
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/reports-scheduler-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Test and Build Reports Scheduler

on: [push, pull_request]

env:
OPENSEARCH_VERSION: '1.0'
COMMON_UTILS_VERSION: '1.0'
JOB_SCHEDULER_VERSION: '1.0'

jobs:
build:
Expand All @@ -19,7 +23,7 @@ jobs:
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: '1.0'
ref: ${{ env.OPENSEARCH_VERSION }}
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false
Expand All @@ -29,22 +33,22 @@ jobs:
uses: actions/checkout@v2
with:
repository: 'opensearch-project/common-utils'
ref: 'main'
ref: ${{ env.COMMON_UTILS_VERSION }}
path: common-utils
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0
run: ./gradlew publishToMavenLocal -Dopensearch.version=${{ env.OPENSEARCH_VERSION }}.0

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

# reports-scheduler
- name: Checkout Reports Scheduler
Expand All @@ -53,7 +57,7 @@ jobs:
- name: Build with Gradle
run: |
cd reports-scheduler
./gradlew build -Dopensearch.version=1.0.0
./gradlew build -Dopensearch.version=${{ env.OPENSEARCH_VERSION }}.0
- name: Upload coverage
uses: codecov/codecov-action@v1
Expand Down
3 changes: 3 additions & 0 deletions dashboards-reports/.cypress/integration/01-create.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ describe('Cypress', () => {
// set report trigger to Schedule option
cy.get('[type="radio"]').check({ force: true });

// set source back to saved search for testing purpose
cy.get('#savedSearchReportSource').check({ force: true });

// create scheduled report definition
cy.get('#createNewReportDefinition').click({ force: true });
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export function ReportSettings(props: ReportSettingProps) {
reportDefinitionRequest.report_params.report_source = 'Dashboard';
reportDefinitionRequest.report_params.core_params.base_url =
getDashboardBaseUrlCreate(edit, editDefinitionId, fromInContext) +
dashboards[0].value;
dashboards[0]?.value;

// set params to visual report params after switch from saved search
handleDataToVisualReportSourceChange(reportDefinitionRequest);
Expand All @@ -172,7 +172,7 @@ export function ReportSettings(props: ReportSettingProps) {
reportDefinitionRequest.report_params.report_source = 'Visualization';
reportDefinitionRequest.report_params.core_params.base_url =
getVisualizationBaseUrlCreate(edit, editDefinitionId, fromInContext) +
visualizations[0].value;
visualizations[0]?.value;

// set params to visual report params after switch from saved search
handleDataToVisualReportSourceChange(reportDefinitionRequest);
Expand All @@ -181,17 +181,17 @@ export function ReportSettings(props: ReportSettingProps) {
reportDefinitionRequest.report_params.report_source = 'Saved search';
reportDefinitionRequest.report_params.core_params.base_url =
getSavedSearchBaseUrlCreate(edit, editDefinitionId, fromInContext) +
savedSearches[0].value;
savedSearches[0]?.value;
reportDefinitionRequest.report_params.core_params.saved_search_id =
savedSearches[0].value;
savedSearches[0]?.value;
reportDefinitionRequest.report_params.core_params.report_format = 'csv';
reportDefinitionRequest.report_params.core_params.limit = 10000;
reportDefinitionRequest.report_params.core_params.excel = true;
} else if (e === 'notebooksReportSource') {
reportDefinitionRequest.report_params.report_source = 'Notebook';
reportDefinitionRequest.report_params.core_params.base_url =
getNotebooksBaseUrlCreate(edit, editDefinitionId, fromInContext) +
notebooks[0].value;
notebooks[0]?.value;

// set params to visual report params after switch from saved search
handleDataToVisualReportSourceChange(reportDefinitionRequest);
Expand Down
2 changes: 1 addition & 1 deletion reports-scheduler/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions reports-scheduler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ buildscript {
opensearch_group = "org.opensearch"
opensearch_version = System.getProperty("opensearch.version", "1.0.0")
kotlin_version = System.getProperty("kotlin.version", "1.4.0")
common_utils_version = "1.0.0.0"
job_scheduler_version = "1.0.0.0"
}

repositories {
Expand Down Expand Up @@ -139,8 +141,8 @@ dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
compile "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9"
compile "${group}:common-utils:${opensearchVersion}"
compileOnly "${group}:opensearch-job-scheduler-spi:${opensearchVersion}"
compile "${group}:common-utils:${common_utils_version}"
compileOnly "${group}:opensearch-job-scheduler-spi:${job_scheduler_version}"
compile group: 'com.google.guava', name: 'guava', version: '15.0'
compile "org.json:json:20180813"
compile group: 'com.github.wnameless', name: 'json-flattener', version: '0.1.0'
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit d3f5445

Please sign in to comment.