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

Importing Template requires you to upload the same file after previewing #2485

Closed
netniV opened this issue Mar 4, 2019 · 5 comments
Closed
Assignees
Labels
enhancement General tag for an enhancement import/export Related to Import and Export of Template and Packages resolved A fixed issue templates Issues related to templating
Milestone

Comments

@netniV
Copy link
Member

netniV commented Mar 4, 2019

Describe the bug
When uploading a template, the default action is to preview to ensure that your template won't overwrite anything important. However, if you are satisfied with the import, you must then return to the import screen, select your file and then upload it again.

Expected behavior
After previewing, there should be an option to import the template immediately. This may be best to be disabled unless a checkbox has been ticked to confirm that the template is OK (especially if there is something being updates, not just exists/new).

@cigamit
Copy link
Member

cigamit commented Mar 7, 2019

This is easier said than done in that the browser obfuscates the actual path. So, even though we can save a path, we can never save the real path, which makes the attempt to short circuit this security measure impossible. So, I suggest we close this feature request.

@cigamit cigamit added enhancement General tag for an enhancement 3rd Party Change Something that Cacti can't fix directly no plans This is a feature request that can or will not be implemented and removed enhancement General tag for an enhancement labels Mar 7, 2019
@netniV
Copy link
Member Author

netniV commented Mar 7, 2019

I think we can circumvent that by storing the upload in a cache directory with a random name. That way, we can then say to import that randomly named file safely after a preview. If the file isn't imported, the cache cleanup routines can remove it if it's older than 30 minutes.

It also means that for larger templates you wouldn't need to upload twice, during which time you may have modified your template but not realised that you'd not previewed again.

If you were uploading without preview, that could follow the same uploading to a random name, but then jump straight to importing.

@cigamit
Copy link
Member

cigamit commented Mar 10, 2019

Hmm, that might work. Post 1.2.3 though.

@netniV
Copy link
Member Author

netniV commented Mar 11, 2019

I'd say make it a 1.3 think as we'll likely be starting on that soon.

@netniV netniV added this to the v1.3.0 milestone Mar 11, 2019
@netniV netniV self-assigned this Mar 11, 2019
@netniV netniV added enhancement General tag for an enhancement and removed 3rd Party Change Something that Cacti can't fix directly no plans This is a feature request that can or will not be implemented labels Mar 11, 2019
@TheWitness TheWitness added templates Issues related to templating import/export Related to Import and Export of Template and Packages labels Mar 18, 2020
TheWitness added a commit that referenced this issue Oct 17, 2022
Importing Template requires you to upload the same file after previewing
@TheWitness TheWitness added the resolved A fixed issue label Oct 17, 2022
@TheWitness TheWitness modified the milestones: v1.3.0, v1.2.23 Oct 17, 2022
@TheWitness
Copy link
Member

This is resolved now.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement General tag for an enhancement import/export Related to Import and Export of Template and Packages resolved A fixed issue templates Issues related to templating
Projects
None yet
Development

No branches or pull requests

3 participants