Skip to content

Commit 50ffeaf

Browse files
authored
SF-3771 Record USFM downloads in the event log (#3783)
1 parent b691ada commit 50ffeaf

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/SIL.XForge.Scripture/ClientApp/src/app/event-metrics/event-metrics-log.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,11 @@ export class EventMetricsLogComponent extends DataLoadingComponent implements On
188188
// I have not localized at this time because these strings are likely to change based on feedback.
189189
// When this feature is mature, these should be localized to help Project Administrators.
190190
const eventTypeMap: { [key: string]: string } = {
191+
ApplyPreTranslationToProjectAsync: 'Import draft into a project',
191192
BuildProjectAsync: 'Start draft generation on Serval',
192193
CancelPreTranslationBuildAsync: 'Cancel draft generation',
193194
CancelSyncAsync: 'Cancel synchronization with Paratext',
195+
GetPreTranslationUsfmAsync: 'Download draft as USFM',
194196
RetrievePreTranslationStatusAsync: 'Save drafts to Scripture Forge',
195197
SetDraftAppliedAsync: "Updated the chapter's draft applied status",
196198
SetIsValidAsync: 'Marked chapter as valid/invalid',

src/SIL.XForge.Scripture/Services/IMachineApiService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ Task<IReadOnlyList<DocumentRevision>> GetPreTranslationRevisionsAsync(
120120
bool isServalAdmin,
121121
CancellationToken cancellationToken
122122
);
123+
124+
[LogEventMetric(EventScope.Drafting, nameof(curUserId), nameof(sfProjectId), captureReturnValue: false)]
123125
Task<string> GetPreTranslationUsfmAsync(
124126
string curUserId,
125127
string sfProjectId,

0 commit comments

Comments
 (0)