Adding link to gzipped data

This commit is contained in:
John Lyon-Smith
2018-04-26 18:26:55 -07:00
parent 96e2599cdb
commit 88c20e9dbf
3 changed files with 9 additions and 7 deletions

View File

@@ -178,8 +178,7 @@ export class TeamRoutes {
readable.push(null) readable.push(null)
res.writeHead(200, { res.writeHead(200, {
"Content-Type": "text/html", "Content-Type": "application/gzip",
"Content-Encoding": "gzip",
}) })
readable.pipe(gzip).pipe(res) readable.pipe(gzip).pipe(res)
} }

View File

@@ -118,6 +118,10 @@ class API extends EventEmitter {
return id ? "/api/assets/" + id + "?access_token=" + this.token : null return id ? "/api/assets/" + id + "?access_token=" + this.token : null
} }
makeTeamStatusUrl() {
return `/api/teams/status?access_token=${this.token}`
}
static makeParams(params) { static makeParams(params) {
return params return params
? "?" + ? "?" +

View File

@@ -1,6 +1,6 @@
import React, { Component, Fragment } from "react" import React, { Component, Fragment } from "react"
import PropTypes from "prop-types" import PropTypes from "prop-types"
import { Box, Image, Column, Row, Button } from "ui" import { Box, Image, Column, Row, Button, Link, Text } from "ui"
import { MessageModal, WaitModal, YesNoMessageModal } from "../Modal" import { MessageModal, WaitModal, YesNoMessageModal } from "../Modal"
import { sizeInfo, colorInfo } from "ui/style" import { sizeInfo, colorInfo } from "ui/style"
import headerLogo from "images/deighton.png" import headerLogo from "images/deighton.png"
@@ -186,10 +186,9 @@ export class System extends Component {
<Row> <Row>
<Row.Item grow /> <Row.Item grow />
<Row.Item> <Row.Item>
<Button <Link to={api.makeTeamStatusUrl()}>
text="Download Team Data" <Text>Download Team Data</Text>
width={sizeInfo.buttonWideWidth} </Link>
/>
</Row.Item> </Row.Item>
<Row.Item grow /> <Row.Item grow />
</Row> </Row>