/[smecontribs]/rpms/smeserver-openvpn-bridge/contribs8/smeserver-openvpn-bridge-2.0-code_cleanup2.patch
ViewVC logotype

Contents of /rpms/smeserver-openvpn-bridge/contribs8/smeserver-openvpn-bridge-2.0-code_cleanup2.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Mar 3 21:14:33 2013 UTC (11 years, 2 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-openvpn-bridge-2_0-49_el5_sme, smeserver-openvpn-bridge-2_0-55_el5_sme, smeserver-openvpn-bridge-2_0-48_el5_sme, smeserver-openvpn-bridge-2_0-56_el5_sme, smeserver-openvpn-bridge-2_0-51_el5_sme, smeserver-openvpn-bridge-2_0-52_el5_sme, smeserver-openvpn-bridge-2_0-53_el5_sme, smeserver-openvpn-bridge-2_0-54_el5_sme, smeserver-openvpn-bridge-2_0-47_el5_sme, smeserver-openvpn-bridge-2_0-50_el5_sme, HEAD
Initial import

1 --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/web/functions/openvpnbridge.code_cleanup2 2009-11-17 23:18:32.000000000 +0100
2 +++ smeserver-openvpn-bridge-2.0/root/etc/e-smith/web/functions/openvpnbridge 2009-11-18 09:10:29.000000000 +0100
3 @@ -31,15 +31,7 @@
4
5 my $fm = esmith::FormMagick::Panel::openvpnbridge->new();
6 my $q = $fm->{cgi};
7 -my $file_to_download = $q->param('file_to_download');
8 -
9 -if ($file_to_download){
10 - download_file($fm);
11 -}
12 -else{
13 - $fm->display();
14 -}
15 -
16 +$fm->display();
17
18
19 __DATA__
20 @@ -49,20 +41,19 @@
21 header="/etc/e-smith/web/common/head.tmpl"
22 footer="/etc/e-smith/web/common/foot.tmpl">
23
24 - <page name="FIRST"
25 - pre-event="print_status_message()">
26 -
27 - <field
28 + <page name="FIRST"
29 + pre-event="print_status_message()">
30 + <field
31 type="literal"
32 id="first_desc"
33 value="">
34 <description>DESC_FIRST_PAGE</description>
35 </field>
36 -
37 +
38 <field
39 type="literal"
40 id="current_status"
41 - display=""
42 + display=""
43 value="get_status()">
44 <label>LABEL_STATUS</label>
45 </field>
46 @@ -70,15 +61,15 @@
47 <field
48 type="literal"
49 id="current_auth_type"
50 - display=""
51 + display=""
52 value="get_auth_type()">
53 <label>LABEL_AUTH_TYPE</label>
54 </field>
55
56 - <field
57 + <field
58 type="literal"
59 id="current_ip_pool"
60 - display=""
61 + display=""
62 value="get_ip_pool()">
63 <label>LABEL_IP_POOL</label>
64 </field>
65 @@ -86,87 +77,87 @@
66 <field
67 type="literal"
68 id="current_crt_status"
69 - display=""
70 + display=""
71 value="print_crt_not_ready_warning()">
72 <label>LABEL_CRT_STATUS</label>
73 </field>
74
75 - <subroutine src="print_section_bar()" />
76 -
77 - <subroutine src="print_custom_button('DESC_RULE_BUTTON','RULES_PAGE')"/>
78 - <subroutine src="print_custom_button('SHOW_SAMPLE_CONFIG','DISPLAY_CLIENT_CONF_PAGE')"/>
79 - <subroutine src="print_custom_button('DESC_SHOW_CLIENTS_BUTTON','SHOW_CLIENTS_PAGE')"/>
80 -
81 - <subroutine src="print_section_bar()" />
82 + <subroutine src="print_section_bar()" />
83 + <subroutine src="print_custom_button('DESC_RULE_BUTTON','RULES_PAGE')"/>
84 + <subroutine src="print_custom_button('SHOW_SAMPLE_CONFIG','DISPLAY_CLIENT_CONF_PAGE')"/>
85 + <subroutine src="print_custom_button('DESC_SHOW_CLIENTS_BUTTON','SHOW_CLIENTS_PAGE')"/>
86 + <subroutine src="print_section_bar()" />
87 + <subroutine src="print_custom_button('DESC_CONFIG_BUTTON','CONFIG_PAGE')"/>
88 + <subroutine src="print_custom_button('DESC_CRT_CONFIG_BUTTON','CRT_CONFIG_PAGE')" />
89
90 - <subroutine src="print_custom_button('DESC_CONFIG_BUTTON','CONFIG_PAGE')"/>
91 - <subroutine src="print_custom_button('DESC_CRT_CONFIG_BUTTON','CRT_CONFIG_PAGE')" />
92 -
93 </page>
94
95 - <page name="CONFIG_PAGE"
96 - pre-event="print_status_message()"
97 - post-event="apply_settings()">
98 -
99 - <field
100 + <page name="CONFIG_PAGE"
101 + pre-event="print_status_message()"
102 + post-event="apply_settings()">
103 +
104 + <field
105 type="literal"
106 id="first_desc"
107 value="">
108 <description>DESC_CONFIG_PAGE</description>
109 </field>
110
111 - <field type="select"
112 - id="status"
113 - options="'enabled' => 'ENABLED', 'disabled' => 'DISABLED'"
114 - value="get_prop('status')">
115 - <label>LABEL_STATUS</label>
116 - <description>DESC_STATUS</description>
117 - </field>
118 -
119 - <field type="select"
120 - id="auth_type"
121 - options="'CrtOnly' => 'CRT_ONLY', 'CrtWithPass' => 'CRT_WITH_PASS'"
122 - value="get_prop('userAuth')">
123 - <label>LABEL_AUTH_TYPE</label>
124 - <description>DESC_AUTH_TYPE</description>
125 - </field>
126 + <field type="select"
127 + id="status"
128 + options="'enabled' => 'ENABLED', 'disabled' => 'DISABLED'"
129 + value="get_prop('status')">
130 + <label>LABEL_STATUS</label>
131 + <description>DESC_STATUS</description>
132 + </field>
133
134 + <field type="select"
135 + id="auth_type"
136 + options="'CrtOnly' => 'CRT_ONLY', 'CrtWithPass' => 'CRT_WITH_PASS'"
137 + value="get_prop('userAuth')">
138 + <label>LABEL_AUTH_TYPE</label>
139 + <description>DESC_AUTH_TYPE</description>
140 + </field>
141
142 - <field type="text" id="start_pool" value="get_prop('startPool')"
143 - validation="ip_is_in_local_net, not_in_dhcp_range">
144 - <label>LABEL_START_POOL</label>
145 - <description>DESC_START_POOL</description>
146 + <field type="text"
147 + id="start_pool"
148 + value="get_prop('startPool')"
149 + validation="ip_is_in_local_net, not_in_dhcp_range">
150 + <label>LABEL_START_POOL</label>
151 + <description>DESC_START_POOL</description>
152 </field>
153
154 - <field type="text" id="end_pool" value="get_prop('endPool')"
155 - validation="ip_is_in_local_net, not_in_dhcp_range">
156 - <label>LABEL_END_POOL</label>
157 - <description>DESC_END_POOL</description>
158 - </field>
159 + <field type="text"
160 + id="end_pool"
161 + value="get_prop('endPool')"
162 + validation="ip_is_in_local_net, not_in_dhcp_range">
163 + <label>LABEL_END_POOL</label>
164 + <description>DESC_END_POOL</description>
165 + </field>
166
167 - <subroutine src="print_button('SAVE')" />
168 + <subroutine src="print_button('SAVE')" />
169 </page>
170 -
171 -
172 +
173 +
174 // Règles
175 // Page d'accueil, liste des certificats
176 - <page name="RULES_PAGE"
177 - pre-event="print_status_message">
178 -
179 - <field
180 + <page name="RULES_PAGE"
181 + pre-event="print_status_message">
182 +
183 + <field
184 type="literal"
185 id="desc_rules_page"
186 value="">
187 <description>DESC_RULES_PAGE</description>
188 </field>
189 -
190 - <subroutine
191 - src="print_custom_button(
192 - 'DESC_ADD_RULE_BUTTON',
193 - 'CREATE_OR_MODIFY_RULE_PAGE'
194 - )"
195 - />
196 -
197 +
198 + <subroutine
199 + src="print_custom_button(
200 + 'DESC_ADD_RULE_BUTTON',
201 + 'CREATE_OR_MODIFY_RULE_PAGE'
202 + )"
203 + />
204 +
205 <field
206 type="literal"
207 id="desc_rules"
208 @@ -175,158 +166,174 @@
209 </field>
210
211 <subroutine src="print_rules()" />
212 -
213 - </page>
214 -
215 - // Ajout ou modif d'une règle
216 - <page name="CREATE_OR_MODIFY_RULE_PAGE"
217 - pre-event="turn_off_buttons()"
218 - post-event="create_or_modify_rule()">
219 -
220 - <field
221 +
222 + </page>
223 +
224 + // Ajout ou modif d'une règle
225 + <page name="CREATE_OR_MODIFY_RULE_PAGE"
226 + pre-event="turn_off_buttons()"
227 + post-event="create_or_modify_rule()">
228 +
229 + <field
230 type="literal"
231 id="desc_add_rule"
232 value="">
233 <description>DESC_ADD_OR_MODIFY_PAGE</description>
234 </field>
235
236 - <subroutine src="print_common_name_field()" />
237 + <subroutine src="print_common_name_field()" />
238
239 - <field type="text" id="comment">
240 - <label>COMMENT</label>
241 - <description>DESC_COMMENT</description>
242 - </field>
243 -
244 - <field type="text" id="reserved_ip"
245 - validation="ip_is_in_local_net_or_blank, not_in_dhcp_range">
246 - <label>LABEL_RESERVED_IP</label>
247 - <description>DESC_RESERVED_IP</description>
248 - </field>
249 -
250 - <field type="select"
251 - id="gw_redirection"
252 - options="'enabled' => 'ENABLED', 'disabled' => 'DISABLED'" >
253 - <label>LABEL_GW_REDIRECTION</label>
254 - <description>DESC_GW_REDIRECTION</description>
255 + <field type="text"
256 + id="comment">
257 + <label>COMMENT</label>
258 + <description>DESC_COMMENT</description>
259 </field>
260
261 - <field type="select"
262 - id="access"
263 - options="'allowed' => 'ALLOWED', 'denied' => 'DENIED'" >
264 - <label>ACCESS</label>
265 - <description>DESC_ACCESS</description>
266 - </field>
267 + <field type="text"
268 + id="reserved_ip"
269 + validation="ip_is_in_local_net_or_blank, not_in_dhcp_range">
270 + <label>LABEL_RESERVED_IP</label>
271 + <description>DESC_RESERVED_IP</description>
272 + </field>
273 +
274 + <field type="select"
275 + id="gw_redirection"
276 + options="'enabled' => 'ENABLED', 'disabled' => 'DISABLED'" >
277 + <label>LABEL_GW_REDIRECTION</label>
278 + <description>DESC_GW_REDIRECTION</description>
279 + </field>
280 +
281 + <field type="select"
282 + id="access"
283 + options="'allowed' => 'ALLOWED', 'denied' => 'DENIED'" >
284 + <label>ACCESS</label>
285 + <description>DESC_ACCESS</description>
286 + </field>
287
288 - <subroutine src="print_button('SAVE')"/>
289 + <subroutine src="print_button('SAVE')"/>
290 </page>
291 -
292 - // Révocation d'un certificat client
293 - <page name="REMOVE_RULE_PAGE"
294 - pre-event="turn_off_buttons()"
295 - post-event="remove_rule()">
296 -
297 - <field
298 - type="literal"
299 +
300 + // Révocation d'un certificat client
301 + <page name="REMOVE_RULE_PAGE"
302 + pre-event="turn_off_buttons()"
303 + post-event="remove_rule()">
304 +
305 + <field type="literal"
306 id="desc_remove_rule"
307 value="">
308 <description>DESC_REMOVE_PAGE</description>
309 </field>
310
311 - <subroutine src="print_rule_to_remove()" />
312 + <subroutine src="print_rule_to_remove()" />
313 </page>
314 -
315 +
316 // Display de la config
317 <page name="DISPLAY_CLIENT_CONF_PAGE">
318 - <subroutine src="turn_off_buttons()" />
319 -
320 - <field
321 - type="literal"
322 + <subroutine src="turn_off_buttons()" />
323 +
324 + <field type="literal"
325 id="desc_create_client_conf"
326 value="">
327 <description>DESC_DISPLAY_CLIENT_CONF</description>
328 - </field>
329 -
330 - <subroutine src="print_client_config()" />
331 + </field>
332 + <subroutine src="print_client_config()" />
333 </page>
334 -
335 +
336 // Configuration initiale
337 // CA
338 <page name="CRT_CONFIG_PAGE"
339 - pre-event="turn_off_buttons()"
340 - post-event="write_pem()">
341 -
342 - <field
343 - type="literal"
344 + pre-event="turn_off_buttons()"
345 + post-event="write_pem()">
346 +
347 + <field type="literal"
348 id="desc_initial_config"
349 value="">
350 <description>DESC_CRT_CONFIG_PAGE</description>
351 </field>
352
353 - <field
354 - type="text"
355 + <field type="text"
356 id="crl_url"
357 size="60"
358 value="get_prop('CrlUrl')"
359 validation="is_url">
360 - <label>LABEL_CRL_URL</label>
361 - <description>DESC_CRL_URL</description>
362 + <label>LABEL_CRL_URL</label>
363 + <description>DESC_CRL_URL</description>
364 </field>
365
366 + <field type="textarea"
367 + id="ca_pem"
368 + rows="15"
369 + cols="70"
370 + value="read_pem('cacert.pem')">
371 + <label>LABEL_CA_PEM</label>
372 + <description>DESC_CA_PEM</description>
373 + </field>
374 +
375 + <field type="textarea"
376 + id="crt_pem"
377 + rows="15"
378 + cols="70"
379 + value="read_pem('cert.pem')">
380 + <label>LABEL_CRT_PEM</label>
381 + <description>DESC_CRT_PEM</description>
382 + </field>
383 +
384 + <field type="textarea"
385 + id="key_pem"
386 + rows="15"
387 + cols="70"
388 + value="read_pem('key.pem')">
389 + <label>LABEL_KEY_PEM</label>
390 + <description>DESC_KEY_PEM</description>
391 + </field>
392 +
393 + <field type="textarea"
394 + id="dhpar_pem"
395 + rows="15"
396 + cols="70"
397 + value="read_pem('dh.pem')">
398 + <label>LABEL_DH_PEM</label>
399 + <description>DESC_DH_PEM</description>
400 + </field>
401 +
402 + <field type="textarea"
403 + id="ta_pem"
404 + rows="15"
405 + cols="70"
406 + value="read_pem('takey.pem')">
407 + <label>LABEL_TA_PEM</label>
408 + <description>DESC_TA_PEM</description>
409 + </field>
410
411 - <field type="textarea" id="ca_pem" rows="15" cols="70" value="read_pem('cacert.pem')">
412 - <label>LABEL_CA_PEM</label>
413 - <description>DESC_CA_PEM</description>
414 - </field>
415 -
416 - <field type="textarea" id="crt_pem" rows="15" cols="70" value="read_pem('cert.pem')">
417 - <label>LABEL_CRT_PEM</label>
418 - <description>DESC_CRT_PEM</description>
419 - </field>
420 -
421 - <field type="textarea" id="key_pem" rows="15" cols="70" value="read_pem('key.pem')">
422 - <label>LABEL_KEY_PEM</label>
423 - <description>DESC_KEY_PEM</description>
424 - </field>
425 -
426 - <field type="textarea" id="dhpar_pem" rows="15" cols="70" value="read_pem('dh.pem')">
427 - <label>LABEL_DH_PEM</label>
428 - <description>DESC_DH_PEM</description>
429 - </field>
430 -
431 - <field type="textarea" id="ta_pem" rows="15" cols="70" value="read_pem('takey.pem')">
432 - <label>LABEL_TA_PEM</label>
433 - <description>DESC_TA_PEM</description>
434 - </field>
435 -
436 - <subroutine src="print_button('SAVE')" />
437 -
438 + <subroutine src="print_button('SAVE')" />
439 </page>
440 -
441 - // Clients connectés
442 - <page name="SHOW_CLIENTS_PAGE" pre-event="print_status_message()">
443 - <description>DESC_CONNECTED_CLIENTS_PAGE</description>
444 -
445 - <subroutine
446 - src="print_custom_button(
447 - 'REFRESH',
448 - 'SHOW_CLIENTS_PAGE'
449 - )"
450 - />
451 +
452 + // Clients connectés
453 + <page name="SHOW_CLIENTS_PAGE"
454 + pre-event="print_status_message()">
455 + <description>DESC_CONNECTED_CLIENTS_PAGE</description>
456 +
457 + <subroutine
458 + src="print_custom_button(
459 + 'REFRESH',
460 + 'SHOW_CLIENTS_PAGE'
461 + )"
462 + />
463 <subroutine src="print_clients_table()" />
464 </page>
465
466 - // Déconnecter un client
467 - <page name="CLIENT_DISCONNECT_PAGE"
468 - pre-event="turn_off_buttons()"
469 - post-event="disconnect_client()">
470 -
471 - <field
472 - type="literal"
473 + // Déconnecter un client
474 + <page name="CLIENT_DISCONNECT_PAGE"
475 + pre-event="turn_off_buttons()"
476 + post-event="disconnect_client()">
477 +
478 + <field type="literal"
479 id="desc_client_disconnect"
480 value="">
481 <description>DESC_CLIENT_DISCONECT_PAGE</description>
482 </field>
483
484 - <subroutine src="print_client_to_disconnect()" />
485 - </page>
486 + <subroutine src="print_client_to_disconnect()" />
487 + </page>
488 </form>
489 +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed