Skip to content

Commit e7098a3

Browse files
authored
Merge branch 'main' into discover-tabs-copy-naming
2 parents 63046ed + 937dbba commit e7098a3

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

src/core/packages/overlays/browser/src/modal.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
import type { EuiConfirmModalProps } from '@elastic/eui';
10+
import type { EuiConfirmModalProps, EuiModalProps } from '@elastic/eui';
1111
import type { MountPoint, OverlayRef } from '@kbn/core-mount-utils-browser';
1212

1313
/**
@@ -22,6 +22,7 @@ export interface OverlayModalConfirmOptions {
2222
'data-test-subj'?: string;
2323
defaultFocusedButton?: EuiConfirmModalProps['defaultFocusedButton'];
2424
buttonColor?: EuiConfirmModalProps['buttonColor'];
25+
'aria-labelledby'?: EuiConfirmModalProps['aria-labelledby'];
2526
/**
2627
* Sets the max-width of the modal.
2728
* Set to `true` to use the default (`euiBreakpoints 'm'`),
@@ -66,4 +67,5 @@ export interface OverlayModalOpenOptions {
6667
closeButtonAriaLabel?: string;
6768
'data-test-subj'?: string;
6869
maxWidth?: boolean | number | string;
70+
'aria-labelledby'?: EuiModalProps['aria-labelledby'];
6971
}

x-pack/platform/plugins/private/graph/public/components/source_modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function SourceModal(props: SourcePickerProps) {
1616
return (
1717
<div css={sourceModalStyles}>
1818
<EuiModalHeader>
19-
<EuiModalHeaderTitle>
19+
<EuiModalHeaderTitle id="source-modal-title">
2020
<FormattedMessage
2121
id="xpack.graph.sourceModal.title"
2222
defaultMessage="Select a data source"

x-pack/platform/plugins/private/graph/public/services/source_modal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ export function openSourceModal(
3232
onSelected(indexPattern);
3333
modalRef.close();
3434
}}
35-
/>
35+
/>,
36+
{
37+
'aria-labelledby': 'source-modal-title',
38+
}
3639
);
3740
}

x-pack/solutions/security/plugins/security_solution/common/experimental_features.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,12 @@ type Mutable<T> = { -readonly [P in keyof T]: T[P] };
276276

277277
const allowedKeys = Object.keys(allowedExperimentalValues) as Readonly<ExperimentalConfigKeys>;
278278

279+
const disableExperimentalPrefix = 'disable:' as const;
280+
279281
/**
280282
* Parses the string value used in `xpack.securitySolution.enableExperimental` kibana configuration,
281-
* which should be a string of values delimited by a comma (`,`)
283+
* which should be an array of strings corresponding to allowedExperimentalValues keys.
284+
* Use the `disable:` prefix to disable a feature.
282285
*
283286
* @param configValue
284287
* @throws SecuritySolutionInvalidExperimentalValue
@@ -289,11 +292,15 @@ export const parseExperimentalConfigValue = (
289292
const enabledFeatures: Mutable<Partial<ExperimentalFeatures>> = {};
290293
const invalidKeys: string[] = [];
291294

292-
for (const value of configValue) {
295+
for (let value of configValue) {
296+
const isDisabled = value.startsWith(disableExperimentalPrefix);
297+
if (isDisabled) {
298+
value = value.replace(disableExperimentalPrefix, '');
299+
}
293300
if (!allowedKeys.includes(value as keyof ExperimentalFeatures)) {
294301
invalidKeys.push(value);
295302
} else {
296-
enabledFeatures[value as keyof ExperimentalFeatures] = true;
303+
enabledFeatures[value as keyof ExperimentalFeatures] = !isDisabled;
297304
}
298305
}
299306

0 commit comments

Comments
 (0)