* Move tshd test helpers to a better location
* Support passing no props to tshd test helpers
* Refactor ResourcesService getServerByHostname tests
* Move pluralize to shared package
* SearchContext: Rename `opened` to `isOpen`
* ActionPicker story: Show auxiliary items in a separate column
* ActionPicker: Split getClusterName into two functions
getClusterName used to not return the name of the cluster if there's only
a single cluster present. Some places needed to get the cluster name
no matter what, such as the modal with resource errors that will be added
to ActionPicker.
* Refactor resource search to use Promise.allSettled
* useSearchAttempts has been renamed to useActionAttempts
* useActionAttempts returns resourceSearchAttempt in order to supply errors
from ResourcesService.searchResources to ActionPicker.
* SearchContext: Implement lockOpen
We'll want to display error details in a modal. While the user interacts
with the modal, we don't want to close the search bar and reset the results.
So instead, we are going to force the search bar to stay open until the
user closes the modal. This will use the lockOpen function from this commit.
* Add modal for showing resource search errors
* Refactor mockedSearchContext to not be a top-level mutable var
* Show an item in search bar with resource search errors
* ResourceSearchError: Add instanceof check to tests, include clusterUri in message
* Make isLockedOpen into a ref
* Use table tests for lockOpen tests
* Revert "Make isLockedOpen into a ref"
This reverts commit 07f4206cc2.
* Move capitalization to ResourceSearchError.messageWithClusterName
* ResourceSearchError: Use `public` in constructor
* Connect: Improve focus management in search bar (#24665)
* Renders user auth types to match expected capitalization for GitHub, SAML and OIDC
* Update test to use cap OIDC
* Update SAML and GitHub auth type test compare
* UI lint fix
* Applied comments for function location and import
* lint fix
* lint fix
* fix typecheck
* Do not hide any filters if the search term limits the list of clusters to just one cluster
* Rename `ExtraComponent` -> `ExtraTopComponent`
* Use `active` prop only for `InteractiveItem`
* Enroll new AWS integration flow
* Move IntegrationEnroll/* into Integration/Enroll/*
* Rename AWS into AwsOidc, story expects pascal case
but ran into non-story issues where casing was a problem
even renaming AWS to Aws wasn't enough, i don't know
why
* Capitalize browser directory to Browser
* Remove passing in clusterId for integration requests
Also define IntegrationKind as enum string values
to avoid hard coding it all over.
* Add sub routing for lazy loading AwsOidc comp
* Fix some styling, remove unused props, and add story
* Add a success dialog after creating integration
* Remove first in wording for now
* Replace teleport.lol with root cluster public URI
* revert renaming browser to Browser
* Fix lint: add license headers
---------
Co-authored-by: Ryan Clark <ryan.clark@goteleport.com>
* Add new assets for integration enroll flow
* Adapt integration status after switch to enum
* Prettier
* Fix some lints
* Rename enum numbers according to conventions
* Limit results after sorting
* Rename `sortAndLimitResults` -> `rankResults`
* Add `useResourceSearch` test, check if the items are sorted correctly
* Use `renderHook` from the testing library, fix test name
* Create a shareable tooltip no permission badge comp
* Implement the open source enroll integration screen
Copied over tile styling and header description with
minor refactoring from enterprise
* Add integration feature
This feature is manually disabled.
The user ACL for this screen is manually
set to always return false.
* Remove testing implementation detail?
* Make open source check for only integration resource access
* Update snapshot
* Move icons to design pkg to share between packages
* Moved integration routes from enterprise
* Add integrations ACL to user context
Also fixes inaccurate plugin perm checking for features.
Plugin "create" is moved to new feature flag "enrollIntegrations".
* Moved feature definition from enterprise
* Add integration service and types
Also moved Plugin type from enterprise
* Create add integration button comp for use in both OS/enterprise
* Move integration list from enteprise (refactored)
* Create open source integrations comp
* Update user.test
* Address CRs
* Make updates in response to backend PR updates
* Add clarifying comment
* Remove return value, export integration list
* Add stories for longer resource and cluster names
* Extract `PickerContainer`, improve styling of pickers and input
* Extract `FilterButton` component to avoid repeating the same code
* Add a message about excluded clusters
* Show a hint message when input is empty
* Show cluster filters only when there is more than one cluster
* Make search bar input responsive
* Review fixes
* Add a story for no results state
* Fix missing margin when input wraps
* Add license header
* Render `NoResultsItem` and `TypeToSearchItem` as extra items above regular items
* Use `calc` to calculate padding
* Fix comment
* Show TypeToSearchItem only after filter actions attempt finishes
* Run filter search synchronously
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Delete teleterm's ptyHost/v1, added by mistake
* Add package name to protos conforming to PACKAGE_VERSION_SUFFIX
* use go run in buf-connect-go.gen.yaml directly
* Run protogen in place
* Run the buf-go generation off of go run
This also adds protoc-gen-go-grpc to go.mod
Staging environments are typically less secure than production ones.
We should not include the staging feedback URL in the final packaged app
in case it gets compromised.
* Rename following naming convention
* Rename and add more db protocols
* Define new events and add event names to resource spec
* Emit events for unguided resources
Also clear the loc state if the search bar
was cleared to fix a weird quirk where
when user goes back to the select resources
screen, the preserved loc state applied
filter again
* Update tests
* Add database doc event types
This commit adds an MVP of the search bar to Connect. Currently it's
behind a feature flag (`feature.searchBar`) but we'll enable it by
default before the release. The plan was to merge the code ASAP,
potentially even straight to v12 when we have the chance, which didn't
exactly pan out but there's no harm to having this feature flag for now.
On top of that, this commit adds a new shortcut to open the search bar
(this replaces the current shortcut to open the command bar) and a
shortcut to open a new terminal tab.
The search works by essentially making a `ListResources` request for
each supported resource type to every cluster the user is logged in to.
We repurposed the old command palette UI for that but rewritten it to
use React context and hooks rather than a class and a store. This
allowed us to be a little bit more flexible as the old approach required
every picker to conform to the same interface, both in terms of UI and
code.
This implementation has two main pickers so far:
* `ActionPicker` which is the main one. It searches for resources but at
the moment it also supports applying filters. In the future, we plan
to add more actions to it such as "Open a new tab" or "Install tsh".
* `ParameterPicker` is activated when you pick an action from the
`ActionPicker` that requires an additional parameter. Think choosing
an SSH server or a db – you need to provide an SSH login or a db user
for those item. In those situations, `ActionPicker` will switch to
`ParameterPicker` and let you pick a relevant item from the list.
Everything is contained within `web/packages/teleterm/src/ui/Search`.
Arguably, `useSearch` could be refactored a little bit to maybe make its
structure a little more clear as it handles both the resource search and
the filter search. However, at the moment we're not totally sure how the
search bar will evolve, so we want to leave any bigger refactors for
later. We added a couple of basic tests for regressions that happened so
far. We also have stories for the items from the action picker.
Error handling will be added in an upcoming PR. Docs updates will be
done in a separate PR as well.
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Respect route exactness in TopNav
* Allow submitting CSRF token via form
* Skip "safe" methods in CSRF checks
* Export getXCSRFToken
* Add WithAuth2
* Passthrough "name" of FieldInput
Allows it to be used in an actual form
* icomoon: add hashtag icon
* Add GetAvailablePluginTypes to PluginService proto
* Expose ProxyPublicAddr
For use in Enterprise web Plugin
* Run prettier
* Factor out app.MetaRedirect
* Rename: WithAuth2 -> WithAuthCookieAndCSRF
* Run GCI
* Renegerate protos
New endpoints were added to the API server for fetching, creating and deleting locks.
The 'editor' role now has the ability to create, edit, and remove locks by default.
Created new SlidePanel component to easily add a panel that slides in from the right of the screen.
* Use `cloud/stable` when Automatic Upgrades is on.
Teleport provides scripts to install teleport agents/services.
Those scripts use YUM/DEB repositories when possible.
Each repo has multiple channels:
- stable/v11
- stable/v12
- cloud/stable
We want to ensure that if the cluster is running in the cloud and
automatic upgrades is on (auth service was started with
TELEPORT_AUTOMATIC_UPGRADES=yes teleport ...), then the installation
script must offer the `cloud/stable` channel.
This PR changes the following scripts:
- Discover Install Node
- Discover Install Database Service
- Install App script
- EC2 default-installer and EC2 default-agentless-installer
* add helm chart knobs to enable auto updater
* use let instead of const and remove default export
* add HA to helm chart
* always return .automatic_upgrades in web ping response
* rename cloud/stable to stable/cloud
* fix ts test
* Subscribe navigation items to clusterId updates
* Add a test for navigtion item changing correctly
* Add license to test
* Update license to match others
* Delete files
* Add new icons to discover assets
* Update context mocks for storybooking/tests
* Refactor PermissionErrorMessage
- Move file location to SelectResource directory
(only used in SelectResource comp)
- Pass ResourceKind as prop to determine action
and product name instead
* Hardcode resource specs and rename variables
- Split "resource" file into multiple parts since it
was getting so large. Database got its own file b/c
it's the biggest with potential to grow even larger
- Renamed stuff for clarity, a lot of things were getting
named "resource"
- `shouldPrompt` for type ResourceViewConfig is now optional
because resource flows will not start with "Select Resource Type"
view now (change coming in later commit) so we don't have to
skip the "first" view anymore
* Remove "Select Resource Type" as a view from resource configs
Each resource no longer needs its own "select view" as
resources are all combined into one view now (SelectResource.tsx)
* Refactor the SelectResource component
- Combines all resource kinds into one view
- Provides filtering by searching for keywords.
As discussed in meeting, we did not want to provide
like a sorting (filtering?) dropdown at this time
- Provides on hover explanation of why user can't
add resources if user doesn't have access
* Update StepItem and step Navigation
The first item of the step nav used to be "Select a Resource Type"
which used to be part of the views list. The first item is now
replaced with the resources assigned icon and the resource name.
* Refactor Discover component
Major change is now we init variables such as
indexing views and finding resource cfgs after a user has
selected a resource.
Updates how events are init and emitted
and handles user going back to the resource screen
* Remove duplicated type (defined in ResourceKind.ts)
* Minor micro changes from mostly path/variable rename/restruc
* Allows user to go back to the select resource screen
Adds a back button to the first view for each guided resource
* Update snapshot from rebasing with master
* Address Crs
* feat: user acl for device trust ui
* Update lib/web/ui/usercontext.go
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
* revert e ref to current from master
* Update web/packages/teleport/src/stores/storeUserContext.ts
Co-authored-by: Lisa Kim <lisa@goteleport.com>
* Update web/packages/teleport/src/teleportContext.tsx
Co-authored-by: Lisa Kim <lisa@goteleport.com>
* update defaultAllowRules to RW()
* commend added to highlight preset rules should be same when added to defaultAllowRules
---------
Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Lisa Kim <lisa@goteleport.com>