Virus visit column changes
I deployed the changes in prc-test but browsing https://prc-test.parkinson.lu/subjects raises an ajax error (414 uri too large). I don't get this error locally. I tried to increase the buffers in nginx but nothing makes it work.
This is not as a result of these changes. I tried to deploy a previous commit and got the same error.
@valentin.groues can you check prc-test machine and try to fix it? @piotr.gawron is this a known issue?
Changes:
-
Change Visit 1 virus to Visit 0 RT-PCR -
Change Visit X virus to count from 0 -
Filter for inconclusive -
Change rest of Visit number references in the table
Merge request reports
Activity
added enhancement label
there was a 414 uri too long error
I fixed it by changing both nginx and gunicorn config.
nginx, in the server block for 443
added large_client_header_buffers 4 16k;
in /etc/systemd/system/gunicorn.service
I’ve set --limit-request-line 0
maybe it’s better to keep a limit but higher
but I don’t think it’s very risky, we have nginx and f5 in front
it's supposed to limit the risk of ddosEdited by Valentin Grouesadded 10 commits
- 1ea0e39d - added filter for displaying visit number from zero or one depending on settings
- 8572589c - added integer select that starts from 0
- a1027eb0 - added option to display visits from zero. True by default git diff smash/settings.pyg
- b069e347 - use display_visit_number filter
- 2e113052 - use display_visit_number filter
- c93ea945 - if SHOW_VISITS_FROM_ZERO, then change virus visit labels to start from 0
- c3f59bbb - in case of SHOW_VISITS_FROM_ZERO, we add another field to the serialization...
- bc7f59aa - name labels from 0 if SHOW_VISITS_FROM_ZERO
- dd49cb12 - replaced tuple with dict so that properties are better read. also, use display_visit_number filter
- 9cd776c7 - replaced tuple with dict so that properties are better read. also, use display_visit_number filter
Toggle commit listChanges available at https://prc-test.parkinson.lu/subjects
20 20 21 21 DEBUG = True 22 22 23 SHOW_VISITS_FROM_ZERO = True we might use something that I already had to implement for redcap connector: https://git-r3lab.uni.lu/NCER-PD/scheduling-system/-/blob/master/smash/web/models/study.py#L46 - there is an integer indicating number of the first visit in redcap (it will be easier if there is single configuration option for that)
changed this line in version 3 of the diff
87 add_column(result, "Visit 4 virus", "virus_test_4", study_subject_columns, "yes_no_null_filter", study.columns) 88 add_column(result, "Visit 4 virus date", "virus_test_4_updated", study_subject_columns, None, study.columns) 89 add_column(result, "Visit 5 virus", "virus_test_5", study_subject_columns, "yes_no_null_filter", study.columns) 90 add_column(result, "Visit 5 virus date", "virus_test_5_updated", study_subject_columns, None, study.columns) 82 if getattr(settings, "SHOW_VISITS_FROM_ZERO", False): 83 virus_visit_numbers = range(0, 5) 84 visit_numbers = range(0, study.visits_to_show_in_subject_list + 0) 85 else: 86 virus_visit_numbers = range(1, 5+1) 87 visit_numbers = range(1, study.visits_to_show_in_subject_list + 1) 88 89 for one_based_idx, virus_visit_number in enumerate(virus_visit_numbers, 1): 90 add_column(result, 91 'Virus {} RT-PCR'.format(virus_visit_number), 92 'virus_test_{}'.format(one_based_idx), #always starts in 1 93 None, #always visible Okey, but before, it was using study_subject_columns but the columns weren't shown automatically. Right now in production I have to select them every time from the bottom of the table (checkboxes). How can I make them visible for that particular deployment?
Edited by Carlos Vegachanged this line in version 3 of the diff
- Resolved by Carlos Vega
- Resolved by Carlos Vega
mentioned in commit 40492d3d
added 1 commit
- 6ab72bda - small description so that it is not counter intuitive to find first 1 and then...
added 1 commit
- 1fbcc5ce - more admin menus. I don't know other way to edit the columns that are visible...
@piotr.gawron this change might not be needed 1fbcc5ce but I don't know how to edit the list of visible columns.