-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
150 lines (139 loc) · 5.1 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">
<link rel="stylesheet" href="./style.css" />
<link rel="stylesheet" href="./bootstrap.css" />
<title>Form Recognizer</title>
<script src="./renderer.js"></script>
<script src="./googleCloudStorage.js"></script>
</head>
<body>
<div class="marginspace" style="padding-top: 30px;">
<p class="h1 marginspace " style="text-align: center;">Form Recognizer</p>
</div>
<div id="page1">
<div align="right"><BUTTON id="qc" onClick="openQC()" background-color="red" width="50px"
class="btn btn-primary marginspace"> Quality Check </BUTTON></div>
<table width="95%" align="centre" class="marginspace" cellpadding="5" cellspacing="5"
style="text-align: justify;float: right;">
<tr>
<th>
</th>
<th class="rowSelf">
Output from Console
</th>
</tr>
<tr class="rowSelf" height="600px">
<td>
<div>
<Form enctype="multipart/form-data">
<div class="marginspace inputLabel">
<div><label for="inputImage"><b>
Choose file to Upload :</b>
</label>
</div>
<div>
<input type="file" id="inputImage" onchange="setUploadedDirectoryPath(event)"
webkitdirectory mozdirectory msdirectory odirectory directory multiple
class="btn btn-light" value="Choose Folder" />
</div>
</div>
<div class="marginspace form-group">
<div>
<label><b>
Select Form Type
</b></label>
</div>
<div>
<select id="FormType" class="form-control">
<option value="form1">Form1</option>
<option value="form2">Form2</option>
</select>
<input type="hidden" id="directoryFilePath" value="">
</div>
</div>
</Form>
</div>
<div class="marginspace"><button class="btn btn-info" onClick="runPython()">Submit</button></div>
</td>
<td width="80%" style="background-color:black;">
<div id="consoleOutput"
style="overflow-y: scroll; scroll-behavior: auto;color:white; max-height: 600px;"></div>
</td>
</tr>
</table>
</div>
<div id="page2" style="display: none;">
<div align="right"><BUTTON id="uploadImages" onClick="openUploadImage()" background-color="red" width="50px"
class="btn btn-primary marginspace"> Process Files </BUTTON></div>
<div class="marginspace" style="padding-top: 10px;">
<div align="centre" class="marginspace">
<!-- <BUTTON id="selectDirectory" onClick="selectDirectory()" background-color="red" width="50px" class="marginspace"> Select Input Directory </BUTTON> -->
<div class="marginspace form-group">
<label><b>Input Directory Path : </b> </label>
<input id="selectedDirectory" class="form-control" type="textbox" width="80px" value="" />
</div>
<div>
<div style="padding-left:20px;"> <b> OR </b> </div>
<input type="file" id="flup" onchange="setDirectoryPath(event)" webkitdirectory mozdirectory
msdirectory odirectory directory multiple value="Choose Folder" class="btn btn-light" />
<div align="center">
<BUTTON id="selectDirectory" onClick="selectDirectory()" background-color="red" width="50px"
align="center" class="btn btn-info"> Submit </BUTTON>
</div>
</div>
</div>
</div>
<div id="dataTable" style="display:none; padding-top: 20px;">
<table width="100%" cellpadding="5" cellspacing="5" style="text-align: justify;">
<tr>
<th class="rowSelf column-left card-header">
All Forms
</th>
<th class="rowSelf column-centre card-header"> Selected Image
</th>
<th class="rowSelf column-right card-header">
Output Json Data
</th>
</tr>
<tr class="rowSelf" height="70%">
<td class="column-left scrolling equalHeight">
<ul class="listStyle">
<div id="display-files">
</div>
</ul>
</td>
<td class="column-centre equalHeight">
<div id="displaySelected">
</div>
</td>
<td class="column-right equalHeight">
<div style="display: none" class="marginspace" id="QCdivShow"><Label><b>QC Status :
</b></Label>
<div id="QCinfo" class="btn btn-outline-danger"></div>
</div>
<form id="jsonData">
<div id="displayJson">
</div>
</form>
<input type="hidden" id="imageFilePath" value="">
<input type="hidden" id="JsonFilePath" value="">
<div style="align-items: center;">
<button id="submitButton" onClick="saveQCJson('QCComplete-UploadPending', 1)"
style="display:none;" class="submitButton btn btn-info"><b>Submit Data</b></button>
</div>
</td>
</tr>
</table>
</div>
</div>
<!-- Insert this line above script imports -->
<script>if (typeof module === 'object') { window.module = module; module = undefined; }</script>
<!-- normal script imports etc -->
<!-- Insert this line after script imports -->
<script>if (window.module) module = window.module;</script>
<script type="text/javascript"></script>
</body>
</html>