Fix slm_ui setting by changing camel case back to snake case. (#59663)

This commit is contained in:
CJ Cenizal 2020-03-09 09:55:59 -07:00 committed by GitHub
parent 51fb32bbf3
commit 239ca74fc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 7 deletions

View file

@ -35,7 +35,7 @@ const appDependencies = {
core: coreMock.createSetup(),
services,
config: {
slmUi: { enabled: true },
slm_ui: { enabled: true },
},
plugins: {},
};

View file

@ -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'];

View file

@ -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;

View file

@ -5,5 +5,5 @@
*/
export interface ClientConfigType {
slmUi: { enabled: boolean };
slm_ui: { enabled: boolean };
}

View file

@ -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 }),
}),
});

View file

@ -12,6 +12,6 @@ export const plugin = (ctx: PluginInitializerContext) => new SnapshotRestoreServ
export const config: PluginConfigDescriptor<SnapshotRestoreConfig> = {
schema: configSchema,
exposeToBrowser: {
slmUi: true,
slm_ui: true,
},
};

View file

@ -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,