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

Make ssh key editable #2653

Merged
merged 8 commits into from
May 9, 2024
Merged

Make ssh key editable #2653

merged 8 commits into from
May 9, 2024

Conversation

AlaaElattar
Copy link
Contributor

@AlaaElattar AlaaElattar commented May 7, 2024

Description

Once the user creates or import an ssh key he can not edit it or change any field.

Changes

  • When user opens ssh key dialog, all fields editable now except the fingerprint.
  • User can update name or ssh key itself with the required validations.
  • All changes will updated directly to the table, with toast showing if it went right or wrong.
  • Fix Maximum call stack size issue.

Related Issues

Documentation PR

For UI changes, Please provide the Documetation PR on info_grid

Screencast.from.05-07-2024.03.33.31.PM.webm

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

@AlaaElattar AlaaElattar marked this pull request as ready for review May 7, 2024 12:50
Copy link
Contributor

@Mahmoud-Emad Mahmoud-Emad left a comment

Choose a reason for hiding this comment

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

Good job ya Alaa :)

packages/playground/src/views/sshkey_view.vue Outdated Show resolved Hide resolved
packages/playground/src/views/sshkey_view.vue Show resolved Hide resolved
packages/playground/src/views/sshkey_view.vue Outdated Show resolved Hide resolved
@AlaaElattar AlaaElattar marked this pull request as draft May 7, 2024 14:22
@AlaaElattar
Copy link
Contributor Author

Screencast.from.05-07-2024.05.33.08.PM.webm

@AlaaElattar AlaaElattar marked this pull request as ready for review May 7, 2024 14:35
@Mahmoud-Emad
Copy link
Contributor

Mahmoud-Emad commented May 8, 2024

When updating an SSH key we should validate that there are no keys with the same name

Screencast.from.05-08-2024.11.26.55.AM.webm

image

We do that when the user import/generate a new key, you can check the rules there

when updating an SSH key and changing the name

  1. We need to check user keys first
  2. We need to take the last part of the key if there and place it to the name if the name is empty

@AlaaElattar AlaaElattar marked this pull request as draft May 8, 2024 08:34
@AlaaElattar
Copy link
Contributor Author

  • Handle Validation
Screencast.from.05-09-2024.11.15.30.AM.webm

@AlaaElattar AlaaElattar marked this pull request as ready for review May 9, 2024 08:25
@AlaaElattar AlaaElattar marked this pull request as draft May 9, 2024 08:30
@AlaaElattar AlaaElattar marked this pull request as ready for review May 9, 2024 08:35
Copy link
Contributor

@Mahmoud-Emad Mahmoud-Emad left a comment

Choose a reason for hiding this comment

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

Good job ya Alaa

amiraabouhadid
amiraabouhadid previously approved these changes May 9, 2024
Copy link
Contributor

@amiraabouhadid amiraabouhadid left a comment

Choose a reason for hiding this comment

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

LGTM

@amiraabouhadid amiraabouhadid dismissed their stale review May 9, 2024 09:31

needs more testing

Copy link
Contributor

@amiraabouhadid amiraabouhadid left a comment

Choose a reason for hiding this comment

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

Please add a warning to the user that if he edits ssh key and there are existing deployments, then he/she will lose access to those deployments

@AlaaElattar
Copy link
Contributor Author

Please add a warning to the user that if he edits ssh key and there are existing deployments, then he/she will lose access to those deployments

That's wrong, the keys on the machines itself. The upcoming deployments only will change.

Copy link
Contributor

@amiraabouhadid amiraabouhadid left a comment

Choose a reason for hiding this comment

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

good catch, good job

@amiraabouhadid amiraabouhadid merged commit c7e57db into development May 9, 2024
3 checks passed
@amiraabouhadid amiraabouhadid deleted the development_edit_sshKey branch May 9, 2024 10:13
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.

3 participants