-
Notifications
You must be signed in to change notification settings - Fork 357
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
Resize disk reconfigure screen #3128
Resize disk reconfigure screen #3128
Conversation
Restarted travis. |
@dclarizio See screenshot in PR #3127. Please assign these two PRs. |
@evertmulder I'm not seeing any tests, perhaps @AparnaKarve or @himdel can recommend some. |
@evertmulder Can you add some screenshots related to this feature? |
(pending core because ManageIQ/manageiq-providers-vmware#164) |
@evertmulder You'll need to rebase - no merge commits in a PR please ;) (This should also fix the ruby specs.) JS specs failure looks related |
vm.setEnableAddDiskButton = function () { | ||
var nrDisksAfterReconfigure=0; | ||
angular.forEach(vm.reconfigureModel.vmdisks, function(disk){ | ||
switch (disk.add_remove) { |
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.
Wrong indentation ;)
Please see the rest of the code climate warnings - feel free to ignore "Function updateDisksAddRemove has 36 lines of code (exceeds 25 allowed). Consider refactoring.
" but the rest is definitely relevant :).
"placeholder" => "Enter Size", | ||
"ng-change" => "vm.hdChanged()", | ||
"validate-multiple" => "1", | ||
:miqmin => "{{ (disk.orgHdUnit=='GB') && (1024*disk.orgHdSize+1) || (1*disk.orgHdSize+1)}}", |
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.
CC won't warn here, but please keep the same rules...
:miqmin => "{{ (disk.orgHdUnit === 'GB') && (1024 * disk.orgHdSize + 1) || (1 * disk.orgHdSize + 1) }}",
EDIT: also, consider using ?:
instead of && ||
unless you're really trying to convey the equivalent of
(disk.orgHdUnit === 'GB') ? ((1024 * disk.orgHdSize + 1) || (1 * disk.orgHdSize + 1)) : (1 * disk.orgHdSize + 1)
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.
@himdel Sorry, over looked this one. Should be fix now.
As for tests, I'm not sure what to suggest, sorry - can't really tell the refactoring bits from the actual changes (this being one big commit). @evertmulder Care to elaborate what this actually changes please? :) (The screenshot might also help.) |
@himdel Thanks for all the reviews. Tomorrow I will make some time addressing the comments. Sorry for the late response, the comments are not going to my corporate mail, so I just saw them. @AparnaKarve Added screenshots |
I am afraid I did merge instead of rebase. Can I do something to fix this? |
removed the merge commits. Currently working on the provider for this PR. |
ManageIQ/manageiq-providers-vmware#164 has been merged |
@miq-bot remove-label pending core |
Can you, please, address the @miq-bot issue? |
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.
👍 confirmed this PR worked while testing ManageIQ/manageiq-providers-vmware#164
JS failures still relevant, also, please run eslint manually on your new code, seems like CC is not reporting properly... I'm seeing at least these in a few places..
@miq-bot add_label wip |
@himdel Fixed all eslint issues I could find in the file. Fixed 127 issues.
for ruby 2.4.2 I keep getting Redux errors running the test suite (like Redux API ManageIQ.redux namespace should be defined), but travis does not. |
@evertmulder Sorry about that , should be fixed now, restarting travis. That said, can you also look at #3128 (review) please? :) |
Checked commit evertmulder@ffa6ad5 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 **
|
@himdel Is there anything I can improve? I think I fixed all review comments ... |
@evertmulder Sorry about the delay, there was a spec failure but it was on our side.. |
LGTM, tested in the UI 👍 |
@himdel can this be |
@simaishi Assuming ManageIQ/manageiq-providers-vmware#164 can be, I think there is no problem here. |
Resize disk reconfigure screen (cherry picked from commit 8835899)
Gaprindashvili backport details:
|
Thanks Martin, backported VMware PR as well. |
Compute > Infra > VMs, select a vm, toolbar Configuration > Reconfigure selected items
PR to support resize disk from reconfigure screen.
See: #3127
Closes #3127