started fixing cost insight deprecations'
' Signed-off-by: Simon <simme.jakobsson@gmail.com>
This commit is contained in:
@@ -15,14 +15,15 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
Alert,
|
||||
Cost,
|
||||
Entity,
|
||||
Group,
|
||||
Project,
|
||||
Maybe,
|
||||
MetricData,
|
||||
} from '../types';
|
||||
} from '@backstage/plugin-cost-insights-common';
|
||||
|
||||
import { Alert } from '../types';
|
||||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
|
||||
/** @public */
|
||||
|
||||
@@ -28,7 +28,8 @@ import {
|
||||
} from '@material-ui/core';
|
||||
import { default as CloseIcon } from '@material-ui/icons/Close';
|
||||
import { useAlertDialogStyles as useStyles } from '../../utils/styles';
|
||||
import { Alert, AlertStatus, Maybe } from '../../types';
|
||||
import { Alert, AlertStatus } from '../../types';
|
||||
import { Maybe } from '@backstage/plugin-cost-insights-common';
|
||||
import { choose, formOf } from '../../utils/alerts';
|
||||
|
||||
const DEFAULT_FORM_ID = 'alert-form';
|
||||
|
||||
@@ -20,8 +20,9 @@ import { Typography, TypographyProps } from '@material-ui/core';
|
||||
import { default as ArrowDropUp } from '@material-ui/icons/ArrowDropUp';
|
||||
import { default as ArrowDropDown } from '@material-ui/icons/ArrowDropDown';
|
||||
import { growthOf } from '../../utils/change';
|
||||
import { ChangeStatistic, GrowthType, Maybe } from '../../types';
|
||||
import { GrowthType } from '../../types';
|
||||
import { useCostGrowthStyles as useStyles } from '../../utils/styles';
|
||||
import { ChangeStatistic, Maybe } from '@backstage/plugin-cost-insights-common';
|
||||
|
||||
/** @public */
|
||||
export type CostGrowthIndicatorProps = TypographyProps & {
|
||||
|
||||
@@ -18,7 +18,7 @@ import React from 'react';
|
||||
import { Typography } from '@material-ui/core';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
import { useCostInsightsStyles } from '../../utils/styles';
|
||||
import { Group } from '../../types';
|
||||
import { Group } from '@backstage/plugin-cost-insights-common';
|
||||
import { identityApiRef, useApi } from '@backstage/core-plugin-api';
|
||||
|
||||
function useDisplayName(): string {
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import {
|
||||
NavigationItem,
|
||||
getDefaultNavigationItems,
|
||||
} from '../../utils/navigation';
|
||||
import { Maybe, Product } from '../../types';
|
||||
import { Maybe, Product } from '@backstage/plugin-cost-insights-common';
|
||||
|
||||
type CostInsightsNavigationProps = {
|
||||
alerts: number;
|
||||
|
||||
@@ -48,7 +48,14 @@ import {
|
||||
useLastCompleteBillingDate,
|
||||
useLoading,
|
||||
} from '../../hooks';
|
||||
import { Alert, Cost, Maybe, MetricData, Product, Project } from '../../types';
|
||||
import { Alert } from '../../types';
|
||||
import {
|
||||
Cost,
|
||||
Maybe,
|
||||
MetricData,
|
||||
Product,
|
||||
Project,
|
||||
} from '@backstage/plugin-cost-insights-common';
|
||||
import { mapLoadingToProps } from './selector';
|
||||
import { ProjectSelect } from '../ProjectSelect';
|
||||
import { intervalsOf } from '../../utils/duration';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import React from 'react';
|
||||
import { CostInsightsTabs } from './CostInsightsTabs';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { Group } from '../../types';
|
||||
import { Group } from '@backstage/plugin-cost-insights-common';
|
||||
import { MockFilterProvider, MockLoadingProvider } from '../../testUtils';
|
||||
import { renderInTestApp } from '@backstage/test-utils';
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import React, { useState } from 'react';
|
||||
import { Menu, MenuItem, Tab, Tabs, Typography } from '@material-ui/core';
|
||||
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
|
||||
import { mapLoadingToProps, mapFiltersToProps } from './selector';
|
||||
import { Group } from '../../types';
|
||||
import { Group } from '@backstage/plugin-cost-insights-common';
|
||||
import { useFilters, useLoading } from '../../hooks';
|
||||
import { useCostInsightsTabsStyles as useStyles } from '../../utils/styles';
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
|
||||
import { MapFiltersToProps } from '../../hooks/useFilters';
|
||||
import { MapLoadingToProps } from '../../hooks/useLoading';
|
||||
import { Group, PageFilters } from '../../types';
|
||||
import { PageFilters } from '../../types';
|
||||
import { Group } from '@backstage/plugin-cost-insights-common';
|
||||
import { getResetStateWithoutInitial } from '../../utils/loading';
|
||||
|
||||
type CostInsightsTabsFilterProps = PageFilters & {
|
||||
|
||||
+2
-1
@@ -32,7 +32,8 @@ import {
|
||||
ResponsiveContainer,
|
||||
CartesianGrid,
|
||||
} from 'recharts';
|
||||
import { Cost, DEFAULT_DATE_FORMAT, CostInsightsTheme } from '../../types';
|
||||
import { DEFAULT_DATE_FORMAT, CostInsightsTheme } from '../../types';
|
||||
import { Cost } from '@backstage/plugin-cost-insights-common';
|
||||
import {
|
||||
BarChartTooltip as Tooltip,
|
||||
BarChartTooltipItem as TooltipItem,
|
||||
|
||||
@@ -17,7 +17,7 @@ import React from 'react';
|
||||
import { fireEvent } from '@testing-library/react';
|
||||
import { renderInTestApp } from '@backstage/test-utils';
|
||||
import { CostOverviewCard } from './CostOverviewCard';
|
||||
import { Cost } from '../../types';
|
||||
import { Cost } from '@backstage/plugin-cost-insights-common';
|
||||
import {
|
||||
changeOf,
|
||||
getGroupedProducts,
|
||||
|
||||
@@ -34,7 +34,12 @@ import { useConfig, useFilters } from '../../hooks';
|
||||
import { mapFiltersToProps } from './selector';
|
||||
import { DefaultNavigation } from '../../utils/navigation';
|
||||
import { findAlways } from '../../utils/assert';
|
||||
import { Cost, CostInsightsTheme, Maybe, MetricData } from '../../types';
|
||||
import { CostInsightsTheme } from '../../types';
|
||||
import {
|
||||
Cost,
|
||||
Maybe,
|
||||
MetricData,
|
||||
} from '@backstage/plugin-cost-insights-common';
|
||||
import { useOverviewTabsStyles } from '../../utils/styles';
|
||||
import { ScrollAnchor } from '../../utils/scroll';
|
||||
|
||||
|
||||
@@ -26,15 +26,13 @@ import {
|
||||
Line,
|
||||
ResponsiveContainer,
|
||||
} from 'recharts';
|
||||
import { ChartData, DEFAULT_DATE_FORMAT, CostInsightsTheme } from '../../types';
|
||||
import {
|
||||
ChartData,
|
||||
Cost,
|
||||
DEFAULT_DATE_FORMAT,
|
||||
Maybe,
|
||||
Metric,
|
||||
MetricData,
|
||||
CostInsightsTheme,
|
||||
} from '../../types';
|
||||
} from '@backstage/plugin-cost-insights-common';
|
||||
import {
|
||||
BarChartTooltip as Tooltip,
|
||||
BarChartTooltipItem as TooltipItem,
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { Box, useTheme } from '@material-ui/core';
|
||||
import { LegendItem } from '../LegendItem';
|
||||
import { CostInsightsTheme } from '../../types';
|
||||
import {
|
||||
CostInsightsTheme,
|
||||
MetricData,
|
||||
Maybe,
|
||||
Cost,
|
||||
Metric,
|
||||
} from '../../types';
|
||||
} from '@backstage/plugin-cost-insights-common';
|
||||
import { useLastCompleteBillingDate, useFilters } from '../../hooks';
|
||||
import { getComparedChange, choose } from '../../utils/change';
|
||||
import { mapFiltersToProps } from './selector';
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Duration, Maybe, PageFilters } from '../../types';
|
||||
import { Duration, PageFilters } from '../../types';
|
||||
import { Maybe } from '@backstage/plugin-cost-insights-common';
|
||||
import { MapFiltersToProps } from '../../hooks/useFilters';
|
||||
|
||||
type CostOverviewFilterProps = PageFilters & {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import React from 'react';
|
||||
import { InputLabel, FormControl, Select, MenuItem } from '@material-ui/core';
|
||||
import { Maybe, Metric } from '../../types';
|
||||
import { Maybe, Metric } from '@backstage/plugin-cost-insights-common';
|
||||
import { useSelectStyles as useStyles } from '../../utils/styles';
|
||||
|
||||
export type MetricSelectProps = {
|
||||
|
||||
Reference in New Issue
Block a user