Skip to content

Commit

Permalink
Adds svom voevent topics
Browse files Browse the repository at this point in the history
  • Loading branch information
dakota002 committed Feb 19, 2025
1 parent 5ad4073 commit 8533a2b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function humanizedRate(rate: number, singular: string, plural?: string) {
return `${isUpperBound ? '< ' : ''}${humanizedCount(Math.round(rate), singular, plural)} per ${unit}`
}

const NoticeTypes = {
const NoticeTypes: { [key: string]: string[] } = {

Check warning on line 47 in app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx

View check run for this annotation

Codecov / codecov/patch

app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx#L47

Added line #L47 was not covered by tests
AGILE: [
'AGILE_GRB_GROUND',
'AGILE_GRB_POS_TEST',
Expand Down Expand Up @@ -229,6 +229,14 @@ export function NoticeTypeCheckboxes({
if (useFeature('SVOM_QUICKSTART')) {
JsonNoticeTypes.SVOM = ['gcn.notices.svom']
JsonNoticeTypeLinks.SVOM = '/missions/svom'

if (selectedFormat == 'voevent') {
NoticeTypes['SVOM'] = [

Check warning on line 234 in app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx

View check run for this annotation

Codecov / codecov/patch

app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx#L234

Added line #L234 was not covered by tests
'gcn.notices.svom.voevent.grm',
'gcn.notices.svom.voevent.eclairs',
'gcn.notices.svom.voevent.mxt',
]
}
}

if (useFeature('FERMI_GBM_QUICKSTART')) {
Expand Down
2 changes: 1 addition & 1 deletion app/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function formatAndNoticeTypeToTopic(
noticeFormat: string,
noticeType: string
) {
return noticeFormat == 'json'
return noticeFormat == 'json' || noticeType.startsWith('gcn.notices')
? noticeType
: `gcn.classic.${noticeFormat}.${noticeType}`
}
Expand Down

0 comments on commit 8533a2b

Please sign in to comment.