mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[Fleet] Make spaces plugin optional (#152115)
## Summary Closes #151897 The spaces service will be disabled in serverless. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
0af9176d3d
commit
ee56d954da
2 changed files with 5 additions and 5 deletions
|
@ -17,7 +17,6 @@
|
|||
"navigation",
|
||||
"customIntegrations",
|
||||
"share",
|
||||
"spaces",
|
||||
"security",
|
||||
"unifiedSearch",
|
||||
"savedObjectsTagging",
|
||||
|
@ -33,7 +32,8 @@
|
|||
"globalSearch",
|
||||
"telemetry",
|
||||
"discover",
|
||||
"ingestPipelines"
|
||||
"ingestPipelines",
|
||||
"spaces",
|
||||
],
|
||||
"requiredBundles": [
|
||||
"kibanaReact",
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
import type { Observable } from 'rxjs';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { take, filter } from 'rxjs/operators';
|
||||
|
||||
import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import type {
|
||||
CoreSetup,
|
||||
|
@ -118,7 +118,7 @@ export interface FleetSetupDeps {
|
|||
encryptedSavedObjects: EncryptedSavedObjectsPluginSetup;
|
||||
cloud?: CloudSetup;
|
||||
usageCollection?: UsageCollectionSetup;
|
||||
spaces: SpacesPluginStart;
|
||||
spaces?: SpacesPluginStart;
|
||||
telemetry?: TelemetryPluginSetup;
|
||||
taskManager: TaskManagerSetupContract;
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ export class FleetPlugin
|
|||
return getInternalSoClient();
|
||||
},
|
||||
get spaceId() {
|
||||
return deps.spaces.spacesService.getSpaceId(request);
|
||||
return deps.spaces?.spacesService?.getSpaceId(request) ?? DEFAULT_SPACE_ID;
|
||||
},
|
||||
|
||||
get limitedToPackages() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue