diff --git a/.github/ISSUE_TEMPLATE/bug_template.md b/.github/ISSUE_TEMPLATE/bug_template.md new file mode 100644 index 0000000..8fae24d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_template.md @@ -0,0 +1,33 @@ +--- +name: 🐛 Bug report +about: Create a report to help us improve +title: "[BUG]" +labels: bug +assignees: '' +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Plugins** +Please list all plugins currently enabled. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Host/Environment (please complete the following information):** + - OS: [e.g. iOS] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..2791b80 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: 🎆 Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml index 4f32711..583e614 100644 --- a/.github/workflows/release-workflow.yml +++ b/.github/workflows/release-workflow.yml @@ -7,8 +7,8 @@ on: - 'v*' env: - PLUGIN_NAME: opendistroGanttChartKibana - OD_VERSION: 1.13.0.0 + PLUGIN_NAME: ganttchartDashboards + OD_VERSION: 1.15.0.0 jobs: @@ -28,13 +28,12 @@ jobs: - name: Checkout Plugin uses: actions/checkout@v1 - - name: Checkout Kibana + - name: Checkout OpenSearch Dashboards uses: actions/checkout@v1 with: - repository: opendistro-for-elasticsearch/kibana-oss - ref: 7.10.2 - token: ${{secrets.OD_ACCESS}} - path: kibana-visualizations/kibana + repository: opensearch-project/Opensearch-Dashboards + ref: 1.x + path: dashboards-visualizations/OpenSearch-Dashboards - name: Setup Node uses: actions/setup-node@v1 @@ -43,27 +42,28 @@ jobs: - name: Move Gantt Chart to Plugins Dir run: | - mv gantt-chart kibana/plugins + mv gantt-chart OpenSearch-Dashboards/plugins - - name: Kibana Pluign Bootstrap + - name: Plugin Bootstrap run: | - cd kibana/plugins/gantt-chart - yarn kbn bootstrap + cd OpenSearch-Dashboards/plugins/gantt-chart + yarn osd bootstrap - name: Build Artifact run: | - cd kibana/plugins/gantt-chart + cd OpenSearch-Dashboards/plugins/gantt-chart yarn build mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip - name: Upload to S3 run: | - cd kibana/plugins/gantt-chart + cd OpenSearch-Dashboards/plugins/gantt-chart artifact=`ls ./build/*.zip` - + # inject build number before the suffix zip_outfile=`basename ${artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip` + # TODO update s3 bucket s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/kibana-plugins/gantt-chart/" echo "Copying ${artifact} to ${s3_prefix}${zip_outfile}" diff --git a/.github/workflows/test-and-build-workflow.yml b/.github/workflows/test-and-build-workflow.yml index 6ef89f5..1962422 100644 --- a/.github/workflows/test-and-build-workflow.yml +++ b/.github/workflows/test-and-build-workflow.yml @@ -4,8 +4,8 @@ name: Test and Build Gantt Chart on: [pull_request, push] env: - PLUGIN_NAME: opendistroGanttChartKibana - OD_VERSION: 1.13.0.0 + PLUGIN_NAME: ganttchartDashboards + OD_VERSION: 1.15.0.0 jobs: @@ -16,30 +16,30 @@ jobs: steps: - name: Checkout Plugin uses: actions/checkout@v1 - - name: Checkout Kibana + - name: Checkout OpenSearch Dashboards uses: actions/checkout@v1 with: - repository: elastic/kibana - ref: v7.10.2 - path: kibana-visualizations/kibana + repository: opensearch-project/Opensearch-Dashboards + ref: 1.x + path: dashboards-visualizations/OpenSearch-Dashboards - name: Setup Node uses: actions/setup-node@v1 with: node-version: '10.23.1' - name: Move Gantt Chart to Plugins Dir run: | - mv gantt-chart kibana/plugins - - name: Kibana Plugin Bootstrap + mv gantt-chart OpenSearch-Dashboards/plugins + - name: Plugin Bootstrap run: | - cd kibana/plugins/gantt-chart - yarn kbn bootstrap + cd OpenSearch-Dashboards/plugins/gantt-chart + yarn osd bootstrap - name: Build Artifact run: | - cd kibana/plugins/gantt-chart + cd OpenSearch-Dashboards/plugins/gantt-chart yarn build mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip - name: Upload Artifact uses: actions/upload-artifact@v1 with: name: gantt-chart - path: kibana/plugins/gantt-chart/build + path: OpenSearch-Dashboards/plugins/gantt-chart/build diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 5b627cf..997bae6 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,4 +1,25 @@ -## Code of Conduct -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. + +This code of conduct applies to all spaces provided by the OpenSource project including in code, documentation, issue trackers, mailing lists, chat channels, wikis, blogs, social media and any other communication channels used by the project. + + +**Our open source communities endeavor to:** + +* Be Inclusive: We are committed to being a community where everyone can join and contribute. This means using inclusive and welcoming language. +* Be Welcoming: We are committed to maintaining a safe space for everyone to be able to contribute. +* Be Respectful: We are committed to encouraging differing viewpoints, accepting constructive criticism and work collaboratively towards decisions that help the project grow. Disrespectful and unacceptable behavior will not be tolerated. +* Be Collaborative: We are committed to supporting what is best for our community and users. When we build anything for the benefit of the project, we should document the work we do and communicate to others on how this affects their work. + + +**Our Responsibility. As contributors, members, or bystanders we each individually have the responsibility to behave professionally and respectfully at all times. Disrespectful and unacceptable behaviors include, but are not limited to:** + +* The use of violent threats, abusive, discriminatory, or derogatory language; +* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, race, political or religious affiliation; +* Posting of sexually explicit or violent content; +* The use of sexualized language and unwelcome sexual attention or advances; +* Public or private harassment of any kind; +* Publishing private information, such as physical or electronic address, without permission; +* Other conduct which could reasonably be considered inappropriate in a professional setting; +* Advocating for or encouraging any of the above behaviors. +* Enforcement and Reporting Code of Conduct Issues: + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:opensource-codeofconduct@amazon.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. diff --git a/LICENSE b/LICENSE index 67db858..261eeb9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -173,3 +172,30 @@ defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 0000000..ede2f2a --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,7 @@ +# Dashboards Visualizations Maintainers + +## Maintainers +| Maintainer | GitHub ID | Affiliation | +|------------------------|---------------------------------------------------|-------------| +| David Cui | [davidcui-amzn](https://github.com/davidcui-amzn) | Amazon | +| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon | diff --git a/NOTICE b/NOTICE index 616fc58..be83767 100644 --- a/NOTICE +++ b/NOTICE @@ -1 +1,12 @@ -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +OpenSearch +Copyright 2021 OpenSearch Contributors + +This product includes software developed by +Elasticsearch (http://www.elastic.co). +Copyright 2009-2018 Elasticsearch + +This product includes software developed by The Apache Software +Foundation (http://www.apache.org/). + +This product includes software developed by +Joda.org (http://www.joda.org/). diff --git a/README.md b/README.md index 951458d..8c0b660 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,36 @@ -# Open Distro for Elasticsearch Kibana Visualizations +# OpenSearch Dashboards Visualizations -The Open Distro for Elasticsearch Kibana Visualizations enables you to use additional types of visualizations inside Kibana Visualize and integrate them in Kibana Dashboard. +The OpenSearch Dashboards Visualizations enables you to use additional types of visualizations inside OpenSearch Dashboards Visualize and integrate them in Dashboard. ## Documentation -Please see our technical [documentation](https://opendistro.github.io/for-elasticsearch-docs/) to learn more about its features. +Please see our technical [documentation](https://opendistro.github.io/for-elasticsearch-docs/docs/kibana/gantt/) to learn more about its features. ## Setup -1. Download Elasticsearch for the version that matches the [Kibana version specified in package.json](./package.json#L5). -1. Download the Kibana source code for the [version specified in package.json](./package.json#L5) you want to set up. +1. Download OpenSearch for the version that matches the [OpenSearch Dashboards version specified in package.json](./package.json#L5). +1. Download the OpenSearch Dashboards source code for the [version specified in package.json](./package.json#L5) you want to set up. - See the [Kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#setting-up-your-development-environment) for more instructions on setting up your development environment. - -1. Change your node version to the version specified in `.node-version` inside the Kibana root directory. -1. cd into the Kibana source code directory. +1. Change your node version to the version specified in `.node-version` inside the OpenSearch Dashboards root directory. +1. cd into the OpenSearch Dashboards source code directory. 1. Check out this package from version control into the `plugins` directory. ``` rm plugins -r -git clone git@github.com:opendistro-for-elasticsearch/kibana-visualizations.git plugins --no-checkout +git clone git@github.com:opensearch-project/dashboards-visualizations.git plugins --no-checkout cd plugins echo 'gantt-chart/*' >> .git/info/sparse-checkout git config core.sparseCheckout true git checkout main ``` -6. Run `yarn kbn bootstrap` inside `kibana` directory. +6. Run `yarn osd bootstrap` inside `OpenSearch-Dashboards` directory. Ultimately, your directory structure should look like this: ```md . -├── kibana +├── OpenSearch Dashboards │ └── plugins │ └── gantt-chart ``` @@ -42,29 +40,27 @@ Ultimately, your directory structure should look like this: To build the plugin's distributable zip simply run `yarn build`. -Example output: `./build/opendistroGanttChartKibana-*.zip` +Example output: `./build/ganttchartDashboards*.zip` ## Run - `yarn start` - Starts Kibana and includes this plugin. Kibana will be available on `localhost:5601`. + Starts OpenSearch Dashboards and includes this plugin. OpenSearch Dashboards will be available on `localhost:5601`. - `npx cypress run` Runs the plugin cypress tests. -## Contributing to Open Distro for Elasticsearch Kibana Visualizations +## Contributing to OpenSearch Dashboards Visualizations -We welcome you to get involved in development, documentation, testing the kibana reports plugin. See our [CONTRIBUTING.md](./CONTRIBUTING.md) and join in. - -Since this is a Kibana plugin, it can be useful to review the [Kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md) alongside the documentation around [Kibana plugins](https://www.elastic.co/guide/en/kibana/master/kibana-plugins.html) and [plugin development](https://www.elastic.co/guide/en/kibana/current/plugin-development.html). +We welcome you to get involved in development, documentation, testing the visualizations plugin. See our [CONTRIBUTING.md](./CONTRIBUTING.md) and join in. ## Bugs, Enhancements or Questions -Please file an issue to report any bugs you may find, enhancements you may need or questions you may have [here](https://github.com/opendistro-for-elasticsearch/kibana-visualizations/issues). +Please file an issue to report any bugs you may find, enhancements you may need or questions you may have [here](https://github.com/opensearch-project/dashboards-visualizations/issues). ## License diff --git a/gantt-chart/.cypress/integration/ui.spec.js b/gantt-chart/.cypress/integration/ui.spec.js index c0148dd..29d6101 100644 --- a/gantt-chart/.cypress/integration/ui.spec.js +++ b/gantt-chart/.cypress/integration/ui.spec.js @@ -19,7 +19,7 @@ import { delay, GANTT_VIS_NAME, Y_LABEL, X_LABEL, DEFAULT_SIZE } from '../utils/ describe('Save a gantt chart', () => { beforeEach(() => { - cy.visit(`${Cypress.env('kibana')}/app/visualize#`); + cy.visit(`${Cypress.env('opensearchDashboards')}/app/visualize#`); cy.wait(delay * 5); }); @@ -45,7 +45,7 @@ describe('Save a gantt chart', () => { describe('Render and configure a gantt chart', () => { beforeEach(() => { - cy.visit(`${Cypress.env('kibana')}/app/visualize#`); + cy.visit(`${Cypress.env('opensearchDashboards')}/app/visualize#`); cy.wait(delay * 5); cy.get('button').contains(GANTT_VIS_NAME).click({ force: true }); cy.wait(delay * 5); @@ -88,7 +88,7 @@ describe('Render and configure a gantt chart', () => { describe('Configure panel settings', () => { beforeEach(() => { - cy.visit(`${Cypress.env('kibana')}/app/visualize#`); + cy.visit(`${Cypress.env('opensearchDashboards')}/app/visualize#`); cy.wait(delay * 5); cy.get('button').contains(GANTT_VIS_NAME).click({ force: true }); cy.wait(delay * 5); @@ -176,7 +176,7 @@ describe('Configure panel settings', () => { describe('Add gantt chart to dashboard', () => { it('Adds gantt chart to dashboard', () => { - cy.visit(`${Cypress.env('kibana')}/app/dashboards#/create`); + cy.visit(`${Cypress.env('opensearchDashboards')}/app/dashboards#/create`); cy.wait(delay * 5); cy.get('.euiLink').contains('Add an existing').click({ force: true }); diff --git a/gantt-chart/.cypress/support/commands.js b/gantt-chart/.cypress/support/commands.js index b4c0a2d..aebab78 100644 --- a/gantt-chart/.cypress/support/commands.js +++ b/gantt-chart/.cypress/support/commands.js @@ -42,7 +42,7 @@ const { ADMIN_AUTH } = require('./constants'); // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) Cypress.Commands.overwrite('visit', (originalFn, url, options) => { - // Add the basic auth header when security enabled in the Elasticsearch cluster + // Add the basic auth header when security enabled in the OpenSearch cluster // https://github.com/cypress-io/cypress/issues/1288 if (Cypress.env('security_enabled')) { if (options) { @@ -50,7 +50,7 @@ Cypress.Commands.overwrite('visit', (originalFn, url, options) => { } else { options = { auth: ADMIN_AUTH }; } - // Add query parameters - select the default Kibana tenant + // Add query parameters - select the default OpenSearch Dashboards tenant options.qs = { security_tenant: 'private' }; return originalFn(url, options); } else { @@ -61,7 +61,7 @@ Cypress.Commands.overwrite('visit', (originalFn, url, options) => { // Be able to add default options to cy.request(), https://github.com/cypress-io/cypress/issues/726 Cypress.Commands.overwrite('request', (originalFn, ...args) => { let defaults = {}; - // Add the basic authentication header when security enabled in the Elasticsearch cluster + // Add the basic authentication header when security enabled in the OpenSearch cluster if (Cypress.env('security_enabled')) { defaults.auth = ADMIN_AUTH; } @@ -78,4 +78,4 @@ Cypress.Commands.overwrite('request', (originalFn, ...args) => { } return originalFn(Object.assign({}, defaults, options)); -}); \ No newline at end of file +}); diff --git a/gantt-chart/.cypress/support/index.js b/gantt-chart/.cypress/support/index.js index 95f4049..2832ec1 100644 --- a/gantt-chart/.cypress/support/index.js +++ b/gantt-chart/.cypress/support/index.js @@ -34,7 +34,7 @@ import './commands' // Alternatively you can use CommonJS syntax: // require('./commands') -// Switch the base URL of Elasticsearch when security enabled in the cluster +// Switch the base URL of OpenSearch when security enabled in the cluster if (Cypress.env('security_enabled')) { - Cypress.env('elasticsearch', 'https://localhost:9200'); -} \ No newline at end of file + Cypress.env('opensearch', 'https://localhost:9200'); +} diff --git a/gantt-chart/.eslintrc.yaml b/gantt-chart/.eslintrc.yaml index cfaf32d..593afaa 100644 --- a/gantt-chart/.eslintrc.yaml +++ b/gantt-chart/.eslintrc.yaml @@ -3,7 +3,7 @@ extends: '@elastic/kibana' settings: import/resolver: - '@kbn/eslint-import-resolver-kibana': + '@osd/eslint-import-resolver-kibana': rootPackageName: 'gantt-chart' pluginPaths: - . diff --git a/gantt-chart/cypress.json b/gantt-chart/cypress.json index cefe648..3f598a7 100644 --- a/gantt-chart/cypress.json +++ b/gantt-chart/cypress.json @@ -12,8 +12,8 @@ "responseTimeout": 60000, "defaultCommandTimeout": 60000, "env": { - "elasticsearch": "localhost:9200", - "kibana": "localhost:5601", + "opensearch": "localhost:9200", + "opensearchDashboards": "localhost:5601", "security_enabled": true } } \ No newline at end of file diff --git a/gantt-chart/kibana.json b/gantt-chart/kibana.json deleted file mode 100644 index 4ddd316..0000000 --- a/gantt-chart/kibana.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id": "opendistroGanttChartKibana", - "version": "1.13.0.0", - "kibanaVersion": "7.10.2", - "requiredPlugins": [ - "visualizations", - "data" - ], - "server": true, - "ui": true -} diff --git a/gantt-chart/.kibana-plugin-helpers.json b/gantt-chart/opensearch-dashboards-plugin-helpers.dev.json similarity index 62% rename from gantt-chart/.kibana-plugin-helpers.json rename to gantt-chart/opensearch-dashboards-plugin-helpers.dev.json index ed093ab..23260a3 100644 --- a/gantt-chart/.kibana-plugin-helpers.json +++ b/gantt-chart/opensearch-dashboards-plugin-helpers.dev.json @@ -3,8 +3,7 @@ "package.json", "yarn.lock", "tsconfig.json", - "public/**/*", - "server/**/*", - "kibana.json" + "{common,public,server,test}/**/*", + "!__tests__" ] } diff --git a/gantt-chart/opensearch_dashboards.json b/gantt-chart/opensearch_dashboards.json new file mode 100644 index 0000000..d2cff66 --- /dev/null +++ b/gantt-chart/opensearch_dashboards.json @@ -0,0 +1,11 @@ +{ + "id": "ganttchartDashboards", + "version": "1.15.0.0", + "opensearchDashboardsVersion": "7.10.2", + "requiredPlugins": [ + "visualizations", + "data" + ], + "server": true, + "ui": true +} diff --git a/gantt-chart/package.json b/gantt-chart/package.json index 0f6fc38..46e1299 100644 --- a/gantt-chart/package.json +++ b/gantt-chart/package.json @@ -1,13 +1,14 @@ { - "name": "opendistro-gantt-chart-kibana", - "version": "1.13.0.0", - "kibana": { + "name": "gantt-chart-dashboards", + "version": "1.15.0.0", + "opensearchDashboards": { "version": "7.10.2", "templateVersion": "1.0.0" }, "license": "Apache-2.0", "scripts": { - "kbn": "node ../../scripts/kbn", + "osd": "node ../../scripts/osd", + "opensearch": "node ../../scripts/opensearch", "lint": "eslint .", "build": "yarn plugin-helpers build", "plugin-helpers": "node ../../scripts/plugin_helpers", diff --git a/gantt-chart/public/gantt_request_handler.tsx b/gantt-chart/public/gantt_request_handler.tsx index 51d8794..f84c2e7 100644 --- a/gantt-chart/public/gantt_request_handler.tsx +++ b/gantt-chart/public/gantt_request_handler.tsx @@ -13,10 +13,10 @@ * permissions and limitations under the License. */ -import { IUiSettingsClient } from 'kibana/public'; +import { IUiSettingsClient } from 'opensearch-dashboards/public'; import { IndexPattern } from 'src/plugins/data/public'; import { VisParams } from 'src/plugins/visualizations/public'; -import { buildEsQuery, Filter, Query, TimeRange, getTime } from '../../../src/plugins/data/common'; +import { buildOpenSearchQuery, Filter, Query, TimeRange, getTime } from '../../../src/plugins/data/common'; import { GanttVisDependencies } from './plugin'; interface GanttRequestHandlerDeps { @@ -32,7 +32,7 @@ const constructRequest = ( uiSettings: IUiSettingsClient, { timeRange, filters, query, index, visParams }: GanttRequestHandlerDeps ) => { - const DSL = buildEsQuery(index, query, filters); + const DSL = buildOpenSearchQuery(index, query, filters); const request = { index: index.title, size: visParams.size, diff --git a/gantt-chart/public/index.ts b/gantt-chart/public/index.ts index fb70cbf..5c71cc0 100644 --- a/gantt-chart/public/index.ts +++ b/gantt-chart/public/index.ts @@ -14,7 +14,7 @@ */ import './index.scss'; -import { PluginInitializer } from 'kibana/public'; +import { PluginInitializer } from 'opensearch-dashboards/public'; import { CustomVisualizationsPublicPlugin, CustomVisualizationsSetup, diff --git a/gantt-chart/public/plugin.ts b/gantt-chart/public/plugin.ts index 2a6ee87..a880a14 100644 --- a/gantt-chart/public/plugin.ts +++ b/gantt-chart/public/plugin.ts @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -import { CoreSetup, Plugin, CoreStart, IUiSettingsClient, HttpSetup } from 'kibana/public'; +import { CoreSetup, Plugin, CoreStart, IUiSettingsClient, HttpSetup } from 'opensearch-dashboards/public'; import { VisualizationsSetup } from '../../../src/plugins/visualizations/public'; import { getGanttVisDefinition } from './gantt_vis_type'; diff --git a/gantt-chart/server/index.ts b/gantt-chart/server/index.ts index 72da4f6..3d07287 100644 --- a/gantt-chart/server/index.ts +++ b/gantt-chart/server/index.ts @@ -17,7 +17,7 @@ import { PluginInitializerContext } from '../../../src/core/server'; import { GanttVisPlugin } from './plugin'; // This exports static code and TypeScript types, -// as well as, Kibana Platform `plugin()` initializer. +// as well as, OpenSearch Dashboards Platform `plugin()` initializer. export function plugin(initializerContext: PluginInitializerContext) { return new GanttVisPlugin(initializerContext); diff --git a/gantt-chart/server/routes/index.ts b/gantt-chart/server/routes/index.ts index 3aea295..92fa619 100644 --- a/gantt-chart/server/routes/index.ts +++ b/gantt-chart/server/routes/index.ts @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -import { schema } from '@kbn/config-schema'; +import { schema } from '@osd/config-schema'; import { RequestParams } from '@elastic/elasticsearch'; import { IRouter } from '../../../../src/core/server'; @@ -49,7 +49,7 @@ export function defineRoutes(router: IRouter) { ...rest, }; try { - const resp = await context.core.elasticsearch.legacy.client.callAsCurrentUser( + const resp = await context.core.opensearch.legacy.client.callAsCurrentUser( 'search', params );