Skip to content

Commit

Permalink
Spaces - Migrate to NP Saved Objects Service (#58716)
Browse files Browse the repository at this point in the history
* use NP saved objects service for type and wrapper registration

* simplifying

* additional testing

* revert snapshot changes

* removing dependency on legacy saved objects service

* consolidate mocks

* fixing imports

* addrress PR feedback

* remove unused docs

* adjust tests for updated corestart contract

* address test flakiness

* address flakiness, part 2

* address test flakiness

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
legrego and elasticmachine committed Apr 3, 2020
1 parent 678d220 commit 37c8262
Show file tree
Hide file tree
Showing 48 changed files with 954 additions and 679 deletions.
15 changes: 0 additions & 15 deletions x-pack/legacy/plugins/spaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ import { SpacesServiceSetup } from '../../../plugins/spaces/server';
import { SpacesPluginSetup } from '../../../plugins/spaces/server';
// @ts-ignore
import { AuditLogger } from '../../server/lib/audit_logger';
import mappings from './mappings.json';
import { wrapError } from './server/lib/errors';
import { migrateToKibana660 } from './server/lib/migrations';
// @ts-ignore
import { watchStatusAndLicenseToInitialize } from '../../server/lib/watch_status_and_license_to_initialize';
import { initEnterSpaceView } from './server/routes/views';
Expand All @@ -39,18 +37,6 @@ export const spaces = (kibana: Record<string, any>) =>
managementSections: [],
apps: [],
hacks: ['plugins/spaces/legacy'],
mappings,
migrations: {
space: {
'6.6.0': migrateToKibana660,
},
},
savedObjectSchemas: {
space: {
isNamespaceAgnostic: true,
hidden: true,
},
},
home: [],
injectDefaultVars(server: Server) {
return {
Expand Down Expand Up @@ -100,7 +86,6 @@ export const spaces = (kibana: Record<string, any>) =>
const { registerLegacyAPI, createDefaultSpace } = spacesPlugin.__legacyCompat;

registerLegacyAPI({
savedObjects: server.savedObjects,
auditLogger: {
create: (pluginId: string) =>
new AuditLogger(server, pluginId, server.config(), server.plugins.xpack_main.info),
Expand Down
34 changes: 0 additions & 34 deletions x-pack/legacy/plugins/spaces/mappings.json

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 37c8262

Please sign in to comment.