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

feat(data-integrity): load data integrity checks from API [DHIS2-12287] #732

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mediremi
Copy link
Contributor

@mediremi mediremi commented Feb 9, 2022

Closes https://jira.dhis2.org/browse/DHIS2-12287

TODOs (updated by @HendrikThePendric on 10-01-2023):

  • Implement checkbox selection
    • Allow selecting individual items
    • Allow selecting entire sections using the checkboxes in the section headers. There is some complexity involved there, because some checks take a long time to complete and may put strain on the system. So these need to be selected explicitly. The options are coming from /dataIntegrity and the slow checks have an isSlow: true property. So when toggling the section checkbox to selected, it should select only the options with isSlow: false and skip the others. When toggling the section checkbox to unselected, all options in that section may be deselected. The checkbox itself should be deselected when no items are selected, selected when all items are selected, and indeterminate when a subset of items are selected. Clicking on the checkbox in its indeterminate or selected state should deselect all items, and clicking on the checkbox when unselected should select all "fast" checks.
  • Implement "Run intergrity checks"
    • When clicking the button, do a POST to /dataIntegrity/summary?checks=<CHECKS>
    • The checks parameter can be populated by comma separated check names (i.e. the name field of the fetched option). Also see here for more info.
    • It is also possible to use wildcards in the query parameters, i.e. checks=categories*. When using the wildcard notation slow checks are also skipped. Probably for the app using the wildcard syntax might actually make things more complicated, it's probably best to just be fully explicit.
  • Implement polling
    • Poll at regular intervals (1000 ms ?) by issuing a GET to the same URL (incl. the same checks query parameter values) you POSTed to (I find it slightly odd that we are not using an ID to poll the progress, but 🤷 )
    • Once the jobStatus field gets a value of COMPLETED you can stop polling
  • Implement displaying check results/details
    • To obtain the results, issue a GET to /dataIntegrity/details?checks=<CHECKS>, where <CHECKS> should be equal to what you POSTed initially.
    • Display these results in a table a bit like this one. Probably best to also consult @cooper-joe about a proper UI design.

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Feb 9, 2022

@amcgee amcgee changed the title feat(data-integrity): load data integrity checks from API feat(data-integrity): load data integrity checks from API [DHIS2-12287] May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants