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

Added consistency improvement in list, details and create page of node credentials. #4323

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

samshinde
Copy link
Contributor

@samshinde samshinde commented Sep 9, 2020

Signed-off-by: samshinde ashinde@chef.io

🔩 Description: What code changed, and why?

consistency improvements for the list, details and create of node credential.

  1. create node credential using the modal popup
  2. Delete node credential modal pop-up with notification
  3. Details tab which has update and reset buttons of each type(ssh, winrm, sudo).
  4. ssh has a dropdown for password or rsa key, since only 1 is required not both

⛓️ Related Resources

#3716

👍 Definition of Done

I have added consistency changes for the create Node Credential , list, update and delete Node Credential with UI changes.

👟 How to Build and Test the Change

visit the Settings >> Node Credential page,
create Node Credential - Create node credential according to the type you need.
delete Node Credential - click to any Node Credential left side three-dot menu ... where you can see the delete Node Credential link to test delete the Node Credential.

STEP 1
inside the hab studio

[default:/src:0]# build components/automate-ui-devproxy/
[default:/src:0]# start_automate_ui_background
[default:/src:0]# start_all_services

STEP 2
open new window
go to automate UI path

$ cd components/automate-ui
and run the command 

✅ Checklist

📷 Screenshots, if applicable

create
create-success
create-test
create-winrm
delete
delete-success
details
list-page
reset-tab
ssh-details
ssh-reset-tab
sudo-create
sudo-details
sudo-resettab

@netlify
Copy link

netlify bot commented Sep 9, 2020

Deploy preview for chef-automate ready!

Built with commit aeb328e

https://deploy-preview-4323--chef-automate.netlify.app

@samshinde samshinde marked this pull request as draft September 9, 2020 08:57
@samshinde samshinde changed the title Added consistency improvement in node credentials. Added consistency improvement in list, details and create page of node credentials. Sep 10, 2020
@samshinde samshinde marked this pull request as ready for review September 10, 2020 13:08
@susanev susanev requested review from a team and msorens September 15, 2020 15:51
@susanev
Copy link
Contributor

susanev commented Sep 15, 2020

@samshinde both the details and reset credential forms have issues with the spacing between the inputs, please use the same amount of space as the other forms, i believe its 30px

@samshinde
Copy link
Contributor Author

samshinde commented Sep 16, 2020

@samshinde both the details and reset credential forms have issues with the spacing between the inputs, please use the same amount of space as the other forms, I believe its 30px

@susanev I have updated the space between the inputs for the details and reset the credential tab.

Copy link
Contributor

@msorens msorens left a comment

Choose a reason for hiding this comment

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

Some initial feedback; more later...

Copy link
Contributor

@msorens msorens left a comment

Choose a reason for hiding this comment

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

A lot of good work here!
Note that I have not exercised the code; my notes are from code-reading only.

@samshinde samshinde force-pushed the Amol/nodeCredential_UI_Changes branch 2 times, most recently from b7e1d0b to 7777288 Compare September 22, 2020 09:32
Copy link
Contributor

@msorens msorens left a comment

Choose a reason for hiding this comment

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

Thanks for the updates; did another review pass with some additional notes.

this.resetSuccessful = (state === EntityStatus.loadingSuccess);
this.resetForm.markAsPristine();
}
this.getNodeCred();
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete this--method is already called on L84 and should only be called once.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@msorens Actually we don't have any response after calling the patch Api so for updating the node credential we need to call it as the same happening in creating success.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, this violates subscription lifecycle management. The reason I asked you even to rename it to setupNodeSubscriptions is that it is not performing any actions--it is simply creating subscriptions and we do not want to setup the same subscription call twice--that simply means the subscription handler will run twice every time the data is emitted.

@samshinde
Copy link
Contributor Author

@msorens regarding the Conflict error test case for now I have disabled the test case and looking for a solution for the same.

@msorens
Copy link
Contributor

msorens commented Sep 29, 2020

Re-reviewed once more; just the one item that needs addressing (#4323 (comment)), then looks good to go!

Signed-off-by: samshinde <ashinde@chef.io>
@samshinde samshinde force-pushed the Amol/nodeCredential_UI_Changes branch from bda2113 to aeb328e Compare October 5, 2020 10:56
@samshinde
Copy link
Contributor Author

Re-reviewed once more; just the one item that needs addressing (#4323 (comment)), then looks good to go!

@msorens Yes, I have updated the code and resolve the two API call issue.

@msorens msorens merged commit 0a8fe26 into master Oct 9, 2020
@msorens msorens deleted the Amol/nodeCredential_UI_Changes branch October 9, 2020 01:17
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.

None yet

3 participants