fix imports
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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<string>;
|
||||
|
||||
@@ -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 <CostGrowth /> for displaying status colors
|
||||
export function growthOf(amount: number, ratio: number) {
|
||||
if (amount >= EngineerThreshold && ratio >= ChangeThreshold.upper) {
|
||||
|
||||
Reference in New Issue
Block a user