]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/profile-manager/control.html
id ;-) and lapply patched
[helm.git] / helm / DEVEL / profile-manager / control.html
1 <html>
2
3 <head>
4 <title>Profile Manager Control Panel</title>
5
6 <style type="text/css">
7 #normal { background-color: white; font-family: sans-serif }
8 td.head { font-weight: bold; background-color: #e6e6fa; color: brown }
9 td.back { background-color: #e6e6fa; color: brown }
10 #indent { margin-left: 1cm; margin-right: 1cm }
11 </style>
12
13 <script language="JavaScript">
14 <!--
15 function getParam(name, def)
16 {
17   var search = top.location.search;
18   search = search.slice(1);
19   var args = search.split("&");
20   var value = "-1";
21   for (var i = 0 ; i < args.length ; i++) {
22     var couple = args[i].split("=");
23     if (couple[0] == name) value = couple[1];
24   }
25   if (value == "-1") value = def;
26   return value;
27 }
28
29 function getInitialURL()
30 {
31   return getParam("pmURL", "http://mowgli.cs.unibo.it:58099/");
32 }
33
34 function getURL()
35 {
36   return document.pmURL.elements[0].value;
37 }
38
39 function setURL(ss)
40 {
41   if (ss.selectedIndex == 0) {
42     document.pmURL.elements[0].value = "";
43   } else {
44     document.pmURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value;
45   }
46 }
47
48 function escapePassword(pwd)
49 {
50   if (ss == "") {
51     return "";
52   } else {
53     return ("&password=" + escape(pwd));
54   }
55 }
56
57 function getAccess(ss)
58 {
59   return (ss.options[ss.selectedIndex].value);
60 }
61 -->
62 </script>
63
64 </head>
65
66 <body>
67 <a name="top"/>
68 <table border="0" width="100%" cellpadding="4">
69 <tr><td class="head" align="center"><big><big>Profile Manager Control Panel</big></big></td></tr>
70 </table>
71
72 <br />
73
74 <div>
75 This is a control panel for the profile manager. You can control a
76 local or remote profile manager by filling the appropriate field below
77 and sending the desired commands. Any command issued to the profile
78 manager results into an XML response.  Note that in order to use this
79 page <i>you must have JavaScript enabled</i>.  If you have troubles,
80 please send an email to the author: lpadovan at cs dot unibo dot it.
81 </div>
82
83 <p>
84 <div style="color: red">
85 <b>WARNING</b>: the information stored in a profile,
86 including the password, IS NOT encrypted in the profile nor while it
87 is travelling from your computer to the profile manager.  DO NOT USE
88 THE PROFILE MANAGER FOR STORING SENSIBLE INFORMATION LIKE PASSWORDS
89 FOR SECURE ACCOUNTS OR ANY OTHER PERSONAL DATA.  </div>
90 </p>
91
92 <div>
93 <br />
94
95 <table border="1">
96    <tr> <td>
97      <form name="pmURL">
98        Profile Manager <b>URL</b>
99        <input type="text" value="http://localhost:58099/" size="50"/>
100        <select onChange="setURL(this)">
101          <option value="">---</option>
102          <option value="localhost:58099/">localhost</option>
103          <option value="mowgli.cs.unibo.it:58099/">mowgli</option>
104        </select>
105      </form>
106    </td> </tr>
107    <tr> <td>
108      <form>
109         <b>List</b> the profiles currently stored in the Profile Manager<br />
110         <input type="button" value="List"
111          onClick="top.result.location.replace(getURL() + 'list')"/>
112       </form>
113     </td>
114   </tr>
115   <tr>
116     <td>
117       <form name="newProfile">
118         <b>Create</b> a new profile<br />
119         <table>
120           <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /> (leave blank if you want an ID to be assigned automatically)</td></tr>
121           <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
122         </table>
123         <input type="button" value="Create"
124          onClick="top.result.location.replace(getURL() +
125           'new?id=' + escape(document.newProfile.elements[0].value))"/>
126       </form>
127     </td>
128   </tr>
129   <tr>
130     <td>
131       <form name="delProfile">
132         <b>Delete</b> an existing profile<br />
133         <table>
134           <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
135           <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
136         </table>
137         <input type="button" value="Delete"
138          onClick="top.result.location.replace(getURL() +
139           'del?id=' + escape(document.delProfile.elements[0].value) +
140           '&password=' + escape(document.delProfile.elements[1].value))"/>
141       </form>
142     </td>
143   </tr>
144   <tr>
145     <td>
146       <form name="getProfile">
147         <b>Retrieve</b> an existing profile<br />
148         <table>
149           <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
150           <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
151         </table>
152         <input type="button" value="Get"
153          onClick="top.result.location.replace(getURL() +
154           'get?id=' + escape(document.getProfile.elements[0].value) +
155           '&password=' + escape(document.getProfile.elements[1].value))"/>
156       </form>
157     </td>
158   </tr>
159   <tr>
160     <td>
161       <form name="setProfile">
162         <b>Set</b> the value for a field in an existing profile<br />
163         <table>
164           <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
165           <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
166           <tr><td>Field:</td><td><input type="text" name="field" value="" /></td></tr>
167           <tr><td>Value:</td><td><input type="text" name="value" value="" /> (optional, if blank will remove the field from the profile)</td></tr>
168         </table>
169         <input type="button" value="Set"
170          onClick="top.result.location.replace(getURL() +
171           'set?id=' + escape(document.setProfile.elements[0].value) +
172           '&password=' + escape(document.setProfile.elements[1].value) +
173           '&field=' + escape(document.setProfile.elements[2].value) +
174           '&value=' + escape(document.setProfile.elements[3].value))"/>
175       </form>
176     </td>
177   </tr>
178   <tr>
179     <td>
180       <form name="setPassword">
181         <b>Set/Change</b> the password for a profile<br />
182         <table>
183           <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
184           <tr><td>Old password:</td><td><input type="text" name="old_password" value="" /> (optional)</td></tr>
185           <tr><td>New password:</td><td><input type="text" name="new_password" value="" /> (optional)</td></tr>
186         </table>
187         <input type="button" value="Set/Change"
188          onClick="top.result.location.replace(getURL() +
189           'password?id=' + escape(document.setPassword.elements[0].value) +
190           '&old_password=' + escape(document.setPassword.elements[1].value) +
191           '&new_password=' + escape(document.setPassword.elements[2].value))"/>
192       </form>
193     </td>
194   </tr>
195   <tr>
196     <td>
197       <form name="setAccess">
198         <b>Set</b> the access capabilities for a profile<br />
199         <table>
200           <tr><td>Profile ID:</td><td> <input type="text" name="id" value="" /></td></tr>
201           <tr><td>Password:</td><td><input type="text" name="password" value="" /> (optional)</td></tr>
202           <tr><td>Read access:</td><td>
203           <select>
204             <option value="allowed">allowed</option>
205             <option value="denied">denied</option>
206             <option value="password">allowed with password</option>
207           </select>
208           </td></tr>
209           <tr><td>Write access:</td><td>
210           <select>
211             <option value="allowed">allowed</option>
212             <option value="denied">denied</option>
213             <option value="password">allowed with password</option>
214           </select>
215           </td></tr>
216           <tr><td>Profile access:</td><td>
217           <select>
218             <option value="allowed">allowed</option>
219             <option value="denied">denied</option>
220             <option value="password">allowed with password</option>
221           </select>
222           </td></tr>
223         </table>
224         <input type="button" value="Set"
225          onClick="top.result.location.replace(getURL() +
226           'access?id=' + escape(document.setAccess.elements[0].value) +
227           '&password=' + escape(document.setAccess.elements[1].value) +
228           '&read=' + getAccess(document.setAccess.elements[2]) +
229           '&write=' + getAccess(document.setAccess.elements[3]) +
230           '&profile=' + getAccess(document.setAccess.elements[4]))"/>
231       </form>
232     </td>
233   </tr>
234 </table>
235 </div>
236
237 </body>
238
239 </html>
240