forked from ManageIQ/manageiq-ui-classic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_endpoints_angular.html.haml
193 lines (186 loc) · 12.7 KB
/
_endpoints_angular.html.haml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
- return unless %w(ems_cloud ems_infra ems_container ems_middleware ems_network ems_datawarehouse ems_physical_infra).include?(controller_name)
- prefix ||= "default"
- ng_reqd_hostname ||= true
- ng_reqd_api_port ||= true
%div{"ng-if" => defined?(hostname_hide) ? false : true}
.form-group{"ng-class" => "{'has-error': angularForm.#{prefix}_hostname.$invalid}"}
%label.col-md-2.control-label{"for" => "#{prefix}_hostname"}
= _('Hostname (or IPv4 or IPv6 address)')
.col-md-4
%input.form-control{"type" => "text",
"id" => "#{prefix}_hostname",
"name" => "#{prefix}_hostname",
"ng-model" => "#{ng_model}.#{prefix}_hostname",
"maxlength" => "#{MAX_NAME_LEN}",
"ng-required" => "#{ng_reqd_hostname}",
"ng-trim" => false,
"detect-spaces" => "",
"checkchange" => "",
"prefix" => "#{prefix}",
"reset-validation-status" => "#{prefix}_auth_status"}
%span.help-block{"ng-show" => "angularForm.#{prefix}_hostname.$error.required"}
= _("Required")
%span.help-block{"ng-show" => "angularForm.#{prefix}_hostname.$error.detectedSpaces"}
= _("Spaces are prohibited")
%div{"ng-if" => defined?(apiport_hide) ? false : true}
.form-group{"ng-class" => "{'has-error': angularForm.#{prefix}_api_port.$invalid}",
"ng-if" => "emsCommonModel.emstype == 'openstack' || " + |
"emsCommonModel.emstype == 'openstack_infra' || " + |
"emsCommonModel.emstype == 'nuage_network' || " + |
"emsCommonModel.emstype == 'rhevm' || " + |
"emsCommonModel.emstype == 'vmware_cloud' || " + |
"emsCommonModel.emstype == 'hawkular' || " + |
"emsCommonModel.emstype == 'hawkular_datawarehouse' || " + |
"emsCommonModel.emstype == 'lenovo_ph_infra' || " + |
"emsCommonModel.ems_controller == 'ems_container'"} |
%label.col-md-2.control-label{"for" => "#{prefix}_api_port"}
= _('API Port')
.col-md-2
%input.form-control{"type" => "text",
"id" => "#{prefix}_api_port",
"name" => "#{prefix}_api_port",
"ng-model" => "#{ng_model}.#{prefix}_api_port",
"maxlength" => 15,
"ng-required" => "#{ng_reqd_api_port}",
"checkchange" => "",
"ng-trim" => false,
"detect-spaces" => "",
"prefix" => "#{prefix}",
"reset-validation-depends-on" => %w(hawkular metrics).include?(prefix) ? "#{prefix}_hostname" : "",
"reset-validation-status" => "#{prefix}_auth_status",
"pattern" => "^[1-9]\\d*$"}
%span.help-block{"ng-show" => "angularForm.#{prefix}_api_port.$error.pattern"}
= _("Must be a number (greater than 0)")
%span.help-block{"ng-show" => "angularForm.#{prefix}_api_port.$error.required"}
= _("Required")
%span.help-block{"ng-show" => "angularForm.#{prefix}_api_port.$error.detectedSpaces"}
= _("Spaces are prohibited")
%div{"ng-if" => defined?(database_name_show) ? true : false}
.form-group{"ng-class" => "{'has-error': angularForm.#{prefix}_database_name.$invalid}",
"ng-if" => "emsCommonModel.emstype == 'rhevm'"} |
%label.col-md-2.control-label{"for" => "#{prefix}_database_name"}
= _('Database Name')
.col-md-4
%input.form-control{"type" => "text",
"id" => "#{prefix}_database_name",
"name" => "#{prefix}_database_name",
"ng-model" => "#{ng_model}.#{prefix}_database_name",
"maxlength" => 40,
"required" => defined?(database_name_required) ? true : false,
"checkchange" => "",
"ng-trim" => false,
"detect-spaces" => ""}
%span.help-block{"ng-show" => "angularForm.#{prefix}_database_name.$error.required"}
= _("Required")
%span.help-block{"ng-show" => "angularForm.#{prefix}_database_name.$error.detectedSpaces"}
= _("Spaces are prohibited")
%div{"ng-if" => defined?(security_protocol_hide) ? false : true}
.form-group{"ng-class" => "{'has-error': angularForm.#{prefix}_security_protocol.$invalid}",
"ng-if" => "emsCommonModel.emstype == 'openstack' || " + |
"emsCommonModel.emstype == 'openstack_infra' || " + |
"emsCommonModel.emstype == 'nuage_network' || " + |
"(emsCommonModel.emstype == 'vmware_cloud' && '#{prefix}' === 'amqp') || " |
"emsCommonModel.emstype == 'scvmm' || " + |
"emsCommonModel.ems_controller == 'ems_container' || " + |
"emsCommonModel.emstype == 'hawkular'"} |
%label.col-md-2.control-label{"for" => "#{prefix}_security_protocol"}
= _('Security Protocol')
.col-md-8{"ng-if" => "emsCommonModel.emstype == 'openstack' || emsCommonModel.emstype == 'openstack_infra' || emsCommonModel.emstype == 'vmware_cloud'"}
- prefix == "amqp" ? security_protocols = @amqp_security_protocols : security_protocols = @openstack_security_protocols
= select_tag("#{prefix}_security_protocol",
options_for_select([["<#{_('Choose')}>", nil]] + security_protocols, disabled: ["<#{_('Choose')}>", nil]),
"ng-model" => "#{ng_model}.#{prefix}_security_protocol",
"checkchange" => "",
"ng-required" => true,
"ng-change" => "openstackSecurityProtocolChanged()",
"selectpicker-for-select-tag" => "",
"prefix" => "#{prefix}",
"reset-validation-status" => "#{prefix}_auth_status")
.col-md-8{"ng-if" => "emsCommonModel.emstype == 'nuage_network'"}
= select_tag("#{prefix}_security_protocol",
options_for_select([["<#{_('Choose')}>", nil]] + @nuage_security_protocols, disabled: ["<#{_('Choose')}>", nil]),
"ng-model" => "#{ng_model}.#{prefix}_security_protocol",
"checkchange" => "",
"required" => defined?(security_protocol_not_required) ? false : true,
"selectpicker-for-select-tag" => "")
.col-md-8{"ng-if" => "emsCommonModel.emstype == 'scvmm'"}
= select_tag("#{prefix}_security_protocol",
options_for_select([["<#{_('Choose')}>", nil]] + @scvmm_security_protocols, disabled: ["<#{_('Choose')}>", nil]),
"ng-model" => "#{ng_model}.#{prefix}_security_protocol",
"checkchange" => "",
"required" => "",
"ng-change" => "scvmmSecurityProtocolChanged()",
"selectpicker-for-select-tag" => "",
"prefix" => "#{prefix}",
"reset-validation-status" => "#{prefix}_auth_status")
.col-md-8{"ng-if" => "emsCommonModel.ems_controller == 'ems_container'"}
= select_tag("#{prefix}_security_protocol",
options_for_select([["<#{_('Choose')}>", nil]] + @container_security_protocols, disabled: ["<#{_('Choose')}>", nil]),
"ng-model" => "#{ng_model}.#{prefix}_security_protocol",
"checkchange" => "",
"required" => "",
"selectpicker-for-select-tag" => "",
"prefix" => "#{prefix}",
"reset-validation-status" => "#{prefix}_auth_status")
.col-md-8{"ng-if" => "emsCommonModel.emstype == 'hawkular'"}
= select_tag("#{prefix}_security_protocol",
options_for_select([["<#{_('Choose')}>", nil]] + @hawkular_security_protocols, "disabled" => ["<#{_('Choose')}>", nil]),
"ng-model" => "#{ng_model}.#{prefix}_security_protocol",
"checkchange" => "",
"required" => "",
"ng-change" => "hawkularSecurityProtocolChanged()",
"selectpicker-for-select-tag" => "",
"prefix" => prefix.to_s,
"reset-validation-status" => "#{prefix}_auth_status")
%div{"ng-if" => defined?(tls_verify_hide) ? false : true}
.form-group{"ng-if"=> "emsCommonModel.emstype == 'rhevm'"}
%label.col-md-2.control-label{"for" => "#{prefix}_tls_verify"}
= _('Verify TLS Certificates')
.col-md-8
%input{"type" => "checkbox",
"id" => "#{prefix}_tls_verify",
"name" => "#{prefix}_tls_verify",
"bs-switch" => "",
"switch-on-text" => _("Yes"),
"switch-off-text" => _("No"),
"ng-true-value" => "true",
"ng-false-value" => "false",
"ng-model" => "#{ng_model}.#{prefix}_tls_verify",
"prefix" => "#{prefix}"}
%div{"ng-if" => defined?(tls_ca_certs_hide) ? false : true}
.form-group{"ng-if"=> "emsCommonModel.emstype == 'rhevm' || " + |
"(emsCommonModel.ems_controller == 'ems_container' && " + |
" emsCommonModel.#{prefix}_security_protocol == 'ssl-with-validation-custom-ca') || " |
"(emsCommonModel.emstype == 'hawkular' && " + |
" emsCommonModel.#{prefix}_security_protocol == 'ssl-with-validation-custom-ca')"} |
%label.col-md-2.control-label{"for" => "#{prefix}_tls_ca_certs"}
= _('Trusted CA Certificates')
.col-md-4
%textarea.form-control{"id" => "#{prefix}_tls_ca_certs",
"name" => "#{prefix}_tls_ca_certs",
"ng-model" => "#{ng_model}.#{prefix}_tls_ca_certs",
"ng-disabled" => "emsCommonModel.emstype == 'rhevm' && !#{ng_model}.#{prefix}_tls_verify",
"ng-required" => false,
"ng-trim" => false,
"prefix" => "#{prefix}"}
%span.help-block
= _("Paste here the trusted CA certificates, in PEM format.")
.form-group{"ng-class" => "{'has-error': angularForm.realm.$invalid}",
"ng-if" => "emsCommonModel.emstype == 'scvmm' && emsCommonModel.default_security_protocol == 'kerberos'"}
%label.col-md-2.control-label{"for" => "realm"}
= _('Realm')
.col-md-4
%input.form-control{"type" => "text",
"id" => "realm",
"name" => "realm",
"ng-model" => "emsCommonModel.realm",
"maxlength" => "#{MAX_NAME_LEN}",
"required" => "",
"checkchange" => "",
"auto-focus" => "",
"ng-trim" => false,
"detect-spaces" => ""}
%span.help-block{"ng-show" => "angularForm.realm.$error.required"}
= _("Required")
%span.help-block{"ng-show" => "angularForm.realm.$error.detectedSpaces"}
= _("Spaces are prohibited")