public async Task <IViewComponentResult> InvokeAsync() { var followerPolicy = _moderationRepository.GetModerationType(ModerationEntityTypeEnum.Follower); var twitterAccountPolicy = _moderationRepository.GetModerationType(ModerationEntityTypeEnum.TwitterAccount); var statistics = await _cachedStatisticsService.GetStatisticsAsync(); var viewModel = new NodeInfoViewModel { BlacklistingEnabled = followerPolicy == ModerationTypeEnum.BlackListing || twitterAccountPolicy == ModerationTypeEnum.BlackListing, WhitelistingEnabled = followerPolicy == ModerationTypeEnum.WhiteListing || twitterAccountPolicy == ModerationTypeEnum.WhiteListing, InstanceSaturation = statistics.Saturation }; //viewModel = new NodeInfoViewModel //{ // BlacklistingEnabled = false, // WhitelistingEnabled = false, // InstanceSaturation = 175 //}; return(View(viewModel)); }
public async Task <IActionResult> Index() { var stats = await _cachedStatisticsService.GetStatisticsAsync(); return(View(stats)); }