Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import { NavigationMenu } from '../../components/navigation_menu';
import { ML_JOB_FIELD_TYPES } from '../../../../common/constants/field_types';
import { SEARCH_QUERY_LANGUAGE } from '../../../../common/constants/search';
import { isFullLicense } from '../../license/check_license';
import { checkPermission } from '../../privilege/check_privilege';
import { mlNodesAvailable } from '../../ml_nodes_check/check_ml_nodes';
import { FullTimeRangeSelector } from '../../components/full_time_range_selector';
import { mlTimefilterRefresh$ } from '../../services/timefilter_refresh_service';
import { useKibanaContext, SavedSearchQuery } from '../../contexts/kibana';
Expand Down Expand Up @@ -131,7 +133,10 @@ export const Page: FC = () => {
const defaults = getDefaultPageState();

const [showActionsPanel] = useState(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove useState here since the value gets never updated and just do const showActionsPanel = ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 901a166

isFullLicense() && currentIndexPattern.timeFieldName !== undefined
isFullLicense() &&
checkPermission('canCreateJob') &&
mlNodesAvailable() &&
currentIndexPattern.timeFieldName !== undefined
);

const [searchString, setSearchString] = useState(defaults.searchString);
Expand Down Expand Up @@ -613,7 +618,9 @@ export const Page: FC = () => {
)}
</EuiPageContentHeader>
</EuiFlexItem>
<EuiFlexItem grow={false} style={{ width: wizardPanelWidth }} />
{showActionsPanel === true && (
<EuiFlexItem grow={false} style={{ width: wizardPanelWidth }} />
)}
</EuiFlexGroup>
<EuiSpacer size="m" />
<EuiPageContentBody>
Expand Down