Commit Graph
49 Commits
Author SHA1 Message Date
Bartosz Leper 652fc7cb08 Add ValidationSuspender component (#53223)
This component makes it possible to conditionally hide validation errors
in a subset of form fields. It is required by an upcoming PR to the role
editor that satisfies the UX requirement of not showing validation
errors on newly added sections until the next explicit validation is
requested.

Also: add type information to useRule.
2025-03-28 07:44:37 +00:00
Bartosz Leper b6bd4651b0 Required markers (#52343) 2025-02-25 15:17:16 +00:00
Bartosz Leper b3904f4bc9 Support sticky tooltips in FieldInput and legend in LabelsInput (#51457)
* Support sticky tooltips in FieldInput and legend in LabelsInput

* review
2025-01-27 17:18:48 +00:00
Rafał Cieślak 3653dda622 Add basic support for target port in gateways in Connect (#50912)
* Update type for targetSubresourceName on DocumentGateway

The way DocumentsService.createGatewayDocument is implemented means that
the targetSubresourceName property is always present, but it can be undefined.

* Use "local port" instead of "port" in DocumentGatewapApp

* Rewrite gateway FieldInputs to use styled components

* Update comments in protos

* useGateway: Stabilize useAsync functions of ports

* Add padding to menu label if it's first child

* Add support for required prop to Input and FieldInput

* Add UI for changing target port

* ActionButtons: Show ports of multi-port apps when VNet is not supported

Now that we have support for the target port in Connect's gateways, we
can show the ports and then open a gateway for that specific port on
click.

* Add RWMutex to gateways

* Clear app gateway cert on target port change

* Remove gateways/app.LocalProxyURL

It was used only in tests and it made sense only for web apps anyway.

* TestTCP: Close connections when test ends

* Create context with timeout in testGatewayCertRenewal

…instead of in each function that uses it.

* Add tests for changing the target port of a TCP gateway

* Parallelize app gateway tests within MFA/non-MFA groups

* Make testGatewayConnection take ctx as first arg

This will be needed in tests that check target port validation.

* Validate target port of app gateways

* Increase timeouts in app gateway tests

* Change icons from medium to small

* Use consistent spacing in AppGateway

* Add godoc for ValidateTargetPort

* Add retry with relogin to change target port
2025-01-13 16:55:41 +00:00
Ryan ClarkandRafał Cieślak d6fa030c0e Move import sorting over to prettier (#50618)
* Move import sorting over to prettier

* Update import order

* Re-run prettier

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2025-01-02 13:36:46 +00:00
Grzegorz Zdunek 941a99301e Remove unused React imports from packages/shared (#50207) 2024-12-13 15:12:14 +00:00
Bartosz Leper db9505d169 Move tooltips to the design package (#49544)
* Validation

Adds a model-level validation capability to our validation library.

* Move tooltips to the design package

They will be later required in the SlideTabs component

* Review

* Also, rename the tooltip directory

* Also, rename the tooltip component

* review

* Never return undefined from useValidation()
2024-12-04 17:59:25 +00:00
Bartosz Leper 47fc861916 Get rid of unnecessary text colors (#47458)
* wip

* wip

* Remove the background field

* Remove the type

* Post-merge fix
2024-10-11 12:38:02 +00:00
Bartosz Leper 4543d0f8be Implement new inputs and select components (#46812)
* Implement the new inputs and fix all type issues

* Implement select controls and fix build problems

* Fix UI issues after updating inputs and selects
2024-10-03 12:38:45 +00:00
Sakshyam Shah e67f35c9e2 web: remove snapshot tests (#45034)
* remove snapshot tests

* prettier-write

* remove Users.story.test.tsx.snap

* remove ConnectDialog snapshot test

* remove unused import
2024-08-06 18:41:17 +00:00
Bartosz Leper affee361c4 Implement new in-page alerts design (#44890)
* Replace old in-page alerts with the new design

* Update snapshots

* Remove a commented out test

* Review

* Update snapshots

* Fix the alert in the DB auto-enrollment
2024-08-05 12:14:15 +00:00
Bartosz Leper 965c98d29c Implement new typography (H3, H4 header levels; paragraphs, body styles) (#44502)
* Finalize switch to the new typography

Implements H3 and beyond, new subitiles, new text body styles, and paragraphs.

* Update snapshots

* Change the resource enrollment workflow headings to H1

* Minor tweaks

- Set body2 line height to 24px
- Set input font weight to 300
- Correct the typography of small text in a couple of places

* Update snapshots

* Fix ResourceIcon story
2024-07-29 15:53:45 +00:00
Bartosz Leper 5b35579da9 Implement new H1 and H2 headings (#44252)
* Iplement new H1 and H2 headings

* Update snapshots
2024-07-17 08:38:47 +00:00
dependabot[bot]andBartosz Leper a9febc998c Bump styled-system and @types/styled-system (#43089)
* Bump styled-components from 5.3.11 to 6.1.11

Bumps [styled-components](https://github.com/styled-components/styled-components) from 5.3.11 to 6.1.11.
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Commits](https://github.com/styled-components/styled-components/compare/v5.3.11...v6.1.11)

---
updated-dependencies:
- dependency-name: styled-components
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove @types/styled-components

* Add babel-plugin-styled-components

* Fix issues after upgrading packages

* Update snapshots

* Bump styled-system and @types/styled-system

Bumps [styled-system](https://github.com/jxnblk/styled-system) and [@types/styled-system](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/styled-system). These dependencies needed to be updated together.

Updates `styled-system` from 3.2.1 to 5.1.5
- [Release notes](https://github.com/jxnblk/styled-system/releases)
- [Changelog](https://github.com/styled-system/styled-system/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jxnblk/styled-system/compare/v3.2.1...v5.1.5)

Updates `@types/styled-system` from 3.2.2 to 5.1.22
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/styled-system)

---
updated-dependencies:
- dependency-name: styled-system
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: "@types/styled-system"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix issues after upgrading styled-system

* Update snapshots

* Post-merge fixes

* Declare @emotion/is-prop-valid as an explicit dependency

* Correct formatting

* Lint

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com>
2024-07-15 12:47:54 +00:00
dependabot[bot]andBartosz Leper 4947c0d118 Bump styled-components from 5.3.11 to 6.1.11 (#43057)
* Bump styled-components from 5.3.11 to 6.1.11

Bumps [styled-components](https://github.com/styled-components/styled-components) from 5.3.11 to 6.1.11.
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Commits](https://github.com/styled-components/styled-components/compare/v5.3.11...v6.1.11)

---
updated-dependencies:
- dependency-name: styled-components
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove @types/styled-components

* Add babel-plugin-styled-components

* Fix issues after upgrading packages

* Update snapshots

* Post-merge fixes

* Declare @emotion/is-prop-valid as an explicit dependency

* Correct formatting

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bartosz Leper <bartosz.leper@goteleport.com>
2024-07-12 10:39:04 +00:00
Bartosz Leper 2dbc690617 Add types to some components in the design package (#41969)
* Add types to some components in the design package

* Review

* Post-merge fixes

* lint

* Review

* Revert @types/styled-system to 3.1.3

* Fix problems after downgrading types

* Post-merge fixes

* Reexport some types

* Fix the CliCommand loading indicator size

* post-merge fix
2024-06-17 10:43:32 +00:00
Rafał Cieślak 5c16e76c15 Add ButtonWithMenu (#39016)
* 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
2024-03-07 09:45:13 +00:00
fheinecke b178b8b732 Updated Teleport codebase to AGPL3 license (#35259)
Signed-off-by: Fred Heinecke <fred.heinecke@goteleport.com>
2023-12-01 17:48:14 +00:00
Lisa Kim 02630a6494 Web: Remove all cap and bolding for LabelInput used with inputs (#30779)
* Remove all cap and bolding for label input

* Fix proper capitalization and update snapshots
2023-08-22 14:28:20 +00:00
Yassine Bounekhla 64c3e7b25c replace icon library (#29384) 2023-08-02 20:07:43 +00:00
Lisa Kim 7fca7f14a9 Web related tweaks for access request user groups (#28455)
* Enable muting tooltip info icon

* Require user group field

* Update snapshot as a result of changing css for tooltip

* Fix user group setting for UI

* Address CR
2023-06-30 18:16:48 +00:00
Michelle Bergquist f0db2090e7 add styles to tooltip for team pages (#27417) 2023-06-07 19:35:31 +00:00
Grzegorz Zdunek 1870c80cdb Theme fixes (#24883)
* Make pagination icons a little more visible

* Use different color for `tr` border

* Use `opacity: 1` for placeholders

* Include `borderRadius` in `StyledPanel` to fix rounded corners in Connect custom tables

* Use `colors.text.primary` for items in `MenuLogin`

* Adjust Connect theme to the updated dark theme

* Remove unused component

* Update snapshots

* Remove `surfaceSecondary` and `sunkenSecondary` colors

* Remove unneeded `inherit`

* Do not hardcode bg color in `TextArea`

* Expand comment

* Simplify the look of top bar elements

* Remove unused component

* Remove `text.contrast`

* Use the same dark theme for WebUI and Connect

* Revert "Make pagination icons a little more visible"

This reverts commit 1fe1d7baec.

* Add shadow for the tabs

* Post-merge fixes

* Do not use Arial on custom buttons

* Revert snapshot changes

* Fix colors in `ActionPicker`

* Apply hover styles directly on `SearchBar` input

* Use white color for "Database Connection" header

* Add shadow directly to `StyledTabs`

* Run prettier

* Update e

* Add some top padding to the terminal

* Review fixes

* Move SearchBar hover to the Flex element

* Table-related improvements  (#25333)

* Use a better icon for the reverse tunnel cell

* Use `ButtonIcon` for pagination icons

* Fix rendering table border on Safari

* Manually add a visual separator between the table and the element below it

* Add bottom padding to resource tables in Connect

* Update snapshots

* Update snapshots

* Revert e
2023-05-04 14:52:17 +00:00
Yassine Bounekhla 1d7785971e theme-related fixes (#25119) 2023-04-26 17:55:46 +00:00
Yassine Bounekhla 5a46f044b5 add themes to webui (#24507) 2023-04-14 21:45:23 +00:00
Justinas Stankevičius 10a075cfe1 Hosted plugins onboarding prerequisites (#23234)
* 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
2023-03-31 16:05:51 +00:00
Yassine Bounekhla faecdcf3b7 Refactor theme (#23539) 2023-03-29 18:25:14 +00:00
Ryan Clark 471a82bd6f Move teleport over to Vite (#21168) 2023-03-21 18:01:53 +00:00
Lisa Kim 8aefef1ae6 [Web:Discover] Bring back db service checker (#21062)
* [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
2023-02-06 18:44:39 +00:00
Ryan ClarkandLisa Kim 9a605331f3 Remove timeouts from discover flows, fix desktop discovery (#20829)
* 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>
2023-02-06 17:52:30 +00:00
Lisa Kim e38f665de5 [Discover] Add database service checker and various db tweaks (#1481)
* 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
2023-01-05 06:47:22 +00:00
jkaczmarkiewiczandRyan Clark 09f08ab93e Enforce react-testing-library eslint rules (#1150)
* Add `eslint-plugin-{jest-dom,testing-library}`

* Enable `eslint-plugin-{jest-dom,testing-library}` rules

* Run `eslint --fix`

* refactor: apply eslint hints in FormPassword.test.tsx

* refactor: fix test in Table.test.tsx

* refactor: apply eslint hints in Table.test.tsx

* refactor: apply eslint hints in multiplefiles

* refactor: apply eslint hints in multiple files

* refactor: allow direct node access

* test: fix

* refactor: ButtonSso FileldInput

* refactor: FieldSelect

* refactor: FieldSelect

* refactor: MenuAction

* refactor: ShareFeedback

* refactor: FormLogin

* refactor: LabelSelector

* refactor: Welcome

* refactor: useUrlFiltering

* refactor: Login

* refactor: LoginTrait

* refactor: apply eslint hints in multiple files

* refactor: apply eslint hints in multiple files

* refactor: apply eslint hints in MenageDevices

* refactor: Indicator and FieldSelect tests

* refactor: Portal tests

* fix: use @testing-library/react instead of react-test-renderer

* refactor: use find without assertion

* fix: add webapps.e

* refactor: find by instead of get by+wait for

* fix: remove unused waitFor

* test: LoginTrait checkboxes count

* test: SlideTabs check tabs len

Co-authored-by: Ryan Clark <ryan@ryanclark.me>
2022-08-29 10:57:55 +02:00
Grzegorz Zdunek e9875a6966 Refactor input focusing after transition (#1071) 2022-08-03 18:05:04 +02:00
Grzegorz ZdunekandRafał Cieślak bd4866d5a4 Add ability to change port for db proxy (#900)
* 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>
2022-07-29 11:09:21 +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
Lisa Kim 631aa2f6e2 [1/3] Prettify Design Package (#953)
* Update snapshots
* Add prettier ignore file
* Update e-ref
2022-07-06 14:35:42 +00:00
Grzegorz Zdunek fb8d6e6ee4 Add ability to change db name for db proxy (#883) 2022-06-27 15:54:19 +02:00
Grzegorz Zdunek f2c8477a89 Add TextArea and FieldTextArea components (#870) 2022-06-14 11:07:27 +02:00
Lisa Kim b3398d0884 Refactor Teleport Reset/Invite Flow (#818)
* 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
2022-05-12 10:17:28 -07:00
Lisa Kim d8cc096ea1 Refactor Teleport Login Flow (#816)
- Display primary and secondary logins on different cards
- Use sliding transitions
- Allow to add passwordless device through dashboard
- Update e-ref
2022-05-10 13:04:56 -07:00
Matheus 8ccfeac7dc Add IAM method to web ui (#690) 2022-04-19 13:25:24 +00:00
Lisa Kim 28dabc20ba Fix half auto-filling OTP's for input boxes meant for it (#706)
* Update's e-ref
2022-03-30 10:59:21 -07:00
t-rutterandZac Bergquist 6fa7a9cacf Update FormLogin.tsx (#608)
* Update FormLogin.tsx

* Update FormLogin.story.test.tsx.snap

Updated FormLogin story snapshot

* Update FieldInput.tsx

Added  type 'tel' to FieldInput

Co-authored-by: Zac Bergquist <zmb3@users.noreply.github.com>
2022-03-02 23:34:38 +00:00
Grzegorz Zdunek 313bf0b12f Update build depedencies (#473) 2021-12-01 10:33:23 +01:00
Alexey Kontsevoy 43d2a39a21 Teleport V5 (#185)
* New Top Nav (#136)
* Moves AuthConnectors/TrustedClusters/Roles to the Dashboard Top Nav
* Add feature to allow user in context to perform operations on other users (#137)
* Added List/Create/Update/Delete/Reset user functionality
* Added enterprise api endpoint to OSS config
Co-authored-by: Alexey Kontsevoy <biz.kovoy@gmail.com>

* Fix handling of feature flags (#138)
* Prevent closing when there is an error with deleting user (#142)
* Alexey/v5nav (#155)
* Touch Ups (#157)
* Create a story for Teleport App (#158)
* Add Application Launcher (AAP) (#162)
* use publicAddr and clusterName URL parameters to launch apps. (#169)
* Update sideNav styles and ssh input box (#170)
* [teleport] Implement add node dialog (#165)
* [teleport] Change NodeJoinToken prop expires to expiry (#176)
* Remove empty state from NodesList (#179)
* [teleport] Add -f flag to add node curl command (#180)
* [teleport] Add app session chunk and start events (#181)
* Add Application Dialog
* Delete Force
Co-authored-by: Lisa Kim <lisa@gravitational.com>
2020-11-09 17:02:33 -05:00
Lisa KimandAlexey Kontsevoy 9ea19761b3 Typescript conversion mostly in shared package (#120)
ButtonSso/*, services/enums.js, FieldInput/*, FieldSelect/*, FormInvite/*,
FormLogin/*, FormPassword/*, MenuAction/*, Select/*, design/utils/testing.js,
TwoFaInfo, enums to types

Co-authored-by: Alexey Kontsevoy <biz.kovoy@gmail.com>
2020-07-14 10:32:57 -07:00
Lisa Kim 800c0a27ef Unit test FieldInput (#32) 2020-02-24 11:48:22 -08:00
Lisa Kim b5301e351a Prettify package shared (#27)
* Prettify *.js, *.jsx, *.json except bpf.*.json
* Remove unnecessary space in Expired.jsx
2020-02-19 09:07:57 -08:00
Alexey Kontsevoy 5e0a948f19 Move code to this repo 2019-09-12 19:37:15 -04:00