/// <summary> /// Детализация по компоненту - общее состояние /// </summary> public ActionResult ComponentDetailsState(Guid id) { var repository = CurrentAccountDbContext.GetComponentRepository(); var component = repository.GetById(id); var eventsMiniStatus = ComponentsController.GetEventsMiniStatusModel(id, CurrentAccountDbContext); var unittestsMiniStatus = ComponentsController.GetUnittestsMiniStatusModel(CurrentUser.AccountId, id, CurrentAccountDbContext); var metricsMiniStatus = ComponentsController.GetMetricsMiniStatusModel(CurrentUser.AccountId, id, CurrentAccountDbContext); var childsMiniStatus = ComponentsController.GetChildsMiniStatusModel(CurrentUser.AccountId, id, CurrentAccountDbContext); var model = new ComponentDetailsStateModel() { Id = id, SystemName = component.SystemName, Status = component.ExternalStatus.Status, StatusEventId = component.ExternalStatus.StatusEventId, StatusDuration = component.ExternalStatus.GetDuration(MvcApplication.GetServerDateTime()), CanEdit = CurrentUser.CanEditCommonData() && !component.IsRoot, IsEnabled = component.Enable, EventsMiniStatus = eventsMiniStatus, UnittestsMiniStatus = unittestsMiniStatus, MetricsMiniStatus = metricsMiniStatus, ChildsMiniStatus = childsMiniStatus }; return(PartialView(model)); }