diff --git a/.eslintignore b/.eslintignore index 7f3e3ef597c..00ec727b80f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,7 +10,6 @@ /optimize /plugins /test/fixtures/scenarios -/x-pack/build node_modules target @@ -21,26 +20,15 @@ target /src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken /src/plugins/data/common/es_query/kuery/ast/_generated_/** /src/plugins/vis_type_timelion/public/_generated_/** -/x-pack/legacy/plugins/**/__tests__/fixtures/** -/x-pack/plugins/apm/e2e/**/snapshots.js -/x-pack/plugins/apm/e2e/tmp/* -/x-pack/plugins/canvas/canvas_plugin -/x-pack/plugins/canvas/shareable_runtime/build -/x-pack/plugins/canvas/storybook/build -/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/** -/x-pack/legacy/plugins/infra/common/graphql/types.ts -/x-pack/legacy/plugins/infra/public/graphql/types.ts -/x-pack/legacy/plugins/infra/server/graphql/types.ts -/x-pack/legacy/plugins/maps/public/vendor/** # package overrides /packages/elastic-eslint-config-kibana -/packages/kbn-interpreter/src/common/lib/grammar.js -/packages/kbn-plugin-generator/template -/packages/kbn-pm/dist -/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/ -/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/ -/packages/kbn-ui-framework/dist -/packages/kbn-ui-framework/doc_site/build -/packages/kbn-ui-framework/generator-kui/*/templates/ -/packages/kbn-ui-shared-deps/flot_charts +/packages/osd-interpreter/src/common/lib/grammar.js +/packages/osd-plugin-generator/template +/packages/osd-pm/dist +/packages/osd-test/src/functional_test_runner/__tests__/fixtures/ +/packages/osd-test/src/functional_test_runner/lib/config/__tests__/fixtures/ +/packages/osd-ui-framework/dist +/packages/osd-ui-framework/doc_site/build +/packages/osd-ui-framework/generator-kui/*/templates/ +/packages/osd-ui-shared-deps/flot_charts diff --git a/.eslintrc.js b/.eslintrc.js index 1597431d4b3..b63cde6ec0b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -86,7 +86,7 @@ module.exports = { * Temporarily disable some react rules for specific plugins, remove in separate PRs */ { - files: ['packages/kbn-ui-framework/**/*.{js,mjs,ts,tsx}'], + files: ['packages/osd-ui-framework/**/*.{js,mjs,ts,tsx}'], rules: { 'jsx-a11y/no-onchange': 'off', }, @@ -98,37 +98,18 @@ module.exports = { }, }, { - files: ['src/plugins/kibana_react/**/*.{js,mjs,ts,tsx}'], + files: ['src/plugins/opensearch_dashboards_react/**/*.{js,mjs,ts,tsx}'], rules: { 'react-hooks/rules-of-hooks': 'off', 'react-hooks/exhaustive-deps': 'off', }, }, { - files: ['src/plugins/kibana_utils/**/*.{js,mjs,ts,tsx}'], + files: ['src/plugins/opensearch_dashboards_utils/**/*.{js,mjs,ts,tsx}'], rules: { 'react-hooks/exhaustive-deps': 'off', }, }, - { - files: ['x-pack/plugins/canvas/**/*.{js,mjs,ts,tsx}'], - rules: { - 'jsx-a11y/click-events-have-key-events': 'off', - }, - }, - { - files: ['x-pack/plugins/cross_cluster_replication/**/*.{js,mjs,ts,tsx}'], - rules: { - 'jsx-a11y/click-events-have-key-events': 'off', - }, - }, - { - files: ['x-pack/plugins/ml/**/*.{js,mjs,ts,tsx}'], - rules: { - 'react-hooks/exhaustive-deps': 'off', - }, - }, - /** * Files that require Apache 2.0 headers, settings * are overridden below for files that require Elastic @@ -137,13 +118,13 @@ module.exports = { { files: ['**/*.{js,mjs,ts,tsx}', '!plugins/**/*'], rules: { - '@kbn/eslint/require-license-header': [ + '@osd/eslint/require-license-header': [ 'error', { license: APACHE_2_0_LICENSE_HEADER, }, ], - '@kbn/eslint/disallow-license-headers': [ + '@osd/eslint/disallow-license-headers': [ 'error', { licenses: [ @@ -167,45 +148,19 @@ module.exports = { }, }, - /** - * Files that require Elastic license headers instead of Apache 2.0 header - */ - { - files: ['x-pack/**/*.{js,mjs,ts,tsx}'], - rules: { - '@kbn/eslint/require-license-header': [ - 'error', - { - license: ELASTIC_LICENSE_HEADER, - }, - ], - '@kbn/eslint/disallow-license-headers': [ - 'error', - { - licenses: [ - APACHE_2_0_LICENSE_HEADER, - SAFER_LODASH_SET_HEADER, - SAFER_LODASH_SET_LODASH_HEADER, - SAFER_LODASH_SET_DEFINITELYTYPED_HEADER, - ], - }, - ], - }, - }, - /** * safer-lodash-set package requires special license headers */ { files: ['packages/elastic-safer-lodash-set/**/*.{js,mjs,ts,tsx}'], rules: { - '@kbn/eslint/require-license-header': [ + '@osd/eslint/require-license-header': [ 'error', { license: SAFER_LODASH_SET_LODASH_HEADER, }, ], - '@kbn/eslint/disallow-license-headers': [ + '@osd/eslint/disallow-license-headers': [ 'error', { licenses: [ @@ -221,13 +176,13 @@ module.exports = { { files: ['packages/elastic-safer-lodash-set/test/*.{js,mjs,ts,tsx}'], rules: { - '@kbn/eslint/require-license-header': [ + '@osd/eslint/require-license-header': [ 'error', { license: SAFER_LODASH_SET_HEADER, }, ], - '@kbn/eslint/disallow-license-headers': [ + '@osd/eslint/disallow-license-headers': [ 'error', { licenses: [ @@ -243,13 +198,13 @@ module.exports = { { files: ['packages/elastic-safer-lodash-set/**/*.d.ts'], rules: { - '@kbn/eslint/require-license-header': [ + '@osd/eslint/require-license-header': [ 'error', { license: SAFER_LODASH_SET_DEFINITELYTYPED_HEADER, }, ], - '@kbn/eslint/disallow-license-headers': [ + '@osd/eslint/disallow-license-headers': [ 'error', { licenses: [ @@ -269,7 +224,7 @@ module.exports = { { files: ['**/*.{js,mjs,ts,tsx}'], rules: { - '@kbn/eslint/no-restricted-paths': [ + '@osd/eslint/no-restricted-paths': [ 'error', { basePath: __dirname, @@ -417,7 +372,7 @@ module.exports = { { files: [ '**/public/**/*.js', - 'packages/kbn-ui-framework/doc_site/src/**/*.js', + 'packages/osd-ui-framework/doc_site/src/**/*.js', 'src/fixtures/**/*.js', // TODO: this directory needs to be more obviously "public" (or go away) ], settings: { @@ -426,10 +381,10 @@ module.exports = { 'import/core-modules': ['plugins'], 'import/resolver': { - '@kbn/eslint-import-resolver-kibana': { + '@osd/eslint-import-resolver-opensearch-dashboards': { forceNode: false, - rootPackageName: 'kibana', - kibanaPath: '.', + rootPackageName: 'opensearch-dashboards', + opensearchDashboardsPath: '.', pluginMap: {}, }, }, @@ -441,9 +396,9 @@ module.exports = { */ { files: [ - 'packages/kbn-ui-framework/**/*.js', + 'packages/osd-ui-framework/**/*.js', 'x-pack/**/*.js', - 'packages/kbn-interpreter/**/*.js', + 'packages/osd-interpreter/**/*.js', ], rules: { 'import/no-extraneous-dependencies': [ @@ -461,13 +416,13 @@ module.exports = { */ { files: [ - 'packages/kbn-ui-framework/**/*.test.js', - 'packages/kbn-ui-framework/doc_site/**/*.js', - 'packages/kbn-ui-framework/generator-kui/**/*.js', - 'packages/kbn-ui-framework/Gruntfile.js', - 'packages/kbn-es/src/**/*.js', - 'packages/kbn-interpreter/tasks/**/*.js', - 'packages/kbn-interpreter/src/plugin/**/*.js', + 'packages/osd-ui-framework/**/*.test.js', + 'packages/osd-ui-framework/doc_site/**/*.js', + 'packages/osd-ui-framework/generator-kui/**/*.js', + 'packages/osd-ui-framework/Gruntfile.js', + 'packages/osd-es/src/**/*.js', + 'packages/osd-interpreter/tasks/**/*.js', + 'packages/osd-interpreter/src/plugin/**/*.js', 'x-pack/{dev-tools,tasks,scripts,test,build_chromium}/**/*.js', 'x-pack/**/{__tests__,__test__,__jest__,__fixtures__,__mocks__,public}/**/*.js', 'x-pack/**/*.test.js', @@ -524,7 +479,7 @@ module.exports = { { files: [ 'test/functional/services/lib/web_element_wrapper/scroll_into_view_if_necessary.js', - 'src/legacy/ui/ui_render/bootstrap/kbn_bundles_loader_source.js', + 'src/legacy/ui/ui_render/bootstrap/osd_bundles_loader_source.js', '**/browser_exec_scripts/**/*.js', ], rules: { @@ -556,8 +511,8 @@ module.exports = { { files: [ '.eslintrc.js', - 'packages/kbn-eslint-import-resolver-kibana/**/*.js', - 'packages/kbn-eslint-plugin-eslint/**/*', + 'packages/osd-eslint-import-resolver-opensearch-dashboards/**/*.js', + 'packages/osd-eslint-plugin-eslint/**/*', 'x-pack/gulpfile.js', 'x-pack/dev-tools/mocha/setup_mocha.js', 'x-pack/scripts/*.js', @@ -1079,10 +1034,10 @@ module.exports = { }, /** - * disable jsx-a11y for kbn-ui-framework + * disable jsx-a11y for osd-ui-framework */ { - files: ['packages/kbn-ui-framework/**/*.js'], + files: ['packages/osd-ui-framework/**/*.js'], rules: { 'jsx-a11y/click-events-have-key-events': 'off', 'jsx-a11y/anchor-has-content': 'off', @@ -1182,7 +1137,7 @@ module.exports = { }, }, { - files: ['packages/kbn-ui-shared-deps/flot_charts/**/*.js'], + files: ['packages/osd-ui-shared-deps/flot_charts/**/*.js'], env: { jquery: true, }, @@ -1218,7 +1173,7 @@ module.exports = { 'x-pack/plugins/licensing/**', 'x-pack/plugins/global_search/**', 'x-pack/plugins/cloud/**', - 'packages/kbn-config-schema', + 'packages/osd-config-schema', 'src/plugins/status_page/**', 'src/plugins/saved_objects_management/**', ], diff --git a/.i18nrc.json b/.i18nrc.json index 68e38d3976a..8a0cea55f08 100644 --- a/.i18nrc.json +++ b/.i18nrc.json @@ -11,17 +11,17 @@ "uiActionsExamples": "examples/ui_action_examples", "share": "src/plugins/share", "home": "src/plugins/home", - "flot": "packages/kbn-ui-shared-deps/flot_charts", + "flot": "packages/osd-ui-shared-deps/flot_charts", "charts": "src/plugins/charts", - "esUi": "src/plugins/es_ui_shared", + "opensearchUi": "src/plugins/opensearch_ui_shared", "devTools": "src/plugins/dev_tools", "expressions": "src/plugins/expressions", "inputControl": "src/plugins/input_control_vis", "inspector": "src/plugins/inspector", "inspectorViews": "src/legacy/core_plugins/inspector_views", "interpreter": "src/legacy/core_plugins/interpreter", - "kbn": "src/legacy/core_plugins/kibana", - "kbnDocViews": "src/legacy/core_plugins/kbn_doc_views", + "osd": "src/legacy/core_plugins/opensearch-dashboards", + "osdDocViews": "src/legacy/core_plugins/osd_doc_views", "management": [ "src/legacy/core_plugins/management", "src/plugins/management" @@ -29,11 +29,11 @@ "maps_legacy": "src/plugins/maps_legacy", "indexPatternManagement": "src/plugins/index_pattern_management", "advancedSettings": "src/plugins/advanced_settings", - "kibana_legacy": "src/plugins/kibana_legacy", - "kibanaOverview": "src/plugins/kibana_overview", - "kibana_react": "src/legacy/core_plugins/kibana_react", - "kibana-react": "src/plugins/kibana_react", - "kibana_utils": "src/plugins/kibana_utils", + "opensearch_dashboards_legacy": "src/plugins/opensearch_dashboards_legacy", + "opensearchDashboardsOverview": "src/plugins/opensearch_dashboards_overview", + "opensearch_dashboards_react": "src/legacy/core_plugins/opensearch_dashboards_react", + "opensearch-dashboards-react": "src/plugins/opensearch_dashboards_react", + "opensearch_dashboards_utils": "src/plugins/opensearch_dashboards_utils", "navigation": "src/plugins/navigation", "newsfeed": "src/plugins/newsfeed", "regionMap": "src/plugins/region_map", diff --git a/.telemetryrc.json b/.telemetryrc.json index 3d1b0df1d8f..a3b17300abf 100644 --- a/.telemetryrc.json +++ b/.telemetryrc.json @@ -3,9 +3,9 @@ "output": "src/plugins/telemetry/schema/oss_plugins.json", "root": "src/plugins/", "exclude": [ - "src/plugins/kibana_react/", + "src/plugins/opensearch_dashboards_react/", "src/plugins/testbed/", - "src/plugins/kibana_utils/" + "src/plugins/opensearch_dashboards_utils/" ] } ] diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 11c595a1ad9..bfc3d0a5f47 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,5 +1,5 @@ -# Contributing to Kibana +# Contributing to OpenSearch Dashboards -We understand that you may not have days at a time to work on Kibana. We ask that you read our [developer guide](https://www.elastic.co/guide/en/kibana/master/development.html) carefully so that you spend less time, overall, struggling to push your PR through our code review processes. +We understand that you may not have days at a time to work on OpenSearch Dashboards. We ask that you read our [developer guide](https://www.elastic.co/guide/en/kibana/master/development.html) carefully so that you spend less time, overall, struggling to push your PR through our code review processes. Our developer guide is written in asciidoc and located under [./docs/developer](./docs/developer) if you want to make edits or access it in raw form. diff --git a/Dockerfile b/Dockerfile index c8ea4fd5237..3229f942a09 100755 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,6 @@ RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && pip install awscli \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN groupadd -r kibana && useradd -r -g kibana kibana && mkdir /home/kibana && chown kibana:kibana /home/kibana +RUN groupadd -r opensearch-dashboards && useradd -r -g opensearch-dashboards opensearch-dashboards && mkdir /home/opensearch-dashboards && chown opensearch-dashboards:opensearch-dashboards /home/opensearch-dashboards -USER kibana +USER opensearch-dashboards diff --git a/FAQ.md b/FAQ.md index 26c6df401d1..d5f038d42a9 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1,16 +1,16 @@ # Frequently asked questions **Q:** I'm getting `bin/node/bin/node: not found` but I can see the node binary in the package? -**A:** Kibana 4 packages are architecture specific. Ensure you are using the correct package for your architecture. +**A:** OpenSearch Dashboards 4 packages are architecture specific. Ensure you are using the correct package for your architecture. **Q:** Where do I go for support? -**A:** Please join us at [discuss.elastic.co](https://discuss.elastic.co) with questions. Your problem might be a bug, but it might just be a misunderstanding, or a feature we could improve. We're also available on Freenode in #kibana +**A:** Please join us at [discuss.elastic.co](https://discuss.elastic.co) with questions. Your problem might be a bug, but it might just be a misunderstanding, or a feature we could improve. We're also available on Freenode in #opensearch-dashboards **Q:** Ok, we talked about it and its definitely a bug -**A:** Doh, ok, let's get that fixed. File an issue on [github.com/elastic/kibana](https://github.com/elastic/kibana). I'd recommend reading the beginning of the CONTRIBUTING.md, just so you know how we'll handle the issue. +**A:** Doh, ok, let's get that fixed. File an issue on [github.com/opensearch-project/opensearch-dashboards](https://github.com/opensearch-project/opensearch-dashboards). I'd recommend reading the beginning of the CONTRIBUTING.md, just so you know how we'll handle the issue. -### Kibana 3 Migration -**Q:** Where is feature X that I loved from Kibana 3? +### OpenSearch Dashboards 3 Migration +**Q:** Where is feature X that I loved from OpenSearch Dashboards 3? **A:** It might be coming! We’ve published our immediate roadmap as tickets. Check out the beta milestones on GitHub to see if the feature you’re missing is coming soon. **Q:** Is the dashboard schema compatible? diff --git a/Jenkinsfile b/Jenkinsfile index 954590cddff..97e12fd2d67 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,8 +19,8 @@ pipeline { DOCKER_IMAGE.inside { stage('bootstrap') { echo "Bootstrap here" - sh 'yarn kbn bootstrap' - sh 'node scripts/build_kibana_platform_plugins --oss --no-examples --workers 10' + sh 'yarn osd bootstrap' + sh 'node scripts/build_opensearch_dashboards_platform_plugins --oss --no-examples --workers 10' } } } @@ -79,10 +79,10 @@ def functionalDynamicParallelSteps(image){ "CI=1", "CI_GROUP=${currentCiGroup}", "GCS_UPLOAD_PREFIX=fake", - "TEST_KIBANA_HOST=localhost", - "TEST_KIBANA_PORT=6610", - "TEST_ES_TRANSPORT_PORT=9403", - "TEST_ES_PORT=9400", + "TEST_OPENSEARCh_DASHBOARDS_HOST=localhost", + "TEST_OPENSEARCh_DASHBOARDS_PORT=6610", + "TEST_OPENSEARCH_TRANSPORT_PORT=9403", + "TEST_OPENSEARCH_PORT=9400", "CI_PARALLEL_PROCESS_NUMBER=${currentStep}", "JOB=ci${currentStep}", "CACHE_DIR=${currentCiGroup}" diff --git a/README.md b/README.md index b786d95ce29..26cfee51505 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,65 @@ -# Kibana +# OpenSearch Dashboards -Kibana is your window into the [Elastic Stack](https://www.elastic.co/products). Specifically, it's a browser-based analytics and search dashboard for Elasticsearch. +OpenSearch Dashboards is your window into the [OpenSearch Stack](https://www.elastic.co/products). Specifically, it's a browser-based analytics and search dashboard for OpenSearch. - [Getting Started](#getting-started) - - [Using a Kibana Release](#using-a-kibana-release) - - [Building and Running Kibana, and/or Contributing Code](#building-and-running-kibana-andor-contributing-code) + - [Using a OpenSearch Dashboards Release](#using-a-opensearch-dashboards-release) + - [Building and Running OpenSearch Dashboards, and/or Contributing Code](#building-and-running-kibana-andor-contributing-code) - [Documentation](#documentation) -- [Version Compatibility with Elasticsearch](#version-compatibility-with-elasticsearch) +- [Version Compatibility with OpenSearch](#version-compatibility-with-elasticsearch) - [Questions? Problems? Suggestions?](#questions-problems-suggestions) ## Getting Started -If you just want to try Kibana out, check out the [Elastic Stack Getting Started Page](https://www.elastic.co/start) to give it a whirl. +If you just want to try OpenSearch Dashboards out, check out the [OpenSearch Stack Getting Started Page](https://www.elastic.co/start) to give it a whirl. -If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the [Kibana Getting Started Page](https://www.elastic.co/guide/en/kibana/current/getting-started.html). +If you're interested in diving a bit deeper and getting a taste of OpenSearch Dashboards's capabilities, head over to the [OpenSearch Dashboards Getting Started Page](https://www.elastic.co/guide/en/kibana/current/getting-started.html). -### Using a Kibana Release +### Using a OpenSearch Dashboards Release -If you want to use a Kibana release in production, give it a test run, or just play around: +If you want to use a OpenSearch Dashboards release in production, give it a test run, or just play around: -- Download the latest version on the [Kibana Download Page](https://www.elastic.co/downloads/kibana). -- Learn more about Kibana's features and capabilities on the -[Kibana Product Page](https://www.elastic.co/products/kibana). -- We also offer a hosted version of Kibana on our +- Download the latest version on the [OpenSearch Dashboards Download Page](https://www.elastic.co/downloads/kibana). +- Learn more about OpenSearch Dashboards's features and capabilities on the +[OpenSearch Dashboards Product Page](https://www.elastic.co/products/kibana). +- We also offer a hosted version of OpenSearch Dashboards on our [Cloud Service](https://www.elastic.co/cloud/as-a-service). -### Building and Running Kibana, and/or Contributing Code +### Building and Running OpenSearch Dashboards, and/or Contributing Code -You might want to build Kibana locally to contribute some code, test out the latest features, or try +You might want to build OpenSearch Dashboards locally to contribute some code, test out the latest features, or try out an open PR: -- [CONTRIBUTING.md](CONTRIBUTING.md) will help you get Kibana up and running. +- [CONTRIBUTING.md](CONTRIBUTING.md) will help you get OpenSearch Dashboards up and running. - If you would like to contribute code, please follow our [STYLEGUIDE.md](STYLEGUIDE.md). - For all other questions, check out the [FAQ.md](FAQ.md) and [wiki](https://github.com/elastic/kibana/wiki). ## Documentation -Visit [Elastic.co](http://www.elastic.co/guide/en/kibana/current/index.html) for the full Kibana documentation. +Visit [Elastic.co](http://www.elastic.co/guide/en/kibana/current/index.html) for the full OpenSearch Dashboards documentation. For information about building the documentation, see the README in [elastic/docs](https://github.com/elastic/docs). -## Version Compatibility with Elasticsearch +## Version Compatibility with OpenSearch -Ideally, you should be running Elasticsearch and Kibana with matching version numbers. If your Elasticsearch has an older version number or a newer _major_ number than Kibana, then Kibana will fail to run. If Elasticsearch has a newer minor or patch number than Kibana, then the Kibana Server will log a warning. +Ideally, you should be running OpenSearch and OpenSearch Dashboards with matching version numbers. If your OpenSearch has an older version number or a newer _major_ number than OpenSearch Dashboards, then OpenSearch Dashboards will fail to run. If OpenSearch has a newer minor or patch number than OpenSearch Dashboards, then the OpenSearch Dashboards Server will log a warning. _Note: The version numbers below are only examples, meant to illustrate the relationships between different types of version numbers._ -| Situation | Example Kibana version | Example ES version | Outcome | +| Situation | Example OpenSearch Dashboards version | Example OpenSearch version | Outcome | | ------------------------- | -------------------------- |------------------- | ------- | | Versions are the same. | 5.1.2 | 5.1.2 | 💚 OK | -| ES patch number is newer. | 5.1.__2__ | 5.1.__5__ | ⚠️ Logged warning | -| ES minor number is newer. | 5.__1__.2 | 5.__5__.0 | ⚠️ Logged warning | -| ES major number is newer. | __5__.1.2 | __6__.0.0 | 🚫 Fatal error | -| ES patch number is older. | 5.1.__2__ | 5.1.__0__ | ⚠️ Logged warning | -| ES minor number is older. | 5.__1__.2 | 5.__0__.0 | 🚫 Fatal error | -| ES major number is older. | __5__.1.2 | __4__.0.0 | 🚫 Fatal error | +| OpenSearch patch number is newer. | 5.1.__2__ | 5.1.__5__ | ⚠️ Logged warning | +| OpenSearch minor number is newer. | 5.__1__.2 | 5.__5__.0 | ⚠️ Logged warning | +| OpenSearch major number is newer. | __5__.1.2 | __6__.0.0 | 🚫 Fatal error | +| OpenSearch patch number is older. | 5.1.__2__ | 5.1.__0__ | ⚠️ Logged warning | +| OpenSearch minor number is older. | 5.__1__.2 | 5.__0__.0 | 🚫 Fatal error | +| OpenSearch major number is older. | __5__.1.2 | __4__.0.0 | 🚫 Fatal error | ## Questions? Problems? Suggestions? - If you've found a bug or want to request a feature, please create a [GitHub Issue](https://github.com/elastic/kibana/issues/new/choose). Please check to make sure someone else hasn't already created an issue for the same topic. -- Need help using Kibana? Ask away on our [Kibana Discuss Forum](https://discuss.elastic.co/c/kibana) and a fellow community member or -Elastic engineer will be glad to help you out. +- Need help using OpenSearch Dashboards? Ask away on our [OpenSearch Dashboards Discuss Forum](https://discuss.elastic.co/c/kibana) and a fellow community member or +OpenSearch Dashboards engineer will be glad to help you out. diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 94bb40ab3ff..6a6e46e187f 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -1,7 +1,7 @@ -# Kibana Style Guide +# OpenSearch Dashboards Style Guide -This guide applies to all development within the Kibana project and is -recommended for the development of all Kibana plugins. +This guide applies to all development within the OpenSearch Dashboards project and is +recommended for the development of all OpenSearch Dashboards plugins. - [General](#general) - [HTML](#html) @@ -11,7 +11,7 @@ recommended for the development of all Kibana plugins. - [React](#react) Besides the content in this style guide, the following style guides may also apply -to all development within the Kibana project. Please make sure to also read them: +to all development within the OpenSearch Dashboards project. Please make sure to also read them: - [Accessibility style guide (EUI Docs)](https://elastic.github.io/eui/#/guidelines/accessibility) - [SASS style guide (EUI Docs)](https://elastic.github.io/eui/#/guidelines/sass) @@ -22,9 +22,9 @@ to all development within the Kibana project. Please make sure to also read them All filenames should use `snake_case`. -**Right:** `src/kibana/index_patterns/index_pattern.js` +**Right:** `src/opensearch-dashboards/index_patterns/index_pattern.js` -**Wrong:** `src/kibana/IndexPatterns/IndexPattern.js` +**Wrong:** `src/opensearch-dashboards/IndexPatterns/IndexPattern.js` ### Do not comment out code @@ -33,7 +33,7 @@ remove it, don't simply comment it out. ### Prettier and Linting -We are gradually moving the Kibana code base over to Prettier. All TypeScript code +We are gradually moving the OpenSearch Dashboards code base over to Prettier. All TypeScript code and some JavaScript code (check `.eslintrc.js`) is using Prettier to format code. You can run `node script/eslint --fix` to fix linting issues and apply Prettier formatting. We recommend you to enable running ESLint via your IDE. @@ -145,12 +145,12 @@ API routes must start with the `/api/` path segment, and should be followed by t ### snake_case -Kibana uses `snake_case` for the entire API, just like Elasticsearch. All urls, paths, query string parameters, values, and bodies should be `snake_case` formatted. +OpenSearch Dashboards uses `snake_case` for the entire API, just like Elasticsearch. All urls, paths, query string parameters, values, and bodies should be `snake_case` formatted. _Right:_ ``` -POST /api/kibana/index_patterns +POST /api/opensearch-dashboards/index_patterns { "id": "...", "time_field_name": "...", @@ -593,7 +593,7 @@ Do not use setters, they cause more problems than they can solve. When writing a new component, create a sibling SASS file of the same name and import directly into the **top** of the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint). -All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/public/core_app/styles/_globals_v7light.scss). +All SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & OpenSearch Dashboards invisibles (SASS variables, mixins, functions) from the [`globals_[theme].scss` file](src/core/public/core_app/styles/_globals_v7light.scss). While the styles for this component will only be loaded if the component exists on the page, the styles **will** be global and so it is recommended to use a three letter prefix on your diff --git a/TYPESCRIPT.md b/TYPESCRIPT.md index ae23768558f..19eb42cb2a3 100644 --- a/TYPESCRIPT.md +++ b/TYPESCRIPT.md @@ -1,4 +1,4 @@ -## TypeScriptifying Kibana Tips +## TypeScriptifying OpenSearch Dashboards Tips ### Converting existing code @@ -14,7 +14,7 @@ The first thing that will probably happen when you convert a `.js` file in our s #### EUI component is missing types 1. Check https://github.com/elastic/eui/issues/256 to see if they know it’s missing, if it’s not on there, add it. -2. Temporarily get around the issue by adding the missing type in the `typings/@elastic/eui/index.d.ts` file. Bonus points if you write a PR yourself to the EUI repo to add the types, but having them available back in Kibana will take some time, as a new EUI release will need to be generated, then that new release pointed to in Kibana. Best, to make forward progress, to do a temporary workaround. +2. Temporarily get around the issue by adding the missing type in the `typings/@elastic/eui/index.d.ts` file. Bonus points if you write a PR yourself to the EUI repo to add the types, but having them available back in OpenSearch Dashboards will take some time, as a new EUI release will need to be generated, then that new release pointed to in OpenSearch Dashboards. Best, to make forward progress, to do a temporary workaround. ```ts // typings/@elastic/eui/index.d.ts diff --git a/config/kibana.yml b/config/kibana.yml index 31d326a9f8b..675033136f7 100644 --- a/config/kibana.yml +++ b/config/kibana.yml @@ -1,91 +1,91 @@ -# Kibana is served by a back end server. This setting specifies the port to use. +# OpenSearch Dashboards is served by a back end server. This setting specifies the port to use. #server.port: 5601 -# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values. +# Specifies the address to which the OpenSearch Dashboards server will bind. IP addresses and host names are both valid values. # The default is 'localhost', which usually means remote machines will not be able to connect. # To allow connections from remote users, set this parameter to a non-loopback address. #server.host: "localhost" -# Enables you to specify a path to mount Kibana at if you are running behind a proxy. -# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath +# Enables you to specify a path to mount OpenSearch Dashboards at if you are running behind a proxy. +# Use the `server.rewriteBasePath` setting to tell OpenSearch Dashboards if it should remove the basePath # from requests it receives, and to prevent a deprecation warning at startup. # This setting cannot end in a slash. #server.basePath: "" -# Specifies whether Kibana should rewrite requests that are prefixed with +# Specifies whether OpenSearch Dashboards should rewrite requests that are prefixed with # `server.basePath` or require that they are rewritten by your reverse proxy. -# This setting was effectively always `false` before Kibana 6.3 and will -# default to `true` starting in Kibana 7.0. +# This setting was effectively always `false` before OpenSearch Dashboards 6.3 and will +# default to `true` starting in OpenSearch Dashboards 7.0. #server.rewriteBasePath: false # The maximum payload size in bytes for incoming server requests. #server.maxPayloadBytes: 1048576 -# The Kibana server's name. This is used for display purposes. +# The OpenSearch Dashboards server's name. This is used for display purposes. #server.name: "your-hostname" -# The URLs of the Elasticsearch instances to use for all your queries. -#elasticsearch.hosts: ["http://localhost:9200"] +# The URLs of the OpenSearch instances to use for all your queries. +#opensearch.hosts: ["http://localhost:9200"] -# Kibana uses an index in Elasticsearch to store saved searches, visualizations and -# dashboards. Kibana creates a new index if the index doesn't already exist. -#kibana.index: ".kibana" +# OpenSearch Dashboards uses an index in OpenSearch to store saved searches, visualizations and +# dashboards. OpenSearch Dashboards creates a new index if the index doesn't already exist. +#opensearchDashboards.index: ".opensearch-dashboards" # The default application to load. -#kibana.defaultAppId: "home" +#opensearchDashboards.defaultAppId: "home" -# If your Elasticsearch is protected with basic authentication, these settings provide -# the username and password that the Kibana server uses to perform maintenance on the Kibana -# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which -# is proxied through the Kibana server. -#elasticsearch.username: "kibana_system" -#elasticsearch.password: "pass" +# If your OpenSearch is protected with basic authentication, these settings provide +# the username and password that the OpenSearch Dashboards server uses to perform maintenance on the OpenSearch Dashboards +# index at startup. Your OpenSearch Dashboards users still need to authenticate with OpenSearch, which +# is proxied through the OpenSearch Dashboards server. +#opensearch.username: "opensearch_dashboards_system" +#opensearch.password: "pass" # Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively. -# These settings enable SSL for outgoing requests from the Kibana server to the browser. +# These settings enable SSL for outgoing requests from the OpenSearch Dashboards server to the browser. #server.ssl.enabled: false #server.ssl.certificate: /path/to/your/server.crt #server.ssl.key: /path/to/your/server.key # Optional settings that provide the paths to the PEM-format SSL certificate and key files. -# These files are used to verify the identity of Kibana to Elasticsearch and are required when -# xpack.security.http.ssl.client_authentication in Elasticsearch is set to required. -#elasticsearch.ssl.certificate: /path/to/your/client.crt -#elasticsearch.ssl.key: /path/to/your/client.key +# These files are used to verify the identity of OpenSearch Dashboards to OpenSearch and are required when +# xpack.security.http.ssl.client_authentication in OpenSearch is set to required. +#opensearch.ssl.certificate: /path/to/your/client.crt +#opensearch.ssl.key: /path/to/your/client.key # Optional setting that enables you to specify a path to the PEM file for the certificate -# authority for your Elasticsearch instance. -#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ] +# authority for your OpenSearch instance. +#opensearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ] # To disregard the validity of SSL certificates, change this setting's value to 'none'. -#elasticsearch.ssl.verificationMode: full +#opensearch.ssl.verificationMode: full -# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of -# the elasticsearch.requestTimeout setting. -#elasticsearch.pingTimeout: 1500 +# Time in milliseconds to wait for OpenSearch to respond to pings. Defaults to the value of +# the opensearch.requestTimeout setting. +#opensearch.pingTimeout: 1500 -# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value +# Time in milliseconds to wait for responses from the back end or OpenSearch. This value # must be a positive integer. -#elasticsearch.requestTimeout: 30000 +#opensearch.requestTimeout: 30000 -# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side +# List of OpenSearch Dashboards client-side headers to send to OpenSearch. To send *no* client-side # headers, set this value to [] (an empty list). -#elasticsearch.requestHeadersWhitelist: [ authorization ] +#opensearch.requestHeadersWhitelist: [ authorization ] -# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten -# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration. -#elasticsearch.customHeaders: {} +# Header names and values that are sent to OpenSearch. Any custom headers cannot be overwritten +# by client-side headers, regardless of the opensearch.requestHeadersWhitelist configuration. +#opensearch.customHeaders: {} -# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable. -#elasticsearch.shardTimeout: 30000 +# Time in milliseconds for OpenSearch to wait for responses from shards. Set to 0 to disable. +#opensearch.shardTimeout: 30000 -# Logs queries sent to Elasticsearch. Requires logging.verbose set to true. -#elasticsearch.logQueries: false +# Logs queries sent to OpenSearch. Requires logging.verbose set to true. +#opensearch.logQueries: false -# Specifies the path where Kibana creates the process ID file. -#pid.file: /var/run/kibana.pid +# Specifies the path where OpenSearch Dashboards creates the process ID file. +#pid.file: /var/run/opensearchDashboards.pid -# Enables you to specify a file where Kibana stores log output. +# Enables you to specify a file where OpenSearch Dashboards stores log output. #logging.dest: stdout # Set the value of this setting to true to suppress all logging output. diff --git a/kibana.d.ts b/opensearch_dashboards.d.ts similarity index 74% rename from kibana.d.ts rename to opensearch_dashboards.d.ts index 50f8b8690d9..02073cec5b0 100644 --- a/kibana.d.ts +++ b/opensearch_dashboards.d.ts @@ -28,14 +28,14 @@ export { Public, Server }; /** * All exports from TS ambient definitions (where types are added for JS source in a .d.ts file). */ -import * as LegacyKibanaServer from './src/legacy/server/kbn_server'; +import * as LegacyOpenSearchDashboardsServer from './src/legacy/server/osd_server'; /** * Re-export legacy types under a namespace. */ export namespace Legacy { - export type KibanaConfig = LegacyKibanaServer.KibanaConfig; - export type Request = LegacyKibanaServer.Request; - export type ResponseToolkit = LegacyKibanaServer.ResponseToolkit; - export type Server = LegacyKibanaServer.Server; + export type OpenSearchDashboardsConfig = LegacyOpenSearchDashboardsServer.OpenSearchDashboardsConfig; + export type Request = LegacyOpenSearchDashboardsServer.Request; + export type ResponseToolkit = LegacyOpenSearchDashboardsServer.ResponseToolkit; + export type Server = LegacyOpenSearchDashboardsServer.Server; } diff --git a/package.json b/package.json index 26c2efc2635..8164dc15a5c 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "kibana", - "description": "Kibana is a browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elasticsearch.", + "name": "opensearch-dashboards", + "description": "OpenSearch Dashboards is a browser based analytics and search dashboard for OpenSearch. OpeenSearch Dashboards is a snap to setup and start using. OpeenSearch Dashboards strives to be easy to get started with, while also being flexible and powerful, just like OpenSearch.", "keywords": [ - "kibana", - "elasticsearch", + "opensearch-dashboards", + "opensearch", "logstash", "analytics", "visualizations", @@ -13,7 +13,7 @@ "private": true, "version": "7.10.3", "branch": "7.10", - "types": "./kibana.d.ts", + "types": "./opensearch_dashboards.d.ts", "tsdocMetadata": "./build/tsdoc-metadata.json", "build": { "number": 8467, @@ -23,7 +23,7 @@ "bugs": { "url": "http://github.com/elastic/kibana/issues" }, - "kibana": { + "opensearchDashboards": { "clean": { "extraPatterns": [ "build", @@ -38,8 +38,8 @@ "author": "Rashid Khan ", "scripts": { "preinstall": "node ./preinstall_check", - "kbn": "node scripts/kbn", - "es": "node scripts/es", + "osd": "node scripts/osd", + "opensearch": "node scripts/opensearch", "test": "grunt test", "test:jest": "node scripts/jest", "test:jest_integration": "node scripts/jest_integration", @@ -51,27 +51,27 @@ "test:coverage": "grunt test:coverage", "checkLicenses": "node scripts/check_licenses --dev", "build": "node scripts/build --all-platforms", - "start": "node scripts/kibana --dev", - "debug": "node --nolazy --inspect scripts/kibana --dev", - "debug-break": "node --nolazy --inspect-brk scripts/kibana --dev", + "start": "node scripts/opensearch_dashboards --dev", + "debug": "node --nolazy --inspect scripts/opensearch_dashboards --dev", + "debug-break": "node --nolazy --inspect-brk scripts/opensearch_dashboards --dev", "lint": "yarn run lint:es && yarn run lint:sass", "lint:es": "node scripts/eslint", "lint:sass": "node scripts/sasslint", "makelogs": "node scripts/makelogs", - "uiFramework:start": "cd packages/kbn-ui-framework && yarn docSiteStart", - "uiFramework:build": "cd packages/kbn-ui-framework && yarn docSiteBuild", - "uiFramework:createComponent": "cd packages/kbn-ui-framework && yarn createComponent", - "uiFramework:documentComponent": "cd packages/kbn-ui-framework && yarn documentComponent", - "kbn:watch": "node scripts/kibana --dev --logging.json=false", + "uiFramework:start": "cd packages/osd-ui-framework && yarn docSiteStart", + "uiFramework:build": "cd packages/osd-ui-framework && yarn docSiteBuild", + "uiFramework:createComponent": "cd packages/osd-ui-framework && yarn createComponent", + "uiFramework:documentComponent": "cd packages/osd-ui-framework && yarn documentComponent", + "osd:watch": "node scripts/opensearch_dashboards --dev --logging.json=false", "build:types": "rm -rf ./target/types && tsc --p tsconfig.types.json", "docs:acceptApiChanges": "node --max-old-space-size=6144 scripts/check_published_api_changes.js --accept", - "kbn:bootstrap": "node scripts/build_ts_refs && node scripts/register_git_hook", + "osd:bootstrap": "node scripts/build_ts_refs && node scripts/register_git_hook", "spec_to_console": "node scripts/spec_to_console", "storybook": "node scripts/storybook" }, "repository": { "type": "git", - "url": "https://github.com/elastic/kibana.git" + "url": "https://github.com/opensearch-project/opensearch-dashboards.git" }, "resolutions": { "**/@types/node": ">=10.17.17 <10.20.0", @@ -120,18 +120,18 @@ "@elastic/safer-lodash-set": "0.0.0", "@hapi/good-squeeze": "5.2.1", "@hapi/wreck": "^15.0.2", - "@kbn/analytics": "1.0.0", - "@kbn/apm-config-loader": "1.0.0", - "@kbn/config": "1.0.0", - "@kbn/config-schema": "1.0.0", - "@kbn/i18n": "1.0.0", - "@kbn/interpreter": "1.0.0", - "@kbn/logging": "1.0.0", - "@kbn/std": "1.0.0", - "@kbn/ui-framework": "1.0.0", - "@kbn/ace": "1.0.0", - "@kbn/monaco": "1.0.0", - "@kbn/ui-shared-deps": "1.0.0", + "@osd/analytics": "1.0.0", + "@osd/apm-config-loader": "1.0.0", + "@osd/config": "1.0.0", + "@osd/config-schema": "1.0.0", + "@osd/i18n": "1.0.0", + "@osd/interpreter": "1.0.0", + "@osd/logging": "1.0.0", + "@osd/std": "1.0.0", + "@osd/ui-framework": "1.0.0", + "@osd/ace": "1.0.0", + "@osd/monaco": "1.0.0", + "@osd/ui-shared-deps": "1.0.0", "@types/yauzl": "^2.9.1", "JSONStream": "1.3.5", "abortcontroller-polyfill": "^1.4.0", @@ -230,21 +230,21 @@ "@elastic/github-checks-reporter": "0.0.20b3", "@elastic/makelogs": "^6.0.0", "@elastic/ui-ace": "0.2.3", - "@kbn/babel-preset": "1.0.0", - "@kbn/dev-utils": "1.0.0", - "@kbn/es": "1.0.0", - "@kbn/es-archiver": "1.0.0", - "@kbn/eslint-import-resolver-kibana": "2.0.0", - "@kbn/eslint-plugin-eslint": "1.0.0", - "@kbn/expect": "1.0.0", - "@kbn/optimizer": "1.0.0", - "@kbn/plugin-generator": "1.0.0", - "@kbn/pm": "1.0.0", - "@kbn/release-notes": "1.0.0", - "@kbn/telemetry-tools": "1.0.0", - "@kbn/test": "1.0.0", - "@kbn/test-subj-selector": "0.2.1", - "@kbn/utility-types": "1.0.0", + "@osd/babel-preset": "1.0.0", + "@osd/dev-utils": "1.0.0", + "@osd/opensearch": "1.0.0", + "@osd/opensearch-archiver": "1.0.0", + "@osd/eslint-import-resolver-opensearch-dashboards": "2.0.0", + "@osd/eslint-plugin-eslint": "1.0.0", + "@osd/expect": "1.0.0", + "@osd/optimizer": "1.0.0", + "@osd/plugin-generator": "1.0.0", + "@osd/pm": "1.0.0", + "@osd/release-notes": "1.0.0", + "@osd/telemetry-tools": "1.0.0", + "@osd/test": "1.0.0", + "@osd/test-subj-selector": "0.2.1", + "@osd/utility-types": "1.0.0", "@microsoft/api-documenter": "7.7.2", "@microsoft/api-extractor": "7.7.0", "@percy/agent": "^0.26.0", diff --git a/preinstall_check.js b/preinstall_check.js index 458c42d851d..af9d4589b72 100644 --- a/preinstall_check.js +++ b/preinstall_check.js @@ -20,7 +20,7 @@ const isUsingNpm = process.env.npm_config_git !== undefined; if (isUsingNpm) { - throw `Use Yarn instead of npm, see Kibana's contributing guidelines`; + throw `Use Yarn instead of npm, see OpenSearch Dashboards's contributing guidelines`; } // The value of the `npm_config_argv` env for each command: diff --git a/tsconfig.base.json b/tsconfig.base.json index 0aad8d6b9c1..42229ccfd54 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -2,10 +2,10 @@ "compilerOptions": { "baseUrl": ".", "paths": { - // Allows for importing from `kibana` package for the exported types. - "kibana": ["./kibana"], - "kibana/public": ["src/core/public"], - "kibana/server": ["src/core/server"], + // Allows for importing from `opensearch-dashboards` package for the exported types. + "opensearch-dashboards": ["./opensearch_dashboards"], + "opensearch-dashboards/public": ["src/core/public"], + "opensearch-dashboards/server": ["src/core/server"], "plugins/*": ["src/legacy/core_plugins/*/public/"], "test_utils/*": [ "src/test_utils/public/*" diff --git a/tsconfig.json b/tsconfig.json index cf112b26a2c..8992e17067f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { "extends": "./tsconfig.base.json", "compilerOptions": { - "tsBuildInfoFile": "./build/tsbuildinfo/kibana" + "tsBuildInfoFile": "./build/tsbuildinfo/opensearch-dashboards" }, "include": [ - "kibana.d.ts", + "opensearch_dashboards.d.ts", "src/**/*", "typings/**/*", "test_utils/**/*" @@ -13,8 +13,8 @@ "src/**/__fixtures__/**/*", "src/test_utils/**/*", "src/core/**/*", - "src/plugins/kibana_utils/**/*", - "src/plugins/kibana_react/**/*" + "src/plugins/opensearch_dashboards_utils/**/*", + "src/plugins/opensearch_dashboards_react/**/*" // In the build we actually exclude **/public/**/* from this config so that // we can run the TSC on both this and the .browser version of this config // file, but if we did it during development IDEs would not be able to find @@ -24,7 +24,7 @@ "references": [ { "path": "./src/test_utils/tsconfig.json" }, { "path": "./src/core/tsconfig.json" }, - { "path": "./src/plugins/kibana_utils/tsconfig.json" }, - { "path": "./src/plugins/kibana_react/tsconfig.json" } + { "path": "./src/plugins/opensearch_dashboards_utils/tsconfig.json" }, + { "path": "./src/plugins/opensearch_dashboards_react/tsconfig.json" } ] } diff --git a/tsconfig.refs.json b/tsconfig.refs.json index 54bd07e4b13..8eaa1fcbc55 100644 --- a/tsconfig.refs.json +++ b/tsconfig.refs.json @@ -3,7 +3,7 @@ "references": [ { "path": "./src/test_utils/tsconfig.json" }, { "path": "./src/core/tsconfig.json" }, - { "path": "./src/plugins/kibana_utils/tsconfig.json" }, - { "path": "./src/plugins/kibana_react/tsconfig.json" }, + { "path": "./src/plugins/opensearch_dashboards_utils/tsconfig.json" }, + { "path": "./src/plugins/opensearch_dashboards_react/tsconfig.json" }, ] }