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)
res.writeHead(200, {
"Content-Type": "text/html",
"Content-Encoding": "gzip",
"Content-Type": "application/gzip",
})
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
}
makeTeamStatusUrl() {
return `/api/teams/status?access_token=${this.token}`
}
static makeParams(params) {
return params
? "?" +

View File

@@ -1,6 +1,6 @@
import React, { Component, Fragment } from "react"
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 { sizeInfo, colorInfo } from "ui/style"
import headerLogo from "images/deighton.png"
@@ -186,10 +186,9 @@ export class System extends Component {
<Row>
<Row.Item grow />
<Row.Item>
<Button
text="Download Team Data"
width={sizeInfo.buttonWideWidth}
/>
<Link to={api.makeTeamStatusUrl()}>
<Text>Download Team Data</Text>
</Link>
</Row.Item>
<Row.Item grow />
</Row>