-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
657 lines (606 loc) · 39.3 KB
/
index.html
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
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<!-- Local CSS -->
<link rel="stylesheet" href="style/index.css">
<!-- Google Font -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
<title>Hello, world!</title>
</head>
<body>
<!-- Add Back to Top Button -->
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<main>
<div class="container mt-5 col-sm-10">
<div class="wrapper">
<div class="container-fluid">
<div class="row">
<div class="col-sm-2">
<ul class="sidebar-nav">
<p>API</p>
<p> Endpoint</p>
<p> Report</p>
<li> <strong>Fields</strong></li><br>
<li>
<a href="#doc_nama"> Nama</a>
</li>
<li>
<a href="#doc_email"> Surel</a>
</li>
<li>
<a href="#doc_laporan"> Laporan</a>
</li>
<li>
<a href="#doc_keparahan"> Keparahan</a>
</li>
<li>
<a href="#doc_perangkat"> Perangkat</a>
</li>
<li>
<a href="#doc_unggah"> Unggah</a>
</li>
</ul>
</div>
</div>
</div>
<div class="main-content">
<div class="title">
<h1><center>Dokumentasi API Bug Report</center></h1>
<p><center>for Bintang Putera</center></p>
</div>
<div class="section-title mt-5">
<h2>Struktur/UI Bug Report Form</h2>
</div>
<div class="content mt-2">
<form action="">
<div class="form-group mt-2">
<a href="#identitas"><h2 class="identitas">Identitas <span class="material-symbols-outlined">link</span></h2></a>
<div class="form-group mt-3">
<label for='name'>Nama*</label>
<input class="form-control" type='text' name='name' id='name' placeholder="Example: Bintang Putera [autofill]" required readonly>
</div>
<div class="form-group mt-2">
<label for='email'>Surel</label>
<input class="form-control" type='text' name='email' id='email' placeholder="Example: [email protected] [autofill]" required readonly>
</div>
</div>
<div class="form-group mt-5">
<a href="#keterangan"><h2>Keterangan <span class="material-symbols-outlined">link</span></h2></a>
<div class="form-group mt-3">
<label for='report'>Laporan*</label>
<textarea class="form-control" name="report" id="report" cols="30" rows="10">Lorem ipsum dolor sit amet consectetur adipisicing elit. Labore doloremque officia amet ex reiciendis iure illo earum laborum recusandae, eius quibusdam provident quidem maiores natus nesciunt. Ipsam exercitationem, obcaecati enim molestiae at eveniet sapiente quod sit aspernatur repellat labore inventore, porro amet eum placeat harum et impedit consequatur nostrum repudiandae dolore! Atque aliquam repudiandae impedit neque in commodi maiores ipsam sit, error perferendis amet qui facere velit ab voluptate repellat laudantium molestias eaque quos sint officiis facilis architecto saepe. Est animi consequatur eligendi, asperiores excepturi, saepe voluptas vitae suscipit ipsam, fugit iusto quia praesentium dicta facilis sapiente esse consequuntur quam.</textarea>
<small id="passwordHelpBlock" class="form-text text-muted">
0/255
</small>
</div>
<div class="form-group mt-3">
<label for="severity">Keparahan*</label>
<div class="input-group mt-2">
<label class="input-group-text" for="inputGroupSelect01">Tingkat Keparahan</label>
<select class="form-select" id="inputGroupSelect01">
<option value="1">Perlu diperbaiki sesegera mungkin</option>
<option value="2">Parah</option>
<option value="3">Sedang</option>
<option value="4">Kecil</option>
<option value="5" selected>Saran</option>
</select>
</div>
</div>
<div class="form-group mt-3">
<label for='platform'>Platform dan Lingkungan Perangkat*</label>
<div class="form-group row">
<label for="phone-brand" class="col-sm-3 col-form-label not-bold">Merek HP</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="phone-brand" placeholder="Phone Brand [autofill]" readonly>
</div>
</div>
<div class="form-group row">
<label for="RAM" class="col-sm-3 col-form-label not-bold">RAM</label>
<div class="col-sm-7">
<input type="text" class="form-control" id="RAM" placeholder="RAM [autofill]" onkeydown="return /^[0-9]+/i.test(event.key)" readonly>
</div>
<div class="col-sm-2">
<input type="text" class="form-control" id="RAM" placeholder="GB" readonly>
</div>
</div>
<div class="form-group row">
<label for="android-version" class="col-sm-3 col-form-label not-bold">Versi Android</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="android-version" placeholder="Android Version [autofill]" readonly>
</div>
</div>
</div>
<div class="form-group mt-4">
<label for='laporan'>Lampirkan berkas, video, atau gambar <br><small> <sup>• Batas ukuran berkas: 1 MB</sup></small> <br> <small> <sup>• Maksimal hingga 1 berkas</sup></small></label>
<div class="form-group mt-2">
<label for="img" class="not-bold">Pilih berkas:</label>
<input class="btn btn-warning" type="file" id="img" name="img" accept="image/*">
</div>
</div>
</div>
<section class="button-form mt-5">
<p>*Wajib diisi</p>
<button class="btn btn-primary">Kirim</button>
</section>
</form>
</div>
</div>
</div>
<hr>
<div class="explanation">
<h1><center>Dokumentasi</center></h1>
<div class="explanation-identitas mt-5" id="identitas">
<h2>Identitas</h2>
<ol type="1">
<li><span id="doc_nama">Nama</span>
<ul>
<li>Description
<div class="description">
<p>✔️ Already Implemented</p>
</div>
</li>
<li>URL
<div class="url">
<ul style="list-style-type:disc">
<li><code>/report</code></li>
</ul>
</div>
</li>
<li>Method
<div class="method">
<ul style="list-style-type:disc">
<li><code>POST</code></li>
</ul>
</div>
</li>
<li>Headers
<div class="headers">
<ul style="list-style-type:disc">
<li><code>Content-Type</code> : <code>multipart/form-data</code></li>
<li><code>Authorization</code> : <code>Bearer <token></code></li>
</ul>
</div>
</li>
<li>Request Body
<div class="request">
<ul style="list-style-type:disc">
<li><code>name</code> as <code>string</code></li>
</ul>
</div>
</li>
<li>Response
<div class="response">
<pre v-pre data-lang="json">
<code class="lang-json">
{
"status": "success",
"error": false,
"message": "Report is successfully added to Firestore",
"date": "04-09-2022 07:49:49",
"data": {
"reportId": "auJtkpoCbuljkxis"
}
}
</code>
</pre>
</div>
</li>
</ul>
</li>
<li><span id="doc_email">Email</span>
<ul>
<li>Description
<div class="description">
<p>✔️ Already Implemented</p>
</div>
</li>
<li>URL
<div class="url">
<ul style="list-style-type:disc">
<li><code>/report</code></li>
</ul>
</div>
</li>
<li>Method
<div class="method">
<ul style="list-style-type:disc">
<li><code>POST</code></li>
</ul>
</div>
</li>
<li>Headers
<div class="headers">
<ul style="list-style-type:disc">
<li><code>Content-Type</code> : <code>multipart/form-data</code></li>
<li><code>Authorization</code> : <code>Bearer <token></code></li>
</ul>
</div>
</li>
<li>Request Body
<div class="request">
<ul style="list-style-type:disc">
<li><code>email</code> as <code>string</code></li>
</ul>
</div>
</li>
<li>Response
<div class="response">
<pre v-pre data-lang="json">
<code class="lang-json">
{
"status": "success",
"error": false,
"message": "Report is successfully added to Firestore",
"date": "04-09-2022 07:49:49",
"data": {
"reportId": "auJtkpoCbuljkxis"
}
}
</code>
</pre>
</div>
</li>
</ul>
</li>
</ol>
</div>
<div class="explanation-keterangan mt-5" id="keterangan">
<h2>Keterangan</h2>
<ol type="1">
<li><span id="doc_laporan">Laporan</span>
<ul>
<li>Description
<div class="description">
<p>✔️ Already Implemented</p>
</div>
</li>
<li>URL
<div class="url">
<ul style="list-style-type:disc">
<li><code>/report</code></li>
</ul>
</div>
</li>
<li>Method
<div class="method">
<ul style="list-style-type:disc">
<li><code>POST</code></li>
</ul>
</div>
</li>
<li>Headers
<div class="headers">
<ul style="list-style-type:disc">
<li><code>Content-Type</code> : <code>multipart/form-data</code></li>
<li><code>Authorization</code> : <code>Bearer <token></code></li>
</ul>
</div>
</li>
<li>Request Body
<div class="request">
<ul style="list-style-type:disc">
<li><code>message</code> as <code>string</code></li>
</ul>
</div>
</li>
<li>Response
<div class="response">
<pre v-pre data-lang="json">
<code class="lang-json">
{
"status": "success",
"error": false,
"message": "Report is successfully added to Firestore",
"date": "04-09-2022 07:49:49",
"data": {
"reportId": "auJtkpoCbuljkxis"
}
}
</code>
</pre>
</div>
</li>
</ul>
</li>
<li><span id="doc_keparahan">Keparahan</span>
<ul>
<li>Description
<div class="description">
<p class="tipe-data">Data Type: <strong>String</strong></p>
<p>Pada field <strong>Keparahan</strong>, user akan memilih opsi <strong>Tingkat Keparahan</strong> berdasarkan nilai/value drop down list yang ada (Perlu diperbaiki sesegera mungkin, Parah, Sedang, Kecil, dan Saran). </p>
<p>Salah satu opsinya menjadi placeholder dari input field <strong>Tingkat Keparahan</strong></p>
<p>Label <strong>Tingkat Keparahan</strong> berada di sebelah kiri drop downnya (satu line)</p>
</div>
</li>
<li>URL
<div class="url">
<ul style="list-style-type:disc">
<li><code>/report</code></li>
</ul>
</div>
</li>
<li>Method
<div class="method">
<ul style="list-style-type:disc">
<li><code>POST</code></li>
</ul>
</div>
</li>
<li>Headers
<div class="headers">
<ul style="list-style-type:disc">
<li><code>Content-Type</code> : <code>multipart/form-data</code></li>
<li><code>Authorization</code> : <code>Bearer <token></code></li>
</ul>
</div>
</li>
<li>Request Body
<div class="request">
<ul style="list-style-type:disc">
<li><code>severity</code> as <code>string</code></li>
</ul>
</div>
</li>
<li>Response
<div class="response">
<pre v-pre data-lang="json">
<code class="lang-json">
{
"status": "success",
"error": false,
"message": "Report is successfully added to Firestore",
"date": "04-09-2022 07:49:49",
"data": {
"reportId": "auJtkpoCbuljkxis"
}
}
</code>
</pre>
</div>
</li>
</ul>
</li>
<li><span id="doc_perangkat">Platform dan Lingkungan Perangkat</span>
<ul>
<li>Description
<div class="description">
<p class="tipe-data">Data Type: <strong>String,</strong> except <strong>RAM. RAM is number/integer</strong></p>
<p>Pada field Platform dan Lingkungan Perangkat, ada 3 field bertipe Text yaitu <strong>Phone Brand</strong>, <strong>RAM</strong>, dan <strong>Android Version</strong></p>
<p>Untuk <strong>RAM</strong> <strike>batasin user dari menulis <em>Aplhanumeric (e.g: a-z / A-Z)</em>, jadi hanya bisa fill <em> number (e.g: 0-9) </em> </strike> Tidak Perlu karena sudah <strong>AUTOFILL</strong></p>
<p> <small>Note: <strike>Coba tes ngisi aja fieldnya</small> </strike></p>
<p> <small>Note 2: <strike>Cara batasinnya pake <strong>REGEX</strong> (syntaxnya: <strong> ^[0-9]+/i</strong> )</small> </strike></p>
</div>
</li>
<li>URL
<div class="url">
<ul style="list-style-type:disc">
<li><code>/report</code></li>
</ul>
</div>
</li>
<li>Method
<div class="method">
<ul style="list-style-type:disc">
<li><code>POST</code></li>
</ul>
</div>
</li>
<li>Headers
<div class="headers">
<ul style="list-style-type:disc">
<li><code>Content-Type</code> : <code>multipart/form-data</code></li>
<li><code>Authorization</code> : <code>Bearer <token></code></li>
</ul>
</div>
</li>
<li>Request Body
<div class="request">
<ul style="list-style-type:disc">
<li><code>phone_brand</code> as <code>string</code></li>
<li><code>ram</code> as <code>number or integer</code></li>
<li><code>android_version</code> as <code>string</code><br>
<small>Note: Untuk <code>android_version</code> Karena nantinya ini bakal Autofill dari androidnya dan ketika aku lihat di sini (<a href="https://apilevels.com/">https://apilevels.com/</a>) itu ada banyak data dan column, jadi kita hanya kirim yang "Version" column sebagai string ke database aja</small>
</li>
</ul>
</div>
</li>
<li>Response
<div class="response">
<pre v-pre data-lang="json">
<code class="lang-json">
{
"status": "success",
"error": false,
"message": "Report is successfully added to Firestore",
"date": "04-09-2022 07:49:49",
"data": {
"reportId": "auJtkpoCbuljkxis"
}
}
</code>
</pre>
</div>
</li>
</ul>
</li>
</li>
<li><span id="doc_unggah">Lampirkan berkas, video, atau gambar (Optional, tidak wajib diisi oleh user)</span>
<ul>
<li>Description
<div class="description">
<p class="tipe-data">Data Type: <strong>An image, file, and video are typically in a binary format</strong></p>
<p class="tipe-data">Acceptable Format: <strong>.txt/.pdf/.JPG/.png/.mp4/.mov/</strong> | Read Here <a href="https://cloud.google.com/dlp/docs/supported-file-types">https://cloud.google.com/dlp/docs/supported-file-types</a></p>
<p>Pada field Lampirkan berkas, video, atau gambar, user akan mengupload sebuah file (txt, pdf, video, atau gambar)</p>
<p>User akan dibatasi oleh <strong>Size Limit</strong> sebanyak <strong><em>1 MB</em></strong> dan <strong>Maximum File</strong> sebanyak <strong><em>satu buah</em></strong></p>
<p>Referensi 1: <strong><a href="https://firebase.google.com/docs/storage/android/upload-files?hl=id#kotlin+ktx">How to Mengupload file dengan Cloud Storage di Android</a></strong></p>
<p>Referensi 2: <strong><a href="https://firebase.google.com/docs/storage/android/start?authuser=0#kotlin+ktx_3">[Setting2 dan Adding Cloud Storage Dependencies SDK] Get started with Cloud Storage on Android</a></strong></p>
<p>Referensi 3: <strong><a href="https://stackoverflow.com/questions/68858102/how-retrieve-video-from-firebase-storage-kotlin">How Retrieve video from Firebase Storage? kotlin</a></strong></p>
<p>Referensi 4: <strong><a href="https://stackoverflow.com/questions/18002293/uploading-image-from-android-to-gcs">Uploading image from Android to GCS</a></strong></p>
<p>Referensi 5: <strong><a href="https://www.youtube.com/watch?v=j11O6DvkePg">How to Choose File and Upload to Firebase Storage - Android Kotlin</a></strong></p>
</div>
</li>
<li>URL
<div class="url">
<ul style="list-style-type:disc">
<li><code>/report</code></li>
</ul>
</div>
</li>
<li>Method
<div class="method">
<ul style="list-style-type:disc">
<li><code>POST</code></li>
</ul>
</div>
</li>
<li>Headers
<div class="headers">
<ul style="list-style-type:disc">
<li><code>Content-Type</code> : <code>multipart/form-data</code></li>
<li><code>Authorization</code> : <code>Bearer <token></code></li>
</ul>
</div>
</li>
<li>Request Body
<div class="request">
<ul style="list-style-type:disc">
<li><code>file</code> as <code>file</code><br>
<small>must be a valid image file (gif, jpg, jpeg, jpe, png), max size <strong>1 MB</strong></small>
</li>
</ul>
</div>
</li>
<li>Response
<div class="response">
<pre v-pre data-lang="json">
<code class="lang-json">
{
"status": "success",
"error": false,
"message": "File(s) is successfully added to Firebase Cloud Storage",
"date": "04-09-2022 07:49:49",
"data": {
"reportId": "auJtkpoCbuljkxis"
}
}
</code>
</pre>
</div>
</li>
</ul>
</li>
</ol>
</div>
<div class="explanation-getreport mt-5" id="getreport">
<h2>GET All Reports</h2>
<ol type="1">
<ul>
<li>Description
<div class="description">
<p>Tinggal Ganti HTTP Method ke <code>GET</code></p>
</div>
</li>
<li>URL
<div class="url">
<ul style="list-style-type:disc">
<li><code>/report</code></li>
</ul>
</div>
</li>
<li>Parameters & Query
<div class="url">
<ul style="list-style-type:disc">
<li>Key:<code>token</code> | Value:<code><secret-token></code></li>
</ul>
</div>
</li>
<li>Method
<div class="method">
<ul style="list-style-type:disc">
<li><code>GET</code></li>
</ul>
</div>
</li>
<li>Headers
<div class="headers">
<ul style="list-style-type:disc">
<li><code>Authorization</code> : <code>Bearer <token></code></li>
</ul>
</div>
</li>
<li>Response
<div class="response">
<pre v-pre data-lang="json">
<code class="lang-json">
{
"status": "success",
"error": false,
"data": {
"getDataFromFirestore": [
{
"message": "Aku menemukan error di fitur login",
"severity": "Saran",
"name": "Gilang Martadinata",
"ID_DocumentReport": "8uRommr1PaJTEDR_",
"email": "[email protected]",
"createdAt": "02-09-2022 16:28:31",
"statusBug": "Opened",
"key": "8uRommr1PaJTEDR_"
},
{
"name": "Hazlan Muhammad Qodri",
"createdAt": "02-09-2022 16:28:00",
"email": "[email protected]",
"message": "saya menemukan error di fitur penerjemah bahasa isyarat",
"ID_DocumentReport": "lpaXT3gVAeqFgvVt",
"severity": "Saran",
"statusBug": "Assigned",
"key": "lpaXT3gVAeqFgvVt"
}
]
}
}
</code>
</pre>
</div>
</li>
</ul>
</li>
</ol>
</div>
</div>
</div>
</main>
<script>
//Get the button:
mybutton = document.getElementById("myBtn");
// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
</script>
<!-- Optional JavaScript; choose one of the two! -->
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
-->
</body>
</html>