forked from ooyinloy/Final-Forking
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
527 lines (441 loc) · 15.7 KB
/
index.html
File metadata and controls
527 lines (441 loc) · 15.7 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
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<link rel="stylesheet" href="https://ssl.gstatic.com/docs/script/css/add-ons1.css">
<?!= include('styles.css') ?>
</head>
<body>
<!--This is the HTML that the user sees when the app launched and the sidebar is opened. -->
<!-- `< ?!= include(X)? >` are template inserts for modularity -->
<!-- and the entire document will be bundled together with inline CSS and JavaScript on deployment -->
<header class="header">
<img src="https://files.inflectra.com/google/sheets/spira_icon.png" class="header-logo">
<h3 class="header-heading">SpiraTeam Google Sheets Integration</h3>
</header>
<!--auth page-->
<div class="panel" id="panel-auth">
<p>Please enter the information used to access your server.</p>
<ul class="form">
<li class="form-pair">
<label
class="form-label"
for="input-url"
>
Spira URL:
</label>
<input
class="form-input"
id="input-url"
name="URL"
placeholder="https://<your-site-name>.com"
type="text"
/>
</li>
<li class="form-pair">
<label
class="form-label"
for="input-userName"
>
User Name:
</label>
<input
class="form-input"
id="input-userName"
name="user-name"
placeholder="User Name"
type="text"
/>
</li>
<li class="form-pair mt-sm">
<label
class="form-label"
for="input-password"
>
RSS Token:
</label>
<input
class="form-input"
id="input-password"
name="password"
placeholder="{Your-RSS-Token}"
type="password"
/>
</li>
</ul>
<p class="secondary">
The RSS token can be generated from your 'My Profile' screen inside SpiraTeam. For further assistance contact your system administrator
</p>
<div class="mt-md">
<button
class="action"
onclick="loginAttempt()"
title="Login using details filled out above"
type="button"
>
Log In
</button>
<button
onclick="clearAuthForm()"
title="Clear the login form"
type="button"
>
Clear
</button>
<button
onclick="panelToggle('help')"
title="View help screens"
type="button"
>
Help
</button>
<!-- Dev mock login data button. For developement only -->
<button
class="hidden"
id="btn-dev"
onclick="setAuthDetails()"
title="Click to load login screen with dev details"
type="button"
>
Dev
</button>
</div>
</div>
<!--main screen-->
<div class="panel offscreen" id="panel-main">
<p
class="secondary"
id="js--loggedInAs"
>
</p>
<div class="btn-group pb-lg">
<button
id="btn-help-main"
onclick="panelToggle('help')"
title="View help screen"
type="button"
>
Help
</button>
<button
onclick="logoutAttempt()"
title="Logout of addon (no data on sheet is affected)"
type="button"
>
Logout
</button>
</div>
<ul class="form">
<li class="form-pair">
<label
class="form-label"
for="select-project"
>
Projects:
</label>
<select
class="form-input"
id="select-project"
>
<!--aysnc populated -->
</select>
</li>
<li class="form-pair">
<label
class="form-label"
for="select-artifact"
>
Artifact:
</label>
<select
class="form-input"
disabled="true"
id="select-artifact"
>
<!--aysnc populated -->
</select>
</label>
<div class="pt-md">
<button
class="action"
disabled="true"
id="btn-template"
onclick="createTemplateAttempt()"
title="Create template for chosen options on first sheet in file"
type="button"
>
Load
</button>
<button
onclick="saveSheetAttempt()"
title="Create a copy of the current sheet in this spreadsheet"
type="button"
>
Copy
</button>
<button
onclick="clearSheetAttempt()"
title="Manually wipe the current sheet of all data"
type="button"
>
Clear
</button>
</div>
<div class="pt-lg">
<div style="display: none" id="template-data-box">
<p>
The template is currently configured to:
<span id="template-project"></span>, <span id="template-artifact"></span>.
</p>
</div>
<button
disabled="true"
id="btn-fromSpira"
onclick="getFromSpiraAttempt()"
type="button"
>
Get from SpiraTeam
</button>
<button
disabled="true"
id="btn-toSpira"
onclick="sendToSpiraAttempt()"
type="button"
>
Send to SpiraTeam
</button>
</div>
</div>
<!--help page-->
<div class="panel offscreen" id="panel-help">
<!-- help button and module for help page -->
<button
onclick="panelToggle('help')"
type="button"
>
Back
</button>
<h3>Quick Help Guide</h3>
<div class="flex" id='help-header'>
<button
class="btn-help"
id="btn-help-login"
onclick="showChosenHelpSection('login')"
title="Help with the login screen"
type="button"
>
LOGIN
</button>
<button
class="btn-help"
id="btn-help-actions"
onclick="showChosenHelpSection('actions')"
title="Help with creating and loading a template onto the spreadsheet"
type="button"
>
TEMPLATES
</button>
<button
class="btn-help"
id="btn-help-fields"
onclick="showChosenHelpSection('fields')"
title="View help for specific fields and artifacts"
type="button"
>
FIELDS
</button>
</div>
<div id="help-section-login" class="help-section hidden">
<h4>Logging into SpiraTeam</h4>
<ol class="list">
<li>
<p>
<b>Enter your SpiraTeam URL</b>
<small>Please enter the web address that you use to access SpiraTeam® in your browser. This is usually of the form 'http://(hostname)/SpiraTeam'. Make sure that you remove any suffixes from the address (e.g. Default.aspx)</small>
</p>
</li>
<li>
<p><b>Enter your user name</b></p>
<small>
Please enter the user name you use to log in to SpiraTeam. (Not Case Sensitive)
</small>
</li>
<li>
<p><b>Enter your RSS token</b></p>
<small> Please enter your RSS token including the curly braces i.e {ExampleRSS}</small>
</li>
</ol>
</div>
<div id="help-section-actions" class="help-section hidden">
<h4>Actions</h4>
<ul class="list">
<li>
<p>
<b>Help</b>
<small>This button will open an in app help menu with basic functionality information.</small>
</p>
</li>
<li>
<p>
<b>Logout</b>
<small>This button will close your connection with SpiraTeam and clear your data. WARNING: your spreadsheet data will be erased as a security measure on disconnect.</small>
</p>
</li>
<li>
<p>
<b>Clear</b>
<small>This button will clear the contents of your current tab including the template.</small>
</p>
</li>
<li>
<p>
<b>Projects</b>
<small>Select a project from the menu.</small>
</p>
</li>
<li>
<p>
<b>Artifacts</b>
<small>Select an artifact from the menu.</small>
</p>
</li>
<li>
<p>
<b>Load Template</b>
<small>Click this button to generate the template for the project and artifact you’ve selected.</small>
</p>
</li>
<li>
<p>
<b>Save</b>
<small>Clicking this button will save your current spreadsheet information into a new tab.</small>
</p>
</li>
<li>
<p>
<b>Send to SpiraTeam</b>
<small>This button will send your properly formatted data to SpiraTeam and it will be added to the current project.</small>
</p>
</li>
<li>
<p>
<b>Import to SpiraTeam</b>
<small><em>Not Currently Supported</em></small>
</p>
</li>
</ul>
</div>
<div id="help-section-fields" class="help-section hidden">
<h4>Required Fields</h4>
<ul class="list">
<li>
<p>
<small>Required fields are marked by their name in the title row shown as bold black text (standard fields are regular light text)</small>
</p>
</li>
<li>
<p>
<small>For test steps, required fields are shown in black, but not bold text.</small>
</p>
</li>
</ul>
<br/>
<h4>Help For Specific Fields</h4>
<ul class="list">
<li>
<p>
<b>ID Fields</b>
<small>Stores the id of the item. This field MUST be left blank to add new items to SpiraTeam</small>
</p>
</li>
<li>
<p>
<b>Test Step Fields</b>
<small>have their header row shown in a lighter background color. Note that the description field is used for both test cases (not required) and steps (required). If the system cannot tell whether an entry is a test case or step it is skipped over when sending to Spira.</small>
</p>
</li>
<li>
<p>
<b>Name</b>
<small>For REQUIREMENTS and RELEASES this field supports indentation, add a “ > “ symbol to indicate how the items in the artifact hierarchy are organized.</small>
</p>
<pre>
Example:
Item 1
>Item 2 child of item 1
>Item 3 child of item 1
>>Item 4 child of item 3
</pre>
</li>
<li>
<p>
<b>Comments</b>
<small><em>Not Currently Supported</em></small>
</p>
</li>
</ul>
<br/>
<h4>Custom Field Entries</h4>
<ul class="list">
<li>
<p>
<b>Text</b>
<small>Enter any text. Include HTML tags for rich text.</small>
</p>
</li>
<li>
<p>
<b>Decimal</b>
<small>Enter any positive number.</small>
</p>
</li>
<li>
<p>
<b>Integer</b>
<small>Enter a non-decimal number.</small>
</p>
</li>
<li>
<p>
<b>Date</b>
<small>Enter the date in any standard format.</small>
</p>
</li>
<li>
<p>
<b>List</b>
<small>Select a value from the dropdown list.</small>
</p>
</li>
<li>
<p>
<b>MultiList</b>
<small>Select an item from the provided list. <em>This is not currently supported</em></small>
</p>
</li>
<li>
<p>
<b>User</b>
<small>Select a name from the list of users</small>
</p>
</li>
</ul>
</div>
</div>
<!-- footer -->
<footer class="footer">
<a href="https://www.inflectra.com" target="_blank">
<img src="https://files.inflectra.com/google/sheets/by_inflectra.png" class="footer-logo">
</a>
</footer>
<!--spinner-->
<div id='loader' class='loader-box hidden'>
<div class="loader"></div>
</div>
<!--Jquery-->
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha256-/SIrNqv8h6QGKDuNoLGA4iret+kyesCkHGzVUUV0shc=" crossorigin="anonymous"></script>
<!--user agent modules-->
<?!= include('data.js') ?>
<?!= include('client.js') ?>
</body>
</html>