Skip to content

Commit e50f011

Browse files
committed
feat: display sha512t24u digests in web UI contig details
Add sha512t24u (GA4GH refget) digests to the detailed API response for both query and reference contigs, and render them in the contig detail panel alongside the existing MD5 hash.
1 parent 0444b16 commit e50f011

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/web/server.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ async fn handle_detailed_response(
629629
"name": contig.name,
630630
"length": contig.length,
631631
"md5": contig.md5,
632+
"sha512t24u": contig.sha512t24u,
632633
"sequence_role": format!("{:?}", contig.sequence_role),
633634
"aliases": contig.aliases,
634635
"match_status": match_status
@@ -665,6 +666,7 @@ async fn handle_detailed_response(
665666
"name": contig.name,
666667
"length": contig.length,
667668
"md5": contig.md5,
669+
"sha512t24u": contig.sha512t24u,
668670
"sequence_role": format!("{:?}", contig.sequence_role),
669671
"aliases": contig.aliases,
670672
"match_status": match_status

src/web/static/js/managers/SplitViewManager.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { escapeHtml, debounce, DEBOUNCE_DELAY } from '../utils/helpers.js';
1515
* @property {string} name - Contig name
1616
* @property {number} length - Contig length in base pairs
1717
* @property {string} [md5] - MD5 hash of sequence
18+
* @property {string} [sha512t24u] - GA4GH sha512t24u digest
1819
* @property {MatchStatus} match_status - Match status
1920
* @property {string} [sequence_role] - Role of the sequence
2021
* @property {string[]} [aliases] - Alternative names
@@ -637,6 +638,14 @@ export class SplitViewManager {
637638
</div>
638639
` : ''}
639640
641+
<!-- Only show sha512t24u if it exists -->
642+
${contig.sha512t24u ? `
643+
<div class="detail-row">
644+
<span class="detail-label">sha512t24u:</span>
645+
<span class="detail-value monospace">${escapeHtml(contig.sha512t24u)}</span>
646+
</div>
647+
` : ''}
648+
640649
<!-- Only show sequence role if it exists -->
641650
${contig.sequence_role ? `
642651
<div class="detail-row">

0 commit comments

Comments
 (0)