File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
x-pack/plugins/ml/public/application/overview/components/analytics_panel Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414 getResultsUrl ,
1515 DataFrameAnalyticsListRow ,
1616} from '../../../data_frame_analytics/pages/analytics_management/components/analytics_list/common' ;
17+ import { getViewLinkStatus } from '../../../data_frame_analytics/pages/analytics_management/components/action_view/get_view_link_status' ;
1718
1819interface Props {
1920 item : DataFrameAnalyticsListRow ;
@@ -27,23 +28,28 @@ export const ViewLink: FC<Props> = ({ item }) => {
2728 navigateToPath ( getResultsUrl ( item . id , analysisType ) ) ;
2829 } , [ ] ) ;
2930
30- const openJobsInAnomalyExplorerText = i18n . translate (
31+ const { disabled, tooltipContent } = getViewLinkStatus ( item ) ;
32+
33+ const viewJobResultsButtonText = i18n . translate (
3134 'xpack.ml.overview.analytics.resultActions.openJobText' ,
3235 {
3336 defaultMessage : 'View job results' ,
3437 }
3538 ) ;
3639
40+ const tooltipText = disabled === false ? viewJobResultsButtonText : tooltipContent ;
41+
3742 return (
38- < EuiToolTip position = "bottom" content = { openJobsInAnomalyExplorerText } >
43+ < EuiToolTip position = "bottom" content = { tooltipText } >
3944 < EuiButtonEmpty
4045 color = "text"
4146 size = "xs"
4247 onClick = { clickHandler }
4348 iconType = "visTable"
44- aria-label = { openJobsInAnomalyExplorerText }
49+ aria-label = { viewJobResultsButtonText }
4550 className = "results-button"
4651 data-test-subj = "mlAnalyticsJobViewButton"
52+ isDisabled = { disabled }
4753 >
4854 { i18n . translate ( 'xpack.ml.overview.analytics.viewActionName' , {
4955 defaultMessage : 'View' ,
You can’t perform that action at this time.
0 commit comments