Skip to content

Commit

Permalink
Revert "Streaming exports (compdemocracy#1826)"
Browse files Browse the repository at this point in the history
This reverts commit 61d2940.
  • Loading branch information
ballPointPenguin committed Oct 24, 2024
1 parent 61d2940 commit 08e03eb
Show file tree
Hide file tree
Showing 9 changed files with 647 additions and 976 deletions.
67 changes: 27 additions & 40 deletions client-report/src/components/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ const Number = ({ number, label }) => (

const pathname = window.location.pathname; // "/report/2arcefpshi"
const report_id = pathname.split("/")[2];
const doShowDataLicenseTerms = ["pol.is", "preprod.pol.is", "localhost"].includes(
window.location.hostname
);

const getCurrentTimestamp = () => {
const now = new Date();
Expand Down Expand Up @@ -150,16 +147,6 @@ const Overview = ({
</a>
{` (as event log)`}
</p>
<p style={{ fontFamily: "monospace" }}>
{`---Votes matrix: `}
<a
download={getDownloadFilename("participant-votes", conversation)}
href={`http://${window.location.hostname}/api/v3/reportExport/${report_id}/participant-votes.csv`}
>
{getDownloadFilename("participant-votes", conversation)}
</a>
{` (as comments x participants matrix)`}
</p>
<div style={{ marginTop: "3em" }}>
<p style={{ fontFamily: "monospace" }}>
<strong>Public API endpoints (read only, Jupyter notebook friendly)</strong>
Expand All @@ -173,36 +160,36 @@ const Overview = ({
<p style={{ fontFamily: "monospace" }}>
{`$ curl http://${window.location.hostname}/api/v3/reportExport/${report_id}/votes.csv`}
</p>
<p style={{ fontFamily: "monospace" }}>
{`$ curl http://${window.location.hostname}/api/v3/reportExport/${report_id}/participant-votes.csv`}
</p>
</div>
{doShowDataLicenseTerms && (
<div style={{ marginTop: "3em" }}>
<p style={{ fontFamily: "monospace" }}>
<strong>Attribution of Polis Data</strong>
</p>

<p style={{ fontFamily: "monospace" }}>
All Polis data is licensed under a Creative Commons Attribution 4.0 International
license: https://creativecommons.org/licenses/by/4.0/
</p>
<p style={{ fontFamily: "monospace" }}>
--------------- BEGIN STATEMENT ---------------
</p>
<p
style={{ fontFamily: "monospace" }}
>{`Data was gathered using the Polis software (see: compdemocracy.org/polis and github.com/compdemocracy/polis) and is sub-licensed
{window.location.hostname === "pol.is" ||
(window.location.hostname === "localhost" && (
<div style={{ marginTop: "3em" }}>
<p style={{ fontFamily: "monospace" }}>
<strong>Attribution of Polis Data</strong>
</p>

<p style={{ fontFamily: "monospace" }}>
All Polis data is licensed under a Creative Commons Attribution 4.0 International
license: https://creativecommons.org/licenses/by/4.0/
</p>
<p style={{ fontFamily: "monospace" }}>
--------------- BEGIN STATEMENT ---------------
</p>
<p
style={{ fontFamily: "monospace" }}
>{`Data was gathered using the Polis software (see: compdemocracy.org/polis and github.com/compdemocracy/polis) and is sub-licensed
under CC BY 4.0 with Attribution to The Computational Democracy Project. The data and more
information about how the data was collected can be found at the following link: ${window.location.href}`}</p>
<p style={{ fontFamily: "monospace" }}>--------------- END STATEMENT---------------</p>
<p style={{ fontFamily: "monospace" }}>
For further information on best practices for Attribution of CC 4.0 licensed content
Please see:
https://wiki.creativecommons.org/wiki/Best_practices_for_attribution#Title.2C_Author.2C_Source.2C_License
</p>
</div>
)}
<p style={{ fontFamily: "monospace" }}>
--------------- END STATEMENT---------------
</p>
<p style={{ fontFamily: "monospace" }}>
For further information on best practices for Attribution of CC 4.0 licensed content
Please see:
https://wiki.creativecommons.org/wiki/Best_practices_for_attribution#Title.2C_Author.2C_Source.2C_License
</p>
</div>
))}
</div>
</div>
);
Expand Down
113 changes: 14 additions & 99 deletions server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"p3p": "~0.0.2",
"pg": "~8.8.0",
"pg-connection-string": "~2.5.0",
"pg-query-stream": "^4.6.0",
"pg-native": "~3.0.1",
"replacestream": "~4.0.0",
"request": "~2.88.2",
"request-promise": "~4.2.6",
Expand Down
Loading

0 comments on commit 08e03eb

Please sign in to comment.