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

Issue#1195 Improve Pool Delete UX #1436

Merged
merged 15 commits into from
Nov 19, 2016
Merged

Issue#1195 Improve Pool Delete UX #1436

merged 15 commits into from
Nov 19, 2016

Conversation

gkadillak
Copy link
Contributor

@gkadillak gkadillak commented Sep 21, 2016

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.

image

@gkadillak gkadillak changed the title 1195 improve pool delete ux Issue#1195 Improve Pool Delete UX Sep 21, 2016
Copy link
Member

@MFlyer MFlyer left a 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 :)

@gkadillak
Copy link
Contributor Author

Not a problem, @MFlyer! Would that be worth adding to the community contribution docs?

@MFlyer
Copy link
Member

MFlyer commented Sep 21, 2016

Would that be worth adding to the community contribution docs?

That would be a good thing!

@gkadillak
Copy link
Contributor Author

Ok I'll make a pull request to the docs as well with that change :)

@gkadillak
Copy link
Contributor Author

@MFlyer take a look and tell me what you think!

@sfranzen
Copy link
Contributor

@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.

@MFlyer
Copy link
Member

MFlyer commented Sep 22, 2016

Hi @sfranzen,
I assumed a 4 spaces tab looking to other Rockstor files and @phillxnet coding too (4 spaces on python, 4 spaces on js, same indentation).
Do we agree on this?
I think @schakrava should have the last say.

@sfranzen
Copy link
Contributor

@MFlyer,
Yes, you're right, except for the couple of dashboard widget views apparently. Since I started by copy/pasting some code together from there I was looking at my files and just seeing 2 spaces. Going with 4 now! 👍

</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>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling: replics -> replicas

@schakrava
Copy link
Member

schakrava commented Sep 29, 2016

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 ?

@gkadillak
Copy link
Contributor Author

gkadillak commented Sep 29, 2016

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.

@MFlyer
Copy link
Member

MFlyer commented Sep 29, 2016

My personal opinion:
I'm impartial like @gkadillak , 1+ on 4 spaces indent because of better reading.

@phillxnet @priyaganti ?

@priyaganti
Copy link
Contributor

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.

@gkadillak
Copy link
Contributor Author

Happy to hear that @priyaganti ! Thanks for giving it a shot :)

@schakrava
Copy link
Member

Hey @gkadillak. Nicely done. I just tested your changes and it all looks good. I just have 2 comments.

  1. The behavior of delete button in the pools table view is still the old one. Please update it. See if you can reuse the same template/modal for both views.
  2. Update the indentation to 4 spaces while you are at it :)

@gkadillak
Copy link
Contributor Author

4 spaces it is! I'll update the table view behavior as well.

@gkadillak
Copy link
Contributor Author

@schakrava finally finished up this work. Can you take a look? Thanks!

@schakrava
Copy link
Member

schakrava commented Nov 10, 2016

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?

delete_pool_confirm

@gkadillak
Copy link
Contributor Author

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.
@schakrava
Copy link
Member

schakrava commented Nov 16, 2016

@gkadillak Are you able to reproduce the bug after your rebase?

@gkadillak
Copy link
Contributor Author

Unfortunately, no. Is there anything in the console?

@schakrava schakrava merged commit 8f7f86c into rockstor:master Nov 19, 2016
@schakrava
Copy link
Member

Thanks for your work @gkadillak . I had to make a few changes to get it all working, but we are good now.

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.

5 participants