File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed
src/core/packages/overlays/browser/src
platform/plugins/private/graph/public
solutions/security/plugins/security_solution/common Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 7
7
* License v3.0 only", or the "Server Side Public License, v 1".
8
8
*/
9
9
10
- import type { EuiConfirmModalProps } from '@elastic/eui' ;
10
+ import type { EuiConfirmModalProps , EuiModalProps } from '@elastic/eui' ;
11
11
import type { MountPoint , OverlayRef } from '@kbn/core-mount-utils-browser' ;
12
12
13
13
/**
@@ -22,6 +22,7 @@ export interface OverlayModalConfirmOptions {
22
22
'data-test-subj' ?: string ;
23
23
defaultFocusedButton ?: EuiConfirmModalProps [ 'defaultFocusedButton' ] ;
24
24
buttonColor ?: EuiConfirmModalProps [ 'buttonColor' ] ;
25
+ 'aria-labelledby' ?: EuiConfirmModalProps [ 'aria-labelledby' ] ;
25
26
/**
26
27
* Sets the max-width of the modal.
27
28
* Set to `true` to use the default (`euiBreakpoints 'm'`),
@@ -66,4 +67,5 @@ export interface OverlayModalOpenOptions {
66
67
closeButtonAriaLabel ?: string ;
67
68
'data-test-subj' ?: string ;
68
69
maxWidth ?: boolean | number | string ;
70
+ 'aria-labelledby' ?: EuiModalProps [ 'aria-labelledby' ] ;
69
71
}
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export function SourceModal(props: SourcePickerProps) {
16
16
return (
17
17
< div css = { sourceModalStyles } >
18
18
< EuiModalHeader >
19
- < EuiModalHeaderTitle >
19
+ < EuiModalHeaderTitle id = "source-modal-title" >
20
20
< FormattedMessage
21
21
id = "xpack.graph.sourceModal.title"
22
22
defaultMessage = "Select a data source"
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ export function openSourceModal(
32
32
onSelected ( indexPattern ) ;
33
33
modalRef . close ( ) ;
34
34
} }
35
- />
35
+ /> ,
36
+ {
37
+ 'aria-labelledby' : 'source-modal-title' ,
38
+ }
36
39
) ;
37
40
}
Original file line number Diff line number Diff line change @@ -276,9 +276,12 @@ type Mutable<T> = { -readonly [P in keyof T]: T[P] };
276
276
277
277
const allowedKeys = Object . keys ( allowedExperimentalValues ) as Readonly < ExperimentalConfigKeys > ;
278
278
279
+ const disableExperimentalPrefix = 'disable:' as const ;
280
+
279
281
/**
280
282
* 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.
282
285
*
283
286
* @param configValue
284
287
* @throws SecuritySolutionInvalidExperimentalValue
@@ -289,11 +292,15 @@ export const parseExperimentalConfigValue = (
289
292
const enabledFeatures : Mutable < Partial < ExperimentalFeatures > > = { } ;
290
293
const invalidKeys : string [ ] = [ ] ;
291
294
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
+ }
293
300
if ( ! allowedKeys . includes ( value as keyof ExperimentalFeatures ) ) {
294
301
invalidKeys . push ( value ) ;
295
302
} else {
296
- enabledFeatures [ value as keyof ExperimentalFeatures ] = true ;
303
+ enabledFeatures [ value as keyof ExperimentalFeatures ] = ! isDisabled ;
297
304
}
298
305
}
299
306
You can’t perform that action at this time.
0 commit comments