Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve product filtering through REST API #842

Closed
dfaller opened this issue May 10, 2017 · 3 comments
Closed

Improve product filtering through REST API #842

dfaller opened this issue May 10, 2017 · 3 comments

Comments

@dfaller
Copy link
Contributor

dfaller commented May 10, 2017

Add the following fields for filtering through the products REST API:

job_output (char field, the output name from the job interface)
recipe_id
recipe_job (char field, the job name of the job within the recipe definition)
batch_id
data_started
data_ended
source_started (the earliest start time from all source files)
source_ended (the latest end time from all source files)

Any fields that don't currently exist in scale_file need to be created nullable (so the migration is fast). All new fields except job_output and recipe_job should be indexed. Update logic so all of the above fields are populated correctly when a product is saved.

Note that the new filtering should be added to both the /products/ and /sources/{id}/products/ APIs.

Also create a new mode called JobInput (table job_input) with columns job (Job model), job_input (char), input_file (ScaleFile model), created (timestamp with tz), all not nullable. Update Scale logic so that this table is populated when input data is attached to a job.

Also add new nullable recipe_input field (char) to the RecipeFile model. Update Scale logic to populate this when an input is added to a recipe.

@dfaller
Copy link
Contributor Author

dfaller commented May 16, 2017

Quick little addition: update the saving of parse results so that if only one of data_started and data_ended is provided and the other is none, Scale saves the provided timestamp as both data_started and data_ended.

@dfaller
Copy link
Contributor Author

dfaller commented May 18, 2017

One final addition: add recipe_type to the list of new fields as well.

@mikenholt
Copy link
Contributor

is_superseded and superseded need to be added to the base products sterilizer so it is returned by the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants