// // GET: /Status/ public ActionResult Index() { var model = new StatusViewModel(); if (Connections.Current.HasTASConnection) { model.AddDiskInfo(Connections.Current.TAS.GetAllRecordingDiskInformation()); model.AddDiskInfo(Connections.Current.TAS.GetLocalDiskInformation()); model.SetCardList(Connections.Current.TAS.GetCards(), Connections.Current.TAS.GetActiveCards()); } if (Connections.Current.HasMASConnection) { model.AddDiskInfo(Connections.Current.MAS.GetLocalDiskInformation()); } try { model.CpuUsage = (int)Math.Round(cpuCounter.NextValue()); model.TotalMemoryMegaBytes = totalMemory; model.UsedMemoryMegaBytes = (int)Math.Round(totalMemory - memoryCounter.NextValue()); model.HasSystemInformation = true; } catch (UnauthorizedAccessException) { Log.Info("Failed to read performance counters, got UnauthorizedAccessException"); model.HasSystemInformation = false; } catch (Exception ex) { Log.Info("Failed to read performance counters", ex); model.HasSystemInformation = false; } return View(model); }
// // GET: /Status/ public ActionResult Index() { var model = new StatusViewModel(); if (Connections.Current.HasTASConnection) { model.AddDiskInfo(Connections.Current.TAS.GetAllRecordingDiskInformation()); model.AddDiskInfo(Connections.Current.TAS.GetLocalDiskInformation()); model.SetCardList(Connections.Current.TAS.GetCards(), Connections.Current.TAS.GetActiveCards()); } if (Connections.Current.HasMASConnection) { model.AddDiskInfo(Connections.Current.MAS.GetLocalDiskInformation()); } return View(model); }