public ActionResult Index() { TemperatureChartViewModel temperatureChartViewModel = _presentationService.GetTemperatureChartModel(Period, true); temperatureChartViewModel.RemoveLastButtons(2); temperatureChartViewModel.SelectedButtonIndex = 2; DeviceStateLogViewModel deviceStateLogViewModel = _presentationService.GetDeviceStateLogViewModel(Period); ControlPanelViewModel controlPanelViewModel = _controlPanelPresentationService.GetControlPanelViewModel(); object[] lastTempData = temperatureChartViewModel.Data.LastOrDefault(); CurrentStateViewModel currentState = _presentationService.GetCurrentStateViewModel((decimal?)lastTempData?[1] ?? 0); var model = new DashboardViewModel { CurrentState = currentState, TemperatureChart = temperatureChartViewModel, DeviceStates = deviceStateLogViewModel, SwitchableDevices = _switchableDevices, ControlPanel = controlPanelViewModel }; return(View(model)); }
public ActionResult DeviceStateLogSection() { DeviceStateLogViewModel viewModel = _presentationService.GetDeviceStateLogViewModel(Period); return(PartialView("_DeviceStateLogSection", viewModel)); }
public ActionResult DeviceStateLog() { DeviceStateLogViewModel viewModel = _presentationService.GetDeviceStateLogViewModel(_deviceStateLogPeriod); return(View(viewModel)); }