diff --git a/plugins/cost-insights/src/client.ts b/plugins/cost-insights/src/client.ts index 914fdb7b64..f7671bcce0 100644 --- a/plugins/cost-insights/src/client.ts +++ b/plugins/cost-insights/src/client.ts @@ -23,6 +23,7 @@ import { ChangeStatistic, Cost, DateAggregation, + DEFAULT_DATE_FORMAT, Duration, Group, Maybe, @@ -38,7 +39,6 @@ import { UnlabeledDataflowAlert, } from '../src/utils/alerts'; import { - DEFAULT_DATE_FORMAT, exclusiveEndDateOf, inclusiveStartDateOf, } from '../src/utils/duration'; diff --git a/plugins/cost-insights/src/components/CostOverviewCard/CostOverviewTooltip.tsx b/plugins/cost-insights/src/components/CostOverviewCard/CostOverviewTooltip.tsx index 51f2f12bdb..e0a9b9a9ea 100644 --- a/plugins/cost-insights/src/components/CostOverviewCard/CostOverviewTooltip.tsx +++ b/plugins/cost-insights/src/components/CostOverviewCard/CostOverviewTooltip.tsx @@ -17,7 +17,7 @@ import React from 'react'; import moment from 'moment'; import { TooltipPayload, TooltipProps } from 'recharts'; import { Tooltip, TooltipItemProps } from '../../components/Tooltip'; -import { DEFAULT_DATE_FORMAT } from '../../utils/duration'; +import { DEFAULT_DATE_FORMAT } from '../../types'; export type CostOverviewTooltipProps = TooltipProps & { dataKeys: Array; diff --git a/plugins/cost-insights/src/utils/change.ts b/plugins/cost-insights/src/utils/change.ts index f5c6570b36..1fe3662537 100644 --- a/plugins/cost-insights/src/utils/change.ts +++ b/plugins/cost-insights/src/utils/change.ts @@ -14,22 +14,16 @@ * limitations under the License. */ -import { Cost, ChangeStatistic, MetricData } from '../types'; +import { + Cost, + ChangeStatistic, + ChangeThreshold, + EngineerThreshold, + GrowthType, + MetricData, +} from '../types'; import { aggregationSort } from '../utils/sort'; -export const EngineerThreshold = 0.5; - -export enum ChangeThreshold { - upper = 0.05, - lower = -0.05, -} - -export enum GrowthType { - Negligible, - Savings, - Excess, -} - // Used by for displaying status colors export function growthOf(amount: number, ratio: number) { if (amount >= EngineerThreshold && ratio >= ChangeThreshold.upper) {