/[gli]/trunk/src/net/server/html/webgli/configfiles.pyhtml
Gentoo

Contents of /trunk/src/net/server/html/webgli/configfiles.pyhtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1253 - (show annotations) (download)
Sun Jan 15 21:29:08 2006 UTC (12 years, 10 months ago) by codeman
File size: 7299 byte(s)
  webgli/configfiles:
  	check for key in etc_files['rc.conf'] to fix key error
  webgli/timezone: small fix.

1 <? include /webgli/top.pyhtml ?>
2 <?
3 error_msg = ""
4 if post_params:
5 keymap = ""
6 windowkeys = ""
7 ext_keymap = ""
8 font = ""
9 clock = ""
10 editor = ""
11 disp_manager = ""
12 xsession = ""
13 if post_params['clock']:
14 clock = post_params['clock']
15 if post_params['editor']:
16 editor = post_params['editor']
17 if post_params['disp_manager']:
18 disp_manager = post_params['disp_manager']
19 if post_params['keymap']:
20 keymap = post_params['keymap']
21 if post_params['windowkeys']:
22 windowkeys = post_params['windowkeys']
23 if post_params['ext_keymap']:
24 ext_keymap = post_params['ext_keymap']
25 if post_params['font']:
26 font = post_params['font']
27 if post_params['xsession']:
28 xsession = post_params['xsession']
29 etc_files = shared_info.install_profile.get_etc_files()
30 if not "conf.d/keymaps" in etc_files:
31 if keymap or windowkeys or ext_keymap:
32 etc_files['conf.d/keymaps'] = {}
33 if not "conf.d/consolefont" in etc_files:
34 if font:
35 etc_files['conf.d/consolefont'] = {}
36 if not "conf.d/clock" in etc_files:
37 if clock:
38 etc_files['conf.d/clock'] = {}
39 if not "rc.conf" in etc_files:
40 if editor or disp_manager or xsession:
41 etc_files['rc.conf'] = {}
42 if keymap:
43 etc_files['conf.d/keymaps']['KEYMAP'] = keymap
44 if windowkeys:
45 etc_files['conf.d/keymaps']['SET_WINDOWSKEYS'] = windowkeys
46 if ext_keymap:
47 etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS'] = ext_keymap
48 if font:
49 etc_files['conf.d/consolefont']['CONSOLEFONT'] = font
50 if clock:
51 etc_files['conf.d/clock']['CLOCK'] = clock
52 if editor:
53 etc_files['rc.conf']['EDITOR'] = editor
54 if disp_manager:
55 etc_files['rc.conf']['DISPLAYMANAGER'] = disp_manager
56 if xsession:
57 etc_files['rc.conf']['XSESSION'] = xsession
58 shared_info.install_profile.set_etc_files(etc_files)
59 if not error_msg:
60 error_msg = "Values saved successfully"
61
62 etc_files = shared_info.install_profile.get_etc_files()
63 ?>
64 <: if error_msg:
65 <br><% error_msg %><br><br>
66 :>
67 <form action="/webgli/configfiles.pyhtml" method="POST" enctype="multipart/form-data">
68 <table cellspacing="0" cellpadding="0" width="790" height="600" border="1">
69 <tr height="33%">
70 <td>
71 <table width="100%" height="100%" border="1">
72 <tr>
73 <td width="50%">
74 <table width="100%" height="100%" border="1">
75 <tr>
76 <td><b>Clock:</b><br>Should CLOCK be set to UTC or local? Unless you set your timezone to UTC you will want to choose local.<br><input type="radio" name="clock" value="UTC" <? if ("conf.d/clock" in etc_files) and ("CLOCK" in etc_files['conf.d/clock']) and (etc_files['conf.d/clock']['CLOCK'] == "UTC"): print "checked" ?>>UTC<br>
77 <input type="radio" name="clock" value="local" <? if ("conf.d/clock" in etc_files) and (etc_files['conf.d/clock']['CLOCK'] == "local"): print "checked" ?>>Local
78 </td>
79 </tr>
80 <tr>
81 <td><b>Default Editor:</b><br>Choose your default editor:<br>
82 <input type="radio" name="editor" value="/bin/nano" <? if ("rc.conf" in etc_files) and ("EDITOR" in etc_files['rc.conf']) and (etc_files['rc.conf']['EDITOR'] == "/bin/nano"): print "checked" ?>>/bin/nano (Default editor)<br>
83 <input type="radio" name="editor" value="/usr/bin/vim" <? if ("rc.conf" in etc_files) and ("EDITOR" in etc_files['rc.conf']) and (etc_files['rc.conf']['EDITOR'] == "/usr/bin/vim"): print "checked" ?>>/usr/bin/vim (vi improved editor)<br>
84 <input type="radio" name="editor" value="/usr/bin/emacs" <? if ("rc.conf" in etc_files) and ("EDITOR" in etc_files['rc.conf']) and (etc_files['rc.conf']['EDITOR'] == "/usr/bin/emacs"): print "checked" ?>>/usr/bin/emacs (The emacs editor)
85 </td>
86 </tr>
87 </table>
88 </td>
89 <td width="50%"><b>Display Manager:</b><br>Choose your display manager for Xorg-x11 (note you must make sure that package also gets installed for it to work):<br>
90 <input type="radio" name="disp_manager" value="xdm" <? if ("rc.conf" in etc_files) and ("DISPLAYMANAGER" in etc_files['rc.conf']) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "xdm"): print "checked" ?>>xdm (X Display Manager (NOT recommended))<br>
91 <input type="radio" name="disp_manager" value="gdm" <? if ("rc.conf" in etc_files) and ("DISPLAYMANAGER" in etc_files['rc.conf']) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "gdm"): print "checked" ?>>gdm (Gnome Display Manager)<br>
92 <input type="radio" name="disp_manager" value="kdm" <? if ("rc.conf" in etc_files) and ("DISPLAYMANAGER" in etc_files['rc.conf']) and (etc_files['rc.conf']['DISPLAYMANAGER'] == "kdm"): print "checked" ?>>kdm (KDE Display Manager)
93 </td>
94 </tr>
95 </table>
96 </td>
97 </tr>
98 <tr height="66%">
99 <td>
100 <table width="100%" height="100%" border="1">
101 <tr>
102 <td width="50%"><b>Keymap</b><br>Choose your desired keymap:<br>
103 <select name="keymap">
104 <option value=""> </option>
105 <? keymap_list = GLIUtility.generate_keymap_list() ?>
106 <: for keymap in keymap_list:
107 <option value="<% keymap %>" <? if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['KEYMAP'] == keymap): print "selected" ?>><% keymap %></option>
108 :>
109 </select><br>
110 <br><b>Windowkeys</b><br>Should we first load the 'windowkeys' console keymap?
111 <input type="radio" name="windowkeys" value="yes" <? if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['SET_WINDOWSKEYS'] == "yes"): print "checked" ?>> Yes <input type="radio" name="windowkeys" value="no" <? if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['SET_WINDOWSKEYS'] == "no"): print "checked" ?>> No <br>
112 <br><b>Extended Keymaps</b><br>This sets the maps to load for extended keyboards. Most users will leave this as is.<br>
113 <input type="text" name="ext_keymap" value="<? if ("conf.d/keymaps" in etc_files) and (etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS']): print etc_files['conf.d/keymaps']['EXTENDED_KEYMAPS'] ?>"><br>
114 </td>
115 <td width="50%">
116 <table width="100%" height="100%" border="1">
117 <tr>
118 <td><b>Console Font</b><br>Choose your desired console font:<br>
119 <select name="font">
120 <option value=""> </option>
121 <? font_list = GLIUtility.generate_consolefont_list() ?>
122 <: for font in font_list:
123 <option value="<% font %>" <? if ("conf.d/consolefont" in etc_files) and (etc_files['conf.d/consolefont']['CONSOLEFONT'] == font): print 'selected' ?>><% font %></option>
124 :>
125 </select>
126 </td>
127 </tr>
128 <tr>
129 <td><b>Xsession</b><br>Choose what window manager you want to start default with X if run with xdm, startx, or xinit. (common options are Gnome or Xsession: <input type="text" name="xsession" value="<? if ("rc.conf" in etc_files) and ('XSESSION' in etc_files['rc.conf']): print etc_files['rc.conf']['XSESSION'] ?>"></td>
130 </tr>
131 </table>
132 </td>
133 </tr>
134 </table>
135 </td>
136 </tr>
137 </table>
138 <input type="submit" name="SaveConfigFiles" value="Save Values">
139 </form>
140 <? include /webgli/bottom.pyhtml ?>

Properties

Name Value
svn:eol-style native

  ViewVC Help
Powered by ViewVC 1.1.20