Skip to content

Commit 239ca74

Browse files
authored
Fix slm_ui setting by changing camel case back to snake case. (#59663)
1 parent 51fb32b commit 239ca74

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

x-pack/plugins/snapshot_restore/__jest__/client_integration/helpers/setup_environment.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const appDependencies = {
3535
core: coreMock.createSetup(),
3636
services,
3737
config: {
38-
slmUi: { enabled: true },
38+
slm_ui: { enabled: true },
3939
},
4040
plugins: {},
4141
};

x-pack/plugins/snapshot_restore/public/application/app.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { useConfig } from './app_context';
2424
import { AuthorizationContext, WithPrivileges, NotAuthorizedSection } from './lib/authorization';
2525

2626
export const App: React.FunctionComponent = () => {
27-
const { slmUi } = useConfig();
27+
const { slm_ui: slmUi } = useConfig();
2828
const { apiError } = useContext(AuthorizationContext);
2929

3030
const sections: Section[] = ['repositories', 'snapshots', 'restore_status'];

x-pack/plugins/snapshot_restore/public/application/sections/home/home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const SnapshotRestoreHome: React.FunctionComponent<RouteComponentProps<Ma
4141
},
4242
history,
4343
}) => {
44-
const { slmUi } = useConfig();
44+
const { slm_ui: slmUi } = useConfig();
4545

4646
const tabs: Array<{
4747
id: Section;

x-pack/plugins/snapshot_restore/public/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
*/
66

77
export interface ClientConfigType {
8-
slmUi: { enabled: boolean };
8+
slm_ui: { enabled: boolean };
99
}

x-pack/plugins/snapshot_restore/server/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { schema, TypeOf } from '@kbn/config-schema';
88

99
export const configSchema = schema.object({
1010
enabled: schema.boolean({ defaultValue: true }),
11-
slmUi: schema.object({
11+
slm_ui: schema.object({
1212
enabled: schema.boolean({ defaultValue: true }),
1313
}),
1414
});

x-pack/plugins/snapshot_restore/server/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ export const plugin = (ctx: PluginInitializerContext) => new SnapshotRestoreServ
1212
export const config: PluginConfigDescriptor<SnapshotRestoreConfig> = {
1313
schema: configSchema,
1414
exposeToBrowser: {
15-
slmUi: true,
15+
slm_ui: true,
1616
},
1717
};

x-pack/plugins/snapshot_restore/server/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class SnapshotRestoreServerPlugin implements Plugin<void, void, any, any>
8686
config: {
8787
isSecurityEnabled: security !== undefined,
8888
isCloudEnabled: cloud !== undefined && cloud.isCloudEnabled,
89-
isSlmEnabled: pluginConfig.slmUi.enabled,
89+
isSlmEnabled: pluginConfig.slm_ui.enabled,
9090
},
9191
lib: {
9292
isEsError,

0 commit comments

Comments
 (0)