mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ObsUX] [Hosts] Add feedback button to anomalies tab in asset details (#178706)
Closes https://github.com/elastic/kibana/issues/175793 <img width="1162" alt="Screenshot 2024-03-18 at 12 33 20" src="62efbf2c
-dd94-4702-ad3a-0d7ce00c2ab0"> <img width="1162" alt="Screenshot 2024-03-18 at 12 33 02" src="4264eea1
-eb94-4c3b-b515-80a4eb37d43c">
This commit is contained in:
parent
833f1de3ad
commit
902ba553d5
1 changed files with 24 additions and 1 deletions
|
@ -5,18 +5,22 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import React, { useMemo, useRef } from 'react';
|
||||
import React, { useContext, useMemo, useRef } from 'react';
|
||||
import { FeatureFeedbackButton } from '@kbn/observability-shared-plugin/public';
|
||||
import { AnomaliesTable } from '../../../ml/anomaly_detection/anomalies_table/anomalies_table';
|
||||
import { useAssetDetailsRenderPropsContext } from '../../hooks/use_asset_details_render_props';
|
||||
import { useDatePickerContext } from '../../hooks/use_date_picker';
|
||||
import { useIntersectingState } from '../../hooks/use_intersecting_state';
|
||||
import { useRequestObservable } from '../../hooks/use_request_observable';
|
||||
import { KibanaEnvironmentContext } from '../../../../hooks/use_kibana';
|
||||
import { INFRA_ML_FLYOUT_FEEDBACK_LINK } from '../../../ml/anomaly_detection/flyout_home';
|
||||
|
||||
export const Anomalies = () => {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
const { request$ } = useRequestObservable();
|
||||
const { getParsedDateRange } = useDatePickerContext();
|
||||
const { asset, overrides } = useAssetDetailsRenderPropsContext();
|
||||
const { kibanaVersion, isCloudEnv, isServerlessEnv } = useContext(KibanaEnvironmentContext);
|
||||
const { onClose = () => {} } = overrides?.anomalies ?? {};
|
||||
|
||||
const parsedDateRange = useMemo(() => getParsedDateRange(), [getParsedDateRange]);
|
||||
|
@ -33,6 +37,25 @@ export const Anomalies = () => {
|
|||
hideDatePicker
|
||||
request$={request$}
|
||||
/>
|
||||
<div
|
||||
style={{
|
||||
position: 'fixed',
|
||||
bottom: '24px',
|
||||
right: '24px',
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
alignItems: 'flex-end',
|
||||
}}
|
||||
>
|
||||
<FeatureFeedbackButton
|
||||
data-test-subj="infraMLHostFlyoutFeedbackLink"
|
||||
formUrl={INFRA_ML_FLYOUT_FEEDBACK_LINK}
|
||||
kibanaVersion={kibanaVersion}
|
||||
isCloudEnv={isCloudEnv}
|
||||
isServerlessEnv={isServerlessEnv}
|
||||
nodeType={'host'}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue