Permalink
Browse files

Bugzilla bug look-up for slavealloc

  • Loading branch information...
1 parent 3f0774a commit 63fa6a67d074b15353b2da640efc952d5397b1bb @ccooper ccooper committed Dec 5, 2012
Showing with 11 additions and 1 deletion.
  1. +2 −0 .hgignore
  2. +2 −0 lib/python/slavealloc/www/index.html
  3. +7 −1 lib/python/slavealloc/www/js/views.js
View
@@ -11,3 +11,5 @@ twistd\.pid
.*\.egg-info
dist/
slavealloc.log
+lib/python/slavealloc/www/icons
+lib/python/slavealloc/www/js/bugzilla.js
@@ -1,5 +1,6 @@
<html>
<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Slave Allocator</title>
<link rel="stylesheet" type="text/css" href="%%BASE_URL%%ui/css/slavealloc.css" />
<script src="%%BASE_URL%%ui/js/deps/load-min.js" type="text/javascript"></script>
@@ -14,6 +15,7 @@
<div id="viewcontent">
<div class="loading"> Loading... </div>
</div>
+ <script src="%%BASE_URL%%ui/js/bugzilla.js" type="text/javascript"></script>
</body>
</html>
@@ -431,7 +431,8 @@ var SlavesTableView = TableView.extend({
defaultPageLength: 10,
columns: [
- { id: "name", title: "Name" },
+ { id: "name", title: "Name",
+ renderFn: 'renderName'},
{ id: "distro", title: "Distro" },
{ id: "bitlength", title: "Bits" },
{ id: "speed", title: "Speed" },
@@ -456,6 +457,11 @@ var SlavesTableView = TableView.extend({
TableView.prototype.initialize.call(this, args);
},
+ renderName: function(model) {
+ var slavename = model.get('name');
+ return '<div id="' + slavename + '">' + slavename + '&nbsp;<img src="./icons/help.png" alt="Check bug status" title="Check bug status" onCLick="getBugByAlias(\'' + slavename + '\');" /></div>';
+ },
+
renderMaster: function(model, masterid) {
// handle an empty master quickly
if (masterid === null) {

0 comments on commit 63fa6a6

Please sign in to comment.