-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spaces - Client NP Migration, Phase 1 #40856
Changes from all commits
f80f888
452d592
b41073c
1677dc4
a014d72
b0bf4dd
c46f283
aed3888
2aa3b71
b039a99
8c161f2
3a010f1
8efbeab
a3e1e59
86a4379
8f398c6
f866d7d
a551a50
e9bdc21
8df1838
9dc0957
6517a60
e314536
75c0b02
67eea7b
3acca45
40b6c9e
444dbb6
13cc9ae
1b50503
6f123b6
6192de1
e41dc60
9482b47
86bc36d
e80e91b
0d1d283
c849fde
e4c0e43
03e93da
7d15190
c3cb211
6cf91d4
8146ddb
b593c70
ebd3147
d2b2452
54f8ce7
f6249ff
b27c7b7
eb2714b
839b9a7
1871ef7
d771522
0186d5f
5b2c16a
03f1687
e29437b
71865a9
5cbb6d9
2ff6cb8
7cfdcb1
bbfc0bd
ffb8a7b
884e545
cb44020
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,6 @@ export const spaces = (kibana: Record<string, any>) => | |
}, | ||
|
||
uiExports: { | ||
chromeNavControls: ['plugins/spaces/views/nav_control'], | ||
styleSheetPaths: resolve(__dirname, 'public/index.scss'), | ||
managementSections: ['plugins/spaces/views/management'], | ||
apps: [ | ||
|
@@ -60,7 +59,7 @@ export const spaces = (kibana: Record<string, any>) => | |
hidden: true, | ||
}, | ||
], | ||
hacks: [], | ||
hacks: ['plugins/spaces/legacy'], | ||
mappings, | ||
migrations: { | ||
space: { | ||
|
@@ -73,19 +72,21 @@ export const spaces = (kibana: Record<string, any>) => | |
hidden: true, | ||
}, | ||
}, | ||
home: ['plugins/spaces/register_feature'], | ||
injectDefaultVars(server: any) { | ||
home: [], | ||
injectDefaultVars(server: Server) { | ||
return { | ||
spaces: [], | ||
activeSpace: null, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No more There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: it seems Infra still relies on this variable: https://github.com/elastic/kibana/blob/master/x-pack/legacy/plugins/infra/public/utils/use_kibana_space_id.ts#L14 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! I've restored this variable solely for their use in 0186d5f |
||
serverBasePath: server.config().get('server.basePath'), | ||
activeSpace: null, | ||
}; | ||
}, | ||
async replaceInjectedVars( | ||
vars: Record<string, any>, | ||
request: Legacy.Request, | ||
server: Record<string, any> | ||
server: Server | ||
) { | ||
// NOTICE: use of `activeSpace` is deprecated and will not be made available in the New Platform. | ||
// Known usages: | ||
// - x-pack/legacy/plugins/infra/public/utils/use_kibana_space_id.ts | ||
const spacesPlugin = server.newPlatform.setup.plugins.spaces as SpacesPluginSetup; | ||
if (!spacesPlugin) { | ||
throw new Error('New Platform XPack Spaces plugin is not available.'); | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { SpacesPlugin } from './plugin'; | ||
|
||
export const plugin = () => { | ||
return new SpacesPlugin(); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { npSetup, npStart } from 'ui/new_platform'; | ||
import { plugin } from '.'; | ||
import { SpacesPlugin, PluginsSetup } from './plugin'; | ||
|
||
const spacesPlugin: SpacesPlugin = plugin(); | ||
|
||
const plugins: PluginsSetup = { | ||
home: npSetup.plugins.home, | ||
}; | ||
|
||
export const setup = spacesPlugin.setup(npSetup.core, plugins); | ||
export const start = spacesPlugin.start(npStart.core); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reducing security's dependency on the spaces plugin, at least for now.