XML Jobs & UI Changes#534
Open
tholulomo wants to merge 13 commits into
Open
Conversation
…us adjustments as we filter out duplicate Xmls
…been curated, also added a button to resubmit in case we expand the ETL and require a rerun of the XML on the Xml history page
…l state after submission
…viewed XML. Reviewed XMLs are XML that are not duplicates and have been successfully validated by the PI
…Sci/materialsmine into MigrationWithoutDynamfit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. New
POST /jobs/xml/adjust-statusendpoint-
src/routes/jobs.js— Route definition with isAuth and latencyTimer middleware-
src/controllers/jobs.js— Controller with two exports:-
updateStatus(id, status)— Reusable function that updates a single ID's curateState in xmldata (+ entityState: 'IngestSuccess'), falling back to curationState/entityState in curatedsamples-
adjustXmlStatus— HTTP handler for bulk-updating IDs provided via comma-separated text or file-
src/server.js— Mounted /jobs route2. Auto-update status after curation publish
-
src/controllers/curationController.js— After successfulserializeAndValidate, silently callsJobsController.updateStatus(id, 'Completed')in a swallowed try/catch3. Curation pipeline updated
-
src/pipelines/curation-pipeline.js— ReplacedentityStatewithcurateState/curationStateas the source of truth:- Only returns records where curateState/curationState is '
Review'or'Completed'- Still projects
statusas"Approved"(if Completed) or"Not Approved"(otherwise)4. Documentation & tests
-
src/api-docs/swagger-service.yaml— Swagger docs for the new endpoint-
spec/controllers/jobsController.spec.js— 8 unit tests (validation, text/file input, fallthrough, error handling)5. UI
useXmlViewer.ts (new composable)
Extracts the shared
XML_VIEWERApollo query,xmlViewerref, auth/dialog computeds, andapproveCuration/approval/closeDialogBoxmethods — used by both components to follow DRY.XmlLoader.vue
xmlViewerref, auth/dialog computeds withuseXmlViewer()composableapproveCuration,approval, andcloseDialogBoxpreserved to handle XmlLoader-specificdialogModeandapprovalInProgressstateXmlHistory.vue
useXmlViewer()composable forxmlViewerdata, auth checks, and approval flowapprovalInProgress(matching XmlLoader's pattern)6. Auth
Frontend (apolloClient.ts):
Frontend (auth/actions.ts):
Backend (getHttpContext.js):