Skip to content

Commit

Permalink
Fix for rendering results of submission
Browse files Browse the repository at this point in the history
  • Loading branch information
BirdMachine committed Jan 22, 2025
1 parent cb41cb0 commit dba8fb5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/src/components/ingest/dataset_edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1240,9 +1240,21 @@ class DatasetEdit extends Component {
ingest_api_pipeline_test_submit(JSON.parse(localStorage.getItem("info")).groups_token, {"uuid":this.props.editingDataset.uuid})
.then((response) => {
console.debug('%c◉ SUBMITTED', 'color:#00ff7b', response);
let results = "";
let title = "";
if(response.status === 200){
title = "Submitted for Testing";
results = "Dataset submitted for test processing";
}else if(response.status === 500){
title = "Error";
results = "Unexpected error occurred, please ask an admin to check the ingest-api logs.";
}else{
title = "Submission Response: "+response.status;
results = response.results;
}
this.toggleFeedbackDialog(
"Testing Submitted",
response.results,
title,
results,
[{label:"Close", action:()=>{this.clearFeedbackDialog()}}]);
})
.catch((error) => {
Expand Down

0 comments on commit dba8fb5

Please sign in to comment.