* update storybook dependencies to resolve some dependabot issues.
* remove config that's already set to the default
* Resolve prettier issues after dep update.
* Pin x-default-browser version to resolve dependabot vulnerability.
* Use event.code for non A-z keys
Without this fix, shortcuts like "Shift+1" can't work, because the reported character is "!".
* Add Zod schema to validate keyboard shortcuts
* Render better formatted error notification, add a link to docs
* Notify about duplicated accelerators
* Improve the error message for re-parsing failure (it can happen when a default value does not pass validation)
* A bunch of renames
* Allow spaces in accelerators
* Rename `isContentAnObject`
* Allow `Notification` to render links and lists
* Split by optional whitespace and "+"
* Allow lowercase letters
* Require a modifier for non-function keys
* Move VALID_SHORTCUT_MESSAGE to `initUi`
* Always return from `getDuplicateAccelerators`
* Use 'Cmd' and 'Ctrl' for mac
* Add comments
* Fix notification not rendering content
* Add more comments, rename `getKeyCode` to `getKeyName`
* Fix incorrect size of <Link> text
* Remove "expected" prefix
* Revert `typeof content === 'object'` in `Notification`
* Remove a comment about disabled keys in `ConfigService`, add a note about `keymap.` prefix
* Improve `getKeyName` comment
* Extract an inline object to a variable in `getKeyName`
* Fix notification list padding
* Change text for doc link & description for config error
* Improve comment for `getKeyName`
* Remove special formatting for list === 1 in `Notification`
* Print valid modifiers
* Call `getKeyboardShortcutSchema()` once
* Collect issues from all validations, run `invalidModifiers` through a set
* Change error message for `missingModifierIssue`
* Convert duplicates warning to error
* Define ALLOWED_KEY_CODES in a more concise way
* Support both `IntlBackslash` and `Backquote`
* Restore modifiers for mac to full spelling, sort them in order recommended by platform guidelines
* Fix old comment about the shortcuts order
---------
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* Create new local util lib to replace lodash.
* Replace usage of isInteger and debounce from lodash with highbar.
* Create isObject and runOnce utility methods.
* remove use of at, isObject, and once lodash method usage.
* remove map and transform lodash calls.
* Add memoize function to highbar.
* remove memoize lodash usage.
* remove merge and isEqual lodash methods and update other missing refs to highbar.
* convert the throttle to debounce.
* add throttle method to highbar.
* use the new throttle method instead of debounce where necessary.
* Add mergeDeep function for init config merge.
* remove lodash from the build process.
* Fix introduced bug in workspacesService.
* Added tests for highbar mergeDeep and expanded its functionality to support arrays.
* review updates.
* Added types to mergeDeep function.
* Add missing MapCache prototype methods.
* Add license notices, types and missing hash code.
* First pass at compare an array objects function.
* use new compareArrayObjs fn
* Add missing not
* Added types to arrayObjectIsEqual
* Add tests for arrayObjectIsEqual and fix some edge case bugs.
* update util fn name
* [Backend]: allow more db fields to be updatable
* Add preventing duplicate keys for label creator
* Add sort compare fn helper
* Update db request update object
* Update CreateDatabase component
- Uncomment and touch up db service checker
- Fix db service label checking
- Allow user to make changes to updatable db fields
- Split defining db name and the other fields into
two views, to prevent user from changing the db name
which is not allowed with the update action
* Address CR: use nil value to determine CACert update
* Few more touch ups
- address CR: don't OR update db request field CACert
and use consistent camelCasing
- remove the skip button for deploying service since
we have the service checker now, which auto skips it
for user if detects service
- refactor label matching for both register database
and deploy service steps
* Address CR: make all fields updatable
* Update service polling after rebase
* Allow for inputs to be disabled
* Remove timeouts from the discover workflows
* Correct the resource type to be cleared on unmount
* Update test snapshots
* Rename useJoinToken to useJoinTokenSuspender
* Remove TODO
* Simplify usePoll
* Simplify the hint box code, add a shared hook
* Add the generte command button back to db flow
* Store the joinToken in PingTeleportContext state instead of using the hook
* Fix rebase diff mistake
* Fix bug with polling for result
- once we get the result, we set the result
back to null, so we can't proceed to next step
---------
Co-authored-by: Lisa Kim <lisa@goteleport.com>
* Create ToolTipInfo component
* Update FieldInput to accept optional tool tip content
* Temp fix for story viewing timed out polling state
* Support different informational texts depending on database
* Add database service checker to determine if we can skip next step
* Enable AWS RDS postgres flow
* tshd events: Wait for listeners before responding
When tshd is sending the relogin event, it needs to be able to know when
the Electron app has finished relogging the user. I wanted to implement
this by simply waiting for the response from the RPC.
I'm so glad we did not use gRPC streams for tshd events as this would be
much harder to implement with streams.
* Return a function from ModalsService.openDialog which closes dialog
With the introduction of important and regular modals, this will help us
close the specific dialog if need arises.
* Make tshd events listeners aware of request cancellation
This will be useful in the upcoming commits. Basically, tshd is going to
ask the Electron app to relogin the user, with a 1 minute timeout.
The Electron app will show a login modal but if the user doesn't submit
it within 1 minute, tshd is going to cancel the request.
In that situation, we need to be able to close the modal.
* Add support for passing reason in DialogClusterConnect
* Add support for important modals
This will let us show the relogin modal on expired cert, even if the user
was using some other modal at that moment.
* Remove title attr from notification text
The user can read more by expanding the notification. The title attribute
persisted even after expanding the notification, making reading it harder.
* Add WindowsManager.forceFocusWindow
* Use IAppContext instead of AppContext
The next commit is going to add a private method to AppContext.
IAppContext is an interface which enables us to pass a mocked version of
AppContext in tests. That mock is not going have that private method,
so any place accepting AppContext wouldn't be able to accept the mocked
AppContext.
Instead, classes & functions should accept IAppContext rather than AppContext.
* Implement handlers for new tshd events
tshd needs to be able to do two things:
- Ask the user to log in again.
- Forward errors from goroutines running gateways to the Electron app
in form of a notification. Otherwise those error would be visible
only in the logs.
* Don't restart gateways after logging in
Restarting the gateways on login was a workaround from times where gateways
didn't manage their own certs.
In the new flow, a gateway takes care of refreshing the certs itself
through the middleware passed to alpnproxy.LocalProxy.
syncRootClusterAndRestartClusterGatewaysAndCatchErrors used to call two
functions:
- syncRootClusterAndCatchErrors
- restartClusterGatewaysAndCatchErrors
The second function is no longer necessary, so we can make any place that
was calling syncRootClusterAndRestartClusterGatewaysAndCatchErrors
call just syncRootClusterAndCatchErrors instead.
* Refactor `DocumentGateway`
* Update protobuf files
* Do not hide port input on reconnect
* Update port of gateway connection when doc gets updated
Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
* add import order lint rule.
* auto fix import order and spacing.
* prettier fix.
* manual fix of import order.
* update failing snapshots.
* bump e submodule for import order fixes.
* Create/Use buttons for text button so users can focus with keyboard
* Various small tweaks
- Add a refocus indicator to FieldInput
- Tweaked StepSlider to handle edge cases like growing height
from error dialogues on initial render
- Pass on deviceName to reset endpoints
* Update e-ref
- Display primary and secondary logins on different cards
- Use sliding transitions
- Allow to add passwordless device through dashboard
- Update e-ref
* Add required prop to MenuLogin
This will be needed for the db name dropdown, where the value is optional.
* Update proto files
* Include targetSubresourceName when creating a gateway
* Set better title for gateway tab
* Fix long document titles breaking connection tracker's UI
* Move useAsync to the shared package, add docs
* Add async variant of MenuLogin
* Add Teleport Connect version of MenuLogin to its story
* Update gRPC files
* Show database username suggestions
* Use JSdoc in useAsync
Co-authored-by: Grzegorz Zdunek <gzdunek@users.noreply.github.com>
* Convert useAsync to a named export
* Refactor MenuLogin to use useAsync underneath
* Rewrite useAsync to use a promise instead of async
The Web UI currently doesn't support `async`. To do this, we'd need to
configure polyfills there, but we don't have time for that right now.
* Replace async with promise in MenuLogin
Co-authored-by: Grzegorz Zdunek <gzdunek@users.noreply.github.com>
* Remove unnecessary code related to gateway creation
* Rename MenuSshLogin to MenuLogin
* MenuLogin: Accept placeholder as a prop
* Use dropdown for the db connect button
* Rename MenuLogin's onOpen to getLoginItems
* MenuLogin: Convert default export to named export
This prevents password managers like 1password from attempting to
autocomplete the SSH login, which is not a standard password field.
Fixesgravitational/teleport#10356
Co-authored-by: Lisa Kim <lisa@goteleport.com>
* first version
* Fix build
* Fix
* fixes
* add app context
* Add Navigator
* more screens
* add cluster
* grpc
* Add gateways
* add node-pty
* add tshd daemon
* add main process quick reload
* add tsh access
* Use default terminal shell and add context menu (#444)
* node-pty errors
* Fix build process and include `tsh` in the package (#451)
* Use single `package.json` config
* Include `tsh` in app package
* fix linux package target
* add global search
* fix tsc (errors) build step
* Add mocks
* Add logging to file (#455)
* minor cleanups
* Add keyboard shortcuts service (#462)
* add sync statuses for teleport resources
* add teleterm icon (#470)
* Fix dev reloads of main process
* minore bug fixes
* implement auth
* update webpack configs to v5 (#492)
* arrange the cards evenly depending on the available space & add drag and drop (#486)
* fix text truncation on tabs
* Add logout and cluster removal
* Add context menu to clusters (#500)
* Add tabs shortcuts & open new tab basing on active tab (#495)
* Make xterm understand resize sequence (#507)
* use `Immer` in teleterm store (#516)
* Add apps and kubes
* Teleterm bugfixes (#519)
* add command palette
* Replace Gateways with Connections
* add tc
* Clean up
* Add basic config service (#526)
* add fonts config (#528)
* Fix resize bug
* Minor teleterm fixes (#531)
* remove exit code checking before closing a tab
* prevent closing `home` tab
* Fix crashing errors
* Remove Roles and Activities
* Remove GlobalSearch
* Add context menu to tab items (#533)
* make quickIInput always visible on top
* Add workspace service (#538)
* Add recently opened documents to workspace (#547)
* add recently opened documents to workspace
* review fixes
* review fixes
* add `ClusterConnect` component
* remove the `close` item and electron help items from the app menu (#560)
* improve navigator behaviour (#565)
* improve navigator behaviour
* Add new connection handling
* Add username to gateways
* add kube connect command
* Gateway should render instructions per DB protocol
* Address design changes
Co-authored-by: gzdunek <gzdunek@users.noreply.github.com>