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

Implementing Multiple SSH Keys with Enhanced Management Features #2463

Merged
merged 30 commits into from
Apr 7, 2024

Conversation

Mahmoud-Emad
Copy link
Contributor

@Mahmoud-Emad Mahmoud-Emad commented Mar 18, 2024

Description

Implemented multiple SSH key feature and SSH key management

Changes

  • Implemented a helper function to generate a name for the generated key to be saved with the key.
  • Added activation and deletion logic for SSH keys.
  • Worked on the feature to delete all selected keys, preparing to delete keys based on types like active or all keys.
  • Unified UI elements by removing the tonal theme from cards to maintain consistency with the contracts list view.
  • Enhanced UI by adding another dialog for importing SSH keys and updated the colors of the table.
  • Calculated SSH key fingerprints, consolidated form dialogs, and introduced a key details dialog while removing redundant dialog.
  • Refined the copy input wrapper to conditionally display the copy icon based on field data presence and improved the functionality of the generate dialog.
  • Migrated old SSH keys to the new SSH key type and set them as active keys.
  • Fixed the issue when saving SSH keys by loading them from the chain instead. Work in progress on updating the chain when pressing on active/inactive or deleting keys.
  • Enhanced the way of saving/removing the keys and improved the import key form by adding a rule to validate the entered SSH key.
  • Merged SSH key management functionality into all applications.

Related Issues

Screenshots

  • image
  • image
  • image
  • image
  • image
  • image
  • image
  • image
  • image

Checklist

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

…ed key to be saved with the key, added some UI enhancements.
…delete the keys based on the types like active or all keys.
…to maintain consistency with the contracts list view. Eliminated the onClickRow method as all necessary data is now displayed directly on the SSH-key table. Updated color schemes for both light and dark themes.
…and introduced key details dialog. Removed redundant dialog.
…opy icon based on field data presence, and improved the functionality of the generate dialog.
…rom the chain instead, WIP: update the chain when pressing on active/inactive or even on delete

.
…the the import key form by added a rule to validate the entred sshkey.
… management prior to deployment in the fullVM module. Work in progress: Standardizing the inclusion of this feature across all deployments.
…n the SSH key selector for improved visual consistency. Resolved an issue with importing the SSH key dialog. Enhanced user experience by implementing clearer messaging.
@Mahmoud-Emad Mahmoud-Emad force-pushed the development_multiple_sshkey branch from cdbea0b to e37df5d Compare March 27, 2024 00:28
@Mahmoud-Emad Mahmoud-Emad force-pushed the development_multiple_sshkey branch from e37df5d to 664dcc7 Compare March 27, 2024 00:35
@Mahmoud-Emad Mahmoud-Emad marked this pull request as ready for review March 27, 2024 00:45
@Mahmoud-Emad Mahmoud-Emad force-pushed the development_multiple_sshkey branch from 0ae5cf2 to e674520 Compare March 31, 2024 11:20
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.

It says that this sshkey was created today. However, this sshkey was created long before today.

image

@MohamedElmdary
Copy link
Member

Deploy button need to be disable if no key is select

How to do that?

basically, use our validator form api but manually
example for such solution can be found here https://github.com/threefoldtech/tfgrid-sdk-ts/blob/development/packages/playground/src/components/node_selector/TfSelectionDetails.vue#L144

Mahmoud-Emad and others added 5 commits April 2, 2024 11:22
- style: remove action/inactive btn and turn them into checkbox
- style: remove view btn and move action to click:row
- feat: Add disable/enable (aka. validation) to ssh management component
- style: add some whitespaces based on defined btns in all other components
@Mahmoud-Emad
Copy link
Contributor Author

Mahmoud-Emad commented Apr 2, 2024

It says that this sshkey was created today. However, this sshkey was created long before today.

image

I have keys created since 31/3, it's not an issue anyway.

image

Copy link
Member

@MohamedElmdary MohamedElmdary 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

@amiraabouhadid amiraabouhadid merged commit 6e2902d into development Apr 7, 2024
3 checks passed
@amiraabouhadid amiraabouhadid deleted the development_multiple_sshkey branch April 7, 2024 03:10
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.

4 participants