-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Backports the following commits to 7.x: - [Logs UI] Show log analysis ML jobs in a list (#71132)
- Loading branch information
1 parent
b4a5162
commit 8e7c699
Showing
42 changed files
with
714 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
x-pack/plugins/infra/public/components/logging/log_analysis_setup/manage_jobs_button.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { EuiButton, PropsOf } from '@elastic/eui'; | ||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import React from 'react'; | ||
|
||
export const ManageJobsButton: React.FunctionComponent<PropsOf<typeof EuiButton>> = (props) => ( | ||
<EuiButton {...props}> | ||
<FormattedMessage | ||
id="xpack.infra.logs.analysis.manageMlJobsButtonLabel" | ||
defaultMessage="Manage ML jobs" | ||
/> | ||
</EuiButton> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
...ic/components/logging/log_analysis_setup/setup_flyout/log_entry_categories_setup_view.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { EuiSpacer, EuiSteps, EuiText, EuiTitle } from '@elastic/eui'; | ||
import React, { useCallback, useMemo } from 'react'; | ||
import { useLogEntryCategoriesSetup } from '../../../../containers/logs/log_analysis/modules/log_entry_categories'; | ||
import { createInitialConfigurationStep } from '../initial_configuration_step'; | ||
import { createProcessStep } from '../process_step'; | ||
|
||
export const LogEntryCategoriesSetupView: React.FC<{ | ||
onClose: () => void; | ||
}> = ({ onClose }) => { | ||
const { | ||
cleanUpAndSetUp, | ||
endTime, | ||
isValidating, | ||
lastSetupErrorMessages, | ||
moduleDescriptor, | ||
setEndTime, | ||
setStartTime, | ||
setValidatedIndices, | ||
setUp, | ||
setupStatus, | ||
startTime, | ||
validatedIndices, | ||
validationErrors, | ||
viewResults, | ||
} = useLogEntryCategoriesSetup(); | ||
|
||
const viewResultsAndClose = useCallback(() => { | ||
viewResults(); | ||
onClose(); | ||
}, [viewResults, onClose]); | ||
|
||
const steps = useMemo( | ||
() => [ | ||
createInitialConfigurationStep({ | ||
setStartTime, | ||
setEndTime, | ||
startTime, | ||
endTime, | ||
isValidating, | ||
validatedIndices, | ||
setupStatus, | ||
setValidatedIndices, | ||
validationErrors, | ||
}), | ||
createProcessStep({ | ||
cleanUpAndSetUp, | ||
errorMessages: lastSetupErrorMessages, | ||
isConfigurationValid: validationErrors.length <= 0 && !isValidating, | ||
setUp, | ||
setupStatus, | ||
viewResults: viewResultsAndClose, | ||
}), | ||
], | ||
[ | ||
cleanUpAndSetUp, | ||
endTime, | ||
isValidating, | ||
lastSetupErrorMessages, | ||
setEndTime, | ||
setStartTime, | ||
setUp, | ||
setValidatedIndices, | ||
setupStatus, | ||
startTime, | ||
validatedIndices, | ||
validationErrors, | ||
viewResultsAndClose, | ||
] | ||
); | ||
|
||
return ( | ||
<> | ||
<EuiTitle size="s"> | ||
<h3>{moduleDescriptor.moduleName} </h3> | ||
</EuiTitle> | ||
<EuiText size="s">{moduleDescriptor.moduleDescription}</EuiText> | ||
<EuiSpacer /> | ||
<EuiSteps steps={steps} /> | ||
</> | ||
); | ||
}; |
Oops, something went wrong.