mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
fixing conflicts (#52179)
This commit is contained in:
parent
8592f59c1a
commit
76662c1669
10 changed files with 33 additions and 16 deletions
|
@ -8,8 +8,8 @@ import React, { Fragment, FC } from 'react';
|
|||
|
||||
import { EuiCallOut, EuiLink, EuiSpacer } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { mlNodesAvailable, permissionToViewMlNodeCount } from '../../../../ml_nodes_check';
|
||||
import { getCloudDeploymentId, isCloud } from '../../../../services/ml_server_info';
|
||||
import { mlNodesAvailable, permissionToViewMlNodeCount } from '../../ml_nodes_check';
|
||||
import { getCloudDeploymentId, isCloud } from '../../services/ml_server_info';
|
||||
|
||||
export const NodeAvailableWarning: FC = () => {
|
||||
if (mlNodesAvailable() === true || permissionToViewMlNodeCount() === false) {
|
|
@ -4,5 +4,4 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
|
||||
export { UpgradeWarning } from './upgrade_warning';
|
|
@ -4,26 +4,24 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import React, { FC } from 'react';
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import {
|
||||
EuiCallOut,
|
||||
EuiSpacer,
|
||||
} from '@elastic/eui';
|
||||
import { EuiCallOut, EuiSpacer } from '@elastic/eui';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
|
||||
import { isUpgradeInProgress } from '../../services/upgrade_service';
|
||||
|
||||
export function UpgradeWarning() {
|
||||
export const UpgradeWarning: FC = () => {
|
||||
if (isUpgradeInProgress() === true) {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<EuiCallOut
|
||||
title={(<FormattedMessage
|
||||
id="xpack.ml.upgrade.upgradeWarning.upgradeInProgressWarningTitle"
|
||||
defaultMessage="Index migration in progress"
|
||||
/>)}
|
||||
title={
|
||||
<FormattedMessage
|
||||
id="xpack.ml.upgrade.upgradeWarning.upgradeInProgressWarningTitle"
|
||||
defaultMessage="Index migration in progress"
|
||||
/>
|
||||
}
|
||||
color="warning"
|
||||
iconType="alert"
|
||||
>
|
||||
|
@ -45,4 +43,4 @@ export function UpgradeWarning() {
|
|||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
import { DeepPartial } from '../../../../../../common/types/common';
|
||||
import { checkPermission } from '../../../../../privilege/check_privilege';
|
||||
import { mlNodesAvailable } from '../../../../../ml_nodes_check/check_ml_nodes';
|
||||
|
||||
import { DataFrameAnalyticsId, DataFrameAnalyticsConfig } from '../../../../common';
|
||||
|
||||
|
@ -102,6 +103,7 @@ export const getInitialState = (): State => ({
|
|||
},
|
||||
jobConfig: {},
|
||||
disabled:
|
||||
!mlNodesAvailable() ||
|
||||
!checkPermission('canCreateDataFrameAnalytics') ||
|
||||
!checkPermission('canStartStopDataFrameAnalytics'),
|
||||
indexNames: [],
|
||||
|
|
|
@ -29,6 +29,8 @@ import { DataFrameAnalyticsList } from './components/analytics_list';
|
|||
import { RefreshAnalyticsListButton } from './components/refresh_analytics_list_button';
|
||||
import { useRefreshInterval } from './components/analytics_list/use_refresh_interval';
|
||||
import { useCreateAnalyticsForm } from './hooks/use_create_analytics_form';
|
||||
import { NodeAvailableWarning } from '../../../components/node_available_warning';
|
||||
import { UpgradeWarning } from '../../../components/upgrade';
|
||||
|
||||
export const Page: FC = () => {
|
||||
const [blockRefresh, setBlockRefresh] = useState(false);
|
||||
|
@ -68,6 +70,10 @@ export const Page: FC = () => {
|
|||
</h1>
|
||||
</EuiTitle>
|
||||
</EuiPageContentHeaderSection>
|
||||
|
||||
<NodeAvailableWarning />
|
||||
<UpgradeWarning />
|
||||
|
||||
<EuiPageContentHeaderSection>
|
||||
<EuiFlexGroup alignItems="center">
|
||||
{/* grow={false} fixes IE11 issue with nested flex */}
|
||||
|
|
|
@ -9,6 +9,8 @@ import uiRoutes from 'ui/routes';
|
|||
// @ts-ignore
|
||||
import { checkFullLicense } from '../../../license/check_license';
|
||||
import { checkGetJobsPrivilege } from '../../../privilege/check_privilege';
|
||||
import { loadMlServerInfo } from '../../../services/ml_server_info';
|
||||
import { getMlNodeCount } from '../../../ml_nodes_check/check_ml_nodes';
|
||||
import {
|
||||
loadCurrentIndexPattern,
|
||||
loadCurrentSavedSearch,
|
||||
|
@ -26,5 +28,7 @@ uiRoutes.when('/data_frame_analytics/?', {
|
|||
privileges: checkGetJobsPrivilege,
|
||||
indexPattern: loadCurrentIndexPattern,
|
||||
savedSearch: loadCurrentSavedSearch,
|
||||
mlNodeCount: getMlNodeCount,
|
||||
loadMlServerInfo,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ import { CreateWatchFlyout } from '../create_watch_flyout';
|
|||
import { MultiJobActions } from '../multi_job_actions';
|
||||
import { NewJobButton } from '../new_job_button';
|
||||
import { JobStatsBar } from '../jobs_stats_bar';
|
||||
import { NodeAvailableWarning } from '../node_available_warning';
|
||||
import { NodeAvailableWarning } from '../../../../components/node_available_warning';
|
||||
import { UpgradeWarning } from '../../../../components/upgrade';
|
||||
import { RefreshJobsListButton } from '../refresh_jobs_list_button';
|
||||
import { isEqual } from 'lodash';
|
||||
|
|
|
@ -11,10 +11,13 @@ import { mlNodesAvailable } from '../ml_nodes_check/check_ml_nodes';
|
|||
import { NavigationMenu } from '../components/navigation_menu';
|
||||
import { OverviewSideBar } from './components/sidebar';
|
||||
import { OverviewContent } from './components/content';
|
||||
import { NodeAvailableWarning } from '../components/node_available_warning';
|
||||
import { UpgradeWarning } from '../components/upgrade';
|
||||
|
||||
export const OverviewPage: FC = () => {
|
||||
const disableCreateAnomalyDetectionJob = !checkPermission('canCreateJob') || !mlNodesAvailable();
|
||||
const disableCreateAnalyticsButton =
|
||||
!mlNodesAvailable() ||
|
||||
!checkPermission('canCreateDataFrameAnalytics') ||
|
||||
!checkPermission('canStartStopDataFrameAnalytics');
|
||||
return (
|
||||
|
@ -22,6 +25,9 @@ export const OverviewPage: FC = () => {
|
|||
<NavigationMenu tabId="overview" />
|
||||
<EuiPage data-test-subj="mlPageOverview">
|
||||
<EuiPageBody>
|
||||
<NodeAvailableWarning />
|
||||
<UpgradeWarning />
|
||||
|
||||
<EuiFlexGroup>
|
||||
<OverviewSideBar createAnomalyDetectionJobDisabled={disableCreateAnomalyDetectionJob} />
|
||||
<OverviewContent
|
||||
|
|
|
@ -9,6 +9,7 @@ import { getMlNodeCount } from '../ml_nodes_check/check_ml_nodes';
|
|||
// @ts-ignore no declaration module
|
||||
import { checkFullLicense } from '../license/check_license';
|
||||
import { checkGetJobsPrivilege } from '../privilege/check_privilege';
|
||||
import { loadMlServerInfo } from '../services/ml_server_info';
|
||||
import { getOverviewBreadcrumbs } from './breadcrumbs';
|
||||
import './directive';
|
||||
|
||||
|
@ -21,5 +22,6 @@ uiRoutes.when('/overview/?', {
|
|||
CheckLicense: checkFullLicense,
|
||||
privileges: checkGetJobsPrivilege,
|
||||
mlNodeCount: getMlNodeCount,
|
||||
loadMlServerInfo,
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue