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

Remove "Confirm Password" input field previously required for Validation #1335

Merged
merged 21 commits into from
Jun 13, 2017

Conversation

AparnaKarve
Copy link
Contributor

This PR removes the Confirm Password input field from all angular forms.

Going forward, the user no longer has to key-in his/her password twice.

Before:
screen shot 2017-05-11 at 2 36 34 pm

After:
screen shot 2017-05-11 at 2 48 22 pm

https://bugzilla.redhat.com/show_bug.cgi?id=1427488

@AparnaKarve
Copy link
Contributor Author

@miq-bot add_label bug,fine/no,'angular_dialogs',

@miq-bot
Copy link
Member

miq-bot commented May 11, 2017

@AparnaKarve Cannot apply the following label because they are not recognized: 'angular_dialogs'

@miq-bot
Copy link
Member

miq-bot commented May 18, 2017

This pull request is not mergeable. Please rebase and repush.

@himdel
Copy link
Contributor

himdel commented May 18, 2017

@AparnaKarve what's here looks good I think, but it also looks like there's a half missing, and it has to be in this PR.

All the backend code is still working with these fields - I see a lot of code like

@edit[:new][:log_password] = @edit[:new][:log_verify] = @ps.authentication_password(:default).to_s

@edit[:new][:log_verify]           = depot.authentication_password

@edit[:amqp_verify_status] = (edit_new[:amqp_password] == edit_new[:amqp_verify])

if !host.authentication_userid(:ipmi).blank? && params[:ipmi_password] != params[:ipmi_verify]

etc. etc.

@AparnaKarve
Copy link
Contributor Author

All the backend code is still working with these fields - I see a lot of code like

@himdel Agreed. I will work on that.

@AparnaKarve AparnaKarve force-pushed the bz1427488_remove_verify_password branch from ae2d2dc to d78a90e Compare May 22, 2017 22:09
@AparnaKarve AparnaKarve force-pushed the bz1427488_remove_verify_password branch from d78a90e to 065451f Compare May 22, 2017 22:48
@AparnaKarve
Copy link
Contributor Author

AparnaKarve commented May 22, 2017

I have deleted all _verify references from the backend code as well.

In ems_common, I started deleting all _verify code and noticed that in many areas where the _verify code was called there was also a lot of obsolete code (@edit related). So it was a good clean-up opportunity there.

@AparnaKarve AparnaKarve force-pushed the bz1427488_remove_verify_password branch from 065451f to dd61075 Compare May 22, 2017 23:02
@AparnaKarve AparnaKarve reopened this May 23, 2017
@AparnaKarve
Copy link
Contributor Author

@himdel Can we get some traction on this PR?
Once these changes are in, I would like to look into converting the Credentials controller to a component and while at it address some of the code climate errors like Similar code found in 1 other location.
Thanks.

@himdel
Copy link
Contributor

himdel commented Jun 7, 2017

@AparnaKarve sorry for taking so long, it's a big one :)..

But.. so far, can you re-check those backend bits please?

I'm still seeing these...

app/controllers/application_controller.rb
610:    if (@edit[:new][:log_password] == @edit[:new][:log_verify]) && @edit[:new][:uri_prefix] != "nfs" &&
611:       (!@edit[:new][:uri].blank? && !@edit[:new][:log_userid].blank? && !@edit[:new][:log_password].blank? && !@edit[:new][:log_verify].blank?)

app/controllers/pxe_controller/pxe_servers.rb
297:      elsif @edit[:new][:log_password] != @edit[:new][:log_verify]
412:    @edit[:new][:log_verify] = params[:log_verify] if params[:log_verify]
446:    @edit[:new][:log_verify]      = @ps.has_authentication_type?(:default) ? @ps.authentication_password(:default).to_s : ""
487:      @edit[:new][:log_password] = @edit[:new][:log_verify] = @ps.authentication_password(:default).to_s

(Also seeing this, but not sure if that's the same case:

app/controllers/ops_controller/settings/common.rb
662:       :customer_org, :customer_org_display, :customer_userid, :customer_password, :customer_verify].each do |key|

)

@AparnaKarve
Copy link
Contributor Author

@himdel No worries. Agree, it's a big one.

app/controllers/pxe_controller/pxe_servers.rb

==> PXE Server is not an angular form and hence did not touch that code.


app/controllers/application_controller.rb
610:    if (@edit[:new][:log_password] == @edit[:new][:log_verify]) && @edit[:new][:uri_prefix] != "nfs" &&
611:       (!@edit[:new][:uri].blank? && !@edit[:new][:log_userid].blank? && !@edit[:new][:log_password].blank? && !@edit[:new][:log_verify].blank?)

==> Related to PXE Server as well


app/controllers/ops_controller/settings/common.rb
662:       :customer_org, :customer_org_display, :customer_userid, :customer_password, :customer_verify].each do |key|

==> Looks related to settings_rhn_edit.
Again, not angular code and hence have left it as is.

@himdel
Copy link
Contributor

himdel commented Jun 8, 2017

Maybe this one?

app/assets/javascripts/controllers/ems_common/ems_common_form_controller.js
275:      ($scope.emsCommonModel.default_verify != '' && $scope.angularForm.default_verify.$valid);

@@ -1,56 +0,0 @@
ManageIQ.angular.app.directive('verifypasswd', function() {
Copy link
Contributor

Choose a reason for hiding this comment

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

app/assets/stylesheets/angular.css
4:input.ng-invalid-verifypasswd, select.ng-invalid-verifypasswd,

I guess that style can be removed if the directive is..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we can get rid of that style.

@AparnaKarve
Copy link
Contributor Author

@himdel
Copy link
Contributor

himdel commented Jun 8, 2017

@AparnaKarve You have to rebase ;) (sorry, should have mentioned that - introduced by #1304)

@AparnaKarve
Copy link
Contributor Author

Ah, I see...yesterday's PR that got merged added the _verify :)

@AparnaKarve
Copy link
Contributor Author

AparnaKarve commented Jun 8, 2017

@himdel Should I wait for a couple more minutes in case you have anything more?

I want to push a final commit that addresses these last few stray _verify's

@himdel
Copy link
Contributor

himdel commented Jun 8, 2017

Other than that, LGTM 👍 (+ all those deletions 😺)

I still want to give this some clicking in the UI, it surprises me how many ems_common methods are dead, but I think this should be ready (except for #1335 (comment) and #1335 (comment)) :).

@AparnaKarve AparnaKarve force-pushed the bz1427488_remove_verify_password branch from dd61075 to 0282686 Compare June 8, 2017 15:29
@miq-bot
Copy link
Member

miq-bot commented Jun 8, 2017

Checked commits AparnaKarve/manageiq-ui-classic@42d8562~...0282686 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
18 files checked, 0 offenses detected
Everything looks fine. 🍪

@himdel
Copy link
Contributor

himdel commented Jun 8, 2017

OK, looks like EmsCommon is always used together with Mixins::EmsCommonAngular or with MiddlewareCommonMixin, so I guess that explains the dead code :) Tried to touch a few provider dialogs and a middleware one in the UI, looks like nothing crashes 👍 .. waiting for green travis..

@AparnaKarve AparnaKarve closed this Jun 8, 2017
@AparnaKarve AparnaKarve reopened this Jun 8, 2017
@AparnaKarve
Copy link
Contributor Author

AparnaKarve commented Jun 12, 2017

@himdel Travis has been green 💚 for the last 4 days :)
Can you please merge if you are around?

/cc @dclarizio

@himdel himdel added this to the Sprint 63 Ending Jun 19, 2017 milestone Jun 13, 2017
@himdel himdel merged commit 995cda4 into ManageIQ:master Jun 13, 2017
@himdel
Copy link
Contributor

himdel commented Jun 13, 2017

Sorry @AparnaKarve, I am now.. merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants