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

Add Connect Action to Package actions menu #1570

Closed
Madeline-UX opened this issue Apr 6, 2023 · 0 comments · Fixed by #1638
Closed

Add Connect Action to Package actions menu #1570

Madeline-UX opened this issue Apr 6, 2023 · 0 comments · Fixed by #1638
Assignees
Labels
enhancement ✨ New feature or request ux

Comments

@Madeline-UX
Copy link
Contributor

Madeline-UX commented Apr 6, 2023

User Story

As Ashton, I need to be able to open a tunnel to the cluser to view an application or package resource from the UI

CLI command: zarf connect + connect command name

Acceptance Criteria

Given - the user has packages deployed in their cluster
When - selects the connect... from the actions menu
Then - Open a dialog that lists the connect commands available for that package and have primary button disabled
When - the user to selects one of the commands
Then - make the primary button enabled
When - the user clicks connect
Then - Open tunnel in new tab (zarf connect + command)
And - Return user to previous screen

Design Resources

Figma File - https://www.figma.com/file/MUItIzpzLBLuIyt225Bwgl/Zarf-UI?node-id=1347%3A57870&t=ojULNeuu0CxY2PM1-1

Screenshot 2023-04-06 at 4 18 36 PM

Dialog

@Madeline-UX Madeline-UX added this to the Zarf UI milestone Apr 6, 2023
@Madeline-UX Madeline-UX added the UI label Apr 6, 2023
@github-project-automation github-project-automation bot moved this to New Requests in Zarf Project Board Apr 6, 2023
@Madeline-UX Madeline-UX modified the milestones: Zarf UI, Zarf UI 2 Apr 10, 2023
@Racer159 Racer159 modified the milestones: v0.27.0 (Zarf UI 2), v0.27.0 Apr 18, 2023
@Madeline-UX Madeline-UX added the ux label Apr 19, 2023
@mike-winberry mike-winberry self-assigned this Apr 19, 2023
mike-winberry added a commit that referenced this issue Apr 21, 2023
…false now that the server is nested within src.
@mike-winberry mike-winberry linked a pull request Apr 21, 2023 that will close this issue
5 tasks
mike-winberry added a commit that referenced this issue Apr 26, 2023
… 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.
mike-winberry added a commit that referenced this issue Apr 26, 2023
…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.
mike-winberry added a commit that referenced this issue May 1, 2023
…. Update types runetime.go by removing ZarfTunnels type to fix import error
mike-winberry added a commit that referenced this issue May 1, 2023
…pdate api/ start.go with the tunnels package.
mike-winberry added a commit that referenced this issue May 1, 2023
… selectable connections to disconnect if there are any connections. Update ui DeployedPackageMenu to show disconnect button if there are active tunnels for the package.
@Racer159 Racer159 added the enhancement ✨ New feature or request label May 1, 2023
mike-winberry added a commit that referenced this issue May 1, 2023
…i 04_connect_doom by removing unused import.
mike-winberry added a commit that referenced this issue May 2, 2023
…and fixed the response status for ConnectTunnel. Update test/ui connect_doom to properly handle waiting for asynchronous click acttions for connect and disconnect.
mike-winberry added a commit that referenced this issue May 3, 2023
…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.
mike-winberry added a commit that referenced this issue May 4, 2023
…ed to the DeployedPackage type. Update ConnectDeployedPackageDialog with a state for no connections found
Racer159 added a commit that referenced this issue May 8, 2023
## Description
Ashton should be able to connect to a pre-defined connection within a
deployed package.



## Related Issue
#1570 


## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed

---------

Co-authored-by: Wayne Starr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request ux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants