@@ -154,42 +154,46 @@ export default function Admin(props) {
154
154
155
155
< Grid container item spacing = { 5 } direction = "row" style = { { padding : 20 } } >
156
156
< Grid container item direction = "column" spacing = { 3 } sm = { 6 } >
157
- < Grid item >
158
- < Typography variant = "h5" > Latest Files</ Typography >
159
- </ Grid >
160
- < Grid item >
161
- { _ . isEmpty ( fileListHtml ) !== true &&
162
- < TableContainer component = { Paper } >
163
- < Table aria-label = "simple table" >
164
- < TableHead >
165
- < TableRow >
166
- < TableCell > < b > File Type</ b > </ TableCell >
167
- < TableCell > < b > Last Updated</ b > </ TableCell >
168
- </ TableRow >
169
- </ TableHead >
170
- < TableBody >
171
- { _ . map ( fileListHtml , ( file , index ) => {
172
- const fileName = file . split ( "-" ) [ 0 ] ;
173
- let fileDate = file . split ( "-" ) . slice ( 1 ) . join ( ) . split ( "." ) [ 0 ] ;
174
- let fileDateOnlyNumbers = fileDate . replaceAll ( "," , "" ) ;
175
- let fileDateFormatted = moment ( fileDateOnlyNumbers , "YYYYMMDDhmmss" ) . local ( ) . format ( "MMMM Do YYYY, h:mm:ss a" ) ;
176
-
177
- return (
178
- < TableRow key = { index } >
179
- < TableCell > { fileName } </ TableCell >
180
- < TableCell > { fileDateFormatted } </ TableCell >
157
+ { _ . isEmpty ( fileListHtml ) !== true &&
158
+ < >
159
+ < Grid item >
160
+ < Typography variant = "h5" > Latest Files</ Typography >
161
+ </ Grid >
162
+ < Grid item >
163
+ < TableContainer component = { Paper } >
164
+ < Table aria-label = "simple table" >
165
+ < TableHead >
166
+ < TableRow >
167
+ < TableCell > < b > File Type</ b > </ TableCell >
168
+ < TableCell > < b > Last Updated</ b > </ TableCell >
181
169
</ TableRow >
182
- )
183
- } )
184
- }
185
- </ TableBody >
186
- </ Table >
187
- </ TableContainer > }
188
- </ Grid >
170
+ </ TableHead >
171
+ < TableBody >
172
+ { _ . map ( fileListHtml , ( file , index ) => {
173
+ const fileName = file . split ( "-" ) [ 0 ] ;
174
+ let fileDate = file . split ( "-" ) . slice ( 1 ) . join ( ) . split ( "." ) [ 0 ] ;
175
+ let fileDateOnlyNumbers = fileDate . replaceAll ( "," , "" ) ;
176
+ let fileDateFormatted = moment ( fileDateOnlyNumbers , "YYYYMMDDhmmss" ) . local ( ) . format ( "MMMM Do YYYY, h:mm:ss a" ) ;
177
+
178
+ return (
179
+ < TableRow key = { index } >
180
+ < TableCell > { fileName } </ TableCell >
181
+ < TableCell > { fileDateFormatted } </ TableCell >
182
+ </ TableRow >
183
+ )
184
+ } )
185
+ }
186
+ </ TableBody >
187
+ </ Table >
188
+ </ TableContainer >
189
+ </ Grid >
190
+ </ >
191
+ }
189
192
< Grid item >
190
193
< Paper >
191
194
< CardContent >
192
195
< Typography variant = "h5" > Upload Files</ Typography >
196
+ < Typography variant = "caption" > Note: This upload feature now only accepts Volgistics data files. Other data is uploaded automatically.</ Typography >
193
197
< form onSubmit = { handleUpload } >
194
198
< input type = "file" id = "fileItemsID"
195
199
value = { filesInput }
@@ -205,6 +209,19 @@ export default function Admin(props) {
205
209
</ Grid >
206
210
</ Grid >
207
211
< Grid container item direction = "column" spacing = { 3 } sm = { 6 } >
212
+ < Grid item >
213
+ < Paper style = { { padding : 5 } } >
214
+ < CardContent >
215
+ < Typography variant = "h5" styles = { { paddingBottom : 5 } } > Run New Analysis</ Typography >
216
+ < form onSubmit = { handleExecute } >
217
+ < Button type = "submit" variant = "contained" color = "primary"
218
+ disabled = { statistics === 'Running' } >
219
+ Run Data Analysis
220
+ </ Button >
221
+ </ form >
222
+ </ CardContent >
223
+ </ Paper >
224
+ </ Grid >
208
225
< Grid item >
209
226
< Typography variant = "h5" > Last Match Analysis</ Typography >
210
227
</ Grid >
@@ -237,19 +254,6 @@ export default function Admin(props) {
237
254
</ TableContainer >
238
255
}
239
256
</ Grid >
240
- < Grid item >
241
- < Paper style = { { padding : 5 , marginTop : 10 } } >
242
- < CardContent >
243
- < Typography variant = "h5" styles = { { paddingBottom : 5 } } > Run New Analysis</ Typography >
244
- < form onSubmit = { handleExecute } >
245
- < Button type = "submit" variant = "contained" color = "primary"
246
- disabled = { statistics === 'Running' } >
247
- Run Data Analysis
248
- </ Button >
249
- </ form >
250
- </ CardContent >
251
- </ Paper >
252
- </ Grid >
253
257
254
258
</ Grid >
255
259
</ Grid >
0 commit comments