Beispiel #1
0
        public ActionResult BuildNamesView(string projectName)
        {
            var buildNames = buildService.GetBuildDefinitions(projectName);

            var viewModel = new LinkListViewModel
            {
                Title = string.Format("Builds for project {0}", projectName),
                Links = buildNames.ToDictionary(
                    buildName => Url.Action("BuildTimelineView", new { projectName, buildName }),
                    buildName => buildName)
            };

            return(View("LinkListView", viewModel));
        }
        public ActionResult BuildNames(string projectName)
        {
            var buildNames = buildService.GetBuildDefinitions(projectName);

            var result = new
            {
                Self     = Url.Action("BuildNames", new { projectName }),
                Projects = buildNames.Select(buildName => new
                {
                    Name = buildName,
                    Url  = Url.Action("BuildTimeline", new { projectName, buildName }),
                })
            };

            return(Json(result));
        }