Delete team start times, fix download link style, fix download file name
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import passport from "passport"
|
||||
import createError from "http-errors"
|
||||
import autobind from "autobind-decorator"
|
||||
import { catchAll } from "."
|
||||
import { catchAll, TeamRoutes } from "."
|
||||
|
||||
@autobind
|
||||
export class ActivityRoutes {
|
||||
@@ -166,8 +166,10 @@ export class ActivityRoutes {
|
||||
|
||||
async deleteAllActivities(req, res, next) {
|
||||
const Activity = this.db.Activity
|
||||
const Team = this.db.Team
|
||||
|
||||
await Activity.remove({})
|
||||
await Team.updateMany({}, { $set: { start: null } })
|
||||
|
||||
res.json({})
|
||||
}
|
||||
|
||||
@@ -179,6 +179,7 @@ export class TeamRoutes {
|
||||
|
||||
res.writeHead(200, {
|
||||
"Content-Type": "application/gzip",
|
||||
"Content-Disposition": 'attachment; filename="team-scores.gzip"',
|
||||
})
|
||||
readable.pipe(gzip).pipe(res)
|
||||
}
|
||||
|
||||
@@ -204,6 +204,7 @@ export class WorkItemRoutes {
|
||||
const WorkItem = this.db.WorkItem
|
||||
|
||||
await Activity.remove({})
|
||||
await Team.updateMany({}, { $set: { start: null } })
|
||||
await WorkItem.remove({})
|
||||
|
||||
res.json({})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Component, Fragment } from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import { Box, Image, Column, Row, Button, Link, Text } from "ui"
|
||||
import { Box, Image, Column, Row, Button, Link } from "ui"
|
||||
import { MessageModal, WaitModal, YesNoMessageModal } from "../Modal"
|
||||
import { sizeInfo, colorInfo } from "ui/style"
|
||||
import headerLogo from "images/deighton.png"
|
||||
@@ -187,7 +187,7 @@ export class System extends Component {
|
||||
<Row.Item grow />
|
||||
<Row.Item>
|
||||
<Link to={api.makeTeamStatusUrl()}>
|
||||
<Text>Download Team Data</Text>
|
||||
Download Team Data
|
||||
</Link>
|
||||
</Row.Item>
|
||||
<Row.Item grow />
|
||||
|
||||
Reference in New Issue
Block a user