-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings2.php
More file actions
501 lines (435 loc) · 25.6 KB
/
settings2.php
File metadata and controls
501 lines (435 loc) · 25.6 KB
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
<?php
require_once('classes/autoloader.php');
$logger = new logging();
$dbm = new dbHelper();
$sHelper = new sessionHelper();
require_once('include/header.php.inc');
$usersettings = UserSettings::getUserSettings();
$settings = ApplicationSettings::getSettings();
list($c1, $c2, $c3, $ce1, $ce2, $ce3) = getCustomFieldProperties($settings);
?>
<h1>Settings</h1>
<div id="msgdiv"></div>
<div id="content">
<table border=0>
<tr>
<td width="800" valign="top">
<h3>My Settings</h3>
<div>
<a href="#" id='change_personal_password_menu'>Change password</a>
</div>
<div id='change_personal_password'>
<table border="0">
<tr>
<td align="left">
Old password
</td>
<td><input type="password" size="50" value="" id="changepasswordold">
</td>
</tr>
<tr>
<td align="left">
New password
</td>
<td><input type="password" size="50" value="" id="changepassword1">
</td>
</tr>
<tr>
<td align="left">
Retype password
</td>
<td><input type="password" size="50" value="" id="changepassword2">
</td>
</tr>
</table>
<span class='settings_submit' id='change_personal_password_exe'>CHANGE PASSWORD</span>
</div>
<div>
<a href="#" id='change_personal_settings_menu'>User settings</a>
</div>
<div id='change_personal_settings'>
<h3>Settings for List sessions</h3>
<?php
$all = "";
$team = "";
$mine = "";
if ($usersettings['list_view'] == "team")
$team = "selected";
if ($usersettings['list_view'] == "all")
$all = "selected";
if ($usersettings['list_view'] == "mine")
$mine = "selected";
if ($usersettings['autosave'] == 1)
$autosaveCheckedHtml = "checked=\"checked\"";
else
$autosaveCheckedHtml = "";
?>
<select id="personal_changelistsettings_options" name="listsettings">
<option value="all" <?php echo $all; ?>>All sessions</option>
<option value="mine" <?php echo $mine; ?>>My own sessions</option>
<option value="team" <?php echo $team; ?>>My teams sessions</option>
</select>
<!--<h3>Autosave when edit sessions</h3>
Enable: <input type="checkbox" id="autosave" <?php //echo $autosaveCheckedHtml;?> value="checked">
-->
<h3>Settings for new session</h3><br>
Select default team:
<?php HtmlFunctions::echoTeamSelect($usersettings['default_team'], true, "personal_select_team"); ?>
<br>
Select default sprint:
<?php HtmlFunctions::echoSprintSelect($usersettings['default_sprint'], false, "personal_select_sprint"); ?>
<br>
Select default area:
<?php HtmlFunctions::echoAreaSelectSingel($usersettings['default_area'], false, "personal_select_area"); ?>
<div>
<span class='settings_submit' id='change_personal_settings_exe'>CHANGE SETTINGS</span>
</div>
<!-- <a href="settings.php">Old settings page</a>-->
</div>
<div id="contentmenu">
<h3 id="manage_content">Manage Content</h3>
<div>
<a href="#" id='team_menu'>Manage Team Entries</a>
</div>
<div id='add_remove_team'>
<div class='divider_settings'></div>
<p>Add Team</p>
<input type="text" size="50" value="" id="teamname"> <span class='settings_submit'
id='add_team'>ADD</span>
<div class='divider_settings_noline'></div>
<p>Remove Team</p>
<div>
<select id='remove_team_select'></select> <span class='settings_submit'
id='remove_team'>REMOVE</span>
</div>
<div class='divider_settings'></div>
</div>
<div>
<a href="#" id='sprint_menu'>Manage Sprint Entries</a>
</div>
<div id='add_remove_sprint'>
<div class='divider_settings'></div>
<p>Add sprint</p>
<input type="text" size="50" value="" id="sprintname"> <span class='settings_submit'
id='add_sprint'>ADD</span>
<div class='divider_settings_noline'></div>
<p>Remove sprint</p>
<div>
<select id='remove_sprint_select'></select> <span class='settings_submit'
id='remove_sprint'>REMOVE</span>
</div>
<div class='divider_settings'></div>
</div>
<div>
<a href="#" id='area_menu'>Manage Area Entries</a>
</div>
<div id='add_remove_area'>
<div class='divider_settings'></div>
<p>Add Area</p>
<input type="text" size="50" value="" id="areaname"> <span class='settings_submit'
id='add_area'>ADD</span>
<div class='divider_settings_noline'></div>
<p>Remove Area</p>
<div>
<select id='remove_area_select'></select> <span class='settings_submit'
id='remove_area'>REMOVE</span>
</div>
<div class='divider_settings'></div>
</div>
<div>
<a href="#" id='testenvironments_menu'>Manage Test Environments Entries</a>
</div>
<div id='add_remove_testenvironment'>
<div class='divider_settings'></div>
<p>Add testenvironment</p>
Name:<br> <input type="text" size="50" value="" id="teName"><br>
Web page with information about software running on environment:<br><i>By adding this
sessionweb
will be able to automatically fetch running software from this environment</i><br>
<input type="text" size="50" value="" id="teUrl"><br>
Username:<br><input type="text" size="50" value="" id="teUser"><br>
Password:<br><input type="text" size="50" value="" id="tePassword"><br>
<span class='settings_submit' id='add_testenvironment'>ADD</span>
<div class='divider_settings_noline'></div>
<p>Remove testenvironment</p>
<div>
<select id='remove_testenvironment_select'></select> <span
id='remove_testenvironment'>REMOVE</span>
</div>
<div class='divider_settings'></div>
</div>
<div>
<a href="#" id='customFieldsEntries_menu'>Manage Custom Fields Entries</a>
</div>
<div id='customFieldsEntries_testenvironment'>
<div class='divider_settings'></div>
<p>Add Item</p>
<?php
echoCustomFieldAddItem("custom1_name", 1, $settings);
echoCustomFieldAddItem("custom2_name", 2, $settings);
echoCustomFieldAddItem("custom3_name", 3, $settings);
?>
<div class='divider_settings_noline'></div>
<div class='divider_settings'></div>
</div>
</div>
<div id="adminmenu">
<h3 id="site_settings">Site Settings</h3>
<div>
<a href="#" id='customfields_menu'>Add/Update Custom Fields Names</a>
</div>
<div id='manage_customfields'>
<?php
list($c1, $c2, $c3, $ce1, $ce2, $ce3) = getCustomFieldProperties($settings);
?>
<div class='divider_settings'></div>
Custom field 1:<br> <input type="text" size="50"
value="<?php echo $settings['custom1_name']; ?>" id="cf1Name">
Multiselect:<input type="checkbox" id="cf1multiselect" <?php echo $c1; ?> value="1">
Enabled:<input type="checkbox" id="cf1enabled" <?php echo $ce1; ?> value="1">
<br>
Custom field 2:<br> <input type="text" size="50"
value="<?php echo $settings['custom2_name']; ?>" id="cf2Name">
Multiselect:<input type="checkbox" id="cf2multiselect" <?php echo $c2; ?> value="1">
Enabled:<input type="checkbox" id="cf2enabled" <?php echo $ce2; ?> value="1"><br>
Custom field 3:<br> <input type="text" size="50"
value="<?php echo $settings['custom3_name']; ?>" id="cf3Name">
Multiselect:<input type="checkbox" id="cf3multiselect" <?php echo $c3; ?> value="1">
Enabled:<input type="checkbox" id="cf3enabled" <?php echo $ce3; ?> value="1"><br>
<span class='settings_submit' id='update_customfields'>ADD/UPDATE</span>
<!-- <div class='divider_settings_noline'></div>-->
<div class='divider_settings'></div>
</div>
<div>
<a href="#" id='appconfig_menu'>Application Configuration</a>
</div>
<div id='add_remove_appconfig'>
<div class='divider_settings'></div>
<p>Configure application</p>
<form id="appForm">
<table width="*" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Normalized Sessions time(min)
</td>
<td><input type="text" size="50" name="normlizedsessiontime"
id="normlizedsessiontime">
</td>
</tr>
<tr>
<td>
</td>
<td><span class='italic'>If a session is 120min and the normalized Sessions time is 90 the session is counted as 1.33 sessions (120/90).
This is used to be able to compare testers throughput with each other.</span>
</td>
</tr>
<tr>
<td>Defect Managment System URL
</td>
<td><input type="text" size="50" value="" name="url_to_dms" id="url_to_dms">
</td>
</tr>
<tr>
<td>
</td>
<td><span class='italic'>e.g. "http://code.google.com/p/sessionweb/issues/detail?id=" issue number will be added at the end automatically.</span>
</td>
</tr>
<tr>
<td>Requirement Management System URL
</td>
<td><input type="text" size="50" value="" name="url_to_rms" id="url_to_rms">
</td>
</tr>
<tr>
<td>
</td>
<td><span class='italic'>e.g. "http://code.google.com/p/sessionweb/issues/detail?id=" issue number will be added at the end automatically.</span>
</td>
</tr>
<tr>
<td>
</td>
<td><b>Activate Modules</b>
</td>
</tr>
<tr>
<td>Team
</td>
<td><input type="checkbox" id="app_team" name="team" checked="checked"
value="checked">
</td>
</tr>
<tr>
<td>Sprint
</td>
<td><input type="checkbox" id="app_sprint" name="sprint" checked="checked"
value="checked">
</td>
</tr>
<tr>
<td>Area
</td>
<td><input type="checkbox" id="app_area" name="area" checked="checked"
value="checked">
</td>
</tr>
<tr>
<td>Test Environment
</td>
<td><input type="checkbox" id="app_env" name="env" checked="checked"
value="checked">
</td>
</tr>
<!-- <tr>-->
<!-- <td>Public view-->
<!-- </td>-->
<!-- <td><input type="checkbox" id="app_publicview" name="publicview" checked="checked" value="checked">-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td>-->
<!-- </td>-->
<!-- <td><span class='italic'>Public view makes it possible for a person that does not have a Sessionweb account to view a session.-->
<!-- This is made by sharing the public link that contains a unique key for that specific session.</span>-->
<!-- </td>-->
<!-- </tr>-->
<!-- <tr>-->
<!-- <td>Word Cloud in session view-->
<!-- </td>-->
<!-- <td><input type="checkbox" id="app_wordcloud" name="wordcloud" checked="checked" value="checked">-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td>
</td>
</tr>
</table>
</form>
<span class='settings_submit' id='update_appconfig'>UPDATE</span>
<div class='divider_settings'></div>
</div>
<div>
<a href="#" id='bulkclosesessions_menu'>Bulk close sessions</a>
</div>
<div id='bulkclosesessions'>
<div class='divider_settings'></div>
<p>Bulk close sessions</p>
This command will set all sessions older then the given date that are in state EXECUTED to
closed.<br>
Close sessions older then:<br> <input type="text" size="10" value=""
id="datepicker_bulkclosesessions"><br>
<span class='settings_submit' id='bulkclosesessions_close'>CLOSE</span>
</div>
<!-- <div>-->
<!-- <a href="#" id='configuration_menu'>Manage Custom Fields</a>-->
<!-- </div>-->
<!-- <div id='change_configuration'>-->
<!-- ----->
<!-- </div>-->
<!---->
<!-- <div class='divider_settings'></div>-->
<!---->
<!-- <div>-->
<!-- <a href="#" id='systemcheck_menu'>System Check</a>-->
<!-- </div>-->
<!-- <div id='systemcheck'>-->
<!-- ----->
<!-- </div>-->
<a href="log.php">View Sessionweb log file</a><br>
<a href="logsql.php">View Sessionweb sql log file</a><br>
<a href="systemcheck.php">Sessionweb system check</a>
<h3 id="user_management">User Management</h3>
<div>
<a href="#" id='adduser_menu'>Add user</a>
</div>
<div id='adduser'>
<div class='divider_settings'></div>
<p>Add a new user to sessionweb<br>
<span id='usermessages'></span></p><br>
<form id="adduserForm">
Full name:<input id="user_fullname" type="text" size="40" value="" name="fullname"><span
class="italic">Minimum length is 4 chars</span><br>
User name:<input id="user_username" type="text" size="40" value="" name="username"><span
class="italic">Minimum length is 4 chars</span><br>
Password:<input id="user_pw1" type="password" size="40" value="" name="pw1"> <span
class="italic">Minimum length is 6 chars</span> <br>
Retype password:<input id="user_pw2" type="password" size="40" value="" name="pw2"><br>
<?php
if ($_SESSION['settings']['team'] == 1) {
echo "Team:";
HtmlFunctions::echoTeamSelect("");
echo "<br>";
}
?>
Admin: <input type="checkbox" name="admin" value="yes">
Superuser: <input type="checkbox" name="superuser" value="yes"><br>
<span class='settings_submit' id='adduser_add'>ADD</span>
</form>
</div>
<div>
<a href="#" id='deleteuser_menu'>Delete user</a>
</div>
<div id='deleteuser'>
<div class='divider_settings'></div>
<p>Remove a user from sessionweb.<br>
Please be aware that the user account will still be in the database but it is
not visible and you can not create a new user with the same username (you may enable the
account direct through the
database if neede). Reason for this is to keep the sessionweb history for that user.<br>
<span id='usermessagesdelete'></span></p><br>
<form id="deleteuserForm">
<?php
echo "User:";
HtmlFunctions::echoTesterFullNameSelect(null, false, false, true);
echo "<br>";
?>
<span class='settings_submit' id='deleteuser_delete'>Delete user</span>
</form>
</div>
<a href="settings.php?command=listusers">User management</a><br>
</div>
</td>
<td width="300" valign="top">
<h3>Log</h3>
<div id='log'></div>
</td>
</tr>
</table>
</div>
<?php
require_once('include/footer.php.inc');
function getCustomFieldProperties($settings)
{
$c1 = "";
$c2 = "";
$c3 = "";
if ($settings['custom1_multiselect'])
$c1 = "checked='checked'";
if ($settings['custom2_multiselect'])
$c2 = "checked='checked'";
if ($settings['custom3_multiselect'])
$c3 = "checked='checked'";
$ce1 = "";
$ce2 = "";
$ce3 = "";
if ($settings['custom1'])
$ce1 = "checked='checked'";
if ($settings['custom2'])
$ce2 = "checked='checked'";
if ($settings['custom3'])
$ce3 = "checked='checked'";
return array($c1, $c2, $c3, $ce1, $ce2, $ce3);
return array($c1, $c2, $c3, $ce1, $ce2, $ce3);
}
function echoCustomFieldAddItem($customFieldsName, $customFieldsNo, $settings)
{
if ($settings['custom' . $customFieldsNo] == 1) {
echo "Field: " . $settings[$customFieldsName] . "<br> <input type='text' size='50' value='' id='c" . $customFieldsNo . "Name'>";
echo " <span class='settings_submit' id='add_customFieldsc" . $customFieldsNo . "Entries'>ADD</span>";
echo " <div>";
echo " <select id='remove_customFieldsc" . $customFieldsNo . "Entries_select'></select>";
echo " <span class='settings_submit' id='remove_customFieldsc" . $customFieldsNo . "Entries'>REMOVE</span>";
echo " </div>";
}
}
?>