Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 121 lines (119 sloc) 8.274 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
<%@ Page Language="C#" MasterPageFile="~/MoMA.master" AutoEventWireup="true" CodeFile="Overview.aspx.cs" Inherits="Overview" Title="MoMA Studio - Overview" %>

<asp:Content ID="ContentHeaderContent" ContentPlaceHolderID="ContentHeaderPlaceholder" runat="server">
    Overview
</asp:Content>
<asp:Content ID="BodyContent" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
    <asp:SqlDataSource ID="Latest20SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MomaDB %>"
        ProviderName="<%$ ConnectionStrings:MomaDB.ProviderName %>" SelectCommand="SELECT rep.id, rep.report_date, rep.reporter_name, def.display_name, meta.importance, rep.miss, rep.niex, rep.pinv, rep.todo, rep.total FROM moma_definition def, report rep, report_metadata meta WHERE rep.moma_definition_id = def.id AND rep.id = meta.report_id ORDER BY rep.report_date DESC LIMIT 20;"
        EnableCaching="True" CacheDuration="300">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="IssuesPerAppSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MomaDB %>"
        ProviderName="<%$ ConnectionStrings:MomaDB.ProviderName %>" SelectCommand="SELECT total AS count FROM report;"
        EnableCaching="True" CacheDuration="300">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="IssuesPerAppNowSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MomaDB %>"
        ProviderName="<%$ ConnectionStrings:MomaDB.ProviderName %>" SelectCommand="SELECT COUNT(report_id) AS Count FROM issue_report, issue WHERE issue_report.issue_id = issue.id AND issue.is_latest_definition = true GROUP BY report_id;"
        EnableCaching="True" CacheDuration="300">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="StatsSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MomaDB %>"
        ProviderName="<%$ ConnectionStrings:MomaDB.ProviderName %>" SelectCommand="SELECT COUNT(id) AS Count FROM report;"
        EnableCaching="True" CacheDuration="300">
    </asp:SqlDataSource>
    <div id="sidebar">
        <asp:Label runat="server" Text="<h3>Statistics:</h3>"></asp:Label>
        <asp:DetailsView ID="StatsDetailsView" runat="server" AutoGenerateRows="False" DataSourceID="StatsSqlDataSource">
            <AlternatingRowStyle CssClass="dv_row_alternating" />
            <FieldHeaderStyle CssClass="dv_field_header" Font-Bold="true" />
            <Fields>
                <asp:BoundField DataField="count" HeaderText="Report Count:" />
            </Fields>
        </asp:DetailsView>
        <br /><br />
        <asp:Label ID="IssuesPerAppLabel" runat="server" Text="<h3>Issues per Application (as reported):</h3>"></asp:Label>
        <asp:Image ID="IssuesPerAppGraphImage" runat="server" Height="150" Width="200" />
        <br /><br />
        <asp:Label ID="IssuesPerAppNowLabel" runat="server" Text="<h3>Issues per Application (latest mono version):</h3>"></asp:Label>
        <asp:Image ID="IssuesPerAppNowGraphImage" runat="server" Height="150" Width="200" />
    </div>
    <asp:Label ID="Latest20Label" runat="server" Text="<h3>Latest 20 Reports:</h3>"></asp:Label>
    <br />
    <asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
            <asp:GridView ID="Anon_Latest20GridView" runat="server" AutoGenerateColumns="False"
                DataSourceID="Latest20SqlDataSource">
                    <RowStyle CssClass="gv_col" />
                    <AlternatingRowStyle CssClass="gv_col_alternating" />
                    <HeaderStyle CssClass="gv_header" />
                    <Columns>
                    <asp:TemplateField HeaderText="Date" SortExpression="report_date">
                        <ItemTemplate>
                            <%-- Shorten the date --%>
                            <asp:Label ID="Label1" runat="server" Text='<%# ((DateTime)Eval("report_date")).ToShortDateString () %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="display_name" HeaderText="Profile" />
                    <asp:BoundField DataField="miss" HeaderText="MISS" />
                    <asp:BoundField DataField="niex" HeaderText="NIEX" />
                    <asp:BoundField DataField="pinv" HeaderText="PINV" />
                    <asp:BoundField DataField="todo" HeaderText="TODO" />
                    <asp:BoundField DataField="total" HeaderText="Total" />
                </Columns>
            </asp:GridView>
        </AnonymousTemplate>
        <RoleGroups>
            <asp:RoleGroup Roles="Novell">
                <ContentTemplate>
                    <asp:GridView ID="Novell_Latest20GridView" runat="server" AutoGenerateColumns="False" DataSourceID="Latest20SqlDataSource">
                        <RowStyle CssClass="gv_col" />
                        <AlternatingRowStyle CssClass="gv_col_alternating" />
                        <HeaderStyle CssClass="gv_header" />
                        <Columns>
                            <asp:HyperLinkField DataNavigateUrlFields="id" DataNavigateUrlFormatString="~/ReportView.aspx?ReportID={0}"
                                HeaderText="ID" Text=">>" />
                            <asp:TemplateField HeaderText="Date" SortExpression="report_date">
                                <ItemTemplate>
                                    <%-- Shorten the date --%>
                                    <asp:Label ID="Label1" runat="server" Text='<%# ((DateTime)Eval("report_date")).ToShortDateString () %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="reporter_name" HeaderText="Name" />
                            <asp:BoundField DataField="display_name" HeaderText="Profile" />
                            <asp:BoundField DataField="miss" HeaderText="MISS" />
                            <asp:BoundField DataField="niex" HeaderText="NIEX" />
                            <asp:BoundField DataField="pinv" HeaderText="PINV" />
                            <asp:BoundField DataField="todo" HeaderText="TODO" />
                            <asp:BoundField DataField="total" HeaderText="Total" />
                            <asp:TemplateField ShowHeader="False">
                                <ItemTemplate>
                                    <asp:Image ID="ImportanceImage" runat="server" ImageUrl="~/important.png" Visible='<%# Eval("importance").ToString() == "Important" %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </ContentTemplate>
            </asp:RoleGroup>
        </RoleGroups>
        <LoggedInTemplate>
            <asp:GridView ID="LoggedIn_Latest20GridView" runat="server" AutoGenerateColumns="False"
                DataSourceID="Latest20SqlDataSource">
                <RowStyle CssClass="gv_col" />
                <AlternatingRowStyle CssClass="gv_col_alternating" />
                <HeaderStyle CssClass="gv_header" />
                <Columns>
                    <asp:TemplateField HeaderText="Date" SortExpression="report_date">
                        <ItemTemplate>
                            <%-- Shorten the date --%>
                            <asp:Label ID="Label1" runat="server" Text='<%# ((DateTime)Eval("report_date")).ToShortDateString () %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="display_name" HeaderText="Profile" />
                    <asp:BoundField DataField="miss" HeaderText="MISS" />
                    <asp:BoundField DataField="niex" HeaderText="NIEX" />
                    <asp:BoundField DataField="pinv" HeaderText="PINV" />
                    <asp:BoundField DataField="todo" HeaderText="TODO" />
                    <asp:BoundField DataField="total" HeaderText="Total" />
                </Columns>
            </asp:GridView>
        </LoggedInTemplate>
    </asp:LoginView>
</asp:Content>
Something went wrong with that request. Please try again.