|
9 | 9 |
|
10 | 10 | import * as React from 'react';
|
11 | 11 |
|
12 |
| -import Layout from '../layout'; |
13 |
| -import formatUserDate from '../utility/formatUserDate'; |
14 |
| - |
15 | 12 | import {ANNOTATION_REPORT_TEXT} from './constants';
|
16 | 13 | import ReleaseGroupAnnotationList
|
17 | 14 | from './components/ReleaseGroupAnnotationList';
|
18 |
| -import FilterLink from './FilterLink'; |
| 15 | +import ReportLayout from './components/ReportLayout'; |
19 | 16 | import type {ReportDataT, ReportReleaseGroupAnnotationT} from './types';
|
20 | 17 |
|
21 | 18 | const AnnotationsReleaseGroups = ({
|
22 |
| - $c, |
23 | 19 | canBeFiltered,
|
24 | 20 | filtered,
|
25 | 21 | generated,
|
26 | 22 | items,
|
27 | 23 | pager,
|
28 | 24 | }: ReportDataT<ReportReleaseGroupAnnotationT>):
|
29 |
| -React.Element<typeof Layout> => ( |
30 |
| - <Layout $c={$c} fullWidth title={l('Release group annotations')}> |
31 |
| - <h1>{l('Release group annotations')}</h1> |
32 |
| - |
33 |
| - <ul> |
34 |
| - <li> |
35 |
| - {l('This report lists release groups with annotations.')} |
36 |
| - </li> |
37 |
| - <li>{ANNOTATION_REPORT_TEXT()}</li> |
38 |
| - <li> |
39 |
| - {texp.l('Total release groups found: {count}', |
40 |
| - {count: pager.total_entries})} |
41 |
| - </li> |
42 |
| - <li> |
43 |
| - {texp.l('Generated on {date}', |
44 |
| - {date: formatUserDate($c, generated)})} |
45 |
| - </li> |
46 |
| - |
47 |
| - {canBeFiltered ? <FilterLink $c={$c} filtered={filtered} /> : null} |
48 |
| - </ul> |
49 |
| - |
| 25 | +React.Element<typeof ReportLayout> => ( |
| 26 | + <ReportLayout |
| 27 | + canBeFiltered={canBeFiltered} |
| 28 | + description={l('This report lists release groups with annotations.')} |
| 29 | + entityType="release_group" |
| 30 | + extraInfo={ANNOTATION_REPORT_TEXT()} |
| 31 | + filtered={filtered} |
| 32 | + generated={generated} |
| 33 | + title={l('Release group annotations')} |
| 34 | + totalEntries={pager.total_entries} |
| 35 | + > |
50 | 36 | <ReleaseGroupAnnotationList items={items} pager={pager} />
|
51 |
| - |
52 |
| - </Layout> |
| 37 | + </ReportLayout> |
53 | 38 | );
|
54 | 39 |
|
55 | 40 | export default AnnotationsReleaseGroups;
|
0 commit comments