Skip to content

Commit

Permalink
Add refresh field to flyout
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 committed Mar 14, 2024
1 parent 4f2545b commit a9e1d85
Showing 1 changed file with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export const AccelerationDetailsTab = ({
const creationDate = new Date(
parseInt(settings?.settings?.index?.creation_date, 10)
).toLocaleString();
const checkpointName =
mappings?.data?.[acceleration.flintIndexName]?.mappings?._meta?.options?.checkpoint_location;

console.log('mappings:', mappings);
console.log('indexInfo:', indexInfo);
Expand Down Expand Up @@ -96,15 +98,7 @@ export const AccelerationDetailsTab = ({
/>
<DetailComponent title="Creation Date" description={creationDate} />
</EuiFlexGroup>
{isSkippingIndex && (
<>
<EuiFlexGroup direction="row">
<DetailComponent title="Refresh type" description={refreshIntervalDescription} />
<DetailComponent title="Refresh time" description={refreshTime} />
</EuiFlexGroup>
<EuiSpacer />
</>
)}
<EuiSpacer />
<TitleComponent title="Data source details" />
<EuiFlexGroup direction="row">
<DetailComponent
Expand All @@ -124,11 +118,18 @@ export const AccelerationDetailsTab = ({
title="Health"
description={<AccelerationHealth health={indexInfo?.data[0]?.health} />}
/>
<DetailComponent title="Refresh type" description={refreshIntervalDescription} />
<DetailComponent title="Refresh time" description={refreshTime} />
</EuiFlexGroup>
</>
)}
<EuiSpacer />
<TitleComponent title="Refresh Details" />
<EuiFlexGroup direction="row">
<DetailComponent title="Refresh type" description={refreshIntervalDescription} />
<DetailComponent title="Refresh time" description={refreshTime} />
{checkpointName && (
<DetailComponent title="Checkpoint location" description={checkpointName} />
)}
</EuiFlexGroup>
</>
);
};

0 comments on commit a9e1d85

Please sign in to comment.