Пример #1
0
        public async Task <SiteViewModelWithDetailedChilds> GetSite(long id)
        {
            var result = await _endpointService.GetSite(id);

            foreach (var ep in result.Endpoints)
            {
                var detailed = (ep as EndpointViewModelWithDetails);
                detailed.Uptime = await _reportingService.CalculateUptime(ep.Id);

                detailed.Chart = await _reportingService.GetChartForEndpointLastHours(ep.Id);

                detailed.Stat = await _reportingService.GetStatistic(ep.Id);
            }
            return(result);
        }