React console

Note

React console lives in its own package at @patternfly/react-console

Examples

Basic Usage

Basic Usage screenshot

Props

AccessConsoles

*required
NameTypeDefaultDescription
preselectedTypeNo type infonull
textDesktopViewerConsoleNo type info'Desktop viewer'
textSelectConsoleTypeNo type info'Select console type'
textSerialConsoleNo type info'Serial console'
textVncConsoleNo type info'VNC console'

SerialConsole

*required
NameTypeDefaultDescription
onConnectrequired() => voidInitiate connection to backend. In other words, the calling components manages connection state.
onDatarequired(e: string) => voidTerminal produced data, like key-press
onDisconnectrequired() => voidClose connection to backend
colsnumberThe number of columns to resize to
fontFamilystring
fontSizenumber
innerRefReact.RefObject<any>A reference object to attach to the SerialConsole.
onTitleChanged() => voidTerminal title has been changed
rowsnumberThe number of rows to resize to
statusstring
textConnectstringText content rendered inside the Connect button
textDisconnectstringText content rendered inside the Disconnect button
textDisconnectedstring
textLoadingstring
textResetstringText content rendered inside the Reset button

VncConsole

*required
NameTypeDefaultDescription
additionalButtonsNo type info[]
clipViewportNo type infofalse
dragViewportNo type infofalse
encryptNo type infofalse
onDisconnectedNo type info() => {}
pathNo type info''
portNo type info'80'
repeaterIDNo type info''
resizeSessionNo type infotrue
scaleViewportNo type infofalse
sharedNo type infofalse
textConnectNo type info'Connect'
textConnectingNo type info'Connecting'
textDisconnectNo type info'Disconnect'
textDisconnectedNo type info'Click Connect to open the VNC console.'
viewOnlyNo type infofalse
vncLoggingNo type info'warn'

DesktopViewer

*required
NameTypeDefaultDescription
childrenReact.ReactNodenullCustom content of more-info section
rdpConsoleDetailPropTypenullConnection details for RDP
spiceConsoleDetailPropTypenullConnection details for Spice
textAddressstring
textConnectWithstring
textConnectWithRDPstring
textConnectWithRemoteViewerstring
textManualConnectionstring
textMoreInfostringText that appears in the toggle
textMoreInfoContentstring | React.ReactNodeThe information content appearing above the description list for guidelines to install virt-viewer
textMoreRDPInfostringText that appears in the toggle
textMoreRDPInfoContentstring | React.ReactNodeThe information content appearing above the description list for guidelines to install virt-viewer
textNoProtocolstring
textRdpAddressstring
textRDPPortstring
textSpiceAddressstring
textSpicePortstring
textSpiceTlsPortstring
textVNCAddressstring
textVNCPortstring
textVNCTlsPortstring
vncConsoleDetailPropTypenullConnection details for VNC
We use cookies on our websites to deliver our online services. Details about how we use cookies and how you may disable them are set out in our Privacy Statement. By using this website you agree to our use of cookies.