-
Notifications
You must be signed in to change notification settings - Fork 171
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
#1570. Connect Action #1638
Merged
Racer159
merged 29 commits into
main
from
1570-add-connect-action-to-package-actions-menu
May 8, 2023
Merged
#1570. Connect Action #1638
Racer159
merged 29 commits into
main
from
1570-add-connect-action-to-package-actions-menu
May 8, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…false now that the server is nested within src.
✅ Deploy Preview for zarf-docs canceled.
|
…ackage into the RemoveDeployedPackageDialog component.
… that takes in a package name as url param and responds with an APIPackageConnecttions object. Update internal/api/start.go with new packages route /list/connections/{name} where name is the name of the package whose connections are requested. Update types/api.go with the APIPackageConnections struct. Add connect-deployed-package-dialog to UI components. Updateee deployed-package-menu to open the connection selections dialog when clicking on the connect menu list item.
…per leading icon.
…and DisconnectTunnel methods for opening and closing a tunnel given a zarftunnel name as a url param. Update api/ start.go with the /tunnels /connect and /disconnect routes. Update types/runtime.go with type ZarfTunnels for use in api/cluster/tunnels to hold tunnel references until sigterm or DisconnectTunnel is called. Update ui/lib api.ts with a new Tunnels api object that contains the connect and disconnect enpoint methods.
…. Update types runetime.go by removing ZarfTunnels type to fix import error
… returns the tunnel HttpEndpoint with the tunnel urlSuffix appended. Update api/tunnels tunnels.go to no longer block, to properly return on errors, and to open the FullUrl instead of just the HttpUrl. Update ui/lib store.ts with tunnelStore that has a map of pkgNames with a list of thier open tunnels. Update ui components/ConnectDeployedPackageDialog to show an error message if it fails to connect to the requested resource.
…pdate api/ start.go with the tunnels package.
… selectable connections to disconnect if there are any connections. Update ui DeployedPackageMenu to show disconnect button if there are active tunnels for the package.
…l/api start.go with /tunnels/list route. Update api/tunnels/tunnels with ListTunnels method that returns a list of tunnel names. Create test/ui connect_games e2e test that creates a tunnel to doom and then disconnects the tunnel. Update ui package.json with test:connect test. Update ui api with Tunnels.list. Update zarf-dialog with bound open prop. Update ui ConnectDeployedPackageDialog and DisconnectDeployedPackageDialogs to reset selection when dialog opens. Update ui root page to update the tunnel store when it retrieves new package.
…i 04_connect_doom by removing unused import.
mike-winberry
requested review from
jeff-mccoy,
YrrepNoj,
Racer159 and
Noxsios
as code owners
May 1, 2023 23:49
Screen.Recording.2023-05-01.at.4.50.07.PM.mov |
… as it is likely hapenning to fast to catch and is passing locally without.
Racer159
requested changes
May 2, 2023
src/ui/lib/components/DeployedPackageMenu/connect-deployed-package-dialog.svelte
Outdated
Show resolved
Hide resolved
src/ui/lib/components/DeployedPackageMenu/disconnect-deployed-package-dialog.svelte
Outdated
Show resolved
Hide resolved
src/ui/lib/components/DeployedPackageMenu/disconnect-deployed-package-dialog.svelte
Outdated
Show resolved
Hide resolved
…and fixed the response status for ConnectTunnel. Update test/ui connect_doom to properly handle waiting for asynchronous click acttions for connect and disconnect.
…pdated the routes to take in a pkg and connection name instead of just connection so that tunnels can be created and removed by package. Remove api/packages list.go ListPackageConnections as it is no longer needed. Move api/tunnels/tunnels.go to api/packages/tunnels.go. Update api/packages tunnels.go with new typing and logic to connect, disconnect, and get connections by package, added ListConnections method that returns a map of package names to APIDeployedPackageConnections types, and removed the launch logic from the backend to be handled in the front end. Update packager deploy.go to add the connect strings to the pkg metadata prior to saving the deployed package information to k8s. Update types package.go ZarfMetadata with ConnectStrings field of Type ConnectStrings. Update types api.go with connection types for package connections/tunnels. Update ui api.ts with new endpoints and removed the tunnel endpoints. Update ui store.ts with update logic for the stores that use polling, added PackageTunnels interface. Update deployed-package-table with keys to prevent misrendering after adding a package. Update ui ConnectDeployedPackageDialog to use the new connections logic and api calls as well as opening the connection url in a new tab upon successfull connection. Update DeployedPackageMenu removed unused import. Update DisconnectDeployedPackageDialog to use new endpoints and logic for removing a connection. Update routes +page by extracting the asynchronous store methods into store.ts and added a poll for connections.
Racer159
requested changes
May 3, 2023
src/ui/lib/components/DeployedPackageMenu/connect-deployed-package-dialog.svelte
Outdated
Show resolved
Hide resolved
…ed to the DeployedPackage type. Update ConnectDeployedPackageDialog with a state for no connections found
Racer159
approved these changes
May 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Ashton should be able to connect to a pre-defined connection within a deployed package.
Related Issue
#1570
Type of change
Checklist before merging