mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Advanced Settings] Hide settings that are not applicable to current solution (#209136)
Closes https://github.com/elastic/kibana/issues/196659 ## Summary This PR adds a new setting schema field `solution` which is used in the Advanced settings UI to decide whether to display the setting, depending on the solution of the current space. If the `solution` is not set in the setting definition, the setting will be displayed in all solutions. Otherwise, the setting will only be displayed in the set solution. The current agreement is that we want to display all settings in the "Observability" settings category in the Oblt solution only and all settings in the "Security Solution" settings category in the Security solution only. Therefore, in this PR we set the `solution` field accordingly in the corresponding setting definitions. Note: We decided to add a new setting definition field `solution` rather than filtering by the already existing `category` field so that this approach works in the future if we want to hide other single settings outside of these two categories. **How to test:** Verify that in the classic solution, you can see all settings, and that the solution-related settings mentioned above are only displayed in the corresponding solution. https://github.com/user-attachments/assets/398ef3e6-973a-4283-ae20-229bf6139d60 --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
c22987555b
commit
bc3fae5356
22 changed files with 210 additions and 18 deletions
|
@ -11,6 +11,7 @@ export type {
|
|||
UiSettingsType,
|
||||
ReadonlyModeType,
|
||||
DeprecationSettings,
|
||||
UiSettingsSolution,
|
||||
UiSettingsParams,
|
||||
UserProvidedValues,
|
||||
UiSettingsScope,
|
||||
|
|
|
@ -50,6 +50,8 @@ export interface GetUiSettingsContext {
|
|||
request?: KibanaRequest;
|
||||
}
|
||||
|
||||
export type UiSettingsSolution = 'es' | 'oblt' | 'security';
|
||||
|
||||
/**
|
||||
* UiSettings parameters defined by the plugins.
|
||||
* @public
|
||||
|
@ -116,6 +118,10 @@ export interface UiSettingsParams<T = unknown> {
|
|||
* scoped to a namespace. The default value is 'namespace'
|
||||
*/
|
||||
scope?: UiSettingsScope;
|
||||
/** The solution where this setting is applicable.
|
||||
* This field is used to determine whether the setting should be displayed in the Advanced settings app.
|
||||
* If undefined, the setting must be displayed in all solutions. */
|
||||
solution?: UiSettingsSolution;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -81,6 +81,34 @@ describe('Settings application', () => {
|
|||
}
|
||||
});
|
||||
|
||||
it("doesn't render settings that are not applicable in the current solution", async () => {
|
||||
const services: SettingsApplicationServices = createSettingsApplicationServicesMock(
|
||||
undefined,
|
||||
'es',
|
||||
'security'
|
||||
);
|
||||
|
||||
const { findByTestId } = render(wrap(<SettingsApplication />, services));
|
||||
|
||||
// The empty state should be rendered since all settings are for es solution and current space solution is security
|
||||
expect(findByTestId(DATA_TEST_SUBJ_SETTINGS_EMPTY_STATE)).toBeTruthy();
|
||||
});
|
||||
|
||||
it('renders settings that are applicable in the current solution', async () => {
|
||||
const services: SettingsApplicationServices = createSettingsApplicationServicesMock(
|
||||
undefined,
|
||||
'oblt',
|
||||
'oblt'
|
||||
);
|
||||
|
||||
const { getByTestId } = render(wrap(<SettingsApplication />, services));
|
||||
|
||||
// The form should be rendered
|
||||
for (const category of spaceCategories) {
|
||||
expect(getByTestId(`${DATA_TEST_SUBJ_SETTINGS_CATEGORY}-${category}`)).toBeInTheDocument();
|
||||
}
|
||||
});
|
||||
|
||||
describe('Tabs', () => {
|
||||
const spaceSettingsTestSubj = `${DATA_TEST_SUBJ_PREFIX_TAB}-${SPACE_SETTINGS_TAB_ID}`;
|
||||
const globalSettingsTestSubj = `${DATA_TEST_SUBJ_PREFIX_TAB}-${GLOBAL_SETTINGS_TAB_ID}`;
|
||||
|
|
|
@ -7,10 +7,11 @@
|
|||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useState, useEffect } from 'react';
|
||||
import useEffectOnce from 'react-use/lib/useEffectOnce';
|
||||
|
||||
import { UiSettingsScope } from '@kbn/core-ui-settings-common';
|
||||
import { SolutionView } from '@kbn/spaces-plugin/common';
|
||||
import { useServices } from '../services';
|
||||
|
||||
/**
|
||||
|
@ -21,13 +22,31 @@ import { useServices } from '../services';
|
|||
* @returns An array of settings metadata objects.
|
||||
*/
|
||||
export const useSettings = (scope: UiSettingsScope) => {
|
||||
const { getAllowlistedSettings, subscribeToUpdates } = useServices();
|
||||
const { getAllowlistedSettings, subscribeToUpdates, getActiveSpace, subscribeToActiveSpace } =
|
||||
useServices();
|
||||
const [solutionView, setSolutionView] = useState<SolutionView>();
|
||||
|
||||
const [settings, setSettings] = useState(getAllowlistedSettings(scope));
|
||||
useEffectOnce(() => {
|
||||
const subscription = subscribeToActiveSpace(() => {
|
||||
getActiveSpace().then((space) => {
|
||||
setSolutionView(space.solution);
|
||||
});
|
||||
});
|
||||
|
||||
return () => {
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
|
||||
const [settings, setSettings] = useState(getAllowlistedSettings(scope, solutionView));
|
||||
|
||||
useEffect(() => {
|
||||
setSettings(getAllowlistedSettings(scope, solutionView));
|
||||
}, [solutionView, scope, getAllowlistedSettings]); // Update settings when solutionView changes
|
||||
|
||||
useEffectOnce(() => {
|
||||
const subscription = subscribeToUpdates(() => {
|
||||
setSettings(getAllowlistedSettings(scope));
|
||||
setSettings(getAllowlistedSettings(scope, solutionView));
|
||||
}, scope);
|
||||
|
||||
return () => {
|
||||
|
|
|
@ -33,6 +33,7 @@ export const KibanaSettingsApplication = ({
|
|||
sectionRegistry,
|
||||
application,
|
||||
chrome,
|
||||
spaces,
|
||||
}: SettingsApplicationKibanaDependencies) => (
|
||||
<SettingsApplicationKibanaProvider
|
||||
{...{
|
||||
|
@ -46,6 +47,7 @@ export const KibanaSettingsApplication = ({
|
|||
sectionRegistry,
|
||||
application,
|
||||
chrome,
|
||||
spaces,
|
||||
}}
|
||||
>
|
||||
<SettingsApplication />
|
||||
|
|
|
@ -24,6 +24,8 @@ import {
|
|||
} from '@kbn/management-settings-utilities/mocks/settings.mock';
|
||||
import { UiSettingsScope } from '@kbn/core-ui-settings-common';
|
||||
import { getSettingsCapabilitiesMock } from '@kbn/management-settings-utilities/mocks/capabilities.mock';
|
||||
import { UiSettingsSolution } from '@kbn/core-ui-settings-common';
|
||||
import { SolutionView } from '@kbn/spaces-plugin/common';
|
||||
import { SettingsApplicationProvider, SettingsApplicationServices } from '../services';
|
||||
|
||||
const createRootMock = () => {
|
||||
|
@ -42,11 +44,17 @@ const createRootMock = () => {
|
|||
};
|
||||
|
||||
export const createSettingsApplicationServicesMock = (
|
||||
hasGlobalSettings?: boolean
|
||||
hasGlobalSettings?: boolean,
|
||||
settingsSolution?: UiSettingsSolution,
|
||||
spaceSolution: SolutionView = 'classic'
|
||||
): SettingsApplicationServices => ({
|
||||
...createFormServicesMock(),
|
||||
getAllowlistedSettings: (scope: UiSettingsScope) =>
|
||||
scope === 'namespace' ? getSettingsMock() : hasGlobalSettings ? getGlobalSettingsMock() : {},
|
||||
scope === 'namespace'
|
||||
? getSettingsMock(undefined, undefined, settingsSolution)
|
||||
: hasGlobalSettings
|
||||
? getGlobalSettingsMock(undefined, undefined, settingsSolution)
|
||||
: {},
|
||||
getSections: () => [],
|
||||
getCapabilities: getSettingsCapabilitiesMock,
|
||||
setBadge: jest.fn(),
|
||||
|
@ -55,6 +63,11 @@ export const createSettingsApplicationServicesMock = (
|
|||
subscribeToUpdates: () => new Subscription(),
|
||||
addUrlToHistory: jest.fn(),
|
||||
getToastsService: jest.fn(),
|
||||
getActiveSpace: () =>
|
||||
Promise.resolve({
|
||||
solution: spaceSolution,
|
||||
}),
|
||||
subscribeToActiveSpace: () => new Subscription(),
|
||||
});
|
||||
|
||||
export const TestWrapper = ({
|
||||
|
|
|
@ -24,9 +24,15 @@ import { UiSettingsScope } from '@kbn/core-ui-settings-common';
|
|||
import { RegistryEntry, SectionRegistryStart } from '@kbn/management-settings-section-registry';
|
||||
import { ToastsStart } from '@kbn/core-notifications-browser';
|
||||
import { ChromeBadge, ChromeStart } from '@kbn/core-chrome-browser';
|
||||
import type { SpacesPluginStart } from '@kbn/spaces-plugin/public';
|
||||
import type { Space } from '@kbn/spaces-plugin/common';
|
||||
import { SolutionView } from '@kbn/spaces-plugin/common';
|
||||
|
||||
export interface Services {
|
||||
getAllowlistedSettings: (scope: UiSettingsScope) => Record<string, UiSettingMetadata>;
|
||||
getAllowlistedSettings: (
|
||||
scope: UiSettingsScope,
|
||||
solution: SolutionView | undefined
|
||||
) => Record<string, UiSettingMetadata>;
|
||||
getSections: (scope: UiSettingsScope) => RegistryEntry[];
|
||||
getToastsService: () => ToastsStart;
|
||||
getCapabilities: () => SettingsCapabilities;
|
||||
|
@ -35,6 +41,8 @@ export interface Services {
|
|||
isCustomSetting: (key: string, scope: UiSettingsScope) => boolean;
|
||||
isOverriddenSetting: (key: string, scope: UiSettingsScope) => boolean;
|
||||
addUrlToHistory: (url: string) => void;
|
||||
getActiveSpace: () => Promise<Pick<Space, 'solution'>>;
|
||||
subscribeToActiveSpace: (fn: () => void) => Subscription;
|
||||
}
|
||||
|
||||
export type SettingsApplicationServices = Services & FormServices;
|
||||
|
@ -57,6 +65,7 @@ export interface KibanaDependencies {
|
|||
};
|
||||
application: Pick<ApplicationStart, 'capabilities'>;
|
||||
chrome: Pick<ChromeStart, 'setBadge'>;
|
||||
spaces: Pick<SpacesPluginStart, 'getActiveSpace' | 'getActiveSpace$'>;
|
||||
}
|
||||
|
||||
export type SettingsApplicationKibanaDependencies = KibanaDependencies & FormKibanaDependencies;
|
||||
|
@ -87,6 +96,8 @@ export const SettingsApplicationProvider: FC<PropsWithChildren<SettingsApplicati
|
|||
isCustomSetting,
|
||||
isOverriddenSetting,
|
||||
addUrlToHistory,
|
||||
getActiveSpace,
|
||||
subscribeToActiveSpace,
|
||||
} = services;
|
||||
|
||||
return (
|
||||
|
@ -101,6 +112,8 @@ export const SettingsApplicationProvider: FC<PropsWithChildren<SettingsApplicati
|
|||
isCustomSetting,
|
||||
isOverriddenSetting,
|
||||
addUrlToHistory,
|
||||
getActiveSpace,
|
||||
subscribeToActiveSpace,
|
||||
}}
|
||||
>
|
||||
<FormProvider
|
||||
|
@ -129,6 +142,7 @@ export const SettingsApplicationKibanaProvider: FC<
|
|||
sectionRegistry,
|
||||
application,
|
||||
chrome,
|
||||
spaces,
|
||||
} = dependencies;
|
||||
const { client, globalClient } = settings;
|
||||
|
||||
|
@ -136,11 +150,17 @@ export const SettingsApplicationKibanaProvider: FC<
|
|||
return scope === 'namespace' ? client : globalClient;
|
||||
};
|
||||
|
||||
const getAllowlistedSettings = (scope: UiSettingsScope) => {
|
||||
const getAllowlistedSettings = (scope: UiSettingsScope, solution: SolutionView | undefined) => {
|
||||
const scopeClient = getScopeClient(scope);
|
||||
const rawSettings = Object.fromEntries(
|
||||
Object.entries(scopeClient.getAll()).filter(
|
||||
([settingId, settingDef]) => !settingDef.readonly && !client.isCustom(settingId)
|
||||
([settingId, settingDef]) =>
|
||||
!settingDef.readonly &&
|
||||
!client.isCustom(settingId) &&
|
||||
(!solution ||
|
||||
solution === 'classic' ||
|
||||
!settingDef.solution ||
|
||||
settingDef.solution === solution)
|
||||
)
|
||||
);
|
||||
return normalizeSettings(rawSettings);
|
||||
|
@ -191,6 +211,10 @@ export const SettingsApplicationKibanaProvider: FC<
|
|||
isOverriddenSetting,
|
||||
subscribeToUpdates,
|
||||
addUrlToHistory: (url: string) => history.push({ pathname: '', search: url }),
|
||||
getActiveSpace: spaces.getActiveSpace,
|
||||
subscribeToActiveSpace: (fn: () => void) => {
|
||||
return spaces.getActiveSpace$().subscribe(fn);
|
||||
},
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
@ -36,5 +36,6 @@
|
|||
"@kbn/core-notifications-browser",
|
||||
"@kbn/core-chrome-browser",
|
||||
"@kbn/core-user-profile-browser-mocks",
|
||||
"@kbn/spaces-plugin",
|
||||
]
|
||||
}
|
||||
|
|
|
@ -102,6 +102,7 @@ export const getFieldDefinition = <T extends SettingType>(
|
|||
type,
|
||||
userValue: savedValue,
|
||||
value: defaultValue,
|
||||
solution,
|
||||
} = setting;
|
||||
|
||||
const { isCustom, isOverridden } = params;
|
||||
|
@ -144,6 +145,7 @@ export const getFieldDefinition = <T extends SettingType>(
|
|||
savedValue,
|
||||
type,
|
||||
unsavedFieldId: `${id}-unsaved`,
|
||||
solution,
|
||||
};
|
||||
|
||||
// TODO: clintandrewhall - add validation (e.g. `select` contains non-empty `options`)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
import { ReactElement } from 'react';
|
||||
|
||||
import { UiCounterMetricType } from '@kbn/analytics';
|
||||
import { DeprecationSettings } from '@kbn/core-ui-settings-common';
|
||||
import { DeprecationSettings, UiSettingsSolution } from '@kbn/core-ui-settings-common';
|
||||
|
||||
import { KnownTypeToValue, SettingType } from './setting_type';
|
||||
|
||||
|
@ -88,6 +88,11 @@ export interface FieldDefinition<
|
|||
type: T;
|
||||
/** An identifier of the field when it has an unsaved change. */
|
||||
unsavedFieldId: string;
|
||||
/** The solution where this setting is applicable.
|
||||
* If undefined, the setting must be displayed in all solutions.
|
||||
* @see {@link UiSettingsSolution}
|
||||
*/
|
||||
solution?: UiSettingsSolution;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
import { KnownTypeToMetadata, SettingType } from '@kbn/management-settings-types';
|
||||
import { UiSettingsSolution } from '@kbn/core-ui-settings-common';
|
||||
|
||||
type Settings = {
|
||||
[key in Exclude<SettingType, 'json' | 'markdown'>]: KnownTypeToMetadata<key>;
|
||||
|
@ -20,11 +21,13 @@ type Settings = {
|
|||
*/
|
||||
export const getSettingsMock = (
|
||||
requiresPageReload: boolean = false,
|
||||
readonly: boolean = false
|
||||
readonly: boolean = false,
|
||||
solution?: UiSettingsSolution
|
||||
): Settings => {
|
||||
const defaults = {
|
||||
requiresPageReload,
|
||||
readonly,
|
||||
solution,
|
||||
};
|
||||
|
||||
return {
|
||||
|
@ -135,11 +138,13 @@ export const getSettingsMock = (
|
|||
*/
|
||||
export const getGlobalSettingsMock = (
|
||||
requiresPageReload: boolean = false,
|
||||
readonly: boolean = false
|
||||
readonly: boolean = false,
|
||||
solution?: UiSettingsSolution
|
||||
) => {
|
||||
const defaults = {
|
||||
requiresPageReload,
|
||||
readonly,
|
||||
solution,
|
||||
};
|
||||
return {
|
||||
globalString: {
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
],
|
||||
"optionalPlugins": [
|
||||
"home",
|
||||
"usageCollection"
|
||||
"usageCollection",
|
||||
"spaces",
|
||||
],
|
||||
"requiredBundles": []
|
||||
}
|
||||
|
|
|
@ -14,7 +14,12 @@ import ReactDOM from 'react-dom';
|
|||
import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render';
|
||||
import React from 'react';
|
||||
import { withSuspense } from '@kbn/shared-ux-utility';
|
||||
import { AdvancedSettingsSetup, AdvancedSettingsStart, AdvancedSettingsPluginSetup } from './types';
|
||||
import {
|
||||
AdvancedSettingsSetup,
|
||||
AdvancedSettingsStart,
|
||||
AdvancedSettingsPluginSetup,
|
||||
AdvancedSettingsPluginStart,
|
||||
} from './types';
|
||||
|
||||
const { setup: sectionRegistrySetup, start: sectionRegistryStart } = new SectionRegistry();
|
||||
|
||||
|
@ -29,9 +34,18 @@ const title = i18n.translate('advancedSettings.advancedSettingsLabel', {
|
|||
});
|
||||
|
||||
export class AdvancedSettingsPlugin
|
||||
implements Plugin<AdvancedSettingsSetup, AdvancedSettingsStart, AdvancedSettingsPluginSetup>
|
||||
implements
|
||||
Plugin<
|
||||
AdvancedSettingsSetup,
|
||||
AdvancedSettingsStart,
|
||||
AdvancedSettingsPluginSetup,
|
||||
AdvancedSettingsPluginStart
|
||||
>
|
||||
{
|
||||
public setup(core: CoreSetup, { management, home }: AdvancedSettingsPluginSetup) {
|
||||
public setup(
|
||||
core: CoreSetup<AdvancedSettingsPluginStart>,
|
||||
{ management, home }: AdvancedSettingsPluginSetup
|
||||
) {
|
||||
const kibanaSection = management.sections.section.kibana;
|
||||
|
||||
kibanaSection.registerApp({
|
||||
|
@ -39,7 +53,7 @@ export class AdvancedSettingsPlugin
|
|||
title,
|
||||
order: 3,
|
||||
async mount({ element, setBreadcrumbs, history }) {
|
||||
const [coreStart] = await core.getStartServices();
|
||||
const [coreStart, { spaces }] = await core.getStartServices();
|
||||
|
||||
const { docTitle } = coreStart.chrome;
|
||||
docTitle.change(title);
|
||||
|
@ -48,7 +62,12 @@ export class AdvancedSettingsPlugin
|
|||
ReactDOM.render(
|
||||
<KibanaRenderContextProvider {...coreStart}>
|
||||
<KibanaSettingsApplication
|
||||
{...{ ...coreStart, history, sectionRegistry: sectionRegistryStart }}
|
||||
{...{
|
||||
...coreStart,
|
||||
history,
|
||||
spaces,
|
||||
sectionRegistry: sectionRegistryStart,
|
||||
}}
|
||||
/>
|
||||
</KibanaRenderContextProvider>,
|
||||
element
|
||||
|
|
|
@ -15,6 +15,7 @@ import type {
|
|||
SectionRegistrySetup,
|
||||
SectionRegistryStart,
|
||||
} from '@kbn/management-settings-section-registry';
|
||||
import type { SpacesPluginStart } from '@kbn/spaces-plugin/public';
|
||||
|
||||
export type AdvancedSettingsSetup = SectionRegistrySetup;
|
||||
export type AdvancedSettingsStart = SectionRegistryStart;
|
||||
|
@ -24,3 +25,7 @@ export interface AdvancedSettingsPluginSetup {
|
|||
home?: HomePublicPluginSetup;
|
||||
usageCollection?: UsageCollectionSetup;
|
||||
}
|
||||
|
||||
export interface AdvancedSettingsPluginStart {
|
||||
spaces: SpacesPluginStart;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
"@kbn/react-kibana-context-render",
|
||||
"@kbn/shared-ux-utility",
|
||||
"@kbn/management-settings-application",
|
||||
"@kbn/spaces-plugin",
|
||||
],
|
||||
"exclude": [
|
||||
"target/**/*",
|
||||
|
|
|
@ -89,6 +89,7 @@ export class AIAssistantManagementSelectionPlugin
|
|||
),
|
||||
},
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ exports[`TelemetryManagementSectionComponent renders as expected 1`] = `
|
|||
"order": undefined,
|
||||
"requiresPageReload": false,
|
||||
"savedValue": true,
|
||||
"solution": undefined,
|
||||
"type": "boolean",
|
||||
"unsavedFieldId": "Usage collection-unsaved",
|
||||
}
|
||||
|
|
|
@ -28,5 +28,6 @@ export const uiSettings: Record<string, UiSettingsParams> = {
|
|||
type: 'array',
|
||||
schema: schema.arrayOf(schema.string()),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -29,5 +29,6 @@ export const featureFlagUiSettings: Record<string, UiSettingsParams> = {
|
|||
type: 'boolean',
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -73,6 +73,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[maxSuggestions]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -84,6 +85,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
defaultMessage: 'Maximum number of suggestions fetched in autocomplete selection boxes.',
|
||||
}),
|
||||
schema: schema.number(),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[enableComparisonByDefault]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -96,6 +98,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
'Determines whether the comparison feature is enabled or disabled by default in the APM app.',
|
||||
}),
|
||||
schema: schema.boolean(),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[defaultApmServiceEnvironment]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -109,6 +112,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
value: '',
|
||||
schema: schema.string(),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmProgressiveLoading]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -162,6 +166,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
),
|
||||
},
|
||||
showInLabs: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmServiceInventoryOptimizedSorting]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -183,6 +188,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
requiresPageReload: false,
|
||||
type: 'boolean',
|
||||
showInLabs: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmServiceGroupMaxNumberOfServices]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -194,6 +200,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
defaultMessage: 'Limit the number of services in a given service group',
|
||||
}),
|
||||
schema: schema.number({ min: 1 }),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmTraceExplorerTab]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -215,6 +222,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
requiresPageReload: true,
|
||||
type: 'boolean',
|
||||
showInLabs: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmLabsButton]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -229,6 +237,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: false,
|
||||
requiresPageReload: true,
|
||||
type: 'boolean',
|
||||
solution: 'oblt',
|
||||
},
|
||||
[enableInfrastructureProfilingIntegration]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -243,6 +252,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}
|
||||
),
|
||||
schema: schema.boolean(),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[enableInfrastructureAssetCustomDashboards]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -261,6 +271,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}
|
||||
),
|
||||
schema: schema.boolean(),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[enableAwsLambdaMetrics]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -279,6 +290,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
requiresPageReload: true,
|
||||
type: 'boolean',
|
||||
showInLabs: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[enableAgentExplorerView]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -295,6 +307,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: true,
|
||||
requiresPageReload: true,
|
||||
type: 'boolean',
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmEnableTableSearchBar]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -312,6 +325,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: true,
|
||||
requiresPageReload: true,
|
||||
type: 'boolean',
|
||||
solution: 'oblt',
|
||||
},
|
||||
[entityCentricExperience]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -328,6 +342,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: false,
|
||||
requiresPageReload: true,
|
||||
type: 'boolean',
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmEnableServiceInventoryTableSearchBar]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -348,6 +363,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: true,
|
||||
requiresPageReload: true,
|
||||
type: 'boolean',
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmAWSLambdaPriceFactor]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -363,6 +379,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
arm: schema.number(),
|
||||
x86_64: schema.number(),
|
||||
}),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmAWSLambdaRequestCostPerMillion]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -371,6 +388,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
value: 0.2,
|
||||
schema: schema.number({ min: 0 }),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmEnableServiceMetrics]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -385,6 +403,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmEnableContinuousRollups]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -399,6 +418,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[enableCriticalPath]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -416,6 +436,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
requiresPageReload: true,
|
||||
type: 'boolean',
|
||||
showInLabs: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[syntheticsThrottlingEnabled]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -437,6 +458,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
),
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[enableLegacyUptimeApp]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -450,6 +472,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmEnableProfilingIntegration]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -459,6 +482,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: true,
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: false,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingShowErrorFrames]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -468,6 +492,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: false,
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingPervCPUWattX86]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -480,6 +505,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
schema: schema.number({ min: 0 }),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingPervCPUWattArm64]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -495,6 +521,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
),
|
||||
schema: schema.number({ min: 0 }),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingDatacenterPUE]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -519,6 +546,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
schema: schema.number({ min: 0 }),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingCo2PerKWH]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -542,6 +570,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
}),
|
||||
schema: schema.number({ min: 0 }),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingAWSCostDiscountRate]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -558,6 +587,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
"If you're enrolled in the AWS Enterprise Discount Program (EDP), enter your discount rate to update the profiling cost calculation.",
|
||||
}
|
||||
),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingAzureCostDiscountRate]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -574,6 +604,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
'If you have an Azure Enterprise Agreement with Microsoft, enter your discount rate to update the profiling cost calculation.',
|
||||
}
|
||||
),
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingCostPervCPUPerHour]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -589,6 +620,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
),
|
||||
schema: schema.number({ min: 0, max: 100 }),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[apmEnableTransactionProfiling]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -598,6 +630,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: true,
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[profilingFetchTopNFunctionsFromStacktraces]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -613,6 +646,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
value: false,
|
||||
schema: schema.boolean(),
|
||||
requiresPageReload: false,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[searchExcludedDataTiers]: {
|
||||
category: [observabilityFeatureId],
|
||||
|
@ -632,6 +666,7 @@ export const uiSettings: Record<string, UiSettings> = {
|
|||
schema.oneOf([schema.literal('data_cold'), schema.literal('data_frozen')])
|
||||
),
|
||||
requiresPageReload: false,
|
||||
solution: 'oblt',
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ export const uiSettings: Record<string, UiSettingsParams> = {
|
|||
schema: schema.boolean(),
|
||||
type: 'boolean',
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
[aiAssistantSearchConnectorIndexPattern]: {
|
||||
category: ['observability'],
|
||||
|
@ -54,5 +55,6 @@ export const uiSettings: Record<string, UiSettingsParams> = {
|
|||
schema: schema.string(),
|
||||
type: 'string',
|
||||
requiresPageReload: true,
|
||||
solution: 'oblt',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -95,6 +95,7 @@ export const initUiSettings = (
|
|||
value: schema.number(),
|
||||
pause: schema.boolean(),
|
||||
}),
|
||||
solution: 'security',
|
||||
},
|
||||
[DEFAULT_APP_TIME_RANGE]: {
|
||||
type: 'json',
|
||||
|
@ -115,6 +116,7 @@ export const initUiSettings = (
|
|||
from: schema.string(),
|
||||
to: schema.string(),
|
||||
}),
|
||||
solution: 'security',
|
||||
},
|
||||
[DEFAULT_INDEX_KEY]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.defaultIndexLabel', {
|
||||
|
@ -133,6 +135,7 @@ export const initUiSettings = (
|
|||
schema: validationsEnabled
|
||||
? schema.arrayOf(schema.string(), { maxSize: 50 })
|
||||
: schema.arrayOf(schema.string()),
|
||||
solution: 'security',
|
||||
},
|
||||
[DEFAULT_THREAT_INDEX_KEY]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.defaultThreatIndexLabel', {
|
||||
|
@ -153,6 +156,7 @@ export const initUiSettings = (
|
|||
schema: validationsEnabled
|
||||
? schema.arrayOf(schema.string(), { maxSize: 10 })
|
||||
: schema.arrayOf(schema.string()),
|
||||
solution: 'security',
|
||||
},
|
||||
[DEFAULT_ANOMALY_SCORE]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.defaultAnomalyScoreLabel', {
|
||||
|
@ -171,6 +175,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: true,
|
||||
schema: validationsEnabled ? schema.number({ max: 100, min: 0 }) : schema.number(),
|
||||
solution: 'security',
|
||||
},
|
||||
[ENABLE_NEWS_FEED_SETTING]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.enableNewsFeedLabel', {
|
||||
|
@ -185,6 +190,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: true,
|
||||
schema: schema.boolean(),
|
||||
solution: 'security',
|
||||
},
|
||||
[EXCLUDE_COLD_AND_FROZEN_TIERS_IN_ANALYZER]: {
|
||||
name: i18n.translate(
|
||||
|
@ -206,6 +212,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: true,
|
||||
schema: schema.boolean(),
|
||||
solution: 'security',
|
||||
},
|
||||
[ENABLE_VISUALIZATIONS_IN_FLYOUT_SETTING]: {
|
||||
name: enableVisualizationsInFlyoutLabel,
|
||||
|
@ -222,6 +229,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: true,
|
||||
schema: schema.boolean(),
|
||||
solution: 'security',
|
||||
},
|
||||
[ENABLE_GRAPH_VISUALIZATION_SETTING]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.enableGraphVisualizationLabel', {
|
||||
|
@ -244,6 +252,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: true,
|
||||
schema: schema.boolean(),
|
||||
solution: 'security',
|
||||
},
|
||||
[DEFAULT_RULES_TABLE_REFRESH_SETTING]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.rulesTableRefresh', {
|
||||
|
@ -268,6 +277,7 @@ export const initUiSettings = (
|
|||
value: schema.number({ min: 60000 }),
|
||||
on: schema.boolean(),
|
||||
}),
|
||||
solution: 'security',
|
||||
},
|
||||
[NEWS_FEED_URL_SETTING]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.newsFeedUrl', {
|
||||
|
@ -282,6 +292,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: true,
|
||||
schema: schema.string(),
|
||||
solution: 'security',
|
||||
},
|
||||
[IP_REPUTATION_LINKS_SETTING]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.ipReputationLinks', {
|
||||
|
@ -305,6 +316,7 @@ export const initUiSettings = (
|
|||
url_template: schema.string(),
|
||||
})
|
||||
),
|
||||
solution: 'security',
|
||||
},
|
||||
[ENABLE_CCS_READ_WARNING_SETTING]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.enableCcsReadWarningLabel', {
|
||||
|
@ -319,6 +331,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: false,
|
||||
schema: schema.boolean(),
|
||||
solution: 'security',
|
||||
},
|
||||
[SHOW_RELATED_INTEGRATIONS_SETTING]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.showRelatedIntegrationsLabel', {
|
||||
|
@ -336,6 +349,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: true,
|
||||
schema: schema.boolean(),
|
||||
solution: 'security',
|
||||
},
|
||||
[DEFAULT_ALERT_TAGS_KEY]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.defaultAlertTagsLabel', {
|
||||
|
@ -351,6 +365,7 @@ export const initUiSettings = (
|
|||
category: [APP_ID],
|
||||
requiresPageReload: true,
|
||||
schema: schema.arrayOf(schema.string()),
|
||||
solution: 'security',
|
||||
},
|
||||
[MAX_UNASSOCIATED_NOTES]: {
|
||||
name: i18n.translate('xpack.securitySolution.uiSettings.maxUnassociatedNotesLabel', {
|
||||
|
@ -372,6 +387,7 @@ export const initUiSettings = (
|
|||
}),
|
||||
category: [APP_ID],
|
||||
requiresPageReload: false,
|
||||
solution: 'security',
|
||||
},
|
||||
[EXCLUDED_DATA_TIERS_FOR_RULE_EXECUTION]: {
|
||||
name: i18n.translate(
|
||||
|
@ -396,6 +412,7 @@ export const initUiSettings = (
|
|||
value: [],
|
||||
category: [APP_ID],
|
||||
requiresPageReload: false,
|
||||
solution: 'security',
|
||||
},
|
||||
...(experimentalFeatures.extendedRuleExecutionLoggingEnabled
|
||||
? {
|
||||
|
@ -419,6 +436,7 @@ export const initUiSettings = (
|
|||
value: true,
|
||||
category: [APP_ID],
|
||||
requiresPageReload: false,
|
||||
solution: 'security',
|
||||
},
|
||||
[EXTENDED_RULE_EXECUTION_LOGGING_MIN_LEVEL_SETTING]: {
|
||||
name: i18n.translate(
|
||||
|
@ -493,6 +511,7 @@ export const initUiSettings = (
|
|||
},
|
||||
category: [APP_ID],
|
||||
requiresPageReload: false,
|
||||
solution: 'security',
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue