Skip to content

Commit

Permalink
[Rename] Refactored root directory files (#145)
Browse files Browse the repository at this point in the history
* [Rename] Refactored root directory files

* [Rename] addressed review feedbacks

* [Rename] addressed review feedbacks

* [Rename] addressed PR comments

Signed-off-by: Mihir Soni <mihirsoni.123@gmail.com>
  • Loading branch information
mihirsoni committed Mar 20, 2021
1 parent 59c9657 commit e4397b7
Show file tree
Hide file tree
Showing 18 changed files with 215 additions and 272 deletions.
30 changes: 9 additions & 21 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/optimize
/plugins
/test/fixtures/scenarios
/x-pack/build
node_modules
target

Expand All @@ -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
109 changes: 32 additions & 77 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand All @@ -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
Expand All @@ -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: [
Expand All @@ -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: [
Expand All @@ -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: [
Expand All @@ -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: [
Expand All @@ -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,
Expand Down Expand Up @@ -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: {
Expand All @@ -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: {},
},
},
Expand All @@ -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': [
Expand All @@ -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',
Expand Down Expand Up @@ -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: {
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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,
},
Expand Down Expand Up @@ -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/**',
],
Expand Down
18 changes: 9 additions & 9 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@
"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"
],
"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",
Expand Down
4 changes: 2 additions & 2 deletions .telemetryrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
]
}
]
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 deletions FAQ.md
Original file line number Diff line number Diff line change
@@ -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?
Expand Down
Loading

0 comments on commit e4397b7

Please sign in to comment.