Skip to content

Commit

Permalink
[Index Management] Make the config "enableIndexActions" serverless only
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliacech committed Aug 9, 2023
1 parent 253954c commit b82f77b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function mountManagementSection(
extensionsService: ExtensionsService,
isFleetEnabled: boolean,
kibanaVersion: SemVer,
enableIndexActions: boolean
enableIndexActions: boolean = true
) {
const { element, setBreadcrumbs, history, theme$ } = params;
const [core, startDependencies] = await coreSetup.getStartServices();
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/index_management/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ export interface ClientConfigType {
ui: {
enabled: boolean;
};
enableIndexActions: boolean;
enableIndexActions?: boolean;
}
9 changes: 8 additions & 1 deletion x-pack/plugins/index_management/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ const schemaLatest = schema.object(
ui: schema.object({
enabled: schema.boolean({ defaultValue: true }),
}),
enableIndexActions: schema.boolean({ defaultValue: true }),
enableIndexActions: schema.conditional(
schema.contextRef('serverless'),
true,
// Index actions are disabled in serverless; refer to the serverless.yml file as the source of truth
// We take this approach in order to have a central place (serverless.yml) for serverless config across Kibana
schema.boolean({ defaultValue: true }),
schema.never()
),
},
{ defaultValue: undefined }
);
Expand Down

0 comments on commit b82f77b

Please sign in to comment.