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

feat(rust): show interactive menu to select one or more TCP inlent when user dosen't specifies #6544

Conversation

0x61nas
Copy link
Contributor

@0x61nas 0x61nas commented Oct 15, 2023

Make ockam tcp-inlet delete (no args) interactive by asking the user to choose from a list of tcp-inlet aliases to delete using tuify

After this PR gets merged and if no one takes (#6465, #6464, #6463 and #6462) I'll apply the same changes in one or multiple othr PRs to close them

Current behavior

Shows an error message when the user didn't specify an alias

Proposed changes

  • Make the alias argument optional
  • Check if the user specifies an alias or not
  • if so, then do the old behavior (check, confirm, delete)
  • if not, and the terminal is interactive, and the user didn't pass any of --no-output or --quiet flags
    • then collect all exists TCP inlets aliases in the (selected or default) node
    • Shows them in a multi selection TUI menu
    • confirm and delete

Checks

  • All commits in this Pull Request are signed and Verified by Github.
  • All commits in this Pull Request follow the Ockam commit message convention.
  • There are no Merge commits in this Pull Request. Ockam repo maintains a linear commit history. We merge Pull Requests by rebasing them onto the develop branch. Rebasing to the latest develop branch and force pushing to your Pull Request branch is okay.
  • I have read and accept the Ockam Community Code of Conduct.
  • I have read and accepted the Ockam Contributor License Agreement by adding my Git/Github details in a row at the end of the CONTRIBUTORS.csv file in a separate pull request to the build-trust/ockam repository. done via: build-trust/ockam-contributors/pull/266

@0x61nas 0x61nas requested a review from a team as a code owner October 15, 2023 17:05
@mrinalwadhwa mrinalwadhwa added the hacktoberfest Apply to issues you want contributors to help with label Oct 15, 2023
@0x61nas 0x61nas force-pushed the feat/interactive-inlet-delete branch from 7bc74b4 to c6b90f3 Compare October 15, 2023 17:09
@adrianbenavides
Copy link
Member

Hi @0x61nas , thanks for submitting this PR! We recently merged the first PR related to making some commands interactive at #6480

That PR can serve as a guide on how to use some common functionalities that are now available as part of the Terminal struct. Make sure to rebase latest develop. And let me know if you have any questions!

@0x61nas 0x61nas force-pushed the feat/interactive-inlet-delete branch 3 times, most recently from 3af0830 to dd9a20f Compare October 23, 2023 04:47
@0x61nas
Copy link
Contributor Author

0x61nas commented Oct 23, 2023

@adrianbenavides Hi, is there any plan to review this anytime soon(in this October)?. Hope you have a nice day.

Copy link
Member

@adrianbenavides adrianbenavides left a comment

Choose a reason for hiding this comment

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

It's looking great @0x61nas ! We have two similar PR's related to other show commands where we are using a different structure to handle the multiple use cases. My only request for now would be to adapt your PR to that structure (check #6547 and #6665). Let me know if you have any questions!

@mrinalwadhwa
Copy link
Member

@0x61nas while we still have to review this change. I'm adding the HACKTOBERFEST-ACCEPTED label so the contribution is counted by hacktoberfest bots before the end of October. Thank you for taking time to contribute 🎉

Please not @adrianbenavides's feedback above.

@mrinalwadhwa mrinalwadhwa added the HACKTOBERFEST-ACCEPTED To be used when a PR is ready to merge or after it's merged label Oct 28, 2023
@0x61nas
Copy link
Contributor Author

0x61nas commented Oct 29, 2023

It's looking great @0x61nas ! We have two similar PR's related to other show commands where we are using a different structure to handle the multiple use cases. My only request for now would be to adapt your PR to that structure (check #6547 and #6665). Let me know if you have any questions!

fine, i'll follow it

@0x61nas 0x61nas force-pushed the feat/interactive-inlet-delete branch from dd9a20f to 179ae09 Compare October 29, 2023 11:21
@0x61nas 0x61nas force-pushed the feat/interactive-inlet-delete branch from 179ae09 to 5fe4fa1 Compare October 29, 2023 11:44
…hen user dosen't specifies

  Make ockam tcp-inlet delete (no args) interactive by asking the user to choose from a list of `tcp-inlet` aliases to delete using tuify

 - Closes: build-trust/issues/6466
@adrianbenavides
Copy link
Member

adrianbenavides commented Nov 9, 2023

Hi @0x61nas , your PR will be merged through #6886 Thanks again for your help!

@0x61nas 0x61nas deleted the feat/interactive-inlet-delete branch January 15, 2024 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Apply to issues you want contributors to help with HACKTOBERFEST-ACCEPTED To be used when a PR is ready to merge or after it's merged
Projects
None yet
3 participants