aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2018-12-05 17:32:18 +0100
committerSonarTech <sonartech@sonarsource.com>2018-12-05 20:20:59 +0100
commit41c98779d38bda9fdfdca182a5f20c73fcff9a84 (patch)
treed895a9f8bfd0276aee5ffacf7bb33a0109436cbd /server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
parenta9c22c1185c5fd8c8dc4c9388f4a3b967e3f463d (diff)
downloadsonarqube-41c98779d38bda9fdfdca182a5f20c73fcff9a84.tar.gz
sonarqube-41c98779d38bda9fdfdca182a5f20c73fcff9a84.zip
create global type definitions (#1017)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
index aa82ff5837f..611b3f5087f 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
+++ b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.tsx
@@ -48,18 +48,17 @@ import {
} from '../../../helpers/branches';
import { fetchMetrics } from '../../../store/rootActions';
import { getMetrics, Store } from '../../../store/rootReducer';
-import { BranchLike, Component, Metric, MeasureEnhanced, Period } from '../../../app/types';
import { translate } from '../../../helpers/l10n';
import '../styles.css';
interface OwnProps {
- branchLike?: BranchLike;
- component: Component;
+ branchLike?: T.BranchLike;
+ component: T.Component;
onComponentChange: (changes: {}) => void;
}
interface StateToProps {
- metrics: { [key: string]: Metric };
+ metrics: { [key: string]: T.Metric };
}
interface DispatchToProps {
@@ -74,8 +73,8 @@ interface State {
};
historyStartDate?: Date;
loading: boolean;
- measures: MeasureEnhanced[];
- periods?: Period[];
+ measures: T.MeasureEnhanced[];
+ periods?: T.Period[];
}
export class OverviewApp extends React.PureComponent<Props, State> {
@@ -162,7 +161,7 @@ export class OverviewApp extends React.PureComponent<Props, State> {
getApplicationLeakPeriod = () =>
this.state.measures.find(measure => measure.metric.key === 'new_bugs')
- ? ({ index: 1 } as Period)
+ ? ({ index: 1 } as T.Period)
: undefined;
isEmpty = () =>