forked from owid/owid-grapher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBulkDownloadPage.tsx
61 lines (58 loc) · 2.11 KB
/
BulkDownloadPage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import React from "react"
import { observer } from "mobx-react"
import { AdminLayout } from "./AdminLayout.js"
import { AdminAppContext, AdminAppContextType } from "./AdminAppContext.js"
@observer
export class BulkDownloadPage extends React.Component {
static contextType = AdminAppContext
context!: AdminAppContextType
render() {
return (
<AdminLayout>
<main className="BulkDownloadPage">
<h2>Bulk CSV downloads</h2>
<DownloadChartsSection />
</main>
</AdminLayout>
)
}
}
export class DownloadChartsSection extends React.Component {
render() {
return (
<section>
<div>
<h5>
Download all charts{" "}
<a
className="btn btn-outline-primary"
style={{ marginLeft: "20px" }}
href="/admin/api/charts.csv"
>
Download
</a>
</h5>
<p>
Downloads a csv containing all OWID charts. Each row
represents a single chart. Each column represents a
grapher config field (e.g. title, subtitle, minTime,
...) or a chart meta field (e.g. lastEditedAt, ...).
</p>
<p>
The csv file does NOT contain all grapher config fields
or all chart meta fields. If you would like additional
columns added to this csv, make a request in{" "}
<a
href="https://owid.slack.com/messages/tech-issues/"
rel="noreferrer"
target="_blank"
>
#tech-issues
</a>
.
</p>
</div>
</section>
)
}
}