-
Notifications
You must be signed in to change notification settings - Fork 138
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
Issue#1195 Improve Pool Delete UX #1436
Issue#1195 Improve Pool Delete UX #1436
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gkadillak,
can you indent on frontend with 4 spaces instead of tab? I do this and @phillxnet too :)
Not a problem, @MFlyer! Would that be worth adding to the community contribution docs? |
That would be a good thing! |
Ok I'll make a pull request to the docs as well with that change :) |
@MFlyer take a look and tell me what you think! |
@MFlyer So our "official" JS/HTML coding style is going to be 4 spaces per level? I've been using 2 but don't mind changing it in future PRs. |
Hi @sfranzen, |
@MFlyer, |
</div> | ||
<div class="modal-body"> | ||
<div class="messages"></div> | ||
<h4>Pool {{pool.name}} will be deleted along with the following shares (and all information associated with shares including Snapshots, NFSExports, Samba configs, SFTP, Replics). Are you sure?</h4> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling: replics -> replicas
Yes, 4 spaces guys! For Python we should be following https://www.python.org/dev/peps/pep-0008/. For JS, I am not sure. Any suggestions @gkadillak @MFlyer @priyaganti ? |
I've seen 2 spaces work well with js but I'm impartial. I think it would be good to find a js styleguide and enforce it. |
My personal opinion: |
I am not sure about the spaces to be used but I have tested your changes. The force delete feature looks good and works as per the user request. Thanks @gkadillak for taking the initiative. |
Happy to hear that @priyaganti ! Thanks for giving it a shot :) |
Hey @gkadillak. Nicely done. I just tested your changes and it all looks good. I just have 2 comments.
|
4 spaces it is! I'll update the table view behavior as well. |
@schakrava finally finished up this work. Can you take a look? Thanks! |
Hey @gkadillak, sorry for the delay but just got to test this morning. You'll notice that I pushed to your fork, mostly rebase related stuff to save you time. It's still not working for me. Both in the details view and table view confirmation modals, list of shares is not shown even when I have one in the Pool. Can you take a second look at that logic? |
Yep I'll take another look! |
* Fixed /api/pool/<pname> form throwing error stating that 'pool_name' is not a valid attribute for a Pool object
* Reformatted the entire rockstor.js file after noticing the spacing wasn't uniform. To the best of my knowledge, this is in line with the spacing of the rest of the codebase.
* Fetch the given shares for a pool to display pertinent information.
* When deleting a pool, show all of the shares associated with the pool, along with their size in GB
For emacs users, in order to remove tabs from a file, select the entire file (C-x h) and then (M-x untabify).
* Reformatted the entire rockstor.js file after noticing the spacing wasn't uniform. To the best of my knowledge, this is in line with the spacing of the rest of the codebase.
* Fetch the given shares for a pool to display pertinent information.
* When deleting a pool, show all of the shares associated with the pool, along with their size in GB
For emacs users, in order to remove tabs from a file, select the entire file (C-x h) and then (M-x untabify).
Show the same delete modal as the pool description page. Also reload the page after the deletion.
@gkadillak Are you able to reproduce the bug after your rebase? |
Unfortunately, no. Is there anything in the console? |
Thanks for your work @gkadillak . I had to make a few changes to get it all working, but we are good now. |
Deletion of Pool in Modal
Users are now able to delete a pool from the pool detail page via a force delete checkbox. The size of the share is displayed (rounded to the nearest integer) along with a warning saying that all associated information will be removed.
Also included is a fix where the delete button doesn't show up for the root pool in the pool detail page.