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 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' ;
1111import 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}
Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff line change @@ -276,9 +276,12 @@ type Mutable<T> = { -readonly [P in keyof T]: T[P] };
276276
277277const 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
You can’t perform that action at this time.
0 commit comments