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

Disabled edit button if databag item is encrypted. #5754

Merged
merged 1 commit into from
Sep 21, 2021

Conversation

himanshi-chhabra
Copy link
Contributor

Signed-off-by: Himanshi Chhabra hchhabra@progress.com

πŸ”© Description: What code changed, and why?

Need to disable the edit button if we have data bag item as encrypted

⛓️ Related Resources

#5045

πŸ‘ Definition of Done

Disabled edit button if we have data bag item as encrypted

πŸ‘Ÿ How to Build and Test the Change

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 

npm run serve:hab

To add data https://github.com/chef/automate/blob/master/dev-docs/adding-data/adding_test_data.md#adding-data-to-infra-views
To add encrypted databag :

  1. inside hab studio run local dev server:

    • start_chef_server
    • infra_service_load_chef_repo
    • converge_policyfile_chef_client
  2. inside chef-workstation:
    go to chef-startef/ chef-repo folder then run these commands:
    - openssl rand -base64 512 | tr -d '\r\n' > ~/encrypted_data_bag_secret
    - knife data bag create admins
    - knife data bag create admins encrypted-test --secret-file ~/encrypted_data_bag_secret
    - in nano file add "password": "roots" -> then CTRL+o , CTRL +x

  3. In UI:

    • Go To Infrastructure -> Chef Servers -> click server -> click org -> go to databag tab -> click admins -> click encrypted-test -> edit button is disable.

βœ… Checklist

All PRs must tick these:

With occasional exceptions, all PRs from Progress employees must tick these:

  • Is the code clear? (complicated code or lots of comments--subdivide and use well-named methods, meaningful variable names, etc.)
  • Consistency checked? (user notifications, user prompts, visual patterns, code patterns, variable names)
  • Repeated code blocks eliminated? (adapt and reuse existing components, blocks, functions, etc.)
  • Spelling, grammar, typos checked? (at a minimum use make spell in any component directory)
  • Code well-formatted? (indents, line breaks, etc. improve rather than hinder readability)

All PRs from Progress employees should tick these if appropriate:

  • Tests added/updated? (all new code needs new tests)
  • Docs added/updated? (all customer-facing changes)

Please add a note next to any checkbox above if you are NOT ticking it.

πŸ“· Screenshots, if applicable

data-bag-encrypted.mp4

Signed-off-by: Himanshi Chhabra <hchhabra@progress.com>
@netlify
Copy link

netlify bot commented Sep 20, 2021

πŸ‘· Deploy Preview for chef-automate processing.

πŸ”¨ Explore the source changes: 7b8a6b0

πŸ” Inspect the deploy log: https://app.netlify.com/sites/chef-automate/deploys/6148709854ff480008826666

Copy link
Collaborator

@vinay033 vinay033 left a comment

Choose a reason for hiding this comment

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

good work πŸ‘πŸ»

@sonarcloud
Copy link

sonarcloud bot commented Sep 20, 2021

Kudos, SonarCloud Quality Gate passed!Β  Β  Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@chaitali-mane chaitali-mane left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks @himanshi-chhabra

@kalroy kalroy merged commit 708af04 into main Sep 21, 2021
@kalroy kalroy deleted the Himanshi/encrypted_databag_edit branch September 21, 2021 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants