Пример #1
0
        public async Task <IActionResult> Look(LogLookQuery query)
        {
            var client = (await configService.GetAllClients()).Where(x => x.Name == query.ClientName).FirstOrDefault();

            if (client == null)
            {
                return(Json(new { Succes = false, Message = "未找到此客户端配置" }));
            }
            var p = query.GetIndexName();

            (var l, var count) = logService.GetLogData(query, query.PageIndex, query.PageSize);
            return(Json(new { Succes = true, Items = l, Total = count }));
        }
        public async Task <IActionResult> GetIndexData(IndexDataQuery query)
        {
            var lc = await configService.GetAllClients();

            List <CliEvnDate> lced = new List <CliEvnDate>();

            foreach (var c in lc)
            {
                foreach (var e in c.Environments)
                {
                    var rr = new CliEvnDate()
                    {
                        ClientName = c.Name, EnvironmentName = e.Name, HappenTime = query.Date
                    };
                    bool b = logService.Exist(rr);
                    rr.Exist = b;
                    lced.Add(rr);
                }
            }
            return(Json(lced));
        }
        public async Task <IActionResult> GetIndexData()
        {
            var l = (await configService.GetAllClients()).ToList();

            return(Json(l));
        }