Commit Graph
7 Commits
Author SHA1 Message Date
Jeff Pihach 77df494cc9 Enable no-unused-vars (#1118)
* enable no-unused-vars as an error

* remove unused addApp modal functionality.

* remove unused AddDatabases popup code.

* remove unused variables.
2022-08-18 15:43:31 +00:00
Ryan Clark d6ecb12bb7 Fix the plugins for Connect so React Refresh works (#1032) 2022-07-26 13:49:39 +01:00
Rafał Cieślak 00972f09f1 Add unsafe-eval to CSP in dev mode to make source maps work (#1031) 2022-07-26 12:31:40 +02:00
Jeff Pihach 991856e137 Added eslint rule to enforce the order of file imports (#1030)
* 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.
2022-07-25 16:21:23 -06:00
Ryan Clark a35e7efbf3 Add source maps and type checking to Webpack, config improvements (#985) 2022-07-25 16:57:07 +01:00
Isaiah Becker-Mayer 099c4dda6c desktop per session mfa (#613)
* adding desktopPOC player

* updates to proper playback test websocket endpoint

* Changes EventQuery to take an EventCode in order to facilitate more comprehensible typing for AuditService.fetchEvents. Updates RecordingsService to use the general events search endpoint in order to easily add DESKTOP_SESSION_ENDED events to the response alongside regular [ssh] SESSION_END events.

* Adds logic for distinguishing between session types and displaying appropriate icon

* Deleting DesktopPlayerPOC which should not have been on this branch

* Breaks the handling of the two types of end events passed into makeRecording into two separate functions. Also types RecordingDescription

* touchups

* yarn tsc fixes

* updates storybook

* updating snapshot

* removing unused import

* adds skeleton for distinguishing between ssh and desktop recordings

* Testing connection of the playerClient

* Puts TdpClientCanvas into the DesktopPlayer

* adds toggle to PlayerClient

* small fixes

* adds an onerror to proxyServer so that websocket closures don't shut down the webpack-dev-server

* updates to match backend

* shifting preventDefaults out of TdpClientCanvas since that isn't always desired (for example with the desktop player)

* Adds a ProgressBarDesktop component and makes it respond to the new PlayerClientEvent.TOGGLE_PLAY_PAUSE event emitted by the PlayerClient

* Adds support for decoding client screen spec and using it to determine canvas size during playback. requires some code cleanup

* Some significant refactoring, DesktopSession and DesktopPlayer now both up to par in terms of function. Requires further refactoring for storybook.

* fixes storybook

* fixes codec test

* fixing build warnings

* reverts audit log changes

* removes unused type Region

* decodes the jsons that are now sent over websocket

* replace fqdm with fqdn

* Stops re-adding TOGGLE_PLAY_PAUSE listener each rerender and adds cleanup for that listener

* Make naming more precise

* removing unnecessary logging and fixing a type

* adding todo

* makes recordingType the more appropriate query param

* change let to const

* tiny fixes

* reverting

* The progress bar now moves with the recording timing

* Makes the rest of TdpClientCanvas props optional and wraps relevant logic in relevant if statements where necessary. Gets rid of ugly doNothing

* fixes event listener cleanup

* removes unnecessary prop

* Adds standard error handling display and a storybook for it

* moving detailed TODO to an issue

* changing toHuman to remove brittle reliance on iso string

* removes base64-arraybuffer, refactors base64url.ts into the more general base64.ts and uses it for base64 to array buffer translation

* fixes Storybook

* fixes validDurationMs

* Copies in base64url-arraybuffer library and modifies it for our purposes

* putting import statements in their proper place

* removes (preview) from desktop titles

* adds a hook for confirming the clipboard permissions are either granted or denied

* Moves Base64urlString type to where its needed

* removes DS_Store

* addresses code review

* simplifies and fixes durationMs logic

* adds clipboard to acl

* moves the teleport ctx init() call to the context provider, to ensure that consumers always have an initiated context

* Updates useClipboard and adds clipboard state management to DesktopSession

* Adds clipboard message

* adds code for sending local clipboard to remote over TDP

* adds clipboard decoding and syncronization with the local clipboard

* removes deprecated encodeClipboard

* Updates Main story to account for possibility of TeleportContextProvider processing the ctx.init() or ctx.init() failing

* Updates test to use new context provider

* fixes existing storybooks

* Simplifies DesktopSession rendering logic and adds a test for clipboard error

* Adds test based on storybook

* fixing comments and errors

* renaming to uppercase, apparently vscode rename didn't do the job previously

* Reverts TeleportContextProvider changes, removes teleport context from DesktopSession

* Major updates to useClipboard and dependent logic

* making useClipboard hook local to DesktopSession

* removes hasError by saying that an empty string for errorText means no error

* Fixes storybook

* simplifies error alert jsx and adds an additional test for unknown connection failure

* fixes the fact that the user was prompted for clipboard permissions even if the role had clipboard sharing disabled

* making styled component and updating snapshot

* Adds handling of the desktopSessionRecording flag to the acl and fixes the clipboard flag in the acl

* fixes the actual clipboard sharing which had been broken by changing recording to a useState variable in useDesktopSession.tsx

* code cosmetics

* CR cosmetic changes

* Adds extra check to onClipboardData

* changes allowedHosts to all since this allows for easier development of mfa stuff

* refactors useWebauthn to be generalizeable

* updating client

* fixes test

* integrates mfa challenge into DesktopSession

* fixing tests

* renaming

* cleanup from CR

* Gives all the props passed in to TdpClientCanvas their own useEffect so listeners are updated when those passed functions change. This allowed me to remove the gross useRef in useTdpClientCanvas

* small fixes and updates snapshot

* fixes useWebAuthn scope

* fixes story

* emit an error when u2f is tried

* CR and updates README with information about setting up MFA development

* turning magic numbers into constants
2022-02-22 19:50:55 +00:00
Alexey Kontsevoyandgzdunek b55dd4f2f1 Teleterm Preview (beta) (#590)
* 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>
2022-02-08 18:40:28 -05:00