Ejemplo n.º 1
0
        //
        // GET: /stats/package/{id}/{version}

        public virtual async Task <ActionResult> PackageDownloadsDetail(string id, string version, string[] groupby)
        {
            if (_statisticsService == NullStatisticsService.Instance)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            StatisticsPackagesReport report = null;

            try
            {
                report = await _statisticsService.GetPackageVersionDownloadsByClient(id, version);

                ProcessReport(report, groupby, PackageDownloadsDetailDimensions, null);
            }
            catch (StatisticsReportNotFoundException)
            {
                // no report found
            }

            if (report != null)
            {
                report.Id = MakeReportId(groupby);
            }

            var model = new StatisticsPackagesViewModel();

            model.SetPackageVersionDownloadsByClient(id, version, report);

            model.UseD3 = UseD3();

            return(View(model));
        }
Ejemplo n.º 2
0
        //
        // GET: /stats/package/{id}/{version}

        public virtual async Task <ActionResult> PackageDownloadsDetail(string id, string version, string[] groupby)
        {
            if (_statisticsService == NullStatisticsService.Instance)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            var dimensions = new[] {
                Constants.StatisticsDimensions.ClientName,
                Constants.StatisticsDimensions.ClientVersion,
                Constants.StatisticsDimensions.Operation
            };

            StatisticsPackagesReport report = await _statisticsService.GetPackageVersionDownloadsByClient(id, version);

            ProcessReport(report, groupby, dimensions, null);

            if (report != null)
            {
                report.Id = MakeReportId(groupby);
            }

            var model = new StatisticsPackagesViewModel();

            model.SetPackageVersionDownloadsByClient(id, version, report);

            model.UseD3 = UseD3();

            return(View(model));
        }
Ejemplo n.º 3
0
        //
        // GET: /stats/packages/{id}/{version}

        public virtual async Task <ActionResult> PackageDownloadsDetail(string id, string version, string[] groupby)
        {
            if (_statisticsService == NullStatisticsService.Instance)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            var report = await GetPackageDownloadsDetailReport(id, version, groupby);

            var model = new StatisticsPackagesViewModel();

            model.SetPackageVersionDownloadsByClient(id, version);

            model.UseD3 = UseD3();

            return(View(model));
        }
        //
        // GET: /stats/package/{id}/{version}

        public virtual async Task <ActionResult> PackageDownloadsDetail(string id, string version, string[] groupby)
        {
            if (_statisticsService == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            StatisticsPackagesReport report = await _statisticsService.GetPackageVersionDownloadsByClient(id, version);

            ProcessReport(report, groupby, new string[] { "ClientName", "ClientVersion", "Operation" });

            var model = new StatisticsPackagesViewModel();

            model.SetPackageVersionDownloadsByClient(id, version, report);

            return(View(model));
        }
Ejemplo n.º 5
0
        //
        // GET: /stats/package/{id}/{version}

        public virtual async Task <ActionResult> PackageDownloadsDetail(string id, string version, string[] groupby)
        {
            if (_statisticsService == NullStatisticsService.Instance)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            StatisticsPackagesReport report = await _statisticsService.GetPackageVersionDownloadsByClient(id, version);

            ProcessReport(report, groupby, new string[] { "ClientName", "ClientVersion", "Operation" }, null, DetermineClientLocale());

            if (report != null)
            {
                report.Id = MakeReportId(groupby);
            }

            var model = new StatisticsPackagesViewModel();

            model.SetPackageVersionDownloadsByClient(id, version, report);

            model.UseD3 = UseD3();

            return(View(model));
        }
Ejemplo n.º 6
0
        //
        // GET: /stats/package/{id}/{version}

        public virtual async Task<ActionResult> PackageDownloadsDetail(string id, string version, string[] groupby)
        {
            if (_statisticsService == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.NotFound);
            }

            StatisticsPackagesReport report = await _statisticsService.GetPackageVersionDownloadsByClient(id, version);

            ProcessReport(report, groupby, new string[] { "ClientName", "ClientVersion", "Operation" }, null, DetermineClientLocale());

            if (report != null)
            {
                report.Id = MakeReportId(groupby);
            }

            var model = new StatisticsPackagesViewModel();

            model.SetPackageVersionDownloadsByClient(id, version, report);

            model.UseD3 = UseD3();

            return View(model);
        }
        //
        // GET: /stats/package/{id}/{version}

        public virtual async Task<ActionResult> PackageDownloadsDetail(string id, string version, string[] groupby)
        {
            if (_statisticsService == NullStatisticsService.Instance)
            {
                return new HttpStatusCodeResult(HttpStatusCode.NotFound);
            }

            StatisticsPackagesReport report = null;
            try
            {
                report = await _statisticsService.GetPackageVersionDownloadsByClient(id, version);

                ProcessReport(report, groupby, PackageDownloadsDetailDimensions, null);
            }
            catch (StatisticsReportNotFoundException)
            {
                // no report found
            }

            if (report != null)
            {
                report.Id = MakeReportId(groupby);
            }

            var model = new StatisticsPackagesViewModel();

            model.SetPackageVersionDownloadsByClient(id, version, report);

            model.UseD3 = UseD3();

            return View(model);
        }