Skip to content

Commit

Permalink
[NP] Graph migration (#59409)
Browse files Browse the repository at this point in the history
* Move graph to NP

* Styles

* Clean up

* Fix eslint

* Fix ESlint

* Fix path

* Fix container height

* Clean up

* Update index.ts

* Update graph_client_workspace.js

* Refactoring

* Remove unused methods

* Update graph_client_workspace.test.js

* Rename npData to data

* Move Readme

* Inline parsing discover url

* Remove import of legacy styles

* Update README

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
maryia-lapata and elasticmachine committed Mar 16, 2020
1 parent 96ac1aa commit 7d12b76
Show file tree
Hide file tree
Showing 121 changed files with 339 additions and 451 deletions.
12 changes: 0 additions & 12 deletions x-pack/legacy/plugins/graph/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,19 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { resolve } from 'path';
import { i18n } from '@kbn/i18n';

// @ts-ignore
import migrations from './migrations';
import mappings from './mappings.json';
import { LegacyPluginInitializer } from '../../../../src/legacy/plugin_discovery/types';
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/utils';

export const graph: LegacyPluginInitializer = kibana => {
return new kibana.Plugin({
id: 'graph',
configPrefix: 'xpack.graph',
publicDir: resolve(__dirname, 'public'),
require: ['kibana', 'elasticsearch', 'xpack_main'],
uiExports: {
app: {
title: 'Graph',
order: 9000,
icon: 'plugins/graph/icon.png',
euiIconType: 'graphApp',
main: 'plugins/graph/index',
category: DEFAULT_APP_CATEGORIES.analyze,
},
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
mappings,
migrations,
},
Expand Down
Binary file removed x-pack/legacy/plugins/graph/public/icon.png
Binary file not shown.
26 changes: 0 additions & 26 deletions x-pack/legacy/plugins/graph/public/index.ts

This file was deleted.

9 changes: 0 additions & 9 deletions x-pack/legacy/plugins/graph/public/legacy_imports.ts

This file was deleted.

75 changes: 0 additions & 75 deletions x-pack/legacy/plugins/graph/public/plugin.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Graph shows only up in the side bar if your server is running on a platinum or t

* Run tests `node x-pack/scripts/jest.js --watch plugins/graph`
* Run type check `node scripts/type_check.js --project=x-pack/tsconfig.json`
* Run linter `node scripts/eslint.js x-pack/legacy/plugins/graph`
* Run linter `node scripts/eslint.js x-pack/plugins/graph`
* Run functional tests (make sure to stop dev server)
* Server `cd x-pack && node ./scripts/functional_tests_server.js`
* Tests `cd x-pack && node ../scripts/functional_test_runner.js --config ./test/functional/config.js --grep=graph`
Expand All @@ -21,7 +21,6 @@ Currently most of the state handling is done by a central angular controller. Th

* `angular/` contains all code using javascript and angular. Rewriting this code in typescript and react is currently ongoing. When the migration is finished, this folder will go away
* `components/` contains react components for various parts of the interface. Components can hold local UI state (e.g. current form data), everything else should be passed in from the caller. Styles should reside in a component-specific stylesheet
* `hacks/` contains files that need to run before the actual app is started. When moving to the new platform, this folder will go away.
* `services/` contains functions that encapsule other parts of Kibana. Stateful dependencies are passed in from the outside. Components should not rely on services directly but have callbacks passed in. Once the migration to redux/saga is complete, only sagas will use services.
* `helpers/` contains side effect free helper functions that can be imported and used from components and services
* `state_management/` contains reducers, action creators, selectors and sagas. It also exports the central store creator
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/graph/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"kibanaVersion": "kibana",
"server": true,
"ui": true,
"requiredPlugins": ["licensing"],
"requiredPlugins": ["licensing", "data", "navigation"],
"optionalPlugins": ["home"],
"configPath": ["xpack", "graph"]
}
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 7d12b76

Please sign in to comment.