Example #1
0
 public ActionResult LogList(string app,string host, Log4Grid.Models.LogType? type, DateTime? from, DateTime? to,int? pageIndex)
 {
     Models.HomeLogList hl = new Models.HomeLogList();
     int pages=0;
     if (!string.IsNullOrEmpty(app))
     {
         hl.Logs = mFactory.Search.List(app,host, type, from, to, pageIndex == null ? 0 : pageIndex.Value, out pages);
     }
     else
     {
         hl.Logs = new List<Log4Grid.Models.LogModel>();
     }
     hl.PageIndex = pageIndex!=null?pageIndex.Value:0;
     hl.Pages = pages;
     return View(hl);
 }
Example #2
0
        public ActionResult LogList(string app, string host, Log4Grid.Models.LogType?type, DateTime?from, DateTime?to, int?pageIndex)
        {
            Models.HomeLogList hl = new Models.HomeLogList();
            int pages             = 0;

            if (!string.IsNullOrEmpty(app))
            {
                hl.Logs = mFactory.Search.List(app, host, type, from, to, pageIndex == null ? 0 : pageIndex.Value, out pages);
            }
            else
            {
                hl.Logs = new List <Log4Grid.Models.LogModel>();
            }
            hl.PageIndex = pageIndex != null?pageIndex.Value:0;
            hl.Pages     = pages;
            return(View(hl));
        }