コード例 #1
0
        public ActionResult ExceptionsDeleteSimilar(string log, Guid id)
        {
            var e = ExceptionStores.GetError(log, id);

            ExceptionStores.Action(e.ApplicationName, s => s.DeleteSimilarErrors(e));

            return(Json(new { url = Url.Action("Exceptions", new { log }) }));
        }
コード例 #2
0
        public ActionResult ExceptionsDelete(string log, Guid id, bool redirect = false)
        {
            // we don't care about success...if it's *already* deleted, that's fine
            // if we throw an exception trying to delete, that's another matter
            ExceptionStores.Action(log, s => s.DeleteError(id));

            return(redirect ? Json(new { url = Url.Action("Exceptions", new { log }) }) : ExceptionCounts());
        }
コード例 #3
0
        public ActionResult ExceptionsDeleteList(string log, Guid[] ids, bool returnCounts = false)
        {
            if (ids == null || ids.Length == 0)
            {
                return(Json(true));
            }
            ExceptionStores.Action(log, s => s.DeleteErrors(log, ids.ToList()));

            return(returnCounts ? ExceptionCounts() : Json(new { url = Url.Action("Exceptions", new { log }) }));
        }
コード例 #4
0
        public ActionResult ExceptionsDeleteAll(string log)
        {
            ExceptionStores.Action(log, s => s.DeleteAllErrors(log));

            return(Json(new { url = Url.Action("Exceptions") }));
        }
コード例 #5
0
        public ActionResult ExceptionsProtect(string log, Guid id)
        {
            var success = ExceptionStores.Action(log, s => s.ProtectError(id));

            return(success ? ExceptionCounts() : JsonError("Unable to protect, error was not found in the log"));
        }