Add a standby control plane with server add, and draw the screens as windows
server add gives another machine this llmgw, a certificate, the configuration and store address, lets it into the store through Patroni, and starts it; --vip keeps a floating address on the leader with keepalived, following a new /leader endpoint. Nodes learn every control plane from the leader and notice a dead one by HTTP/2 ping instead of after the kernel's fifteen minutes. The setup, console, node and init screens are drawn full screen in one frame: title bar, sidebar, bordered panel, key bar, dialogs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f5c79052b1
commit
aa3efcebbe
31 files changed
+1856
-394
No files matched your search
+162
-118
@@ -169,7 +169,10 @@ type setupModel struct {
|
||||
spin spinnerModel
|
||||
formErr string
|
||||
width int
|
||||
quit bool
|
||||
height int
|
||||
// scroll is how far the panel is scrolled, reset with each page.
|
||||
scroll int
|
||||
quit bool
|
||||
// single is the choice of one machine: the screen closes and init's own
|
||||
// form takes over.
|
||||
single bool
|
||||
@@ -182,7 +185,7 @@ func newSetupModel(host string, ips []string) setupModel {
|
||||
names.Placeholder, names.CharLimit, names.Width = "llm.example.com, 203.0.113.10", 400, 40
|
||||
return setupModel{
|
||||
ref: &progRef{}, host: host, ips: ips, admin: admin, names: names,
|
||||
db: [2]dbMachine{newDBMachine(1), newDBMachine(2)}, spin: newSpinner(), width: 100,
|
||||
db: [2]dbMachine{newDBMachine(1), newDBMachine(2)}, spin: newSpinner(), width: 100, height: 30,
|
||||
log: &[]string{}, logMu: &sync.Mutex{},
|
||||
}
|
||||
}
|
||||
@@ -199,8 +202,8 @@ func (m setupModel) thisAddr() string {
|
||||
func (m setupModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
switch msg := msg.(type) {
|
||||
case tea.WindowSizeMsg:
|
||||
m.width = msg.Width
|
||||
m.run.width = msg.Width
|
||||
m.width, m.height = msg.Width, msg.Height
|
||||
m.run.width = msg.Width - navWidth - 6
|
||||
case spinTickMsg:
|
||||
var cmd tea.Cmd
|
||||
m.spin, cmd = m.spin.Update(msg)
|
||||
@@ -224,12 +227,32 @@ func (m setupModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
m.quit = true
|
||||
return m, tea.Quit
|
||||
}
|
||||
return m.key(msg)
|
||||
before := m.page
|
||||
next, cmd := m.key(msg)
|
||||
if nm := next.(setupModel); nm.page != before {
|
||||
// A new page starts at its top.
|
||||
nm.scroll = 0
|
||||
return nm, cmd
|
||||
}
|
||||
return next, cmd
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (m setupModel) key(k tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
// A dialog open takes the next key, whatever it is, to close it.
|
||||
if m.formErr != "" {
|
||||
m.formErr = ""
|
||||
return m, nil
|
||||
}
|
||||
switch k.Type {
|
||||
case tea.KeyPgDown:
|
||||
m.scroll += max(1, m.height-8)
|
||||
return m, nil
|
||||
case tea.KeyPgUp:
|
||||
m.scroll = max(0, m.scroll-max(1, m.height-8))
|
||||
return m, nil
|
||||
}
|
||||
if k.Type == tea.KeyEsc && m.page > pWelcome && m.page < pRun && !m.checking {
|
||||
m.page--
|
||||
if m.page == pWait {
|
||||
@@ -627,78 +650,95 @@ func (m *setupModel) startRun() tea.Cmd {
|
||||
}
|
||||
}
|
||||
|
||||
func (m setupModel) View() string {
|
||||
var b strings.Builder
|
||||
b.WriteString(sTitle.Render("llmgw · setup") + " " + sDim.Render(m.crumbs()) + "\n\n")
|
||||
switch m.page {
|
||||
case pWelcome:
|
||||
b.WriteString(m.welcomeView())
|
||||
case pAdmin:
|
||||
b.WriteString(m.adminView())
|
||||
case pMachines:
|
||||
b.WriteString(m.machinesView())
|
||||
case pWait:
|
||||
b.WriteString(m.waitView())
|
||||
case pCheck:
|
||||
b.WriteString(m.checkView())
|
||||
case pPlan:
|
||||
b.WriteString(m.planView())
|
||||
case pRun:
|
||||
v := m.run.View()
|
||||
if i := strings.Index(v, "\n\n"); i >= 0 {
|
||||
v = v[i+2:] // its own title; this screen has one
|
||||
}
|
||||
b.WriteString(v)
|
||||
if m.finished {
|
||||
if m.run.err == nil {
|
||||
b.WriteString("\n" + sDim.Render("The same, from a script, with ssh keys in place:") + "\n" + m.command() + "\n")
|
||||
}
|
||||
b.WriteString("\n" + sDim.Render("enter or q to leave") + "\n")
|
||||
}
|
||||
}
|
||||
if m.formErr != "" {
|
||||
b.WriteString("\n" + sBad.Render(m.formErr) + "\n")
|
||||
}
|
||||
return b.String()
|
||||
// setupSteps are the sidebar's steps, by page.
|
||||
var setupSteps = []struct {
|
||||
label string
|
||||
page setupPage
|
||||
}{
|
||||
{"Start", pWelcome}, {"Administrator", pAdmin}, {"Machines", pMachines},
|
||||
{"Checks", pCheck}, {"Plan", pPlan}, {"Install", pRun},
|
||||
}
|
||||
|
||||
func (m setupModel) crumbs() string {
|
||||
steps := []string{"start", "administrator", "machines", "checks", "plan", "install"}
|
||||
if m.choice == 0 {
|
||||
return steps[0]
|
||||
func (m setupModel) View() string {
|
||||
at := m.page
|
||||
if at == pWait {
|
||||
at = pMachines
|
||||
}
|
||||
at := int(m.page)
|
||||
switch {
|
||||
case m.page == pWait:
|
||||
at = int(pMachines)
|
||||
case m.page > pWait:
|
||||
at--
|
||||
}
|
||||
var out []string
|
||||
for i, s := range steps {
|
||||
if i == at {
|
||||
s = lipgloss.NewStyle().Bold(true).Render(s)
|
||||
var nav []navItem
|
||||
for _, st := range setupSteps {
|
||||
if m.choice == 0 && st.page > pWelcome {
|
||||
break
|
||||
}
|
||||
out = append(out, s)
|
||||
state := "todo"
|
||||
switch {
|
||||
case st.page < at || (st.page == pRun && m.finished && m.run.err == nil):
|
||||
state = "done"
|
||||
case st.page == at:
|
||||
state = "current"
|
||||
}
|
||||
nav = append(nav, navItem{Label: st.label, State: state})
|
||||
}
|
||||
return strings.Join(out, " › ")
|
||||
title, body, keys := m.pageView()
|
||||
f := frame{
|
||||
Width: m.width, Height: m.height,
|
||||
Title: "llmgw setup", Where: m.host + " · " + m.thisAddr(),
|
||||
NavTitle: "Steps", Nav: nav,
|
||||
PanelTitle: title, Body: body, Scroll: m.scroll, Keys: keys,
|
||||
}
|
||||
if m.formErr != "" {
|
||||
f.DialogTitle, f.Dialog = "Not yet", m.formErr+"\n\n"+sDim.Render("any key to go back")
|
||||
}
|
||||
return f.render()
|
||||
}
|
||||
|
||||
// pageView is the panel for the page: its title, what is in it, and its keys.
|
||||
func (m setupModel) pageView() (string, string, string) {
|
||||
switch m.page {
|
||||
case pWelcome:
|
||||
return "Start", m.welcomeView(), "↑↓ choose · Enter go on · Ctrl+C leave"
|
||||
case pAdmin:
|
||||
return "Administrator", m.adminView(), "Tab/↑↓ move · Enter next · Esc back · Ctrl+C leave"
|
||||
case pMachines:
|
||||
return "Database machines", m.machinesView(), "Tab/↑↓ move · ←→ how to log in · Enter next · Esc back · PgUp/PgDn scroll"
|
||||
case pWait:
|
||||
return "Waiting for machines to join", m.waitView(), "Esc back · PgUp/PgDn scroll · Ctrl+C leave"
|
||||
case pCheck:
|
||||
keys := "R check again · Esc back · PgUp/PgDn scroll"
|
||||
if !m.checking && m.report.Worst() < preflight.Fail {
|
||||
keys = "Enter see the plan · " + keys
|
||||
}
|
||||
return "Checks", m.checkView(), keys
|
||||
case pPlan:
|
||||
return "Plan", m.planView(), "Enter install · Esc back · PgUp/PgDn scroll · Ctrl+C leave"
|
||||
}
|
||||
v := m.run.View()
|
||||
if i := strings.Index(v, "\n\n"); i >= 0 {
|
||||
v = v[i+2:] // init's own title; the frame has one
|
||||
}
|
||||
keys := "Ctrl+C stop"
|
||||
if m.finished {
|
||||
keys = "Enter or Q leave · PgUp/PgDn scroll"
|
||||
if m.run.err == nil {
|
||||
v += "\n" + sDim.Render("The same, from a script, with ssh keys in place:") + "\n" + m.command() + "\n"
|
||||
}
|
||||
}
|
||||
return "Install", v, keys
|
||||
}
|
||||
|
||||
func (m setupModel) welcomeView() string {
|
||||
var b strings.Builder
|
||||
fmt.Fprintf(&b, "Nothing of llmgw is installed on %s (%s).\n\n", m.host, strings.Join(m.ips, ", "))
|
||||
fmt.Fprintf(&b, "\n Nothing of llmgw is installed on %s.\n\n", lipgloss.NewStyle().Bold(true).Render(m.host))
|
||||
opt := func(i int, title, detail string) {
|
||||
mark := "( )"
|
||||
if m.choice == i {
|
||||
mark = "(" + sOK.Render("•") + ")"
|
||||
title = sTitle.Render(title)
|
||||
title = fSelected.Render(title)
|
||||
}
|
||||
fmt.Fprintf(&b, " %s %s\n %s\n\n", mark, title, sDim.Render(detail))
|
||||
}
|
||||
opt(0, "One machine", "this machine runs everything: the control plane, a model mirror, and models if it has room.")
|
||||
opt(0, "One machine", "This machine runs everything: control plane, model mirror,\n and models if it has room.")
|
||||
opt(1, "High availability — three machines",
|
||||
"this one is the control plane; two more keep the store, replicated, so losing any one loses nothing.")
|
||||
b.WriteString(sDim.Render("↑↓ to choose · enter to go on · ctrl+c to leave") + "\n")
|
||||
"This one is the control plane; two more keep the store, replicated,\n so losing any one machine loses nothing.")
|
||||
return b.String()
|
||||
}
|
||||
|
||||
@@ -706,104 +746,114 @@ func (m setupModel) adminView() string {
|
||||
var b strings.Builder
|
||||
label := func(i int, s string) string {
|
||||
if m.afocus == i {
|
||||
return sTitle.Render("› " + s)
|
||||
return fSelected.Render("› " + s)
|
||||
}
|
||||
return " " + s
|
||||
}
|
||||
b.WriteString("\n")
|
||||
fmt.Fprintf(&b, "%s\n %s\n %s\n\n", label(0, "Administrator's email"), m.admin.View(),
|
||||
sDim.Render("A password is generated and shown once, at the end."))
|
||||
fmt.Fprintf(&b, "%s\n %s\n %s\n\n", label(1, "Other names nodes will reach this machine by"), m.names.View(),
|
||||
sDim.Render("Already known: "+strings.Join(append([]string{m.host}, m.ips...), ", ")+". Add a DNS name or a floating address."))
|
||||
b.WriteString(label(2, lipgloss.NewStyle().Bold(true).Render("Next")) + "\n\n")
|
||||
b.WriteString(sDim.Render("tab or ↑↓ to move · enter on Next · esc back") + "\n")
|
||||
sDim.Render("Known: "+strings.Join(append([]string{m.host}, m.ips...), ", ")+". Add a DNS name or a floating address."))
|
||||
b.WriteString(button(m.afocus == 2, "Next") + "\n")
|
||||
return b.String()
|
||||
}
|
||||
|
||||
// button is a [ Label ] that shows when it has the focus.
|
||||
func button(focused bool, label string) string {
|
||||
if focused {
|
||||
return " " + fBar.Render(" "+label+" ")
|
||||
}
|
||||
return " " + lipgloss.NewStyle().Bold(true).Render("[ "+label+" ]")
|
||||
}
|
||||
|
||||
func (m setupModel) machinesView() string {
|
||||
var b strings.Builder
|
||||
b.WriteString("The two machines that keep the store. They need ssh, a user that can sudo, and\n" +
|
||||
"Ubuntu 22.04/24.04 or Debian 12; PostgreSQL, Patroni and etcd are installed on them.\n\n")
|
||||
b.WriteString("\n The two machines that keep the store: Ubuntu 22.04/24.04 or Debian 12.\n" +
|
||||
" PostgreSQL, Patroni and etcd are installed on them.\n\n")
|
||||
for i, d := range m.db {
|
||||
base := i * mfCount
|
||||
// Padded before it is coloured: the colour's escape codes count
|
||||
// toward a width and threw the focused row out of line.
|
||||
label := func(f int, s string) string {
|
||||
s = fmt.Sprintf("%-16s", s)
|
||||
s = fmt.Sprintf("%-15s", s)
|
||||
if m.mfocus == base+f {
|
||||
return sTitle.Render("› " + s)
|
||||
return fSelected.Render("› " + s)
|
||||
}
|
||||
return " " + s
|
||||
}
|
||||
fmt.Fprintf(&b, "%s\n", lipgloss.NewStyle().Bold(true).Render(fmt.Sprintf("Database machine %d", i+1)))
|
||||
fmt.Fprintf(&b, " %s\n", lipgloss.NewStyle().Bold(true).Render(fmt.Sprintf("Database machine %d", i+1)))
|
||||
if d.visible(mfAddr) {
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfAddr, "address"), d.addr.View())
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfUser, "user"), d.user.View())
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfAddr, "Address"), d.addr.View())
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfUser, "User"), d.user.View())
|
||||
}
|
||||
var auth []string
|
||||
for a := 0; a < authCount; a++ {
|
||||
if a == d.auth {
|
||||
auth = append(auth, sOK.Render("["+authNames[a]+"]"))
|
||||
auth = append(auth, "("+sOK.Render("•")+") "+authNames[a])
|
||||
} else {
|
||||
auth = append(auth, sDim.Render(" "+authNames[a]+" "))
|
||||
auth = append(auth, "( ) "+sDim.Render(authNames[a]))
|
||||
}
|
||||
}
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfAuth, "log in with"), strings.Join(auth, " "))
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfAuth, "Log in with"), strings.Join(auth, " "))
|
||||
if d.visible(mfSecret) {
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfSecret, authNames[d.auth]), d.secret.View())
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfSecret, strings.ToUpper(authNames[d.auth][:1])+authNames[d.auth][1:]), d.secret.View())
|
||||
}
|
||||
if d.visible(mfSudo) {
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfSudo, "sudo password"), d.sudo.View())
|
||||
fmt.Fprintf(&b, " %s %s\n", label(mfSudo, "Sudo password"), d.sudo.View())
|
||||
}
|
||||
if d.auth == authJoin {
|
||||
b.WriteString(" " + sDim.Render("Nothing logs into it: it runs llmgw join with a code shown next, and dials out to this machine.") + "\n")
|
||||
b.WriteString(" " + sDim.Render("Nothing logs into it: it runs llmgw join with a code shown next.") + "\n")
|
||||
}
|
||||
b.WriteString("\n")
|
||||
}
|
||||
btn := lipgloss.NewStyle().Bold(true).Render("Check the three machines")
|
||||
if m.mfocus == 2*mfCount {
|
||||
btn = sTitle.Render("› " + btn)
|
||||
} else {
|
||||
btn = " " + btn
|
||||
}
|
||||
b.WriteString(btn + "\n\n")
|
||||
b.WriteString(sDim.Render("tab or ↑↓ to move · ←→ to choose how to log in · passwords are kept in memory only · esc back") + "\n")
|
||||
b.WriteString(button(m.mfocus == 2*mfCount, "Check the three machines") + "\n\n")
|
||||
b.WriteString(" " + sDim.Render("Passwords are kept in memory only, for this setup.") + "\n")
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func (m setupModel) waitView() string {
|
||||
var b strings.Builder
|
||||
fmt.Fprintf(&b, "On each machine below, as root. It dials this machine on port %d; nothing dials in.\n\n", joinpkg.DefaultPort)
|
||||
fmt.Fprintf(&b, "\n On each machine below, as root. It dials this machine on port %d;\n nothing dials in. Each code is for one machine and good for an hour.\n\n", joinpkg.DefaultPort)
|
||||
for i, d := range m.db {
|
||||
if d.auth != authJoin {
|
||||
continue
|
||||
}
|
||||
title := lipgloss.NewStyle().Bold(true).Render(fmt.Sprintf("Database machine %d", i+1))
|
||||
if d.joined != nil {
|
||||
fmt.Fprintf(&b, "%s %s joined as %s (%s)\n\n", title, sOK.Render("✓"), d.joined.Hostname, d.joined.Addr)
|
||||
fmt.Fprintf(&b, " %s %s joined as %s (%s)\n\n", title, sOK.Render("✓"), d.joined.Hostname, d.joined.Addr)
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(&b, "%s %s waiting\n", title, m.spin.View())
|
||||
fmt.Fprintf(&b, " %s %s waiting\n", title, m.spin.View())
|
||||
b.WriteString(" " + sDim.Render("without llmgw yet:") + "\n")
|
||||
for _, l := range joinInstall() {
|
||||
b.WriteString(" " + strings.ReplaceAll(l, "\n", "\n ") + "\n")
|
||||
b.WriteString(" " + strings.ReplaceAll(l, "\n", "\n ") + "\n")
|
||||
}
|
||||
b.WriteString(" " + sDim.Render("then:") + "\n sudo llmgw join " + d.code + "\n\n")
|
||||
b.WriteString(" " + sDim.Render("then:") + "\n sudo llmgw join " + d.code + "\n\n")
|
||||
}
|
||||
b.WriteString(sDim.Render("Each code is for one machine and good for an hour. esc back · ctrl+c to leave") + "\n")
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func (m setupModel) checkView() string {
|
||||
var b strings.Builder
|
||||
b.WriteString("\n")
|
||||
if m.checking {
|
||||
b.WriteString(" " + m.spin.View() + " checking the three machines…\n")
|
||||
return b.String()
|
||||
}
|
||||
switch m.report.Worst() {
|
||||
case preflight.Fail:
|
||||
b.WriteString(" " + sBad.Render("✗ Fix what is marked ✗, then check again (R).") + "\n")
|
||||
case preflight.Warn:
|
||||
b.WriteString(" " + sWarn.Render("! It can go ahead; what is marked ! is worth a look.") + "\n")
|
||||
default:
|
||||
b.WriteString(" " + sOK.Render("✓ All three are ready.") + "\n")
|
||||
}
|
||||
machine := ""
|
||||
for _, f := range m.report.Findings {
|
||||
if f.Machine != machine {
|
||||
machine = f.Machine
|
||||
b.WriteString("\n" + lipgloss.NewStyle().Bold(true).Render(machine) + "\n")
|
||||
b.WriteString("\n " + lipgloss.NewStyle().Bold(true).Render(machine) + "\n")
|
||||
}
|
||||
mark := sOK.Render("✓")
|
||||
switch f.Level {
|
||||
@@ -812,51 +862,45 @@ func (m setupModel) checkView() string {
|
||||
case preflight.Fail:
|
||||
mark = sBad.Render("✗")
|
||||
}
|
||||
line := fmt.Sprintf(" %s %-13s %s", mark, f.Check, truncate(f.Detail, max(20, m.width-22)))
|
||||
fmt.Fprintf(&b, " %s %-13s %s\n", mark, f.Check, f.Detail)
|
||||
if f.Level != preflight.OK && f.Fix != "" {
|
||||
line += "\n " + sDim.Render(truncate(f.Fix, max(20, m.width-20)))
|
||||
b.WriteString(" " + sDim.Render(f.Fix) + "\n")
|
||||
}
|
||||
b.WriteString(line + "\n")
|
||||
}
|
||||
b.WriteString("\n")
|
||||
switch m.report.Worst() {
|
||||
case preflight.Fail:
|
||||
b.WriteString(sBad.Render("Fix what is marked ✗, then check again.") + "\n" +
|
||||
sDim.Render("r to check again · esc to change the machines") + "\n")
|
||||
case preflight.Warn:
|
||||
b.WriteString(sWarn.Render("It can go ahead; what is marked ! is worth a look.") + "\n" +
|
||||
sDim.Render("enter to see the plan · r to check again · esc back") + "\n")
|
||||
default:
|
||||
b.WriteString(sOK.Render("All three are ready.") + "\n" + sDim.Render("enter to see the plan · esc back") + "\n")
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func (m setupModel) planView() string {
|
||||
var b strings.Builder
|
||||
b.WriteString("What will be installed:\n\n")
|
||||
b.WriteString("\n What will be installed:\n\n")
|
||||
fmt.Fprintf(&b, " %s %s\n %s\n", lipgloss.NewStyle().Bold(true).Render(m.host), sDim.Render(m.thisAddr()),
|
||||
"control plane and gateway, model mirror, etcd (the third vote), administrator "+strings.TrimSpace(m.admin.Value()))
|
||||
"control plane and gateway, model mirror, etcd (the third vote)")
|
||||
fmt.Fprintf(&b, " administrator %s\n", strings.TrimSpace(m.admin.Value()))
|
||||
granted := false
|
||||
for _, d := range m.db {
|
||||
fmt.Fprintf(&b, " %s\n %s\n", lipgloss.NewStyle().Bold(true).Render(strings.TrimSpace(d.addr.Value())),
|
||||
"PostgreSQL under Patroni, etcd")
|
||||
addr := strings.TrimSpace(d.addr.Value())
|
||||
if d.joined != nil {
|
||||
addr = d.joined.Hostname + " " + sDim.Render(d.joined.Addr+", joined")
|
||||
}
|
||||
fmt.Fprintf(&b, " %s\n PostgreSQL under Patroni, etcd\n", lipgloss.NewStyle().Bold(true).Render(addr))
|
||||
granted = granted || d.sudo.Value() != ""
|
||||
}
|
||||
b.WriteString("\n The store is replicated from the first to the second; if the primary is lost the\n" +
|
||||
" standby takes over in about thirty seconds, and the control plane follows it.\n")
|
||||
b.WriteString("\n The store is replicated from the first to the second; if the primary is lost\n" +
|
||||
" the standby takes over in about thirty seconds, and the control plane follows.\n")
|
||||
if granted {
|
||||
b.WriteString(" " + sDim.Render("Where a sudo password was given, the user may sudo without it until the install\n finishes, and not after.") + "\n")
|
||||
b.WriteString(" " + sDim.Render("Where a sudo password was given, the user may sudo without it until the\n install finishes, and not after.") + "\n")
|
||||
}
|
||||
b.WriteString("\n " + sDim.Render("The same from a script, with ssh keys in place:") + "\n")
|
||||
for _, l := range strings.Split(m.command(), "\n") {
|
||||
b.WriteString(" " + l + "\n")
|
||||
}
|
||||
b.WriteString("\n" + sDim.Render("The same from a script, with ssh keys in place:") + "\n" + m.command() + "\n")
|
||||
for _, d := range m.db {
|
||||
if d.joined != nil {
|
||||
b.WriteString(sDim.Render("(a machine that joined with a code needs ssh for that: the code is for these screens)") + "\n")
|
||||
b.WriteString(" " + sDim.Render("(a machine that joined with a code needs ssh for that)") + "\n")
|
||||
break
|
||||
}
|
||||
}
|
||||
b.WriteString("\n")
|
||||
b.WriteString(lipgloss.NewStyle().Bold(true).Render("enter to install") + sDim.Render(" · esc back · ctrl+c to leave") + "\n")
|
||||
b.WriteString("\n" + button(true, "Enter to install") + "\n")
|
||||
return b.String()
|
||||
}
|
||||
|
||||
@@ -871,7 +915,7 @@ func runSetupTUI(ctx context.Context, out io.Writer) error {
|
||||
}
|
||||
}
|
||||
m := newSetupModel(host, ips)
|
||||
p := tea.NewProgram(m, tea.WithOutput(out))
|
||||
p := tea.NewProgram(m, tea.WithOutput(out), tea.WithAltScreen())
|
||||
m.ref.p = p
|
||||
final, err := p.Run()
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user