Skip to content

Commit

Permalink
percentage display (#2498)
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Aug 22, 2024
1 parent e1cabe0 commit a7e30f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kubernetes/loculus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,8 @@ defaultOrganismConfig: &defaultOrganismConfig
perSegment: true
displayName: Completeness
rangeSearch: true
customDisplay:
type: percentage
preprocessing:
inputs: {input: nextclade.coverage}
- name: versionComment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const CustomDisplayComponent: React.FC<Props> = ({ data, dataUseTermsHistory })
<div className='whitespace-normal text-gray-600 break-inside-avoid'>
<div className='break-all whitespace-wrap'>
{!customDisplay && (value !== '' ? value : <span className='italic'>None</span>)}
{customDisplay?.type === 'percentage' && typeof value === 'number' && `${(100 * value).toFixed(2)}%`}
{customDisplay?.type === 'badge' &&
(customDisplay.value === undefined ? (
<span className='italic'>N/A</span>
Expand Down

0 comments on commit a7e30f5

Please sign in to comment.