mirror of
https://github.com/tale/headplane.git
synced 2026-08-10 05:56:52 +00:00
fix: upgrade to new tailscale go version to fix ssh
This commit is contained in:
@@ -16,8 +16,8 @@ export default function Expire({ machine, isOpen, setIsOpen }: ExpireProps) {
|
||||
This will disconnect the machine from your Tailnet. In order to
|
||||
reconnect, you will need to re-authenticate from the device.
|
||||
</Dialog.Text>
|
||||
<input type="hidden" name="action_id" value="expire" />
|
||||
<input type="hidden" name="node_id" value={machine.id} />
|
||||
<input name="action_id" type="hidden" value="expire" />
|
||||
<input name="node_id" type="hidden" value={machine.id} />
|
||||
</Dialog.Panel>
|
||||
</Dialog>
|
||||
);
|
||||
|
||||
Vendored
+8
-7
@@ -39,15 +39,16 @@ type IPNState =
|
||||
| 'Running';
|
||||
|
||||
interface XtermConfig {
|
||||
Rows: number;
|
||||
Cols: number;
|
||||
rows: number;
|
||||
cols: number;
|
||||
timeout?: number;
|
||||
|
||||
OnStdout: (data: string) => void;
|
||||
OnStderr: (data: string) => void;
|
||||
OnStdin: (func: (input: string) => void) => void;
|
||||
onStdout: (data: string) => void;
|
||||
onStderr: (data: string) => void;
|
||||
onStdin: (func: (input: string) => void) => void;
|
||||
|
||||
OnConnect: () => void;
|
||||
OnDisconnect: () => void;
|
||||
onConnect: () => void;
|
||||
onDisconnect: () => void;
|
||||
}
|
||||
|
||||
interface SSHSession {
|
||||
|
||||
@@ -81,24 +81,26 @@ export default function XTerm({ ipn, username, hostname }: XTermProps) {
|
||||
|
||||
let onUnload: ((e: Event) => void) | null = null;
|
||||
const session = ipn.OpenSSH(hostname, username, {
|
||||
Rows: terminal.rows,
|
||||
Cols: terminal.cols,
|
||||
rows: terminal.rows,
|
||||
cols: terminal.cols,
|
||||
|
||||
OnStdout: (data) => terminal.write(data),
|
||||
OnStderr: (data) => {
|
||||
onStdout: (data) => terminal.write(data),
|
||||
onStderr: (data) => {
|
||||
terminal.write(data);
|
||||
console.log('SSH stderr:', data);
|
||||
toast(data);
|
||||
},
|
||||
OnStdin: (func) => {
|
||||
onStdin: (func) => {
|
||||
console.log('SSH session is ready to receive input');
|
||||
inputRef.current = func;
|
||||
console.log('Stdin handler set', func);
|
||||
},
|
||||
OnConnect: () => {
|
||||
onConnect: () => {
|
||||
console.log('SSH session connected');
|
||||
setIsLoading(false);
|
||||
},
|
||||
|
||||
OnDisconnect: () => {
|
||||
onDisconnect: () => {
|
||||
ro?.disconnect();
|
||||
terminal.dispose();
|
||||
if (onUnload) {
|
||||
@@ -156,8 +158,8 @@ export default function XTerm({ ipn, username, hostname }: XTermProps) {
|
||||
</div>
|
||||
) : undefined}
|
||||
<div
|
||||
ref={container}
|
||||
className={cn('w-full h-full', isLoading ? 'opacity-0' : 'opacity-100')}
|
||||
ref={container}
|
||||
/>
|
||||
{term.current && isResizing ? (
|
||||
<div
|
||||
@@ -172,7 +174,7 @@ export default function XTerm({ ipn, username, hostname }: XTermProps) {
|
||||
{isFailed ? (
|
||||
<div
|
||||
className={cn(
|
||||
'absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2',
|
||||
'absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-center',
|
||||
'px-4 py-2 bg-headplane-800 text-white rounded-full shadow z-50',
|
||||
)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user