diff --git a/src/BirdsiteLive/Component/NodeInfoViewComponent.cs b/src/BirdsiteLive/Component/NodeInfoViewComponent.cs index deb10a9..00c03f3 100644 --- a/src/BirdsiteLive/Component/NodeInfoViewComponent.cs +++ b/src/BirdsiteLive/Component/NodeInfoViewComponent.cs @@ -37,7 +37,8 @@ namespace BirdsiteLive.Component twitterAccountPolicy == ModerationTypeEnum.BlackListing, WhitelistingEnabled = followerPolicy == ModerationTypeEnum.WhiteListing || twitterAccountPolicy == ModerationTypeEnum.WhiteListing, - InstanceSaturation = statistics.Saturation + InstanceSaturation = statistics.Saturation, + SyncLag = statistics.SyncLag }; //viewModel = new NodeInfoViewModel @@ -55,5 +56,6 @@ namespace BirdsiteLive.Component public bool BlacklistingEnabled { get; set; } public bool WhitelistingEnabled { get; set; } public int InstanceSaturation { get; set; } + public TimeSpan SyncLag { get; set; } } } diff --git a/src/BirdsiteLive/Services/CachedStatisticsService.cs b/src/BirdsiteLive/Services/CachedStatisticsService.cs index 9337797..bc2235d 100644 --- a/src/BirdsiteLive/Services/CachedStatisticsService.cs +++ b/src/BirdsiteLive/Services/CachedStatisticsService.cs @@ -32,12 +32,14 @@ namespace BirdsiteLive.Services { var twitterUserMax = _instanceSettings.MaxUsersCapacity; var twitterUserCount = await _twitterUserDal.GetTwitterUsersCountAsync(); + var twitterSyncLag = await _twitterUserDal.GetTwitterSyncLag(); var saturation = (int)((double)twitterUserCount / twitterUserMax * 100); _cachedStatistics = new CachedStatistics { RefreshedTime = DateTime.UtcNow, - Saturation = saturation + Saturation = saturation, + SyncLag = twitterSyncLag }; } @@ -48,6 +50,7 @@ namespace BirdsiteLive.Services public class CachedStatistics { public DateTime RefreshedTime { get; set; } + public TimeSpan SyncLag { get; set; } public int Saturation { get; set; } } } \ No newline at end of file diff --git a/src/BirdsiteLive/Views/Shared/Components/NodeInfo/Default.cshtml b/src/BirdsiteLive/Views/Shared/Components/NodeInfo/Default.cshtml index 4e0f093..1031d0a 100644 --- a/src/BirdsiteLive/Views/Shared/Components/NodeInfo/Default.cshtml +++ b/src/BirdsiteLive/Views/Shared/Components/NodeInfo/Default.cshtml @@ -1,22 +1,10 @@ @model BirdsiteLive.Component.NodeInfoViewModel