File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
x-pack/legacy/plugins/ml/public/application/datavisualizer/index_based Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ import { NavigationMenu } from '../../components/navigation_menu';
3333import { ML_JOB_FIELD_TYPES } from '../../../../common/constants/field_types' ;
3434import { SEARCH_QUERY_LANGUAGE } from '../../../../common/constants/search' ;
3535import { isFullLicense } from '../../license/check_license' ;
36+ import { checkPermission } from '../../privilege/check_privilege' ;
37+ import { mlNodesAvailable } from '../../ml_nodes_check/check_ml_nodes' ;
3638import { FullTimeRangeSelector } from '../../components/full_time_range_selector' ;
3739import { mlTimefilterRefresh$ } from '../../services/timefilter_refresh_service' ;
3840import { useKibanaContext , SavedSearchQuery } from '../../contexts/kibana' ;
@@ -131,7 +133,10 @@ export const Page: FC = () => {
131133 const defaults = getDefaultPageState ( ) ;
132134
133135 const [ showActionsPanel ] = useState (
134- isFullLicense ( ) && currentIndexPattern . timeFieldName !== undefined
136+ isFullLicense ( ) &&
137+ checkPermission ( 'canCreateJob' ) &&
138+ mlNodesAvailable ( ) &&
139+ currentIndexPattern . timeFieldName !== undefined
135140 ) ;
136141
137142 const [ searchString , setSearchString ] = useState ( defaults . searchString ) ;
@@ -613,7 +618,9 @@ export const Page: FC = () => {
613618 ) }
614619 </ EuiPageContentHeader >
615620 </ EuiFlexItem >
616- < EuiFlexItem grow = { false } style = { { width : wizardPanelWidth } } />
621+ { showActionsPanel === true && (
622+ < EuiFlexItem grow = { false } style = { { width : wizardPanelWidth } } />
623+ ) }
617624 </ EuiFlexGroup >
618625 < EuiSpacer size = "m" />
619626 < EuiPageContentBody >
You can’t perform that action at this time.
0 commit comments