# HG changeset patch # User Fadi Abbud # Date 1569586161 -7200 # Node ID e3d436052b7c2ca5419cf11026b89468eca1e890 # Parent f91e46134cd72a018b7fcddb2d22da8583768f05 import: export as CSV diff -r f91e46134cd7 -r e3d436052b7c client/src/components/importoverview/ImportOverview.vue --- a/client/src/components/importoverview/ImportOverview.vue Fri Sep 27 12:09:22 2019 +0200 +++ b/client/src/components/importoverview/ImportOverview.vue Fri Sep 27 14:09:21 2019 +0200 @@ -101,6 +101,16 @@ + + Export as CSV + @@ -174,6 +184,21 @@ countryLabel() { return this.$gettext("Country"); }, + importsCSV() { + if (!this.imports.length) return; + return ( + "data:text/csv;charset=utf-8," + + encodeURIComponent( + this.imports + .map(el => { + return ` ${el.id}, ${el.kind}, ${el.enqueued}, ${el.user}, ${ + el.country + }, ${el.signer}, ${el.state}, ${el.warnings}`; + }) + .join("\n") + ) + ); + }, importReviewLabel() { return this.$gettext("Import review"); },