Skip to content
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

Download/Upload custom configuration sets #1472

Closed
ce-bo opened this issue Nov 6, 2020 · 0 comments · Fixed by #1537
Closed

Download/Upload custom configuration sets #1472

ce-bo opened this issue Nov 6, 2020 · 0 comments · Fixed by #1537
Assignees
Labels
feature Feature requests pr-visualization Issues that touch the visualization pr(oject) which means web and desktop features. priority:high Set by PO

Comments

@ce-bo
Copy link
Collaborator

ce-bo commented Nov 6, 2020

Feature request

Description

As an auditor, I want download and upload my custom configuration files, so that I can share them between other devices, browsers and people. Also, I want to use them as backup.

Acceptance criteria

  • The download button is removed if experimental features are enabled
  • A download button is shown left to the "plus" button within the Custom Configs Panel.
    • On hover a tooltip is shown for downloading the configs. to be discussed.
  • The download button is only active if at least one configuration exists that is related to one of the loaded maps.
  • The downloaded file contains all configuration data that is related to the currently loaded maps.
  • For a single map the filename should be composed with the map name and the current date (e.g. map-example_YYYYmmdd_hh:mm.cc.config.json)
  • On saving a new configuration the total storage size is checked.
    • Some facts regarding the localStorage:
      • It does not exist a limit for the total localStorage size that applies to all browsers.
      • Usually 2MB - 10MB are available (5MB seems to be very common but Opera has supported only 2MB some time ago).
      • The localStorage size (e.g. 5MB) is assigned per origin.
      • localStorage characters are stored in UTF-16.
      • It seems that the localStorage per origin is occupied by a 3KB default overhead.
    • If it exceeds 768KB trigger a warning for the user that contains the request to store old configurations to make space for new ones. Purge old configurations files on acceptance. At least 50% of the configuration files should be freed. Per default all configuration files that has not been accessed within the last 6 months
  • It is possible to upload .cc.json files and .cc.config.json files toghether.
    • the .cc.config.json files will be stored in the local storage.
  • On upload existing configuration files should be matched. Duplications should be prevented.
    • Different configuration files with the same name (mode and assigned maps) should be renamed and both should be kept.
      • t.b.d. how to rename them?

Assumptions & Exclusions

  • Downloading configs is useful to share them with other people, to save them for other devices and browsers and to use them as backup. This should be shown in the tooltip.

Development notes (optional Task Breakdown)

  • Store when a configuration was last applicable to be able to purge possibly outdated/unneeded config files.

Open Questions

@BridgeAR Should we reset the creation timestamp of a CustomConfig during the import, so that a new "Download & Purge" request will not delete them again?

@ce-bo ce-bo added feature Feature requests pr-visualization Issues that touch the visualization pr(oject) which means web and desktop features. labels Nov 6, 2020
@BridgeAR BridgeAR added the priority:high Set by PO label Nov 11, 2020
@ce-bo ce-bo self-assigned this Nov 16, 2020
ce-bo added a commit that referenced this issue Nov 17, 2020
DONES:
- replace forgotten words "view" with "config"
- we must hide the old download button on experimental features enabled
- we may only export related custom config files (to uploaded maps)
- disable button, if no config is exportable
- the export file name must be set dynamically
- storage size warnings
- Download & Purge old Configs with confirmation dialog
ce-bo added a commit that referenced this issue Nov 19, 2020
ce-bo added a commit that referenced this issue Nov 19, 2020
ce-bo added a commit that referenced this issue Nov 20, 2020
ce-bo added a commit that referenced this issue Nov 20, 2020
ce-bo added a commit that referenced this issue Dec 8, 2020
ce-bo added a commit that referenced this issue Dec 8, 2020
ce-bo added a commit that referenced this issue Dec 8, 2020
ce-bo added a commit that referenced this issue Dec 9, 2020
* Implement Download/Upload CustomConfigs #1472

DONES:
- replace forgotten words "view" with "config"
- we must hide the old download button on experimental features enabled
- we may only export related custom config files (to uploaded maps)
- disable button, if no config is exportable
- the export file name must be set dynamically
- storage size warnings
- Download & Purge old Configs with confirmation dialog

* Apply small refactoring of the download functionality #1472

* Add duplicate handling on upload, Change unique id to be a checksum #1472

* Do not show loading gif on uploading CustomConfigs #1472

* Adjust unit tests #1472

* Adjust unit tests #1472

* Adjust unit tests #1472

* Adjust unit tests #1472

* Merge branch 'main' into feature/1472/download-upload-custom-configs

# Conflicts:
#	visualization/app/codeCharta/ui/fileChooser/fileChooser.component.ts

* Adjust download-conditions, Apply minor adjustments #1472

* Apply code style, Add logic to handle an empty purge #1472

* Change "custom config" to be written capitalized #1472

* Apply PR suggestions #1472

* Apply PR suggestions and code styles #1472

* Improve Icon, Adjust naming #1472
ce-bo added a commit that referenced this issue Dec 9, 2020
ce-bo added a commit that referenced this issue Dec 9, 2020
* Add tests, Fix minor bugs, Apply refactorings #1491

* Adjust Changelog #1491, #1472
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests pr-visualization Issues that touch the visualization pr(oject) which means web and desktop features. priority:high Set by PO
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants