-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
committed
Feb 14, 2011
0 parents
commit 0cb0407
Showing
9 changed files
with
244 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
App_Data/* |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
@using Microsoft.Web.Helpers | ||
@{ | ||
Layout = "_Layout.cshtml"; | ||
} | ||
|
||
@section script { | ||
<script type="text/javascript"> | ||
$(function () { | ||
function getStats() { | ||
$.post('stats', {}, function (stats) { | ||
$('#loading').fadeOut('slow'); | ||
$('#stats').fadeIn('slow'); | ||
update('downloads', stats.TotalDownloads); | ||
update('unique', stats.UniqueCount); | ||
update('total', stats.TotalCount); | ||
setTimeout(getStats, 500); | ||
}, 'json'); | ||
} | ||
function update(element, value) { | ||
var currentValue = parseInt($('#' + element).html()) | ||
if (currentValue != value) { | ||
$('#' + element).html(value).hide().fadeIn('slow') | ||
} | ||
} | ||
getStats(); | ||
}); | ||
</script> | ||
} | ||
|
||
<div id="header"> | ||
<img id="logo" src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=nuget&DownloadId=162974&Build=17601" alt="NuGet Logo" /> | ||
<span id="header-text">statistics</span> | ||
<div class="clear"> | ||
</div> | ||
|
||
<div id="loading"> | ||
<img src="@Href("loading.gif")" alt="Loading" /> | ||
<span class="loading">Populating...</span> | ||
</div> | ||
<div class="clear"> | ||
</div> | ||
</div> | ||
|
||
<div style="margin-left:20%"> | ||
<div id="left"> | ||
<table id="stats"> | ||
<tr> | ||
<td id="downloads"> | ||
</td> | ||
<td class="words"> | ||
downloads. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td id="unique"> | ||
</td> | ||
<td class="words"> | ||
unique packages. | ||
</td> | ||
</tr> | ||
<tr> | ||
<td id="total"> | ||
</td> | ||
<td class="words"> | ||
total packages. | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
<div id="right"> | ||
@Twitter.Search("#nuget") | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
body | ||
{ | ||
font-family: Verdana, Tahoma, Arial, "Helvetica Neue", Helvetica, Sans-Serif; | ||
color: #232323; | ||
background-color: #fff; | ||
} | ||
|
||
/* Styles for basic forms | ||
-----------------------------------------------------------*/ | ||
|
||
fieldset | ||
{ | ||
border:1px solid #ddd; | ||
padding:0 1.4em 1.4em 1.4em; | ||
margin:0 0 1.5em 0; | ||
} | ||
|
||
legend | ||
{ | ||
font-size:1.2em; | ||
font-weight: bold; | ||
} | ||
|
||
textarea | ||
{ | ||
min-height: 75px; | ||
} | ||
|
||
.editor-label | ||
{ | ||
margin: 1em 0 0 0; | ||
} | ||
|
||
.editor-field | ||
{ | ||
margin:0.5em 0 0 0; | ||
} | ||
|
||
|
||
/* Styles for validation helpers | ||
-----------------------------------------------------------*/ | ||
.field-validation-error | ||
{ | ||
color: #ff0000; | ||
} | ||
|
||
.field-validation-valid | ||
{ | ||
display: none; | ||
} | ||
|
||
.input-validation-error | ||
{ | ||
border: 1px solid #ff0000; | ||
background-color: #ffeeee; | ||
} | ||
|
||
.validation-summary-errors | ||
{ | ||
font-weight: bold; | ||
color: #ff0000; | ||
} | ||
|
||
.validation-summary-valid | ||
{ | ||
display: none; | ||
} | ||
|
||
#downloads, #unique, #total | ||
{ | ||
font-size:72px; | ||
font-weight:bold; | ||
text-align:right; | ||
} | ||
|
||
#stats | ||
{ | ||
display:none; | ||
} | ||
|
||
#stats td | ||
{ | ||
padding:3px; | ||
} | ||
|
||
.words | ||
{ | ||
font-size:15px; | ||
} | ||
|
||
#header | ||
{ | ||
margin-left:30%; | ||
margin-bottom:2%; | ||
} | ||
|
||
#header-text | ||
{ | ||
font-size:20px; | ||
font-weight:bold; | ||
float:left; | ||
margin-top:20px; | ||
} | ||
|
||
#loading | ||
{ | ||
margin-top:20px; | ||
margin-left:15%; | ||
font-size:15px; | ||
font-weight:bold; | ||
} | ||
|
||
#logo | ||
{ | ||
float:left; | ||
} | ||
|
||
#left | ||
{ | ||
height:300px; | ||
width:500px; | ||
float:left; | ||
} | ||
|
||
#right | ||
{ | ||
float:left; | ||
height:300px; | ||
} | ||
|
||
.clear | ||
{ | ||
clear:both; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@using NuGet | ||
|
||
@{ | ||
var repo = new DataServicePackageRepository(new Uri("http://packages.nuget.org/v1/FeedService.svc")); | ||
var packages = repo.GetPackages().ToList(); | ||
|
||
Response.Write(Json.Encode(new | ||
{ | ||
TotalCount = packages.Count, | ||
UniqueCount = packages.GroupBy(p => p.Id).Count(), | ||
TotalDownloads = packages.GroupBy(p => p.Id).Select(g => g.First().DownloadCount).Sum(), | ||
})); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>@Page.Title</title> | ||
<link href="@Href("Site.css")" rel="stylesheet" type="text/css" /> | ||
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.4.4.min.js" type="text/javascript"></script> | ||
@RenderSection("script", required: false) | ||
</head> | ||
|
||
<body> | ||
@RenderBody() | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
# WebMatrix 1.0 |