Skip to content

Feature: Download Zips #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open

Feature: Download Zips #17

wants to merge 12 commits into from

Conversation

benloh
Copy link
Collaborator

@benloh benloh commented Jun 5, 2025

This ads a new feature for downloading data for non-technical users.

Important

We've needed to add a new library, so make sure you run npm ci

You can now download the following as zips:

  • All Research Logs
  • All *.loki database files
  • All backup *.loki database files
  • All *.template.toml template files

This will download all of the graphs on your server.

Caution

Security and privacy are your responsibility! Keep in mind that any one who can log into your nc-multiplex instance with the password is able to download all of your graph data.

The data comes from the netcreate-itest/runtime folder.

To Test

  1. cd nc-multiplex
  2. git checkout download-zips
  3. cd netcreate-itest -- make sure you're running a recent version of the repo
  4. git fetch && git checkout dev-dhi -- the latest changes should be in dev-dhi
  5. cd .. -- back to nc-multiplex folder
  6. npm ci
  7. ./start-nc-multiplex.sh
  8. Log in
  9. Find the "Download Data" box and click on a link to download the data.
  10. Unzip the data to review it.
  11. Please check the downloaded data to make sure it is valid and usable.

Minor Fixes

  • Remove "Make Tokens" feature
  • Remove obsolete "Google Adwords" feature
  • Update README

@benloh benloh requested a review from jdanish June 5, 2025 23:18
@benloh
Copy link
Collaborator Author

benloh commented Jun 5, 2025

@jdanish Please give this a spin on DO to see if download works

@jdanish
Copy link
Collaborator

jdanish commented Jun 6, 2025

Thanks @benloh !

Testing locally ...

(All Backup .loki files) leads to:

Screenshot 2025-06-05 at 9 30 24 PM

Would it be hard to make a single "download all networks" that zips the Loki files and templates in one place? I usually archive them together just in case ... Not a huge deal, though.

Once the first one is fixed I'll test on DO.

@jdanish
Copy link
Collaborator

jdanish commented Jun 6, 2025

Verified on DO and it appears to work, including that one link that didn't work locally.

@benloh
Copy link
Collaborator Author

benloh commented Jun 6, 2025

Thanks. The issue is missing backup folder. We detect the erorr, but handle the error poorly, so I'm adding some error handling.

@benloh
Copy link
Collaborator Author

benloh commented Jun 6, 2025

Added:

  • prevent unauthorized users from downloading data -- you have to be currently logged in
  • better error checking and reporting
  • download all networks (loki files and template files) in one click

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants