From 636d37cb29c2c5272e235f789a61c43740bb070f Mon Sep 17 00:00:00 2001 From: Jovan Cvetkovic Date: Thu, 24 Nov 2022 12:31:30 +0100 Subject: [PATCH] [FEATURE] Overview | Update stats to use EUI stats component #156 Signed-off-by: Jovan Cvetkovic --- .../Overview/components/Widgets/Summary.tsx | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/public/pages/Overview/components/Widgets/Summary.tsx b/public/pages/Overview/components/Widgets/Summary.tsx index e2ebdd361..f7cec1576 100644 --- a/public/pages/Overview/components/Widgets/Summary.tsx +++ b/public/pages/Overview/components/Widgets/Summary.tsx @@ -3,14 +3,14 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiFlexGroup, EuiFlexItem, EuiText, EuiLink } from '@elastic/eui'; -import { ROUTES } from '../../../../utils/constants'; +import { EuiFlexGroup, EuiFlexItem, EuiLink, EuiStat } from '@elastic/eui'; import React, { useCallback, useEffect, useState } from 'react'; import { WidgetContainer } from './WidgetContainer'; import { summaryGroupByOptions } from '../../utils/constants'; import { getOverviewVisualizationSpec, getTimeWithMinPrecision } from '../../utils/helpers'; import { AlertItem, FindingItem } from '../../models/interfaces'; import { createSelectComponent, renderVisualization } from '../../../../utils/helpers'; +import { ROUTES } from '../../../../utils/constants'; export interface SummaryProps { findings: FindingItem[]; @@ -92,26 +92,22 @@ export const Summary: React.FC = ({ alerts, findings }) => { - -

Total active alerts

-
- - {activeAlerts} - + {activeAlerts}} + description="Total active alerts" + textAlign="left" + titleColor="primary" + isLoading={!activeAlerts} + />
- -

Total findings

-
- - {totalFindings} - + {totalFindings}} + description="Total findings" + textAlign="left" + titleColor="primary" + isLoading={!totalFindings} + />