Skip to content

Commit

Permalink
Fix copyright notice. Add thousand separator.
Browse files Browse the repository at this point in the history
  • Loading branch information
pranavkm committed Mar 3, 2011
1 parent b5aad8c commit f13c37d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
4 changes: 2 additions & 2 deletions App_Code/PackageRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static Statistics GetCurrentStatistics(Cache cache) {
TotalDownloads = packages.GroupBy(p => p.Id).Select(g => g.First().DownloadCount).Sum(),
LatestPackages = (from p in packages
orderby p.LastUpdated descending
select new {
select new StatsPackage {
Id = p.Id,
Version = p.Version,
Url = FixGalleryUrl(p.GalleryDetailsUrl)
Expand All @@ -55,7 +55,7 @@ orderby p.LastUpdated descending
orderby version descending
select p).First()
orderby downloadCount descending
select new {
select new StatsPackage {
Id = latest.Id,
DownloadCount = downloadCount,
Url = FixGalleryUrl(latest.GalleryDetailsUrl)
Expand Down
9 changes: 9 additions & 0 deletions App_Code/StatsPackage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
public class StatsPackage {
public string Id { get; set; }

public string Version { get; set; }

public int DownloadCount { get; set; }

public string Url { get; set; }
}
4 changes: 2 additions & 2 deletions ChartTemplate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<ChartAreas>
<ChartArea Name="Default" _Template_="All" BackColor="64, 165, 191, 228" BackGradientStyle="TopBottom" BackSecondaryColor="White" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" ShadowColor="Transparent">
<AxisY>
<MajorGrid Enabled="False" />
<LabelStyle Format="{0:0,0}" />
<MajorGrid Enabled="True" LineDashStyle="Dash" />
<MinorGrid Enabled="False" />
</AxisY>
<AxisX LineColor="64, 64, 64, 64">
<LabelStyle Interval="1" />
<MajorGrid Enabled="False" />
<MinorGrid Enabled="False" />
</AxisX>
Expand Down
4 changes: 2 additions & 2 deletions Default.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
</div>
</div>
</div>
<footer>
<div id="footer">
&#169; 2010 Outercurve Foundation.
</footer>
</div>

@section foot {
<script type="text/javascript" src="@Href("Default.js")"></script>
Expand Down
2 changes: 1 addition & 1 deletion Site.css
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ a { color: #00A0E7; }
clear: both;
}

footer
#footer
{
margin-top: 10px;
font-size:12px;
Expand Down
9 changes: 6 additions & 3 deletions Stats.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
var metaStats = NuGetStatistics.GetMetaStatistics(Cache);

Response.ContentType = "application/json";

Response.Write(Json.Encode(new {
TotalCount = String.Format("{0:0,0}", stats.TotalCount),
UniqueCount = String.Format("{0:0,0}", stats.UniqueCount),
TotalDownloads = String.Format("{0:0,0}", stats.TotalDownloads),
LatestPackages = stats.LatestPackages,
TopPackages = stats.TopPackages,
HourDownloads = metaStats.HourDownloads,
DayPackages = metaStats.DayPackages
TopPackages = from package in stats.TopPackages
select new { Id = package.Id, DownloadCount = String.Format("{0:0,0}", package.DownloadCount), Url = package.Url },
HourDownloads = String.Format("{0:0,0}", metaStats.HourDownloads),
DayPackages = String.Format("{0:0,0}", metaStats.DayPackages)
}));
}

0 comments on commit f13c37d

Please sign in to comment.