Example #1
0
        public List <TrackLog> GetTimelineData(LogType type, Dictionary <string, string> condition)
        {
            List <TrackLog> final = new List <TrackLog>();

            switch (type)
            {
            case LogType.ExceptionLog:
                ExceptionLogDAO dao = new ExceptionLogDAO();

                SqlFilter filter = new SqlFilter();

                filter.Selects.Add("TimeLine");

                filter.Wheres.And.Add("CreateTime", condition["CreateTime"]);

                filter.Wheres.And.Add("Keyword", condition["Keyword"]);

                filter.Wheres.And.Add("Subkey", condition["Subkey"]);

                filter.Wheres.And.Add("Level", condition["Level"]);

                filter.Wheres.And.Add("ProjectKey", condition["ProjectKey"]);

                filter.Wheres.And.Add("Type", "1");

                filter.Orders.Add("CreateTime");


                List <ExceptionLog> result = dao.GetItems(filter);

                foreach (ExceptionLog log in result)
                {
                    final.Add(log);
                }

                break;
            }



            return(final);
        }
Example #2
0
        public Info SearchInfo(Dictionary <string, string> condition)
        {
            ExceptionLogDAO dao = new ExceptionLogDAO();

            SqlFilter filter = new SqlFilter();

            filter.Wheres.And.Add("CreateTime", condition["CreateTime"]);

            filter.Wheres.And.Add("Keyword", condition["Keyword"]);

            filter.Wheres.And.Add("Subkey", condition["Subkey"]);

            filter.Wheres.And.Add("Level", condition["Level"]);

            filter.Wheres.And.Add("Type", "1");

            Info result = dao.GetItemsInfo(filter);

            return(result);
        }
Example #3
0
        public List <ExceptionLog> DefaultExecptionLogList(string projectKey)
        {
            ExceptionLogDAO dao = new ExceptionLogDAO();

            SqlFilter filter = new SqlFilter();

            filter.Selects.Add("List");

            filter.Limit = 20;

            filter.Wheres.And.Add("Type", "1");

            filter.Wheres.And.Add("ProjectKey", projectKey);

            filter.Orders.Add("CreateTime");

            List <ExceptionLog> result = dao.GetItems(filter);

            return(result);
        }
Example #4
0
        public List <Entity.ExceptionLog> SearchExecptionLog(Dictionary <string, string> condition)
        {
            //CouchbaseHelper helper = new CouchbaseHelper("default");

            //string n1ql = @"select tag,serverIP,createTime,subKey from default where subKey=$subKey and createTime > '2016-12-06T00:29:57.451' and createTime < '2016-12-06T00:30:05.229' limit 2 offset 1";

            //List<ExceptionLog> result = helper.Query<ExceptionLog>(n1ql);

            ExceptionLogDAO dao = new ExceptionLogDAO();

            SqlFilter filter = new SqlFilter();

            filter.Selects.Add("List");

            filter.Wheres.And.Add("CreateTime", condition["CreateTime"]);

            filter.Wheres.And.Add("Keyword", condition["Keyword"]);

            filter.Wheres.And.Add("Subkey", condition["Subkey"]);

            filter.Wheres.And.Add("Level", condition["Level"]);

            filter.Wheres.And.Add("ProjectKey", condition["ProjectKey"]);

            filter.Wheres.And.Add("Type", "1");

            filter.Orders.Add("CreateTime");


            filter.PageSize = _pageSize;
            filter.Page     = int.Parse(condition["Page"]);

            List <ExceptionLog> result = dao.GetItems(filter);

            return(result);
        }
Example #5
0
        /// <summary> Retrieves Entity rows in a datatable which match the specified filter. It will always create a new connection to the database.</summary>
        /// <param name="selectFilter">A predicate or predicate expression which should be used as filter for the entities to retrieve.</param>
        /// <param name="maxNumberOfItemsToReturn"> The maximum number of items to return with this retrieval query.</param>
        /// <param name="sortClauses">The order by specifications for the sorting of the resultset. When not specified, no sorting is applied.</param>
        /// <param name="relations">The set of relations to walk to construct to total query.</param>
        /// <param name="pageNumber">The page number to retrieve.</param>
        /// <param name="pageSize">The page size of the page to retrieve.</param>
        /// <returns>DataTable with the rows requested.</returns>
        public static DataTable GetMultiAsDataTable(IPredicate selectFilter, long maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relations, int pageNumber, int pageSize)
        {
            ExceptionLogDAO dao = DAOFactory.CreateExceptionLogDAO();

            return(dao.GetMultiAsDataTable(maxNumberOfItemsToReturn, sortClauses, selectFilter, relations, pageNumber, pageSize));
        }