private int OnStats(HttpReqResp req) { try { var html = string.Empty; var date = VisHelper.GetVisualizationDateFromUrlParameters(req); //var visType = VisHelper.GetVisualizationTypesFromUrlParameters(req); // log request Database.GetInstance().LogInfo(string.Format("The participant opened the retrospection/visualization for '{0}'.", date)); // prepare charts var contextTimelineChart = new ContextTimelineChart(date); var productivityGauge = new ProductivityGaugeChart(date); var activityPie = new ActivityPieChart(date); // organize & draw charts html += "<style type='text/css'>"; html += "td { border: 3px solid #B0B0B0; }"; html += "</style>"; html += "<table cellpadding='20' style='margin-left: auto; margin-right: auto;'>"; // border-color: #F1F1F1; vertical-align: top; horizontal-align: center;' html += "<tr><td style='vertical-align:top;'>" + productivityGauge.GetHtml() + "</td><td style='vertical-align:top;' rowspan='2'>" + contextTimelineChart.GetHtml() + "</td></tr>"; html += "<tr><td style='vertical-align:top;'>" + activityPie.GetHtml() + "</td></tr>"; html += "</table>"; var title = Dict.RetrospectionPageTitle + " for the " + date.Date.ToShortDateString(); if (RemoteDataHandler.VisualizeWithRemoteData()) { title += " (visualizing local and remote data)"; } //title += "<a href=\"settings\">" + Settings.SettingsTitle + "</a>"; html = ((string)_resourceManager.GetObject("personalanalytics_html")) .Replace("{content}", html) //.Replace("{menu}", Menu) .Replace("{title}", title); req.Write(html); req.SetHeader("Content-Type", "text/html; charset=utf-8"); } catch (Exception e) { req.Write(e.ToString()); req.SetHeader("Content-Type", "text/html; charset=utf-8"); } return(200); }
private int OnStats(HttpReqResp req) { try { var html = string.Empty; var date = VisHelper.GetVisualizationDateFromUrlParameters(req); //var visType = VisHelper.GetVisualizationTypesFromUrlParameters(req); // log request Database.GetInstance().LogInfo(string.Format("The participant opened the retrospection/visualization for '{0}'.", date)); // prepare charts var contextTimelineChart = new ContextTimelineChart(date); var productivityGauge = new ProductivityGaugeChart(date); var activityPie = new ActivityPieChart(date); // organize & draw charts html += "<style type='text/css'>"; html += "td { border: 3px solid #B0B0B0; }"; html += "</style>"; html += "<table cellpadding='20' style='margin-left: auto; margin-right: auto;'>"; // border-color: #F1F1F1; vertical-align: top; horizontal-align: center;' html += "<tr><td style='vertical-align:top;'>" + productivityGauge.GetHtml() + "</td><td style='vertical-align:top;' rowspan='2'>" + contextTimelineChart.GetHtml() + "</td></tr>"; html += "<tr><td style='vertical-align:top;'>" + activityPie.GetHtml() + "</td></tr>"; html += "</table>"; var title = Dict.RetrospectionPageTitle + " for the " + date.Date.ToShortDateString(); if (RemoteDataHandler.VisualizeWithRemoteData()) title += " (visualizing local and remote data)"; //title += "<a href=\"settings\">" + Settings.SettingsTitle + "</a>"; html = ((string) _resourceManager.GetObject("personalanalytics_html")) .Replace("{content}", html) //.Replace("{menu}", Menu) .Replace("{title}", title); req.Write(html); req.SetHeader("Content-Type", "text/html; charset=utf-8"); } catch (Exception e) { req.Write(e.ToString()); req.SetHeader("Content-Type", "text/html; charset=utf-8"); } return 200; }