Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
nomad-FAIR
Commits
1dfbd10b
Commit
1dfbd10b
authored
6 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Added more error informatio about failures and erros in upload proc.
parent
9c1fe443
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gui/src/components/Upload.js
+48
-14
48 additions, 14 deletions
gui/src/components/Upload.js
with
48 additions
and
14 deletions
gui/src/components/Upload.js
+
48
−
14
View file @
1dfbd10b
...
...
@@ -4,7 +4,9 @@ import { withStyles, ExpansionPanel, ExpansionPanelSummary, Typography,
ExpansionPanelDetails
,
Stepper
,
Step
,
StepLabel
,
Table
,
TableRow
,
TableCell
,
TableBody
,
Checkbox
,
FormControlLabel
,
TablePagination
}
from
'
@material-ui/core
'
TablePagination
,
TableHead
,
Tooltip
}
from
'
@material-ui/core
'
import
ExpandMoreIcon
from
'
@material-ui/icons/ExpandMore
'
import
ReactJson
from
'
react-json-view
'
import
CalcLinks
from
'
./CalcLinks
'
...
...
@@ -123,11 +125,23 @@ class Upload extends React.Component {
parse_all
:
(
props
)
=>
{
props
.
children
=
'
parse
'
if
(
calc_procs
.
length
>
0
)
{
props
.
optional
=
(
<
Typography
variant
=
"
caption
"
>
{
calc_procs
.
filter
(
p
=>
p
.
status
===
'
SUCCESS
'
).
length
}
/{calc_procs.length
}
<
/Typography
>
)
const
failures
=
calc_procs
.
filter
(
calcProc
=>
calcProc
.
status
===
'
FAILURE
'
)
if
(
failures
.
length
)
{
props
.
error
=
true
props
.
optional
=
(
<
Typography
variant
=
"
caption
"
color
=
"
error
"
>
{
calc_procs
.
filter
(
p
=>
p
.
status
===
'
SUCCESS
'
).
length
}
/{calc_procs.length
}
,
{
failures
.
length
}
failed
<
/Typography
>
)
}
else
{
props
.
optional
=
(
<
Typography
variant
=
"
caption
"
>
{
calc_procs
.
filter
(
p
=>
p
.
status
===
'
SUCCESS
'
).
length
}
/{calc_procs.length
}
<
/Typography
>
)
}
}
else
if
(
status
===
'
SUCCESS
'
)
{
props
.
error
=
true
props
.
optional
=
(
...
...
@@ -182,27 +196,28 @@ class Upload extends React.Component {
}
const
renderRow
=
(
calcProc
,
index
)
=>
{
const
{
mainfile
,
calc_hash
,
parser_name
,
task_names
,
current_task_name
}
=
calcProc
return
(
const
{
mainfile
,
calc_hash
,
parser_name
,
task_names
,
current_task_name
,
status
,
errors
}
=
calcProc
const
color
=
status
===
'
FAILURE
'
?
'
error
'
:
'
default
'
const
row
=
(
<
TableRow
key
=
{
index
}
>
<
TableCell
>
<
Typography
>
<
Typography
color
=
{
color
}
>
{
mainfile
}
<
/Typography
>
<
Typography
variant
=
"
caption
"
>
<
Typography
variant
=
"
caption
"
color
=
{
color
}
>
{
calc_hash
}
<
/Typography
>
<
/TableCell
>
<
TableCell
>
<
Typography
>
<
Typography
color
=
{
color
}
>
{
parser_name
.
replace
(
'
parsers/
'
,
''
)}
<
/Typography
>
<
/TableCell
>
<
TableCell
>
<
Typography
>
<
Typography
color
=
{
color
}
>
{
current_task_name
}
<
/Typography
>
<
Typography
variant
=
"
caption
"
>
<
Typography
variant
=
"
caption
"
color
=
{
color
}
>
task
&
nbsp
;
<
b
>
[{
task_names
.
indexOf
(
current_task_name
)
+
1
}
/{task_names.length}
]
...
...
@@ -210,10 +225,21 @@ class Upload extends React.Component {
<
/Typography
>
<
/TableCell
>
<
TableCell
>
<
CalcLinks
uploadHash
=
{
upload_hash
}
calcHash
=
{
calc_hash
}
/
>
{
status
===
'
SUCCESS
'
?
<
CalcLinks
uploadHash
=
{
upload_hash
}
calcHash
=
{
calc_hash
}
/> : ''
}
<
/TableCell
>
<
/TableRow
>
)
if
(
status
===
'
FAILURE
'
)
{
return
(
<
Tooltip
title
=
{
errors
.
map
((
error
,
index
)
=>
(
<
p
key
=
{
index
}
>
{
error
}
<
/p>
))
}
>
{
row
}
<
/Tooltip
>
)
}
else
{
return
row
}
}
const
total
=
calc_procs
.
length
...
...
@@ -221,6 +247,14 @@ class Upload extends React.Component {
return
(
<
Table
>
<
TableHead
>
<
TableRow
>
<
TableCell
>
mainfile
<
/TableCell
>
<
TableCell
>
code
<
/TableCell
>
<
TableCell
>
task
<
/TableCell
>
<
TableCell
><
/TableCell
>
<
/TableRow
>
<
/TableHead
>
<
TableBody
>
{
calc_procs
.
slice
((
page
-
1
)
*
rowsPerPage
,
page
*
rowsPerPage
).
map
(
renderRow
)}
{
emptyRows
>
0
&&
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment