Permalink
Browse files

APIReport.aspx, APIReport.aspx.cs: Add style to the GridView. Add lin…

…ks from the GridView to NamespaceView and IssueView.

IssueView.aspx: Add a textbox to quickly select an issue by ID

IssueView.aspx.cs: Force a page reload when an issue has been selected with the cascading drop down, so that disqus (which will also force a page reload when a comment has been entered) can reload the correct page.

MoMA.css: Style links inside GridViews with normal weight fonts, so they don't take up too much space.

MyAccount.aspx, Overview.aspx, Submissions.aspx: Add GridView style.

NamespaceView.aspx, NamespaceView.aspx.cs: Add GridView styles.  Fix SqlDataSource parameters so that the value passed in as a query string didn't override the value selected in the tree view.  Try and clarify the values presented in the first DetailsView.

ReportView.aspx, ReportView.aspx.cs: Add GridView style.  Add links from the GridView to NamespaceView.  Add a textbox to quickly select a report by ID.

svn path=/trunk/moma-tool/; revision=129150
  • Loading branch information...
1 parent 94516d5 commit 27555d5436f92e3ff4b1b73e22beb679273c49d7 @dickp dickp committed Mar 12, 2009
View
@@ -15,7 +15,7 @@
<%-- Need something in the filter here so it will actually filter at all --%>
<asp:SqlDataSource ID="IssuesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MomaDB %>"
ProviderName="<%$ ConnectionStrings:MomaDB.ProviderName %>"
- SelectCommand="SELECT c.total, c.apps, c.total/c.apps AS totalperapp, i.method_namespace, i.method_class, i.method_name, i.display_name, i.lookup_name FROM (SELECT COUNT(report_id) AS total, COUNT(DISTINCT(report_id)) AS apps, issue_id FROM issue_report GROUP BY issue_id) as c, (SELECT issue.id, issue.method_namespace, issue.method_class, issue.method_name, issue_type.display_name, issue_type.lookup_name FROM issue, issue_type WHERE issue_type.id = issue.issue_type_id AND (issue.is_latest_definition = true OR issue_type.lookup_name = 'PINV')) AS i WHERE c.issue_id = i.id ORDER BY total DESC;"
+ SelectCommand="SELECT c.total, c.apps, c.total/c.apps AS totalperapp, i.id, i.method_namespace, i.method_class, i.method_name, i.display_name, i.lookup_name FROM (SELECT COUNT(report_id) AS total, COUNT(DISTINCT(report_id)) AS apps, issue_id FROM issue_report GROUP BY issue_id) as c, (SELECT issue.id, issue.method_namespace, issue.method_class, issue.method_name, issue_type.display_name, issue_type.lookup_name FROM issue, issue_type WHERE issue_type.id = issue.issue_type_id AND (issue.is_latest_definition = true OR issue_type.lookup_name = 'PINV')) AS i WHERE c.issue_id = i.id ORDER BY total DESC;"
CacheDuration="300" EnableCaching="True" FilterExpression="lookup_name = 'TODO'"
OnFiltering="IssuesSqlDataSource_Filtering">
</asp:SqlDataSource>
@@ -38,16 +38,22 @@
AllowPaging="True" AllowSorting="True" PageSize="30"
onrowdatabound="IssuesGridView_RowDataBound"
onprerender="IssuesGridView_PreRender">
+ <RowStyle CssClass="gv_col" />
<AlternatingRowStyle CssClass="gv_col_alternating" />
<HeaderStyle CssClass="gv_header" />
<PagerStyle CssClass="gv_pager" />
<Columns>
<asp:BoundField DataField="total" HeaderText="Count" SortExpression="total" />
<asp:BoundField DataField="apps" HeaderText="Apps" SortExpression="apps" />
<asp:BoundField DataField="totalperapp" HeaderText="Ratio" SortExpression="totalperapp" />
- <asp:BoundField DataField="method_namespace" HeaderText="Namespace" SortExpression="method_namespace" />
+ <asp:HyperLinkField DataNavigateUrlFormatString="~/NamespaceView.aspx?Namespace={0}"
+ DataNavigateUrlFields="method_namespace" HeaderText="Namespace"
+ SortExpression="method_namespace" DataTextField="method_namespace" />
<asp:BoundField DataField="method_class" HeaderText="Class" SortExpression="method_class" />
- <asp:BoundField DataField="method_name" HeaderText="Method" SortExpression="method_name" />
+ <asp:HyperLinkField DataNavigateUrlFormatString="~/IssueView.aspx?IssueID={0}"
+ DataNavigateUrlFields="id" HeaderText="Method"
+ SortExpression="method_name" DataTextField="method_name" />
+ <%-- %><asp:BoundField DataField="method_name" HeaderText="Method" SortExpression="method_name" />--%>
<asp:BoundField DataField="lookup_name" HeaderText="Type" SortExpression="lookup_name" />
</Columns>
<PagerTemplate>
@@ -127,7 +127,10 @@ protected void IssuesGridView_RowDataBound(object sender, GridViewRowEventArgs e
}
else if (e.Row.RowType == DataControlRowType.DataRow)
{
- string method = DataBinder.Eval(e.Row.DataItem, "method_name").ToString();
+ HyperLink ns_hyper = (HyperLink)(e.Row.Cells[3].Controls[0]);
+ HyperLink meth_hyper = (HyperLink)(e.Row.Cells[5].Controls[0]);
+
+ string method = meth_hyper.Text; //DataBinder.Eval(e.Row.DataItem, "method_name").ToString();
int brace_start, brace_end;
brace_start = method.IndexOf('(');
@@ -137,14 +140,14 @@ protected void IssuesGridView_RowDataBound(object sender, GridViewRowEventArgs e
if (brace_start + 1 < brace_end)
{
/* Got some parameters */
- e.Row.Cells[5].Text = method.Substring(0, brace_start + 1) + "...)";
+ meth_hyper.Text = method.Substring(0, brace_start + 1) + "...)";
}
- e.Row.Cells[5].ToolTip = method;
+ meth_hyper.ToolTip = method;
- if (e.Row.Cells[3].Text.Length > 22)
+ if (ns_hyper.Text.Length > 22)
{
- e.Row.Cells[3].ToolTip = e.Row.Cells[3].Text;
- e.Row.Cells[3].Text = e.Row.Cells[3].Text.Substring(0, 19) + "...";
+ ns_hyper.ToolTip = ns_hyper.Text;
+ ns_hyper.Text = ns_hyper.Text.Substring(0, 19) + "...";
}
if (e.Row.Cells[4].Text.Length > 22)
@@ -153,10 +156,10 @@ protected void IssuesGridView_RowDataBound(object sender, GridViewRowEventArgs e
e.Row.Cells[4].Text = e.Row.Cells[4].Text.Substring(0, 19) + "...";
}
- if (e.Row.Cells[5].Text.Length > 22)
+ if (meth_hyper.Text.Length > 22)
{
/* Already done ToolTip for this column */
- e.Row.Cells[5].Text = e.Row.Cells[5].Text.Substring(0, 19) + "...";
+ meth_hyper.Text = meth_hyper.Text.Substring(0, 19) + "...";
}
}
}
@@ -249,8 +249,13 @@
</asp:LoginView>
<asp:UpdatePanel ID="IssuesCommentsUpdatePanel" runat="server">
<ContentTemplate>
+ <br /><br />
<disqus:DisqusControl ID="DisqusComments" Width="900px" DisqusForum="mono-momastudio-issues" DisqusDeveloper="false" runat="server"></disqus:DisqusControl>
</ContentTemplate>
</asp:UpdatePanel>
+ <br style="clear: both" /><br /><br />
+ <asp:Label ID="Label1" runat="server" Text="Jump to Issue:"></asp:Label>
+ <asp:TextBox ID="IssueIDTextBox" runat="server" AutoPostBack="True" MaxLength="7"
+ OnTextChanged="IssueIDTextBox_TextChanged"></asp:TextBox>
</asp:Content>
@@ -181,6 +181,17 @@ void GetIssueDetails(int id)
DataView issue_data = (DataView)IssueByQueryIDSqlDataSource.Select(DataSourceSelectArguments.Empty);
if (issue_data.Count == 1)
{
+ if (issue_id != id)
+ {
+ /* A new issue has been selected. Force a reload so that any Disqus comments entered
+ * (which will cause another reload) will know which issue to display
+ */
+ UriBuilder redirect = new UriBuilder(Page.Request.Url);
+ redirect.Query = "IssueID=" + id.ToString();
+
+ Page.Response.Redirect(redirect.ToString(), true);
+ }
+
default_ns = (string)issue_data[0]["method_namespace"];
default_cls = (string)issue_data[0]["method_class"];
string method = (string)issue_data[0]["method_name"];
@@ -203,7 +214,7 @@ void GetIssueDetails(int id)
DisqusComments.DisqusTitle = default_ns + "." + default_cls + "::" + method + " [" + iss_type + "]";
DisqusComments.DisqusMessage = "Mono Issue: " + DisqusComments.DisqusTitle;
DisqusComments.DisqusIdentifier = "issue-" + id.ToString();
- DisqusComments.DisqusURL = Page.Request.Url.GetLeftPart(UriPartial.Path) + "?IssueID=" + id.ToString();
+ //DisqusComments.DisqusURL = Page.Request.Url.GetLeftPart(UriPartial.Path) + "?IssueID=" + id.ToString();
DisqusComments.DoUpdate();
if (Page.User.Identity.IsAuthenticated)
@@ -344,4 +355,16 @@ protected void ReportsGridView_PreRender(object sender, EventArgs e)
}
}
}
+ protected void IssueIDTextBox_TextChanged(object sender, EventArgs e)
+ {
+ int new_id = Int32.Parse(IssueIDTextBox.Text);
+
+ if (new_id > 0)
+ {
+ UriBuilder redirect = new UriBuilder(Page.Request.Url);
+ redirect.Query = "IssueID=" + new_id.ToString();
+
+ Page.Response.Redirect(redirect.ToString(), true);
+ }
+ }
}
View
@@ -65,6 +65,16 @@
background-color: #e5e5e5;
}
+.gv_col a
+{
+ font-weight: normal;
+}
+
+.gv_col_alternating a
+{
+ font-weight: normal;
+}
+
.dv_field_header
{
background-color: #e5e5e5;
@@ -29,6 +29,7 @@
<asp:GridView ID="MyReportsGridView" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" OnRowDataBound="ReportsGridView_RowDataBound"
PageSize="10" onprerender="MyReportsGridView_PreRender">
+ <RowStyle CssClass="gv_col" />
<AlternatingRowStyle CssClass="gv_col_alternating" />
<HeaderStyle CssClass="gv_header" />
<PagerStyle CssClass="gv_pager" />
@@ -10,19 +10,19 @@
<asp:SqlDataSource ID="NamespaceStatsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MomaDB %>"
ProviderName="<%$ ConnectionStrings:MomaDB.ProviderName %>" SelectCommand="SELECT DISTINCT miss.act_miss, niex.act_niex, todo.act_todo, miss.app_miss, niex.app_niex, todo.app_todo, miss.rep_miss, niex.rep_niex, todo.rep_todo FROM issue LEFT JOIN (SELECT COUNT(DISTINCT(issue.id)) AS act_miss, COUNT(DISTINCT(issue_report.report_id)) AS app_miss, COUNT(issue_report.report_id) AS rep_miss, issue.method_namespace FROM issue_report, issue, issue_type WHERE issue.issue_type_id = issue_type.id AND issue_type.lookup_name = 'MISS' AND issue_report.issue_id = issue.id AND issue.is_latest_definition = true AND issue.method_namespace = @ns GROUP BY method_namespace) AS miss ON miss.method_namespace = issue.method_namespace LEFT JOIN (SELECT COUNT(DISTINCT(issue.id)) AS act_niex, COUNT(DISTINCT(issue_report.report_id)) AS app_niex, COUNT(issue_report.report_id) AS rep_niex, issue.method_namespace FROM issue_report, issue, issue_type WHERE issue.issue_type_id = issue_type.id AND issue_type.lookup_name = 'NIEX' AND issue_report.issue_id = issue.id AND issue.is_latest_definition = true AND issue.method_namespace = @ns GROUP BY method_namespace) AS niex ON niex.method_namespace = issue.method_namespace LEFT JOIN (SELECT COUNT(DISTINCT(issue.id)) AS act_todo, COUNT(DISTINCT(issue_report.report_id)) AS app_todo, COUNT(issue_report.report_id) AS rep_todo, issue.method_namespace FROM issue_report, issue, issue_type WHERE issue.issue_type_id = issue_type.id AND issue_type.lookup_name = 'TODO' AND issue_report.issue_id = issue.id AND issue.is_latest_definition = true AND issue.method_namespace = @ns GROUP BY method_namespace) AS todo ON todo.method_namespace = issue.method_namespace WHERE issue.method_namespace = @ns;">
<SelectParameters>
- <asp:QueryStringParameter DefaultValue="System" Name="ns" QueryStringField="Namespace" Type="String" />
+ <asp:Parameter DefaultValue="System" Name="ns" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="NamespaceIssuesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MomaDB %>"
ProviderName="<%$ ConnectionStrings:MomaDB.ProviderName %>" SelectCommand="SELECT DISTINCT issue.id, issue.method_namespace, issue.method_class, issue.method_name, issue_type.lookup_name FROM issue_type, issue, issue_report WHERE issue.is_latest_definition = true AND issue.issue_type_id = issue_type.id AND issue.method_namespace = @ns AND issue_report.issue_id = issue.id ORDER BY issue.method_class, issue.method_name;">
<SelectParameters>
- <asp:QueryStringParameter DefaultValue="System" Name="ns" QueryStringField="Namespace" Type="String" />
+ <asp:Parameter DefaultValue="System" Name="ns" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="NamespaceReportsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MomaDB %>"
ProviderName="<%$ ConnectionStrings:MomaDB.ProviderName %>" SelectCommand="SELECT DISTINCT rep.id, rep.report_date, meta.importance, meta.application_name, rep.application_type, rep.reporter_name, rep.reporter_organization, def.display_name, rep.miss, rep.niex, rep.pinv, rep.todo, rep.total FROM report rep, report_metadata meta, moma_definition def, issue_report, issue WHERE issue.is_latest_definition = true AND issue.method_namespace = @ns AND issue_report.issue_id = issue.id AND issue_report.report_id = rep.id AND rep.moma_definition_id = def.id AND rep.id = meta.report_id ORDER by rep.report_date ASC;">
<SelectParameters>
- <asp:QueryStringParameter DefaultValue="System" Name="ns" QueryStringField="Namespace" Type="String" />
+ <asp:Parameter DefaultValue="System" Name="ns" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<div id="sidebar">
@@ -42,47 +42,47 @@
<AlternatingRowStyle CssClass="dv_row_alternating" />
<FieldHeaderStyle CssClass="dv_field_header" Font-Bold="true" />
<Fields>
- <asp:TemplateField HeaderText="Issues That Have Been Reported: MISS">
+ <asp:TemplateField HeaderText="Number Of Distinct Issues That Have Been Reported: MISS">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# FormatIssueCount (Eval("act_miss").ToString()) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
- <asp:TemplateField HeaderText="Issues That Have Been Reported: NIEX">
+ <asp:TemplateField HeaderText="Number Of Distinct Issues That Have Been Reported: NIEX">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# FormatIssueCount (Eval("act_niex").ToString()) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
- <asp:TemplateField HeaderText="Issues That Have Been Reported: TODO">
+ <asp:TemplateField HeaderText="Number Of Distinct Issues That Have Been Reported: TODO">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# FormatIssueCount (Eval("act_todo").ToString()) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
- <asp:TemplateField HeaderText="Reports Containing: MISS">
+ <asp:TemplateField HeaderText="Number Of Submissions Containing: MISS">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# FormatIssueCount (Eval("app_miss").ToString()) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
- <asp:TemplateField HeaderText="Reports Containing: NIEX">
+ <asp:TemplateField HeaderText="Number Of Submissions Containing: NIEX">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# FormatIssueCount (Eval("app_niex").ToString()) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
- <asp:TemplateField HeaderText="Reports Containing: TODO">
+ <asp:TemplateField HeaderText="Number Of Submissions Containing: TODO">
<ItemTemplate>
<asp:Label ID="Label6" runat="server" Text='<%# FormatIssueCount (Eval("app_todo").ToString()) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
- <asp:TemplateField HeaderText="Total Reports: MISS">
+ <asp:TemplateField HeaderText="Total Number Of Reports (Multiple Issue Counts Per Submission): MISS">
<ItemTemplate>
<asp:Label ID="Label7" runat="server" Text='<%# FormatIssueCount (Eval("rep_miss").ToString()) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
- <asp:TemplateField HeaderText="Total Reports: NIEX">
+ <asp:TemplateField HeaderText="Total Number Of Reports (Multiple Issue Counts Per Submission): NIEX">
<ItemTemplate>
<asp:Label ID="Label8" runat="server" Text='<%# FormatIssueCount (Eval("rep_niex").ToString()) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
- <asp:TemplateField HeaderText="Total Reports: TODO">
+ <asp:TemplateField HeaderText="Total Number Of Reports (Multiple Issue Counts Per Submission): TODO">
<ItemTemplate>
<asp:Label ID="Label9" runat="server" Text='<%# FormatIssueCount (Eval("rep_todo").ToString()) %>'></asp:Label>
</ItemTemplate>
@@ -97,6 +97,7 @@
<asp:GridView ID="IssuesGridView" runat="server" DataSourceID="NamespaceIssuesSqlDataSource"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" OnRowDataBound="IssuesGridView_RowDataBound"
PageSize="20" OnPreRender="IssuesGridView_PreRender">
+ <RowStyle CssClass="gv_col" />
<AlternatingRowStyle CssClass="gv_col_alternating" />
<HeaderStyle CssClass="gv_header" />
<PagerStyle CssClass="gv_pager" />
@@ -149,6 +150,7 @@
<asp:GridView ID="Novell_ReportsGridView" runat="server" DataSourceID="NamespaceReportsSqlDataSource"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" OnRowDataBound="ReportsGridView_RowDataBound"
PageSize="30" OnPreRender="ReportsGridView_PreRender">
+ <RowStyle CssClass="gv_col" />
<AlternatingRowStyle CssClass="gv_col_alternating" />
<HeaderStyle CssClass="gv_header" />
<PagerStyle CssClass="gv_pager" />
@@ -238,6 +240,7 @@
<asp:GridView ID="LoggedIn_ReportsGridView" runat="server" DataSourceID="NamespaceReportsSqlDataSource"
AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" OnRowDataBound="ReportsGridView_RowDataBound"
PageSize="20" OnPreRender="ReportsGridView_PreRender">
+ <RowStyle CssClass="gv_col" />
<AlternatingRowStyle CssClass="gv_col_alternating" />
<HeaderStyle CssClass="gv_header" />
<PagerStyle CssClass="gv_pager" />
Oops, something went wrong.

0 comments on commit 27555d5

Please sign in to comment.