Skip to content

Commit

Permalink
search: remove ui.enabled config
Browse files Browse the repository at this point in the history
  • Loading branch information
TattdCodeMonkey committed Jan 30, 2025
1 parent 0ff03e2 commit 4094fe4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ export interface Meta {
page: MetaPage;
}

export interface ClientConfigType {
ui: {
enabled: boolean;
};
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ClientConfigType {}

export type { ConnectorStats } from './connector_stats';
export type { ElasticsearchIndexWithPrivileges } from './indices';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ export class EnterpriseSearchPlugin implements Plugin {
private isSidebarEnabled = true;

public setup(core: CoreSetup, plugins: PluginsSetup) {
const { config } = this;
if (!config.ui?.enabled) {
return;
}
const { cloud, share } = plugins;

core.application.register({
Expand Down Expand Up @@ -481,9 +477,6 @@ export class EnterpriseSearchPlugin implements Plugin {
private readonly sideNavDynamicItems$ = new BehaviorSubject<DynamicSideNavItems>({});

public start(core: CoreStart, plugins: PluginsStart) {
if (!this.config.ui?.enabled) {
return;
}
// This must be called here in start() and not in `applications/index.tsx` to prevent loading
// race conditions with our apps' `routes.ts` being initialized before `renderApp()`
docLinks.setDocLinks(core.docLinks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ export const mockConfig: ConfigType = {
hasIncrementalSyncEnabled: true,
hasNativeConnectors: true,
hasWebCrawler: true,
ui: {
enabled: true,
},
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@ export const configSchema = schema.object({
hasIncrementalSyncEnabled: schema.boolean({ defaultValue: true }),
hasNativeConnectors: schema.boolean({ defaultValue: true }),
hasWebCrawler: schema.boolean({ defaultValue: false }),
ui: schema.object({
enabled: schema.boolean({ defaultValue: true }),
}),
});

export type ConfigType = TypeOf<typeof configSchema>;

export const config: PluginConfigDescriptor<ConfigType> = {
exposeToBrowser: {
ui: true,
},
schema: configSchema,
};

0 comments on commit 4094fe4

Please sign in to comment.