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

Add delete folder button to web UI #124

Merged
merged 7 commits into from
May 5, 2014
Merged

Add delete folder button to web UI #124

merged 7 commits into from
May 5, 2014

Conversation

tiwilliam
Copy link
Contributor

This will add a Delete folder button to all folders, it will be disabled for the root folder. The delete request passes ?recurse and will delete all underlying keys and folders. It might be a good idea to add a confirm dialog for this action in the future.

screen shot 2014-05-05 at 02 13 12

Resolves issue #102.

@tiwilliam
Copy link
Contributor Author

There seems to be a issue when deleting a child tree:

DELETE http://localhost:8500/v1/kv/1/2/?recurse

will remove /v1/kv/1, is this expected behaviour?

@tiwilliam
Copy link
Contributor Author

Hm, this API call:

DELETE http://localhost:8500/v1/kv/1/2/3/4?dc=dc1

will remove everything below /v1/kv/1 as well, including 1 self.

@armon
Copy link
Member

armon commented May 5, 2014

@tiwilliam The "folder" view is just imposed by the UI. There is no actual folder structure. So if the only key is "1/2/3/4" and that key is removed, then those "folders" also are removed. Does that make sense?

@tiwilliam tiwilliam changed the title Add delete folder button to web UI WIP: Add delete folder button to web UI May 5, 2014
@tiwilliam
Copy link
Contributor Author

Alright, will re-work this to make sense.

@tiwilliam tiwilliam changed the title WIP: Add delete folder button to web UI Add delete folder button to web UI May 5, 2014
@tiwilliam
Copy link
Contributor Author

@armon Thanks for explaining! This should now work as expected and redirect to nearest existing parent on delete or pop back to root if needed.

@pearkes
Copy link
Contributor

pearkes commented May 5, 2014

Great! I would say we should do a isRoot:hidden in the buttons {{bind-attr class}} instead of disabling it. Just makes it clearer, I think.

I also noticed we're not actually rendering the {{errorMessage}}. I'll fix that post merge. Can you rebase this against master? Thanks, great stuff.

@tiwilliam
Copy link
Contributor Author

Rebased against master. Yeah, hidden sounds like a better idea, leaving it at disabled for you to change post merge.

@pearkes
Copy link
Contributor

pearkes commented May 5, 2014

Great, merging.

pearkes added a commit that referenced this pull request May 5, 2014
Add delete folder button to web UI
@pearkes pearkes merged commit d5a74e9 into hashicorp:master May 5, 2014
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.

3 participants