chore(analytics): remove dead day-hour heatmap (Unit 5) (#45)
CI / backend (push) Successful in 1m29s
CI / frontend (push) Successful in 28s
CI / format (push) Successful in 1m17s
CI / db-tests (push) Successful in 1m24s
CI / backend (pull_request) Successful in 1m18s
CI / frontend (pull_request) Successful in 21s
CI / format (pull_request) Successful in 1m5s
CI / db-tests (pull_request) Successful in 1m12s
Deploy Staging / deploy (push) Successful in 43s
Security / secrets (push) Successful in 6s
Security / dependencies (push) Successful in 1m17s
Security / sast (push) Successful in 1m7s
Security / secrets (pull_request) Successful in 6s
Security / dependencies (pull_request) Successful in 1m24s
Security / sast (pull_request) Successful in 1m8s
CI / backend (push) Successful in 1m29s
CI / frontend (push) Successful in 28s
CI / format (push) Successful in 1m17s
CI / db-tests (push) Successful in 1m24s
CI / backend (pull_request) Successful in 1m18s
CI / frontend (pull_request) Successful in 21s
CI / format (pull_request) Successful in 1m5s
CI / db-tests (pull_request) Successful in 1m12s
Deploy Staging / deploy (push) Successful in 43s
Security / secrets (push) Successful in 6s
Security / dependencies (push) Successful in 1m17s
Security / sast (push) Successful in 1m7s
Security / secrets (pull_request) Successful in 6s
Security / dependencies (pull_request) Successful in 1m24s
Security / sast (pull_request) Successful in 1m8s
This commit was merged in pull request #45.
This commit is contained in:
@@ -16,11 +16,10 @@ public class AnalyticsService : IAnalyticsService
|
||||
var health = await GetInboxHealthAsync(userId, ct);
|
||||
var top = await GetTopSendersAsync(userId, 10, ct);
|
||||
var volume = await GetVolumeOverTimeAsync(userId, 90, ct);
|
||||
var heatmap = await GetHeatmapAsync(userId, ct);
|
||||
var attachments = await GetAttachmentBreakdownAsync(userId, ct);
|
||||
|
||||
return new DashboardSummaryDto(
|
||||
health, health.TotalEmails, health.UnreadEmails, top, volume, heatmap, attachments,
|
||||
health, health.TotalEmails, health.UnreadEmails, top, volume, attachments,
|
||||
health.EstimatedStorageBytes);
|
||||
}
|
||||
|
||||
@@ -75,19 +74,6 @@ public class AnalyticsService : IAnalyticsService
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public async Task<IReadOnlyList<HeatmapCellDto>> GetHeatmapAsync(Guid userId, CancellationToken ct = default)
|
||||
{
|
||||
var raw = await _db.Emails
|
||||
.Where(e => e.UserId == userId)
|
||||
.Select(e => new { e.SentAtUtc })
|
||||
.ToListAsync(ct);
|
||||
|
||||
return raw
|
||||
.GroupBy(x => new { Dow = (int)x.SentAtUtc.DayOfWeek, Hour = x.SentAtUtc.Hour })
|
||||
.Select(g => new HeatmapCellDto(g.Key.Dow, g.Key.Hour, g.Count()))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public async Task<IReadOnlyList<CategoryHeatmapCellDto>> GetCategoryHeatmapAsync(Guid userId, CancellationToken ct = default)
|
||||
{
|
||||
var raw = await _db.Emails
|
||||
|
||||
Reference in New Issue
Block a user