getDisplayedHistoryMetrics(graph, [])
);
const graphs = splitSeriesInGraphs(series, MAX_GRAPH_NB, MAX_SERIES_PER_GRAPH);
- const parsedAnalyses = analyses.map(a => ({ ...a, date: parseDate(a.date) }));
let shownLeakPeriodDate;
if (leakPeriodDate !== undefined) {
const startDate = measuresHistory.reduce((oldest: Date, { history }) => {
<div aria-hidden={true} className="overview-panel-padded display-flex-column flex-1">
<GraphsHeader graph={graph} metrics={metrics} updateGraph={props.onGraphChange} />
<GraphsHistory
- analyses={parsedAnalyses}
+ analyses={[]}
graph={graph}
graphs={graphs}
leakPeriodDate={shownLeakPeriodDate}
import { getMeasuresWithPeriodAndMetrics } from '../../../api/measures';
import { getProjectActivity } from '../../../api/projectActivity';
import { getApplicationQualityGate, getQualityGateProjectStatus } from '../../../api/quality-gates';
-import { getTimeMachineData } from '../../../api/time-machine';
+import { getAllTimeMachineData } from '../../../api/time-machine';
import {
getActivityGraph,
getHistoryMetrics,
const graphMetrics = getHistoryMetrics(graph, []);
const metrics = uniq([...HISTORY_METRICS_LIST, ...graphMetrics]);
- return getTimeMachineData({
+ return getAllTimeMachineData({
...getBranchLikeQuery(branchLike),
from: FROM_DATE,
component: component.key,
getApplicationQualityGate,
getQualityGateProjectStatus
} from '../../../../api/quality-gates';
-import { getTimeMachineData } from '../../../../api/time-machine';
+import { getAllTimeMachineData } from '../../../../api/time-machine';
import { getActivityGraph, saveActivityGraph } from '../../../../components/activity-graph/utils';
import { mockBranch, mockMainBranch } from '../../../../helpers/mocks/branch-like';
import { mockComponent } from '../../../../helpers/testMocks';
jest.mock('../../../../api/time-machine', () => {
const { MetricKey } = require.requireActual('../../../../types/metrics');
return {
- getTimeMachineData: jest.fn().mockResolvedValue({
+ getAllTimeMachineData: jest.fn().mockResolvedValue({
measures: [
{ metric: MetricKey.bugs, history: [{ date: '2019-01-05', value: '2.0' }] },
{ metric: MetricKey.vulnerabilities, history: [{ date: '2019-01-05', value: '0' }] },
const wrapper = shallowRender();
await waitAndUpdate(wrapper);
expect(getProjectActivity).toBeCalled();
- expect(getTimeMachineData).toBeCalled();
+ expect(getAllTimeMachineData).toBeCalled();
const { measuresHistory } = wrapper.state();
expect(measuresHistory).toHaveLength(6);
updateGraph={[MockFunction]}
/>
<GraphsHistory
- analyses={
- Array [
- Object {
- "date": 2017-03-01T08:36:01.000Z,
- "events": Array [
- Object {
- "category": "QUALITY_GATE",
- "description": "Lorem ipsum dolor sit amet",
- "key": "E11",
- "name": "Lorem ipsum",
- "qualityGate": Object {
- "failing": Array [
- Object {
- "branch": "master",
- "key": "foo",
- "name": "Foo",
- },
- Object {
- "branch": "feature/bar",
- "key": "bar",
- "name": "Bar",
- },
- ],
- "status": "ERROR",
- "stillFailing": true,
- },
- },
- ],
- "key": "foo",
- "projectVersion": "1.0",
- },
- Object {
- "date": 2017-03-01T08:36:01.000Z,
- "events": Array [],
- "key": "foo",
- "projectVersion": "1.0",
- },
- ]
- }
+ analyses={Array []}
graph="issues"
graphs={
Array [