diff options
author | Joe <rbo@gmx.us> | 2024-03-29 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-03-29 20:20:20 +0100 |
commit | acb644fd1545fcdcf0ba6a7358e7b10282dafad4 (patch) | |
tree | d79e861837abdbeb328654d5081e2fe4d8908821 | |
parent | iota (diff) | |
download | hardflip-acb644fd1545fcdcf0ba6a7358e7b10282dafad4.tar.gz hardflip-acb644fd1545fcdcf0ba6a7358e7b10282dafad4.tar.bz2 hardflip-acb644fd1545fcdcf0ba6a7358e7b10282dafad4.tar.xz hardflip-acb644fd1545fcdcf0ba6a7358e7b10282dafad4.tar.zst hardflip-acb644fd1545fcdcf0ba6a7358e7b10282dafad4.zip |
oooooo
-rw-r--r-- | src/c_lhosts.go | 8 | ||||
-rw-r--r-- | src/i_events.go | 8 | ||||
-rw-r--r-- | src/i_insert.go | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/c_lhosts.go b/src/c_lhosts.go index 4548d4e..009febf 100644 --- a/src/c_lhosts.go +++ b/src/c_lhosts.go @@ -161,10 +161,10 @@ func (lhost *HostList) count() int { func (host *HostNode) protocol_str() string { switch host.Protocol { - case 0: return "SSH" - case 1: return "RDP" - case 2: return "Single command" - case 3: return "OpenStack CLI" + case PROTOCOL_SSH: return "SSH" + case PROTOCOL_RDP: return "RDP" + case PROTOCOL_CMD: return "Single command" + case PROTOCOL_OS: return "OpenStack CLI" default: return "" } } diff --git a/src/i_events.go b/src/i_events.go index 1ba9e7a..1bdb370 100644 --- a/src/i_events.go +++ b/src/i_events.go @@ -319,21 +319,21 @@ func i_mkdir(data *HardData, ui *HardUI) { func i_set_protocol_defaults(data *HardData, in *HostNode) { switch in.Protocol { - case 0: + case PROTOCOL_SSH: in.Port = 22 in.Jump.Port = 22 data.ui.insert_sel_max = 11 - case 1: + case PROTOCOL_RDP: in.Port = 3389 in.Quality = 2 in.Width = 1600 in.Height = 1200 in.Dynamic = true data.ui.insert_sel_max = 4 - case 2: + case PROTOCOL_CMD: in.Shell = []string{"/bin/sh", "-c"} data.ui.insert_sel_max = 2 - case 3: + case PROTOCOL_OS: in.Stack.RegionName = "eu-west-0" in.Stack.IdentityAPI = "3" in.Stack.ImageAPI = "2" diff --git a/src/i_insert.go b/src/i_insert.go index 8c91640..150ec0e 100644 --- a/src/i_insert.go +++ b/src/i_insert.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_insert.go - * Fri Mar 29 12:15:41 2024 + * Fri Mar 29 14:53:01 2024 * Joe * * insert a new host @@ -160,7 +160,7 @@ func i_draw_insert_panel(ui HardUI, in *HostNode) { 0, ui.insert_sel, false) line += 2 switch in.Protocol { - case 0: + case PROTOCOL_SSH: i_draw_insert_ssh(ui, line, win, in) } } |