Skip to content

Commit d78150d

Browse files
[NP] Graph migration (#59409) (#60225)
* 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> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent a6f2b2e commit d78150d

File tree

121 files changed

+339
-451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+339
-451
lines changed

x-pack/legacy/plugins/graph/index.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,19 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import { resolve } from 'path';
87
import { i18n } from '@kbn/i18n';
98

109
// @ts-ignore
1110
import migrations from './migrations';
1211
import mappings from './mappings.json';
1312
import { LegacyPluginInitializer } from '../../../../src/legacy/plugin_discovery/types';
14-
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/utils';
1513

1614
export const graph: LegacyPluginInitializer = kibana => {
1715
return new kibana.Plugin({
1816
id: 'graph',
1917
configPrefix: 'xpack.graph',
20-
publicDir: resolve(__dirname, 'public'),
2118
require: ['kibana', 'elasticsearch', 'xpack_main'],
2219
uiExports: {
23-
app: {
24-
title: 'Graph',
25-
order: 9000,
26-
icon: 'plugins/graph/icon.png',
27-
euiIconType: 'graphApp',
28-
main: 'plugins/graph/index',
29-
category: DEFAULT_APP_CATEGORIES.analyze,
30-
},
31-
styleSheetPaths: resolve(__dirname, 'public/index.scss'),
3220
mappings,
3321
migrations,
3422
},
-6.06 KB
Binary file not shown.

x-pack/legacy/plugins/graph/public/index.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

x-pack/legacy/plugins/graph/public/legacy_imports.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

x-pack/legacy/plugins/graph/public/plugin.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

x-pack/legacy/plugins/graph/README.md renamed to x-pack/plugins/graph/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Graph shows only up in the side bar if your server is running on a platinum or t
88

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

2222
* `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
2323
* `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
24-
* `hacks/` contains files that need to run before the actual app is started. When moving to the new platform, this folder will go away.
2524
* `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.
2625
* `helpers/` contains side effect free helper functions that can be imported and used from components and services
2726
* `state_management/` contains reducers, action creators, selectors and sagas. It also exports the central store creator

x-pack/plugins/graph/kibana.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"kibanaVersion": "kibana",
55
"server": true,
66
"ui": true,
7-
"requiredPlugins": ["licensing"],
7+
"requiredPlugins": ["licensing", "data", "navigation"],
88
"optionalPlugins": ["home"],
99
"configPath": ["xpack", "graph"]
1010
}

0 commit comments

Comments
 (0)