Exemplo n.º 1
0
        public async Task <Node> Tree(string id)
        {
            if (id != null)
            {
                id = System.Web.HttpUtility.UrlDecode(id);
            }

            var report = await _engine.GetReportAsync(_engine.GetClients().FirstOrDefault()).ConfigureAwait(false);

            var model = new InspectorViewModel(report, x => Url.RouteUrl(
                                                   "ReportByPath",
                                                   new { id = x },
                                                   "",
                                                   Request.Host.ToUriComponent()
                                                   ), true, node =>
            {
                var logs = ActorLogs.LogsOf(node.Id).ToArray();

                if (logs.Any(x => x.Level == "Warning"))
                {
                    node.Warnings.Add("Warnings found");
                }

                if (logs.Any(x => x.Level == "Error"))
                {
                    node.Warnings.Add("Errors found");
                }
            });

            return(model.ByPath(id));
        }
Exemplo n.º 2
0
        public object Messages(string id)
        {
            if (id != null)
            {
                id = System.Web.HttpUtility.UrlDecode(id);
            }

            return(ActorLogs.LogsOf(id).ToArray());
        }