Commit graph

4 commits

Author SHA1 Message Date
Lisa Kim f2449a93ee
Web: Emit integration events (aws oidc) and touch ups (#26926)
* Setup global crypto test config

* Change data test-id

* Export mocks

* Emit event for aws oidc integration
2023-05-31 17:35:20 +00:00
Rafał Cieślak 6578af1efd
Connect: Remove resource cache (#21964)
* Connect: Remove resource cache

This commit refactors parts of the Electron app which still depend on
the resource cache, that is cluster sync and `tsh ssh` executed from the
command bar.

A number of adjustments has been made to executing `tsh ssh` from the
command bar, namely the logic of resolving the hostname has been moved
from the command launcher to useDocumentTerminal. The UI was also
adjusted to allow the user to reconnect to an SSH server if resolving
the hostname fails. This has a nice benefit of also allowing them to
retry if the PTY couldn't be created for some reason.

---

Before gravitational/webapps#1307, Connect was pulling all resources
from the cluster on app start and cluster login. Then it'd show them to
you in tables if you opened a new tab with cluster resources. There were
at least two problems with this approach:

1. It was slow for big clusters as pagination, filtering and sorting
   were all done client-side and blocked the main thread.
2. It wasn't possible to implement advanced search unless we copied the
   implementation from the backend to tshd.

gravitational/webapps#1307 made it so that instead of depending on that
resource cache to show resource tables, Connect would pull paginated
resources from the backend.

However, the resource tables were not the only part of the app depending
on that cache. Due to time constraints, we weren't able to refactor all
of them. We managed to refactor autocomplete (gravitational/webapps#1406)
and the remaining places are listed in #21800.

This PR refactors those remaining places to not use the cache by either
not depending on resource details or by making a call to the proxy
instead.

* Add missing license
2023-02-27 15:32:19 +00:00
Jeff Pihach 26f6022689
Initial pass at lint and test GHA for UI. (#21110)
* Initial pass at lint and test GHA for UI.

* Fix lint

* Add --frozen-lockfile

* Skip the e directory if it doesn't exist while linting.

* Update failing snapshots.

* use a more reasonable filter for eslint to support missing e

* ignore type check on e imports.

* ignore failing file that requires e teleterm file.

* fix lint

* quiet down the log output for prettier-write.
2023-02-02 22:56:55 +00:00
Ryan Clark 27ad839d47
Move jest, eslint & prettier to the root (#20698)
* Move jest, eslint & prettier to the root

* Update e ref
2023-01-25 17:19:22 +00:00
Renamed from web/jest.config.js (Browse further)