Skip to content

Printing controls to the user joining the session via tsh#46370

Closed
mvbrock wants to merge 10 commits intomasterfrom
mvbrock/display-controls-on-session-join
Closed

Printing controls to the user joining the session via tsh#46370
mvbrock wants to merge 10 commits intomasterfrom
mvbrock/display-controls-on-session-join

Conversation

@mvbrock
Copy link
Copy Markdown
Contributor

@mvbrock mvbrock commented Sep 7, 2024

Per #44371, this PR just adds 3 lines of output to a user joining a session via tsh. Before, the output was:

 % tsh join SESSIONID -m moderator
Joining session with participant mode: moderator.

root@RESOURCEID:~#

Now the user will see:

% tsh join SESSIONID -m moderator
Joining session with participant mode: moderator.
Controls
  - CTRL-C: Leave the session
  - t: Forcefully terminate the session (moderators only)
root@RESOURCEID:~#

Changelog: A user joining a session will now see available controls for terminating & leaving the session
Fixes: #44371

@mvbrock mvbrock requested review from jakule and tigrato September 7, 2024 16:47
@mvbrock mvbrock added size/sm and removed size/sm labels Sep 7, 2024
@mvbrock mvbrock removed the request for review from klizhentas September 7, 2024 16:48
Comment thread lib/client/api.go
Copy link
Copy Markdown
Contributor

@tigrato tigrato Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this part of the session handling process?
If we do that, we can make the controls more targeted for participant mode:

  • peer (only has ctrl+c)
  • observer (only has ctrl+c)
  • moderator (has ctrl+c and t)

adding these to lib/client is a bit problematic. It should be the session manager that controls these messages

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely. Makes sense that the proxy's session manager should output what it dictates.

bl-nero and others added 7 commits September 9, 2024 10:05
* Add an alert CTA label

This label allows to customize text on a button that contains the alert
link.

* Comment

* Use the new alert CTA label to display a link button

The link button replaces current visual representation of a cluster
alert, where the entire alert message is a link.

* Update api/types/cluster_alert.go

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Rename CTA to "link text"

* Rename CTA to "link text"

* review

* Remove unnecessary functions

* Update the snackbar notification design

* Review

* Review

* Get rid of min-height

* Revert e/ update

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
* Start roughly hacking on a chart for tobt

* Start templating out the deployment spec

* Add image pull secrets

* Add more configurability to deployment spec

* Pull most config into params rather than config map

* Prefer configuring using config file

* Add to index

* Allow configuration of extraEnv

* Fix extraEnv

* Update makefile to test/lint new tbot chart

* Start adding tests for `tbot` chart

* Fix spurious newline in config mpa

* Add more tests for volumes/tolerations etc

* Appease vale linting

* Add docstrings to all values

* Add required values

* Make services/outputs manually configurable

* Use simpler storage technique

* Generate docs

* Fix linting issues

* Simple -> Basic

* Add support for fullnameoverride and nameoverride

* Add extended timeout seconds to liveness and readiness probe

* Add _config.tpl with merging

* Tweak readme for latest changes

* Allow persistence to be configured and use `secret` by default

* Further add validation

* Update snapshtos

* Fix newlining in templates

* Fixes after real testing against cluster

* More value docs + derive the default output name

* fixup! More value docs + derive the default output name

* Update cpsell

* Update Chart.yaml

* Appease prose linter

* Remove unused value

---------

Co-authored-by: hugoShaka <hugo.hervieux@goteleport.com>
* Remove disablePortal prop

It was not used within the app anyway

* Get rid of ownerDocument and ownerWindow

The only situation where they'd be needed if we were handling some nodes
between iframes, but we don't use <iframe> even once in our code.
Calls to those functions can be replaced with document and window.

https://stackoverflow.com/questions/9845043/when-node-ownerdocument-is-not-window-document
https://stackoverflow.com/questions/9183555/whats-the-point-of-document-defaultview

* Remove container prop for Modal, replace Portal with createPortal

Initially I wanted to just remove the container prop, but as I sat down
to it, I realized that the whole Portal component is not necessary as
we can just replace it with calling createPortal directly.

The onRendered prop of Portal was never used, rendering the handleRendered
function unnecessary.

Similarly, handlePortalRef was set to the ref prop on Portal. This
function sets mountNode, but after we replaced ownerDocument with document,
it's mountNode is no longer being used.

* Refactor Modal to use TypeScript

* Remove RootRef

dialogRef used to point at the child of StyledModal. To get rid of
findDOMNode, we replaced it by taking children directly from the ref
set on StyledModal.

* Remove findDOMNode from Popover

* Fix types for mouse & keyboard events

* Insert whitespace between prop type declarations

* Remove link from BackdropProps comment

* Extract type for BackdropProps

* Add JSDoc for children prop
Closes #44902

Add a quick note to the Next Steps section that you can configure SSO in
order to avoid the impression that server access only works with local
users.
Updates tsh puttyconfig to resolve hosts appropriately if a match
is found in the users defined proxy templates.

Fixes #45565
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-1w053scch-goteleport.vercel.app/docs/ver/preview

@github-actions
Copy link
Copy Markdown
Contributor

🤖 Vercel preview here: https://docs-ppuwlidit-goteleport.vercel.app/docs/ver/preview

@mvbrock
Copy link
Copy Markdown
Contributor Author

mvbrock commented Sep 10, 2024

Corrupted branch with bad commits. Closing and creating new PR.

@mvbrock mvbrock closed this Sep 10, 2024
@mvbrock mvbrock deleted the mvbrock/display-controls-on-session-join branch September 10, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show commands available to an observer within a moderated session

8 participants