import Button from "@material-ui/core/Button" import Popover from "@material-ui/core/Popover" import { makeStyles } from "@material-ui/core/styles" import CloudIcon from "@material-ui/icons/CloudOutlined" import { useRef, useState } from "react" import { CodeExample } from "../CodeExample/CodeExample" import { Stack } from "../Stack/Stack" import { HelpTooltipLink, HelpTooltipLinksGroup, HelpTooltipText } from "../Tooltips/HelpTooltip" export interface SSHButtonProps { workspaceName: string agentName: string defaultIsOpen?: boolean } export const SSHButton: React.FC> = ({ workspaceName, agentName, defaultIsOpen = false, }) => { const anchorRef = useRef(null) const [isOpen, setIsOpen] = useState(defaultIsOpen) const id = isOpen ? "schedule-popover" : undefined const styles = useStyles() const onClose = () => { setIsOpen(false) } return ( <> Run the following commands to connect with SSH:
Configure ssh{" "} - only needs to be run once, or after managing workspaces
Connect to the agent
Install Coder CLI Configuring Web IDEs SSH configuration
) } const useStyles = makeStyles((theme) => ({ popoverPaper: { padding: `${theme.spacing(2)}px ${theme.spacing(3)}px ${theme.spacing(3)}px`, width: theme.spacing(38), color: theme.palette.text.secondary, marginTop: theme.spacing(0.25), }, codeExamples: { marginTop: theme.spacing(1.5), }, codeExampleLabel: { fontSize: 12, }, textHelper: { fontWeight: 400, }, }))