Skip to content

Commit

Permalink
opening panel
Browse files Browse the repository at this point in the history
  • Loading branch information
tiansivive committed Jan 2, 2024
1 parent d3db40e commit 7ce37ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ import { ObservedEntity } from '../shared/components/observed_entity';
import { HOST_PANEL_OBSERVED_HOST_QUERY_ID, HOST_PANEL_RISK_SCORE_QUERY_ID } from '.';
import type { ObservedEntityData } from '../shared/components/observed_entity/types';
import { useObservedHostFields } from './hooks/use_observed_host_fields';
import type { EntityDetailsLeftPanelTab } from '../shared/components/left_panel/left_panel_header';

interface HostPanelContentProps {
observedHost: ObservedEntityData<HostItem>;
riskScoreState: RiskScoreState<RiskScoreEntity.user>;
contextID: string;
scopeId: string;
isDraggable: boolean;
openDetailsPanel: (tab: EntityDetailsLeftPanelTab) => void;
}

export const HostPanelContent = ({
Expand All @@ -32,6 +34,7 @@ export const HostPanelContent = ({
contextID,
scopeId,
isDraggable,
openDetailsPanel,
}: HostPanelContentProps) => {
const observedFields = useObservedHostFields(observedHost);

Expand All @@ -44,7 +47,7 @@ export const HostPanelContent = ({
riskScoreData={riskScoreState}
queryId={HOST_PANEL_RISK_SCORE_QUERY_ID}
entity={RiskScoreEntity.host}
openDetailsPanel={() => {}}
openDetailsPanel={openDetailsPanel}
/>
}
<EuiHorizontalRule margin="m" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export const HostPanel = ({ contextID, scopeId, hostName, isDraggable }: HostPan
contextID={contextID}
scopeId={scopeId}
isDraggable={!!isDraggable}
openDetailsPanel={openPanel}
/>
</>
);
Expand Down

0 comments on commit 7ce37ee

Please sign in to comment.