public ActionResult Index(int size = 50, string iteration = "current") { try { var statusIds = new List <int> { 1, 2, 3, 4 }; IssueListVM bugListVM = new IssueListVM { TeamID = userSessionHelper.TeamId }; var projectExists = projectManager.DoesProjectsExist(); if (!projectExists) { return(RedirectToAction("Index", "Projects")); } else { List <IssueVM> issueVMs = new List <IssueVM>(); if (Request.IsAjaxRequest()) { issueVMs = issueManager.GetIssues(statusIds, 50).ToList(); return(Json(issueVMs, JsonRequestBehavior.AllowGet)); } else { bugListVM.Bugs = issueManager.GetIssues(statusIds, 50).ToList(); bugListVM.ProjectsExist = true; bool defaultProjectExist = projectManager.GetDefaultProjectForCurrentTeam() > 0; if (!defaultProjectExist) { var alertMessages = new AlertMessageStore(); alertMessages.AddMessage("system", String.Format("Hey!, You need to set a default project for the current team. Go to your <a href='{0}account/settings'>profile</a> and set a project as default project.", SiteBaseURL)); TempData["AlertMessages"] = alertMessages; } return(View("Index", bugListVM)); } } } catch (Exception ex) { ErrorStore.LogException(ex, System.Web.HttpContext.Current); return(View("Error")); } }
public async Task <IActionResult> Index() { var vm = new InsightDashboardVm(); vm.Teams = _teamManager.GetTeams(); vm.Users = await _userAccountManager.GetAllUsers(); vm.Issues = _issueManager.GetIssues(); return(View(vm)); }