* WebDiscover: Add custom input fields for database test connection with asterisks
* Add specific validation rule and add tests
* Update database fixture for testing
* add spanner to tsh and teleterm
* handle spanner events in web ui
* update web audit events test snapshot
* customize web ui connect for spanner
* update ConnectDialog snapshot
* Web: update SlideTabs to render spinner depending on condition
* Web: Add async version of FieldSelectCreatable
* Web: Allow modifying fetched resources with useKeyBasedPagination
* Web: Add yaml parse/stringify api endpoints and types
* Web: Allow input search bgColor to take on parents bgColor
* Address CRs
* Update snaps and test
* Move `teleport.e/AccessRequests` to `shared/components/AccessRequests`
The last commit from teleport.e that includes the original files: gravitational/teleport.e@5ca6881e29
* Move `teleport.e/services/accessRequests` to `shared/services/AccessRequests`
* Move `teleterm.e/ui` to `teleterm/ui`
* `make fix-license`
* Fix imports
* Run prettier and eslint
* Rename stories
* Remove ts-ignore comments
`accessRequestsService.test.ts` was refactored slightly,
we don't need assumed requests there at all.
* Remove Assist command execution and chat feature
The changes remove tests and related code for command execution in the assist package and web command handling.
* Remove the Assist UI
---------
Co-authored-by: Jakub Nyckowski <jakub.nyckowski@goteleport.com>
* Add AWS AccountID to IAM Roles in AWS App Access
* add story
* Use named export
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Add JSDoc comments to StepComponentProps
* Vendor in react-merge-refs
* FilterableList: Ignore case when filtering
* Make VNet connection item behave like other items
* Refactor VNet toggle to maintain focus between state transitions
* Always enable VNet in tests
* Add tests for navigating connections
* Switch "get roles" endpoint to the paginated version
* Use the paginated API in the roles screen
* Use the paginated API in the locks screen
* Switch select components for roles to an async version
* Do not break backward compatibility of list roles endpoint
* Allow the new web UI to handle old response types
* Disable pagination buttons in the serverside table when loading data
* Add TODO item about rename
* Add `UrlListRolesParams`
* Remove pagination config
* Remove unused `UrlIntegrationExecuteRequestParams`
* Add functions to clone every gRPC method, so they can be passed over the context bridge
* Replace `@grpc/grpc-js` interceptors with `@protobuf-ts/runtime-rpc` ones
* Replace string check with check on metadata, add missing `AddMetadataToRetryableError`
* Add `pin` to sensitive properties
It's needed because now we also log a passwordless login stream call.
* Add `cloneClient` method to clone the entire gRPC client
* Switch tests to `TshdRetryableError`
* Improve comments
* Move `cloneClient` and `cloneAbortSignal` to the top of the file
* Simplify condition
* Lowercase logs
* Check if the error is `RpcError` using `instanceof`
* Log error object instead of `[object Object]`
* Do not export call specific types
* Wrap gRPC calls in `createClient` to allow passing the errors over the context bridge (#39230)
* Regenerate protos with the `protobuf-ts` client
* Enable `strictBindCallApply` so `.bind()` results have correct types (instead of `any`)
This is needed for wrapping calls in `createClient`.
* Use `protobuf-ts` client instead of `grpc-js` one
* Convert `createClient` to use `protobuf-ts` response style, clone each call
* Switch callsites to `cloneAbortSignal`
* Replace `error.message` checks with a proper check on the error status code
* Clone the entire client instead of each method separately
* Correct the error `cause` in `ResourceSearchError`
* Remove `params.sortBy` defaults, always set `startKey` to string
* Use a simpler type for `reportUsageEvent`
* Fix interceptor test
* Ignore TS error in `highbar.ts`
* Update eslint-plugin-jest to 27.9.0
https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md#2600-2022-01-24https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md#2700-2022-08-28
I switched plugin:jest/all to plugin:jest/recommended, since /all just
activates every rule in the package. This might have been fine when this
package was added a couple of years ago, but it doesn't make sense anymore.
27.0.0 requires parserOptions.project to be set, but this returned an error:
0:0 error Parsing error: ESLint was configured to run on
`<tsconfigRootDir>/web/packages/teleport/vite.config.mts` using `parserOptions.project`:
/users/rav/src/teleport/tsconfig.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
I updated tsconfig.node.json so that it applies only to .mts files, as
I understand that was the original intention.
* Autofix jest/valid-title
* Do not set parserOptions.project
It makes ESLint slower by ~20s and it is not needed for recommended rules
from eslint-plugin-jest.
* Add ButtonWithMenu
* Use ButtonWithMenu in DocumentCluster/ActionButtons
* Reorganize DocumentCluster story
Put ActionButtons into a separate category. Move the happy path as the
first story for DocumentCluster.
* Import ComponentType
* Update snapshots
* Move `TextSelectCopy` to design package
* Show only URL to app instead of curl example
* Move `TextSelectCopy` to `shared`
* Show loading spinner when `changePortAttempt` is processing
* Make the button revert to "Copy" after clicking
* Move Online DocumentGatewayApp story to be the first one
This way the happy path opens first when you open the relevant story section.
* Adjust the story to showcase the spinner
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Table tweak
- move table prop types to types file
- add a custom component field for pagination config
* FieldSelectCreatable: pass in custom props
* api.ts: add/set another error related field
Sometimes the backend can respond with a list of other related
error messages but in another field called `messages`
* Clarifying comments
* Fix grammar
* feat: save content as file
* add min height to have consistent height on empty text
* run linter and update snapshot
* move download icon to the right of copy icon
* increase left padding when showing download icon
* accomodate vertical and horizontal scroller and icon button view
* move download function to shared utils
* rename downloadContentAsFile to saveOnDisk, unit test
* original style with increased padding for download icon
* Support SAML apps
* Add stories
* Add articles
* Remove 'app' from copy in the search bar
* Replace ternary condition with simple ifs
* Make test name more grammatically correct
* Report opening AWS and SAML apps
* Display button as link
* `it` -> `test`
* Move `AwsLaunchButton` to `shared`
* Move generating `launchUrl` to the parent
* Align styling of `AwsLaunchButton` with other action buttons
* Add AWS roles to proto
* Return AWS roles from tshd
* Launch AWS apps from resources view
* Set `textTransform="none"` on all buttons to align them with `AwsLaunchButton` (and Web UI in general)
* Change suggestions passed to `ParameterPicker` to be objects, so they can show a displayable name on the list
* Allow launching AWS apps form the search bar
* Move `AwsRole` to `shared/services/apps`
* Rename fields, add JSDoc
* Fix lint issue
* `make grpc`
* Display 'No roles found' in the search bar when the AWS app doesn't provide any
* `awsRolesList` -> `awsRoles`
* Do the check against correct attempt
* Use MoreVert instead of ChevronDown for web app button in Connect (#37406)
* Clean up URIs in tshd test helpers
* Add missing apps in stories
* Use MoreVert instead of ChevronDown for AWS apps
* Use https instead of cloud for AWS endpoints
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Move Teleport connect over to Vite
* Clean up the Electron Vite config
* Add mts to prettier/eslint
* Add license headers
* Dedupe @babel scope
* Remove console.log from mainProcess
* Set suggestedReviewers on CreateAccessRequestRequest
* Remove unneeded code added from strict null checks
* Move out dir to build/app
On masted it's build/app/dist.
We don't want to use build directly, as the app is being packaged in
build/release.
* Move Node-only deps to dependencies
https://electron-vite.org/guide/dev#dependencies-vs-devdependencies
cross-env has been removed since it's not needed at all.
* Remove eval warning suppression
* Fix default path of tsh
* Rename dev-term to start-term-skip-native-deps
* Use correct `oneofKind` value for `ptyEventOneOfIsStartError`
* Undo strict null check changes
* Correctly construct env vars struct for shell
Based on https://stackoverflow.com/a/66989401
* Allow reloading renderer app
* Move JSDoc for TshdEventContextBridgeService to correct position
* Remove outdated comment about type casting in tshdEvents/index.ts
* Drop type cast for error.cause['message']
* Ignore teleterm's build dir in .eslintignore
**/dist/** has been removed from ignorePatterns because it's no longer
necessary, neither Web UI nor Connect build in a dir matching this pattern.
* Define NODE_ENV for main and renderer
* Define only NODE_ENV, not whole process.env
Otherwise process.env in the main process is always replaced with an
object containing just NODE_ENV.
We need process.env to be properly populated since it's then used when
spawning tsh daemon and other processes.
Using define like this guarantees that only callsites using
process.env.NODE_ENV directly will be affected.
* Add support for the cluster preferences backend mismatch from the gRPC UserPreferences object
* Return resourceIds from preferences, convert preferences before updating
* Future proof all of the clusterPreferences object getting converted correctly
* Fix cluster preferences for leaf clusters
* Use correct `AssistViewMode` enum, remove the old one and unused interface
* Lint fix
* Add back in JS protobuf stuff, it can be removed in a later PR
* Remove `List` from property
* Add license header
* Remove console.logs
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
Co-authored-by: Grzegorz Zdunek <grzegorz.zdunek@goteleport.com>