Fix slm_ui setting by changing camel case back to snake case. (#59663)
This commit is contained in:
parent
51fb32bbf3
commit
239ca74fc9
|
@ -35,7 +35,7 @@ const appDependencies = {
|
|||
core: coreMock.createSetup(),
|
||||
services,
|
||||
config: {
|
||||
slmUi: { enabled: true },
|
||||
slm_ui: { enabled: true },
|
||||
},
|
||||
plugins: {},
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@ import { useConfig } from './app_context';
|
|||
import { AuthorizationContext, WithPrivileges, NotAuthorizedSection } from './lib/authorization';
|
||||
|
||||
export const App: React.FunctionComponent = () => {
|
||||
const { slmUi } = useConfig();
|
||||
const { slm_ui: slmUi } = useConfig();
|
||||
const { apiError } = useContext(AuthorizationContext);
|
||||
|
||||
const sections: Section[] = ['repositories', 'snapshots', 'restore_status'];
|
||||
|
|
|
@ -41,7 +41,7 @@ export const SnapshotRestoreHome: React.FunctionComponent<RouteComponentProps<Ma
|
|||
},
|
||||
history,
|
||||
}) => {
|
||||
const { slmUi } = useConfig();
|
||||
const { slm_ui: slmUi } = useConfig();
|
||||
|
||||
const tabs: Array<{
|
||||
id: Section;
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
*/
|
||||
|
||||
export interface ClientConfigType {
|
||||
slmUi: { enabled: boolean };
|
||||
slm_ui: { enabled: boolean };
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema';
|
|||
|
||||
export const configSchema = schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
slmUi: schema.object({
|
||||
slm_ui: schema.object({
|
||||
enabled: schema.boolean({ defaultValue: true }),
|
||||
}),
|
||||
});
|
||||
|
|
|
@ -12,6 +12,6 @@ export const plugin = (ctx: PluginInitializerContext) => new SnapshotRestoreServ
|
|||
export const config: PluginConfigDescriptor<SnapshotRestoreConfig> = {
|
||||
schema: configSchema,
|
||||
exposeToBrowser: {
|
||||
slmUi: true,
|
||||
slm_ui: true,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -86,7 +86,7 @@ export class SnapshotRestoreServerPlugin implements Plugin<void, void, any, any>
|
|||
config: {
|
||||
isSecurityEnabled: security !== undefined,
|
||||
isCloudEnabled: cloud !== undefined && cloud.isCloudEnabled,
|
||||
isSlmEnabled: pluginConfig.slmUi.enabled,
|
||||
isSlmEnabled: pluginConfig.slm_ui.enabled,
|
||||
},
|
||||
lib: {
|
||||
isEsError,
|
||||
|
|
Loading…
Reference in a new issue