- 
                Notifications
    
You must be signed in to change notification settings  - Fork 8.5k
 
[Dataset Quality] Indicate if failure store isn't enabled for data stream #221644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 22 commits
631e69f
              520379b
              38e0bfe
              7839491
              35cc59c
              eff4e3b
              cfdedcd
              b10ef94
              243b2b3
              c63c5f4
              0597801
              1f654d9
              677be06
              956d139
              43f94cc
              6fa40e7
              7f6db0e
              d3358c6
              9f3fef1
              257b60d
              77abd1c
              66a42f1
              1362929
              ca558e8
              ed15c9a
              f2bb67a
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -7,11 +7,13 @@ | |
| 
     | 
||
| import React, { useCallback, useState } from 'react'; | ||
| import { dynamic } from '@kbn/shared-ux-utility'; | ||
| import { EuiCallOut, EuiFlexItem, EuiSpacer, OnRefreshProps } from '@elastic/eui'; | ||
| import { EuiCallOut, EuiFlexItem, EuiLink, EuiSpacer, OnRefreshProps } from '@elastic/eui'; | ||
| import { i18n } from '@kbn/i18n'; | ||
| import { noAccessToFailureStoreWarningDescription } from '../../../../common/translations'; | ||
| import { useDatasetQualityDetailsState } from '../../../hooks'; | ||
| import { AggregationNotSupported } from './aggregation_not_supported'; | ||
| import { QualityIssues } from './quality_issues'; | ||
| import { useKibanaContextForPlugin } from '../../../utils/use_kibana'; | ||
| 
     | 
||
| const OverviewHeader = dynamic(() => import('./header')); | ||
| const Summary = dynamic(() => import('./summary')); | ||
| 
        
          
        
         | 
    @@ -22,9 +24,20 @@ export function Overview() { | |
| dataStream, | ||
| isNonAggregatable, | ||
| canUserReadFailureStore, | ||
| hasFailureStore, | ||
| updateTimeRange, | ||
| loadingState: { dataStreamSettingsLoading }, | ||
| } = useDatasetQualityDetailsState(); | ||
| 
     | 
||
| const { | ||
| services: { | ||
| share: { url: urlService }, | ||
| }, | ||
| } = useKibanaContextForPlugin(); | ||
| 
     | 
||
| const locator = urlService.locators.get('INDEX_MANAGEMENT_LOCATOR_ID'); | ||
| const locatorParams = { page: 'data_streams_details', dataStreamName: dataStream } as const; | ||
| 
     | 
||
| const [lastReloadTime, setLastReloadTime] = useState<number>(Date.now()); | ||
| 
     | 
||
| const handleRefresh = useCallback( | ||
| 
        
          
        
         | 
    @@ -39,6 +52,32 @@ export function Overview() { | |
| {isNonAggregatable && <AggregationNotSupported dataStream={dataStream} />} | ||
| <OverviewHeader handleRefresh={handleRefresh} /> | ||
| <EuiSpacer size="m" /> | ||
| {!dataStreamSettingsLoading && !hasFailureStore && canUserReadFailureStore && ( | ||
| <div style={{ marginBottom: 16 }}> | ||
| <EuiCallOut | ||
| color="warning" | ||
| iconType="warning" | ||
| title={ | ||
| <> | ||
| {i18n.translate('xpack.datasetQuality.noFailureStoreTitle', { | ||
| defaultMessage: 'Failure store is not enabled for this data stream. ', | ||
| })} | ||
| <EuiLink | ||
| href={locator?.getRedirectUrl(locatorParams)} | ||
| target="_blank" | ||
| external={false} | ||
| color="warning" | ||
| css={{ textDecoration: 'underline' }} | ||
| > | ||
| {i18n.translate('xpack.datasetQuality.enableFailureStore', { | ||
| defaultMessage: 'Enable failure store', | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding an icon would be beneficial here @patpscal? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.  | 
||
| })} | ||
| </EuiLink> | ||
| </> | ||
| } | ||
| /> | ||
| </div> | ||
| )} | ||
| {!dataStreamSettingsLoading && !canUserReadFailureStore && ( | ||
                
      
                  yngrdyn marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
||
| <EuiFlexItem> | ||
| <EuiCallOut | ||
| 
          
            
          
           | 
    ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also be translated