MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / openSelector

Method openSelector

internal/ui/plugins/communityscripts/plugin.go:80–100  ·  view source on GitHub ↗
(ctx context.Context, app *components.App, node *api.Node)

Source from the content-addressed store, hash-verified

78}
79
80func (p *Plugin) openSelector(ctx context.Context, app *components.App, node *api.Node) error {
81 if app == nil {
82 return fmt.Errorf("application context unavailable")
83 }
84
85 if node == nil {
86 return fmt.Errorf("no node selected")
87 }
88
89 sshUser := resolveSSHUser(app, node)
90 if sshUser == "" {
91 app.ShowMessageSafe("SSH user not configured. Please set PROXMOX_SSH_USER or profile ssh_user.")
92
93 return nil
94 }
95
96 selector := NewScriptSelector(app, node, nil, sshUser)
97 selector.Show()
98
99 return nil
100}
101
102func (p *Plugin) openSelectorForLXC(ctx context.Context, app *components.App, node *api.Node, vm *api.VM) error {
103 if app == nil {

Callers

nothing calls this directly

Implementers 4

Plugininternal/ui/plugins/ansible/plugin.go
Plugininternal/ui/plugins/communityscripts/p
Plugininternal/ui/plugins/guestlist/plugin.g
Plugininternal/ui/plugins/commandrunner/plug

Calls 4

ShowMethod · 0.95
NewScriptSelectorFunction · 0.85
ShowMessageSafeMethod · 0.80
resolveSSHUserFunction · 0.70

Tested by

no test coverage detected