Skip to content

Commit 3ef7bf8

Browse files
committed
[SIEM] Client NP Cutover (#64251)
* Move SIEM public/ folder to NP plugin This is solely renames; fixes come next. * Update relative imports in our API tests * Fix linter errors following move to NP folder These paths got a little shorter, so some lines could be collapsed. * Move client dependencies to NP package.json I'm removing the @types/js-yaml for now because I'm not sure we need it; I'll add it back later if we do. * Fix relative imports to other plugins * Fix errant uses of ui/chrome * Remove legacy plugin shim * Move feature registration into plugin This previously had to be part of legacy bootstrapping due to an order of operations issue. * Disconnect legacy plugin The index file should now be redundant with what's in the plugin: * app registration * feature registration * Move public gitattributes * Remove references to legacy embeddables We can now use the NP API. Maps embeddable will not work here until their work is merged, but this should prevent us from importing legacy code and thus breaking the build. * Add our frontend dependencies to kibana.json These are all required for now, because that's how they're typed. If they _should_ be optional (and I think several should), we need to update the type and handle the null case within the app. * Replace use of ui/new_platform mocks in embeddable utils * Fix remaining jest tests * Replace build-breaking ui/new_platform mocks with equivalents in core proper * Remove unnecessary mocks of ui/new_platform * Remove references to legacy SIEM folder * I left the reference in CODEOWNERS in case someone tries to sneak something back * I left the .gitignore reference for the same reason * Fix mocks of relative paths These were not caught by typescript and were causing test failures. * Export our client plugin contracts They're empty for now. * Move from deprecated appmount API The new one dropped a param we weren't using. * Add missing mock causing test failures * Don't re-export core types from our plugin Import them from core where we need them, instead * Move Actions UI registry outside of mount This is already imported, there's no benefit (and potential timing issues) with doing this inside the mount. * Add security's setup contract to our StartServices This doesn't change what's used, only how we're typing it. The types are now a little more truthful as: * our StartPlugins don't include setup contracts * our StartServices includes everything we use at Start time, including the one setup plugin. * Add order and icon back to the sidebar link * Replace plugin class properties with constants These are shared, and should be consistent. * Enable our UI on NP * Add missed plugin dependencies We're not using their contracts, but we are importing code from them. * Revert use of constant in translation Can't do that, whoops * i18n our feature catalogue entry * Remove unnecessary array from single element * Remove unused keys These were the legacy translations used... well, I don't know where they were used. * Ignore circular dependencies in external plugins * Normalize exclusions * Add undeclared dependencies to kibana.json We import our maps embeddable from maps, and we pass inspector to the embeddable. I just missed these in my audit. This was causing errors in the map embeddable. * Await our call to setLayerList This is an async call that we need to complete before we can render. * Reduce siem plugin size When we load our initial plugin (before our app is loaded), were were implicitly importing all of kibana_react with this import. While a global module prevents this from affecting our bundle size currently, that could change in the future. Since we only need a reference to our class, we just import that instead.
1 parent 94ca9ca commit 3ef7bf8

1,696 files changed

Lines changed: 549 additions & 689 deletions

File tree

Some content is hidden

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

.eslintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ module.exports = {
566566
*/
567567
{
568568
// front end typescript and javascript files only
569-
files: ['x-pack/legacy/plugins/siem/public/**/*.{js,ts,tsx}'],
569+
files: ['x-pack/plugins/siem/public/**/*.{js,ts,tsx}'],
570570
rules: {
571571
'import/no-nodejs-modules': 'error',
572572
'no-restricted-imports': [
@@ -615,7 +615,7 @@ module.exports = {
615615
// {
616616
// // will introduced after the other warns are fixed
617617
// // typescript and javascript for front end react performance
618-
// files: ['x-pack/legacy/plugins/siem/public/**/!(*.test).{js,ts,tsx}'],
618+
// files: ['x-pack/plugins/siem/public/**/!(*.test).{js,ts,tsx}'],
619619
// plugins: ['react-perf'],
620620
// rules: {
621621
// // 'react-perf/jsx-no-new-object-as-prop': 'error',

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ kibanaPipeline(timeoutMinutes: 135, checkPrChanges: true) {
4242
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
4343
'xpack-accessibility': kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh'),
4444
'xpack-siemCypress': { processNumber ->
45-
whenChanged(['x-pack/plugins/siem/', 'x-pack/legacy/plugins/siem/', 'x-pack/test/siem_cypress/']) {
45+
whenChanged(['x-pack/plugins/siem/', 'x-pack/test/siem_cypress/']) {
4646
kibanaPipeline.functionalTestProcess('xpack-siemCypress', './test/scripts/jenkins_siem_cypress.sh')(processNumber)
4747
}
4848
},

x-pack/.i18nrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"xpack.searchProfiler": "plugins/searchprofiler",
3737
"xpack.security": ["legacy/plugins/security", "plugins/security"],
3838
"xpack.server": "legacy/server",
39-
"xpack.siem": ["plugins/siem", "legacy/plugins/siem"],
39+
"xpack.siem": "plugins/siem",
4040
"xpack.snapshotRestore": "plugins/snapshot_restore",
4141
"xpack.spaces": ["legacy/plugins/spaces", "plugins/spaces"],
4242
"xpack.taskManager": "legacy/plugins/task_manager",

x-pack/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { canvas } from './legacy/plugins/canvas';
1818
import { infra } from './legacy/plugins/infra';
1919
import { taskManager } from './legacy/plugins/task_manager';
2020
import { rollup } from './legacy/plugins/rollup';
21-
import { siem } from './legacy/plugins/siem';
2221
import { remoteClusters } from './legacy/plugins/remote_clusters';
2322
import { upgradeAssistant } from './legacy/plugins/upgrade_assistant';
2423
import { uptime } from './legacy/plugins/uptime';
@@ -44,7 +43,6 @@ module.exports = function(kibana) {
4443
infra(kibana),
4544
taskManager(kibana),
4645
rollup(kibana),
47-
siem(kibana),
4846
remoteClusters(kibana),
4947
upgradeAssistant(kibana),
5048
uptime(kibana),

x-pack/legacy/plugins/siem/.gitattributes

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

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

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

x-pack/legacy/plugins/siem/package.json

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

x-pack/legacy/plugins/siem/public/legacy.ts

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

x-pack/legacy/plugins/siem/public/lib/kibana/services.ts

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

x-pack/legacy/plugins/siem/public/mock/kibana_core.ts

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

0 commit comments

Comments
 (0)