Partnership phase 0: terminal link + clickable command block

At phase 0, show below the buttons:
- 'Open Terminal' link using HOST1's Tailscale IP (/webterminal/ttyd/)
- Clickable command code block (click to copy) with the Phase 1 script path
- Note that tab auto-updates on next poll when the script completes

Tailscale IP comes from selfNode.ts_ip already in the API response.
This commit is contained in:
Gmer4Lfe
2026-05-30 21:02:27 -04:00
parent 95fd38799d
commit 4449bfc646
+15 -3
View File
@@ -382,9 +382,21 @@ function _renderActions(nodes, cfg) {
html += '</div>';
if (phase === 0) {
html += `<div style="font-size:10px;color:#444;margin-top:6px;">
Phase 1 pushes SSH keys and master.conf to ${remote.hostname} before it has Varaverk installed.
${remote.id} can then install the plugin — the wizard will detect the conf and complete setup automatically.
const termUrl = selfNode && selfNode.ts_ip ? `https://${selfNode.ts_ip}/webterminal/ttyd/` : null;
const termCmd = `bash /mnt/user/appdata/Varaverk/Partnership/partnership_onboard.sh --phase1-only`;
html += `<div style="margin-top:8px;font-size:10px;color:#555;">
<div style="margin-bottom:5px;">First run requires terminal access for SSH key password.</div>
<div style="display:flex;align-items:center;gap:8px;flex-wrap:wrap;">
${termUrl ? `<a href="${termUrl}" target="_blank"
style="font-size:10px;padding:3px 10px;background:#1a2a3a;color:#7ab;border:1px solid #2e4a6b;
border-radius:3px;text-decoration:none;white-space:nowrap;">🖥 Open Terminal</a>` : ''}
<code style="font-size:9px;color:#666;background:#111;padding:3px 7px;border-radius:3px;
border:1px solid #222;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;
white-space:nowrap;cursor:pointer;"
onclick="navigator.clipboard.writeText('${termCmd}').then(()=>{this.style.color='#4caf50';setTimeout(()=>this.style.color='',1200)})"
title="Click to copy">${termCmd}</code>
</div>
<div style="margin-top:4px;color:#333;">Tab auto-updates when complete · or click Push Conf if key already installed.</div>
</div>`;
} else if (phase === 1) {
html += `<div style="font-size:10px;color:#444;margin-top:6px;">