iaso icon indicating copy to clipboard operation
iaso copied to clipboard

POLIO-1610: im refresh button

Open quang-le opened this issue 1 year ago • 0 comments

Add refresh button to IM pages

Related JIRA tickets :POLIO-1610

Self proofreading checklist

  • [x] Did I use eslint and black formatters
  • [x] Is my code clear enough and well documented
  • [x] Are my typescript files well typed
  • [x] New translations have been added or updated if new strings have been introduced in the frontend
  • [ ] My migrations file are included
  • [ ] Are there enough tests
  • [ ] Documentation has been included (for new feature)

Doc

NA

Changes

  • Backend:

    • Abstract RefreshLQASDataViewSet inorder to be able to reuse it for IM
    • Change the way the serializer is initialized in ExternbalTaskViewSet so that get_serializer_context is called
  • Front-end:

    • Rename RefreshLQASData
    • Add IM values (endpoint, config slug etc)
    • Add button text

How to test

  • In Django admin, copy lqas-pipeline-config in a new im-pipeline-config. The IM pipeline is not entirely set up yet, but we can test the code against the LQAS pipeline
  • Go to polio > IM > any IM page
  • Select a country
  • Click "Refresh IM data"
  • Go to tasks
  • There should be an IM task visible

Print screen / video

https://github.com/BLSQ/iaso/assets/38907762/686181a4-8ac7-406f-82f4-cd516643891e

Notes

Do not merge on main until:

  • IM pipeline has been updated to be compatible with our API
  • im-pipeline-config config has been correctly set up on prod and staging

quang-le avatar Jul 10 '24 16:07 quang-le