diff --git a/frontend/src/container/AlertHistory/Timeline/Graph/Graph.tsx b/frontend/src/container/AlertHistory/Timeline/Graph/Graph.tsx index a0534691df..5adf1c481a 100644 --- a/frontend/src/container/AlertHistory/Timeline/Graph/Graph.tsx +++ b/frontend/src/container/AlertHistory/Timeline/Graph/Graph.tsx @@ -26,17 +26,14 @@ function HorizontalTimelineGraph({ return [[], []]; } - // add a first and last entry to make sure the graph displays all the data - const FIVE_MINUTES_IN_SECONDS = 300; + // add an entry for the end time of the last entry to make sure the graph displays all the data const timestamps = [ - data[0].start / 1000 - FIVE_MINUTES_IN_SECONDS, // 5 minutes before the first entry ...data.map((item) => item.start / 1000), data[data.length - 1].end / 1000, // end value of last entry ]; const states = [ - ALERT_STATUS[data[0].state], // Same state as the first entry ...data.map((item) => ALERT_STATUS[item.state]), ALERT_STATUS[data[data.length - 1].state], // Same state as the last entry ]; diff --git a/frontend/src/pages/AlertDetails/hooks.tsx b/frontend/src/pages/AlertDetails/hooks.tsx index fc6219b195..c6f7b64d64 100644 --- a/frontend/src/pages/AlertDetails/hooks.tsx +++ b/frontend/src/pages/AlertDetails/hooks.tsx @@ -26,6 +26,7 @@ import history from 'lib/history'; import { History, Table } from 'lucide-react'; import EditRules from 'pages/EditRules'; import { OrderPreferenceItems } from 'pages/Logs/config'; +import BetaTag from 'periscope/components/BetaTag/BetaTag'; import PaginationInfoText from 'periscope/components/PaginationInfoText/PaginationInfoText'; import { useAlertRule } from 'providers/Alert'; import { useCallback, useMemo } from 'react'; @@ -125,6 +126,7 @@ export const useRouteTabUtils = (): { routes: TabRoutes[] } => {
History +
), route: getRouteUrl(AlertDetailsTab.HISTORY), @@ -256,7 +258,7 @@ export const useGetAlertRuleDetailsTimelineTable = (): GetAlertRuleDetailsTimeli const { updatedOrder, offset } = useMemo( () => ({ updatedOrder: params.get(urlKey.order) ?? OrderPreferenceItems.ASC, - offset: parseInt(params.get(urlKey.offset) ?? '1', 10), + offset: parseInt(params.get(urlKey.offset) ?? '0', 10), }), [params], ); diff --git a/frontend/src/periscope/components/BetaTag/BetaTag.tsx b/frontend/src/periscope/components/BetaTag/BetaTag.tsx new file mode 100644 index 0000000000..55a4e79d58 --- /dev/null +++ b/frontend/src/periscope/components/BetaTag/BetaTag.tsx @@ -0,0 +1,9 @@ +import { Tag } from 'antd'; + +export default function BetaTag(): JSX.Element { + return ( + + Beta + + ); +}