Commits

Matthew Turk  committed 4f685f5

Adding a development dashboard

  • Participants
  • Parent commits 457b222

Comments (0)

Files changed (3)

File yt.enzotools.org/960.css

+
+/* Containers
+----------------------------------------------------------------------------------------------------*/
+.container_6 {
+	margin-left: auto;
+	margin-right: auto;
+	width: 960px;
+	
+	
+}
+
+/* Grid >> Children (Alpha ~ First, Omega ~ Last)
+----------------------------------------------------------------------------------------------------*/
+
+.alpha {
+	margin-left: 0 !important;
+}
+
+.omega {
+	margin-right: 0 !important;
+}
+
+
+
+/* Grid >> Global
+----------------------------------------------------------------------------------------------------*/
+ 
+.grid_1, 
+.grid_2, 
+.grid_3, 
+.grid_4, 
+.grid_5,
+.grid_6{
+	display:inline;
+	float: left;
+	position: relative;
+	margin-left: 10.0px;
+	margin-right: 10.0px;
+}
+
+
+/* Grid >> 2 Columns
+----------------------------------------------------------------------------------------------------*/
+
+.container_6 .grid_1{
+	width:140px;
+}
+
+.container_6 .grid_2{
+	width:300px;
+}
+
+.container_6 .grid_3{
+	width:460px;
+}
+
+.container_6 .grid_4{
+	width:620px;
+}
+
+.container_6 .grid_5{
+	width:780px;
+}
+
+.container_6 .grid_6{
+	width:940px;
+}
+
+
+
+
+
+/* Prefix Extra Space >> 2 Columns
+----------------------------------------------------------------------------------------------------*/
+
+    .container_6 .prefix_1 {
+	padding-left:160px;
+}
+
+    .container_6 .prefix_2 {
+	padding-left:320px;
+}
+
+    .container_6 .prefix_3 {
+	padding-left:480px;
+}
+
+    .container_6 .prefix_4 {
+	padding-left:640px;
+}
+
+    .container_6 .prefix_5 {
+	padding-left:800px;
+}
+
+
+
+/* Suffix Extra Space >> 2 Columns
+----------------------------------------------------------------------------------------------------*/
+
+    .container_6 .suffix_1 {
+	padding-right:160px;
+}
+
+    .container_6 .suffix_2 {
+	padding-right:320px;
+}
+
+    .container_6 .suffix_3 {
+	padding-right:480px;
+}
+
+    .container_6 .suffix_4 {
+	padding-right:640px;
+}
+
+    .container_6 .suffix_5 {
+	padding-right:800px;
+}
+
+
+
+/* Push Space >> 2 Columns
+----------------------------------------------------------------------------------------------------*/
+
+    .container_6 .push_1 {
+	left:160px;
+}
+
+    .container_6 .push_2 {
+	left:320px;
+}
+
+    .container_6 .push_3 {
+	left:480px;
+}
+
+    .container_6 .push_4 {
+	left:640px;
+}
+
+    .container_6 .push_5 {
+	left:800px;
+}
+
+
+
+
+
+/* Pull Space >> 2 Columns
+----------------------------------------------------------------------------------------------------*/
+
+    .container_6 .pull_1 {
+	right:160px;
+}
+
+    .container_6 .pull_2 {
+	right:320px;
+}
+
+    .container_6 .pull_3 {
+	right:480px;
+}
+
+    .container_6 .pull_4 {
+	right:640px;
+}
+
+    .container_6 .pull_5 {
+	right:800px;
+}
+
+
+
+
+/* Clear Floated Elements
+----------------------------------------------------------------------------------------------------*/
+
+
+.clear {
+	clear: both;
+	display: block;
+	overflow: hidden;
+	visibility: hidden;
+	width: 0;
+	height: 0;
+}
+
+
+.clearfix:after {
+	clear: both;
+	content: ' ';
+	display: block;
+	font-size: 0;
+	line-height: 0;
+	visibility: hidden;
+	width: 0;
+	height: 0;
+}
+
+.clearfix {
+	display: inline-block;
+}
+
+* html .clearfix {
+	height: 1%;
+}
+
+.clearfix {
+	display: block;
+}

File yt.enzotools.org/dashboard.html

+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Crimson+Text">
+<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Inconsolata">
+<link rel="stylesheet" type="text/css" media="all" href="960.css" />
+<link rel="stylesheet" type="text/css" media="all" href="style.css" />
+<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
+<script type="text/javascript">
+// we will add our javascript code here
+ function format_commit(commit, reponame) {
+    var url = "http://hg.enzotools.org/" + reponame + "/changeset/"
+        + commit['node'];
+    var user = commit['user'];
+    var entry = "<li><a class='hash_node' href='" + url + "'>" + commit['node'] + "</a> "
+              + "by <a href='https://bitbucket.org/"
+                + user['username'] + "'>"
+                + user['first_name'] + " " + user['last_name'] + "</a>"
+                + ": "
+    + commit['description'].substring(0,50);
+    if (commit['description'].length > 50) { entry += "..."; }
+    entry += "</li>";
+    return entry;
+ }
+ function format_issue(issue, reponame) {
+    var url = "http://hg.enzotools.org/" + reponame + "/issue/"
+            + issue['local_id'];
+    // Should put some kind of coloring based on severity here
+    var entry = "<li><a class='issue_node' href='" + url + "'>"
+              + "#" + issue['local_id'] + "</a>: "
+              + issue['title'].substring(0, 80);
+    if (issue['title'].length > 80) { entry += "..."; }
+    entry += "</li>";
+    return entry;
+ }
+ function populate_events(reponame) {
+        function rv(bbdata) {
+        var entry;
+        var commits = $("#" + reponame + "_commits");
+        $.each(bbdata['events'], function(intIndex, objValue) {
+                if (objValue['event'] == "commit") {
+                    entry = format_commit(objValue, reponame);
+                    commits.append($(entry));
+                }
+            }
+        );
+    }; return rv;}
+ function populate_issues(reponame) {
+        function rv(bbdata) {
+        var entry;
+        var commits = $("#" + reponame + "_issues");
+        $.each(bbdata['issues'], function(intIndex, objValue) {
+                entry = format_issue(objValue, reponame);
+                commits.append($(entry));
+            }
+        );
+    }; return rv;}
+
+ // INCOMING: http://hg.enzotools.org/yt/compare/USERNAME/yt..default
+ // OUTGOING: http://hg.enzotools.org/yt/compare/default..USERNAME/yt
+ function populate_forks(reponame) {
+    function rv(fork_data) {
+        var entry;
+        var this_list = $("#" + reponame + "_forks");
+        $.each(fork_data, function(intIndex, objValue) {
+            if (objValue['reponame'] == undefined)
+               {objValue['reponame'] = 'yt';}
+            entry = "<li>"
+                  + "<a href='http://hg.enzotools.org/yt/compare/"
+                  + "default.." + objValue['username'] + "/yt'>"
+                  + "<img src='images/outgoing.png' width=16 alt='Incoming Changesets'></a>"
+                  + "&nbsp;&nbsp;"
+                  + "<a href='https://bitbucket.org/"
+                  + objValue['username'] + "/" + objValue['reponame'] + "/'>fork</a>"
+                  + " by <a href='" + "https://bitbucket.org/"
+                  + objValue['username'] + "'>"
+                  + objValue['username'] + "</a>"
+                  // incoming
+                  //+ "<a href='http://hg.enzotools.org/yt/compare/"
+                  //+ objValue['username'] + "/yt..default'>"
+                  //+ "<img src='images/incoming.png' width=16></a>"
+                  // outgoing
+                  ;
+            this_list.prepend($(entry));
+        });
+    };
+    return rv;
+}
+
+ $(document).ready(function() {
+    var bburl
+    bburl = "https://api.bitbucket.org/1.0/repositories/yt_analysis/yt/events/";
+    $.getJSON(bburl + "?limit=5&callback=?", populate_events('yt'));
+    bburl = "https://api.bitbucket.org/1.0/repositories/yt_analysis/yt/issues/";
+    $.getJSON(bburl + "?limit=5&callback=?", populate_issues('yt'));
+    populate_forks("yt")( [ {username:'sskory'},
+                            {username:'MatthewTurk'},
+                            {username:'BrittonSmith'},
+                            {username:'samskillman'},
+                            {username:'atmyers'},
+                            {username:'jwise77'},
+                            {username:'sklemer'},
+                            {username:'chummels', reponame:'yt-chummels'},
+                          ]);
+
+    bburl = "https://api.bitbucket.org/1.0/repositories/yt_analysis/yt-doc/events/";
+    $.getJSON(bburl + "?limit=5&callback=?", populate_events('yt-doc'));
+    bburl = "https://api.bitbucket.org/1.0/repositories/yt_analysis/yt-doc/issues/";
+    $.getJSON(bburl + "?limit=5&callback=?", populate_issues('yt-doc'));
+    populate_forks("yt-doc")( [ {username:'samskillman'},
+                              ]);
+
+    bburl = "https://api.bitbucket.org/1.0/repositories/yt_analysis/yt-supplemental/events/";
+    $.getJSON(bburl + "?limit=5&callback=?", populate_events('yt-supplemental'));
+    bburl = "https://api.bitbucket.org/1.0/repositories/yt_analysis/yt-supplemental/issues/";
+    $.getJSON(bburl + "?limit=5&callback=?", populate_issues('yt-supplemental'));
+    populate_forks("yt-supplemental")( [
+                                       ]);
+
+ });
+</script>
+<title>yt development dashboard</title>
+</head>
+<body>
+
+
+<div id="header" class="container_6">
+  <div class="grid_4">
+    <h1>yt development dashboard</h1>
+  </div>
+  <div class="grid_2">
+    <p>A quick snapshot of yt development</p>
+  </div>
+</div>
+
+<div id="content" class="container_6">
+
+<div id="" class="grid_6 repo">
+  <div style="border-bottom: 1px solid #999999;">
+  <h2 class="reponame"><a href="http://hg.enzotools.org/yt/rss"><img src="images/feed.png" width=32></a>
+  <a href="http://hg.enzotools.org/yt/">yt</a></h2>
+  </div>
+</div>
+<div id="" class="grid_4 alpha">
+  <div id="" class="grid_4 repo alpha omega">
+      <h3>Commits</h3>
+      <ul id="yt_commits" class="events">
+      </ul>
+  </div>
+  <div id="" class="grid_4 repo alpha omega">
+      <h3>Issues</h3>
+      <ul id="yt_issues" class="events">
+      </ul>
+  </div>
+</div>
+
+<div id="" class="grid_2 reposupp omega">
+      <h3>Forks </h3>
+      <ul id="yt_forks">
+      <li><a href="http://hg.enzotools.org/yt/fork/"><img width=16 src="images/fork.png"></a>&nbsp;&nbsp;<a href="http://hg.enzotools.org/yt/fork/">add fork!</a></li>
+      </ul>
+</div>
+
+<div id="" class="grid_6 repo">
+  <div style="border-bottom: 1px solid #999999;">
+  <h2 class="reponame"><a href="http://hg.enzotools.org/yt-doc/rss"><img src="images/feed.png" width=32></a>
+  <a href="http://hg.enzotools.org/yt-doc/">yt-doc</a></h2>
+  </div>
+</div>
+<div id="" class="grid_4 alpha">
+  <div id="" class="grid_4 repo alpha omega">
+      <h3>Commits</h3>
+      <ul id="yt-doc_commits" class="events">
+      </ul>
+  </div>
+  <div id="" class="grid_4 repo alpha omega">
+      <h3>Issues</h3>
+      <ul id="yt-doc_issues" class="events">
+      </ul>
+  </div>
+</div>
+
+<div id="" class="grid_2 reposupp omega">
+      <h3>Forks </h3>
+      <ul id="yt-doc_forks">
+      <li><a href="http://hg.enzotools.org/yt-doc/fork/"><img width=16 src="images/fork.png"></a>&nbsp;&nbsp;<a href="http://hg.enzotools.org/yt-doc/fork/">add fork!</a></li>
+      </ul>
+</div>
+
+<div id="" class="grid_6 repo">
+  <div style="border-bottom: 1px solid #999999;">
+  <h2 class="reponame"><a href="http://hg.enzotools.org/yt-supplemental/rss"><img src="images/feed.png" width=32></a>
+  <a href="http://hg.enzotools.org/yt-supplemental/">yt-supplemental</a></h2>
+  </div>
+</div>
+<div id="" class="grid_4 alpha">
+  <div id="" class="grid_4 repo alpha omega">
+      <h3>Commits</h3>
+      <ul id="yt-supplemental_commits" class="events">
+      </ul>
+  </div>
+  <div id="" class="grid_4 repo alpha omega">
+      <h3>Issues</h3>
+      <ul id="yt-supplemental_issues" class="events">
+      </ul>
+  </div>
+</div>
+
+<div id="" class="grid_2 reposupp omega">
+      <h3>Forks </h3>
+      <ul id="yt-supplemental_forks">
+      <li><a href="http://hg.enzotools.org/yt-supplemental/fork/"><img width=16 src="images/fork.png"></a>&nbsp;&nbsp;<a href="http://hg.enzotools.org/yt-supplemental/fork/">add fork!</a></li>
+      </ul>
+</div>
+
+</div>
+
+
+<div id="footer" class="container_6">
+
+<div id="" class="grid_6 ">
+</div>
+
+</div>
+
+
+</body>
+</html>

File yt.enzotools.org/style.css

+body {
+    font-family: "Crimson Text";
+}
+
+h2 { padding: 0px; margin: 0.2em; }
+h3 { padding: 0px; margin: 0.2em; }
+
+h2 a {
+    text-decoration: none;
+    color: #000000;
+}
+
+a.issue_node {
+    font-family: "Inconsolata";
+}
+
+a.hash_node {
+    font-family: "Inconsolata";
+}
+
+.reponame {
+    font-family: "Inconsolata";
+    font-size: 200%;
+}
+
+#repo_container {
+    border-bottom: 2px solid red;
+}
+
+.events {
+    list-style-type: none;
+}
+
+li.events {
+    border-top: 1px dotted #BBBBBB;
+}
+
+#yt_forks {
+    list-style-type: none;
+}