コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public async Task <ActionResult> Index(LogPagingFilteringVM command)
        {
            if (command == null)
            {
                command = new LogPagingFilteringVM();
            }

            command.Content = command.Content.RemoveSpace();
            var model = new LogListVM()
            {
                EndTime   = command.EndTime,
                Content   = command.Content,
                StartTime = command.StartTime,
                Logs      = await GetLogPageList(command)
            };

            return(View(model));
        }
コード例 #2
0
        public HttpResponseMessage LogSearchModel(HttpRequestMessage request)
        {
            return(CreateHttpResponse(request, () =>
            {
                HttpResponseMessage response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No items found");
                if (true)
                {
                    var model = new LogListVM();
                    model.AvailableLogLevels = LogLevel.Debug.ToSelectList(_localizationService, _baseService.WorkContext, false).ToList();
                    model.AvailableLogLevels.Insert(0, new System.Web.Mvc.SelectListItem {
                        Text = _localizationService.GetResource("Admin.Common.All"), Value = "0"
                    });

                    response = request.CreateResponse <LogListVM>(HttpStatusCode.OK, model);
                }
                else
                {
                    response = request.CreateResponse(HttpStatusCode.Unauthorized, "Unauthorized user");
                }
                return response;
            }));
        }
コード例 #3
0
 public LogListView(LogListVM vm)
 {
     InitializeComponent();
     ViewModel = vm;
 }