Exemplo n.º 1
0
        public ActionResult Index()
        {
            UserLogic    gl = new UserLogic();
            RequestLogic rl = new RequestLogic();
            ServerLogic  sl = new ServerLogic();

            //Different models
            RequestDataViewModel rdvm = rl.GetRequestResponseTimeGraphData();
            ServerDataViewModel  sdvm = sl.GetServerData(10);
            SettingLogic         s    = new SettingLogic();
            //events
            EventViewModel evm = new EventViewModel();

            evm.Events            = new EventLogic().GetLastEvents(5);
            evm.NotificationCount = Facade.NotificationDomainController.GetAll().Where(x => x.Seen == false).ToList().Count;

            //MasterViewModel
            DashBoardViewModel dbvm = gl.GetUsersGraphData();

            dbvm.RequestDataViewModel = rdvm;
            dbvm.ServerDataViewModel  = sdvm;
            dbvm.SettingsModel        = s.GetSettings();
            dbvm.EventViewModel       = evm;
            //   DashBoardViewModel dbvm = gl.GetGraphDataOneHourInterval();
            return(View(dbvm));
        }
Exemplo n.º 2
0
        [Route("api/requestGraphData")] //For the responsetime graph
        public RequestDataViewModel RequestsGraphData()
        {
            RequestLogic         rl   = new RequestLogic();
            RequestDataViewModel rdvm = rl.GetRequestResponseTimeGraphData();

            return(rdvm);
        }