File tree Expand file tree Collapse file tree
x-pack/plugins/security_solution/public/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ export const dispatchUpdateSearch = (dispatch: Dispatch) => ({
350350 if ( updateTime ) {
351351 const fromDate = formatDate ( start ) ;
352352 let toDate = formatDate ( end , { roundUp : true } ) ;
353- if ( isQuickSelection ) {
353+ if ( isQuickSelection && end !== start ) {
354354 dispatch (
355355 inputsActions . setRelativeRangeDatePicker ( {
356356 id,
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ export const dispatchUpdateReduxTime = (dispatch: Dispatch) => ({
230230} : UpdateReduxTime ) : ReturnUpdateReduxTime => {
231231 const fromDate = formatDate ( start ) ;
232232 let toDate = formatDate ( end , { roundUp : true } ) ;
233- if ( isQuickSelection ) {
233+ if ( isQuickSelection && end !== start ) {
234234 dispatch (
235235 inputsActions . setRelativeRangeDatePicker ( {
236236 id,
Original file line number Diff line number Diff line change @@ -86,18 +86,25 @@ export const defaultIndexNamesSelector = () => {
8686 return mapStateToProps ;
8787} ;
8888
89- const EXLCUDE_ELASTIC_CLOUD_INDEX = '-*elastic-cloud-logs-*' ;
89+ const EXCLUDE_ELASTIC_CLOUD_INDEX = '-*elastic-cloud-logs-*' ;
9090export const getSourcererScopeSelector = ( ) => {
9191 const getScopesSelector = scopesSelector ( ) ;
9292
93- const mapStateToProps = ( state : State , scopeId : SourcererScopeName ) : ManageScope => ( {
94- ...getScopesSelector ( state ) [ scopeId ] ,
95- selectedPatterns : getScopesSelector ( state ) [ scopeId ] . selectedPatterns . some (
93+ const mapStateToProps = ( state : State , scopeId : SourcererScopeName ) : ManageScope => {
94+ const selectedPatterns = getScopesSelector ( state ) [ scopeId ] . selectedPatterns . some (
9695 ( index ) => index === 'logs-*'
9796 )
98- ? [ ...getScopesSelector ( state ) [ scopeId ] . selectedPatterns , EXLCUDE_ELASTIC_CLOUD_INDEX ]
99- : getScopesSelector ( state ) [ scopeId ] . selectedPatterns ,
100- } ) ;
97+ ? [ ...getScopesSelector ( state ) [ scopeId ] . selectedPatterns , EXCLUDE_ELASTIC_CLOUD_INDEX ]
98+ : getScopesSelector ( state ) [ scopeId ] . selectedPatterns ;
99+ return {
100+ ...getScopesSelector ( state ) [ scopeId ] ,
101+ selectedPatterns,
102+ indexPattern : {
103+ ...getScopesSelector ( state ) [ scopeId ] . indexPattern ,
104+ title : selectedPatterns . join ( ) ,
105+ } ,
106+ } ;
107+ } ;
101108
102109 return mapStateToProps ;
103110} ;
You can’t perform that action at this time.
0 commit comments