Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -95,7 +95,7 @@ export const HypothesesPanel: React.FC<HypothesesPanelProps> = ({
hypothesis={hypothesis}
onClickHypothesis={handleClickHypothesis}
/>
<EuiFlexGroup justifyContent="flexEnd">
<EuiFlexGroup justifyContent="flexEnd" direction="column">
<EuiFlexItem grow={false}>
<EuiSmallButton disabled={isInvestigating} onClick={() => showModal(index)}>
Add Finding
Expand Down
19 changes: 16 additions & 3 deletions public/components/notebooks/components/summary_card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
EuiSplitPanel,
EuiTitle,
EuiSpacer,
EuiButton,
EuiLoadingSpinner,
} from '@elastic/eui';
import React, { useContext } from 'react';
import moment from 'moment';
Expand All @@ -23,6 +25,7 @@
import { useOpenSearchDashboards } from '../../../../../../src/plugins/opensearch_dashboards_react/public';
import { NoteBookSource } from '../../../../common/types/notebooks';
import { Filter } from '../../../../../../src/plugins/data/common';
import { useInvestigation } from '../../../../public/hooks/use_investigation';

interface ContextData {
variables: {
Expand All @@ -31,7 +34,7 @@
};
dataSourceId: string;
index: string;
timeRange?: any;

Check warning on line 37 in public/components/notebooks/components/summary_card.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unexpected any. Specify a different type
source: NoteBookSource;
timeField: string;
currentTime: number | undefined;
Expand All @@ -43,6 +46,7 @@
const {
services: { uiSettings, notifications },
} = useOpenSearchDashboards<NoteBookServices>();
const { rerunInvestigation, isInvestigating } = useInvestigation();

const copyToClipboard = (text: string, label: string) => {
navigator.clipboard.writeText(text).then(() => {
Expand Down Expand Up @@ -72,9 +76,18 @@
return (
<EuiSplitPanel.Outer borderRadius="l">
<EuiSpacer size="s" />
<EuiTitle>
<h2 style={{ paddingLeft: '20px' }}>Issue summary and impact</h2>
</EuiTitle>
<EuiFlexGroup gutterSize="none" justifyContent="spaceBetween">
<EuiTitle>
<h2 style={{ paddingLeft: '20px' }}>Issue summary and impact</h2>
</EuiTitle>
<EuiButton
style={{ marginRight: '20px' }}
onClick={() => rerunInvestigation({})}
disabled={isInvestigating}
>
{isInvestigating && <EuiLoadingSpinner />} Reinvestigate
</EuiButton>
</EuiFlexGroup>
<EuiSpacer size="s" />
<EuiSplitPanel.Inner
grow={false}
Expand Down
Loading
Loading