mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Exports now work at #3173 at least for small boards. TODO: Fix EdgeHTML to work, before I can release this.
Thanks to xet7 !
This commit is contained in:
parent
42d8773e36
commit
1624fc82f7
4 changed files with 607 additions and 647 deletions
|
@ -80,21 +80,19 @@ if (Meteor.isServer) {
|
|||
});
|
||||
}
|
||||
const exporter = new Exporter(boardId);
|
||||
if (exporter.canExport(user)) {
|
||||
body = params.query.delimiter
|
||||
? exporter.buildCsv(params.query.delimiter)
|
||||
: exporter.buildCsv();
|
||||
res.writeHead(200, {
|
||||
// Checking length does not work https://github.com/wekan/wekan/issues/3173
|
||||
// so not using it here
|
||||
//'Content-Length': body.length,
|
||||
'Content-Type': params.query.delimiter ? 'text/csv' : 'text/tsv',
|
||||
});
|
||||
res.write(body);
|
||||
res.end();
|
||||
} else {
|
||||
res.writeHead(403);
|
||||
res.end('Permission Error');
|
||||
}
|
||||
//if (exporter.canExport(user)) {
|
||||
body = params.query.delimiter
|
||||
? exporter.buildCsv(params.query.delimiter)
|
||||
: exporter.buildCsv();
|
||||
//'Content-Length': body.length,
|
||||
res.writeHead(200, {
|
||||
'Content-Type': params.query.delimiter ? 'text/csv' : 'text/tsv',
|
||||
});
|
||||
res.write(body);
|
||||
res.end();
|
||||
//} else {
|
||||
// res.writeHead(403);
|
||||
// res.end('Permission Error');
|
||||
//}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
// const stringify = require('csv-stringify');
|
||||
const stringify = require('csv-stringify');
|
||||
|
||||
// exporter maybe is broken since Gridfs introduced, add fs and path
|
||||
export class Exporter {
|
||||
/*
|
||||
constructor(boardId) {
|
||||
this._boardId = boardId;
|
||||
}
|
||||
|
@ -241,29 +240,29 @@ export class Exporter {
|
|||
}
|
||||
i++;
|
||||
});
|
||||
|
||||
// TODO: Try to get translations working.
|
||||
// These currently only bring English translations.
|
||||
// TAPi18n.__('title'),
|
||||
// TAPi18n.__('description'),
|
||||
// TAPi18n.__('status'),
|
||||
// TAPi18n.__('swimlane'),
|
||||
// TAPi18n.__('owner'),
|
||||
// TAPi18n.__('requested-by'),
|
||||
// TAPi18n.__('assigned-by'),
|
||||
// TAPi18n.__('members'),
|
||||
// TAPi18n.__('assignee'),
|
||||
// TAPi18n.__('labels'),
|
||||
// TAPi18n.__('card-start'),
|
||||
// TAPi18n.__('card-due'),
|
||||
// TAPi18n.__('card-end'),
|
||||
// TAPi18n.__('overtime-hours'),
|
||||
// TAPi18n.__('spent-time-hours'),
|
||||
// TAPi18n.__('createdAt'),
|
||||
// TAPi18n.__('last-modified-at'),
|
||||
// TAPi18n.__('last-activity'),
|
||||
// TAPi18n.__('voting'),
|
||||
// TAPi18n.__('archived'),
|
||||
/* TODO: Try to get translations working.
|
||||
These currently only bring English translations.
|
||||
TAPi18n.__('title'),
|
||||
TAPi18n.__('description'),
|
||||
TAPi18n.__('status'),
|
||||
TAPi18n.__('swimlane'),
|
||||
TAPi18n.__('owner'),
|
||||
TAPi18n.__('requested-by'),
|
||||
TAPi18n.__('assigned-by'),
|
||||
TAPi18n.__('members'),
|
||||
TAPi18n.__('assignee'),
|
||||
TAPi18n.__('labels'),
|
||||
TAPi18n.__('card-start'),
|
||||
TAPi18n.__('card-due'),
|
||||
TAPi18n.__('card-end'),
|
||||
TAPi18n.__('overtime-hours'),
|
||||
TAPi18n.__('spent-time-hours'),
|
||||
TAPi18n.__('createdAt'),
|
||||
TAPi18n.__('last-modified-at'),
|
||||
TAPi18n.__('last-activity'),
|
||||
TAPi18n.__('voting'),
|
||||
TAPi18n.__('archived'),
|
||||
*/
|
||||
|
||||
const stringifier = stringify({
|
||||
header: true,
|
||||
|
@ -396,9 +395,4 @@ export class Exporter {
|
|||
const board = Boards.findOne(this._boardId);
|
||||
return board && board.isVisibleBy(user);
|
||||
}
|
||||
*/
|
||||
|
||||
canExport(user) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
1135
package-lock.json
generated
1135
package-lock.json
generated
File diff suppressed because it is too large
Load diff
35
package.json
35
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "wekan",
|
||||
"version": "v4.21.0",
|
||||
"version": "v4.16.0",
|
||||
"description": "Open-Source kanban",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -45,33 +45,34 @@
|
|||
"eslint-config-meteor": "0.0.9",
|
||||
"eslint-config-prettier": "^3.6.0",
|
||||
"eslint-import-resolver-meteor": "^0.4.0",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"eslint-plugin-import": "^2.20.0",
|
||||
"eslint-plugin-meteor": "^5.1.0",
|
||||
"eslint-plugin-prettier": "^3.1.4",
|
||||
"eslint-plugin-prettier": "^3.1.2",
|
||||
"lint-staged": "^7.3.0",
|
||||
"pre-commit": "^1.2.2",
|
||||
"prettier": "^1.19.1",
|
||||
"prettier-eslint": "^9.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.10.5",
|
||||
"@babel/runtime": "^7.10.5",
|
||||
"@babel/core": "^7.9.6",
|
||||
"@babel/runtime": "^7.9.6",
|
||||
"@root/request": "^1.6.1",
|
||||
"ajv": "^6.12.3",
|
||||
"ajv": "^5.0.0",
|
||||
"babel-runtime": "^6.26.0",
|
||||
"bcrypt": "^5.0.0",
|
||||
"bson": "^4.0.4",
|
||||
"bunyan": "^2.0.4",
|
||||
"es6-promise": "^4.2.8",
|
||||
"bcrypt": "^3.0.7",
|
||||
"bson": "^4.0.3",
|
||||
"bunyan": "^1.8.12",
|
||||
"csv-stringify": "^5.5.0",
|
||||
"es6-promise": "^4.2.4",
|
||||
"fibers": "^5.0.0",
|
||||
"flatted": "^3.0.4",
|
||||
"gridfs-stream": "^1.1.1",
|
||||
"jszip": "^3.5.0",
|
||||
"ldapjs": "^2.0.0",
|
||||
"meteor-node-stubs": "^1.0.0",
|
||||
"mongodb": "^3.5.9",
|
||||
"flatted": "^2.0.1",
|
||||
"gridfs-stream": "^0.5.3",
|
||||
"jszip": "^3.4.0",
|
||||
"ldapjs": "^1.0.2",
|
||||
"meteor-node-stubs": "^0.4.1",
|
||||
"mongodb": "^3.5.7",
|
||||
"os": "^0.1.1",
|
||||
"page": "^1.11.6",
|
||||
"page": "^1.11.5",
|
||||
"papaparse": "^5.2.0",
|
||||
"qs": "^6.9.4",
|
||||
"source-map-support": "^0.5.19",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue