Module: SSHTunnel::UI::Helpers::HostWindowHelper
Defined Under Namespace
Modules: ClassMethods
Constant Summary
collapse
- FORM_BUTTONS =
%w[submit cancel add edit remove reset_identity_file].freeze
- FORM_FIELDS =
{
name: {
type: :text,
},
user: {
type: :text,
},
host: {
type: :text,
},
port: {
type: :text,
},
identity_file: {
type: :file,
},
}.freeze
Class Method Summary
collapse
Instance Method Summary
collapse
#bind_submit_button, #getter_for, #params, #red, #render_form_errors, #restore_form_value, #restore_form_values, #set_input_labels, #setter_for, #submit_form, #white
#add_column, #add_image_column, #add_text_column
Class Method Details
.included(base) ⇒ Object
13
14
15
16
|
# File 'lib/ssh-hull/ui/helpers/host_window_helper.rb', line 13
def self.included(base)
base.extend(ClassMethods)
base.extend(SSHTunnel::UI::Helpers::Common::FormHelper::ClassMethods)
end
|
Instance Method Details
#initialize(application, window, host) ⇒ Object
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/ssh-hull/ui/helpers/host_window_helper.rb', line 49
def initialize(application, window, host)
super
@host = host
set_input_labels(scope: :host)
bind_host_buttons
bind_tunnels_buttons
load_tunnels_treeview(@host)
end
|
#load_tunnels_treeview(host) ⇒ Object
65
66
67
68
69
70
71
72
73
|
# File 'lib/ssh-hull/ui/helpers/host_window_helper.rb', line 65
def load_tunnels_treeview(host)
treeview_model = create_tunnels_treeview_model(host.tunnels)
@tunnels_treeview = create_tunnels_treeview(treeview_model)
tunnels_scrolled_window.add(@tunnels_treeview)
@tunnels_treeview.show
end
|
#reload_tunnels_treeview(host) ⇒ Object
76
77
78
79
|
# File 'lib/ssh-hull/ui/helpers/host_window_helper.rb', line 76
def reload_tunnels_treeview(host)
@tunnels_treeview.destroy
load_tunnels_treeview(host)
end
|