puppetboard: Commit the current code.

This is all the code after a week and a bit hacking on this project.
It's in a rather experimental state but should work with a little
effort.
This commit is contained in:
Daniele Sluijters
2013-08-07 08:58:44 +02:00
parent 26de6d2979
commit f41dd99f60
30 changed files with 2377 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
$ = jQuery
$ ->
$('input.filter-list').parent('div').removeClass('hide')
$("input.filter-list").on "keyup", (e) ->
rex = new RegExp($(this).val(), "i")
$(".searchable li").hide()
$(".searchable li").filter( ->
rex.test $(this).text()
).show()
if e.keyCode is 27
$(e.currentTarget).val ""
ev = $.Event("keyup")
ev.keyCode = 13
$(e.currentTarget).trigger(ev)
e.currentTarget.blur()

View File

@@ -0,0 +1,28 @@
$ = jQuery
$ ->
$('.nodes').tablesorter(
headers:
3:
sorter: false
sortList: [[0,0]]
)
$('.facts').tablesorter(
sortList: [[0,0]]
)
$('input.filter-table').parent('div').removeClass('hide')
$("input.filter-table").on "keyup", (e) ->
rex = new RegExp($(this).val(), "i")
$(".searchable tr").hide()
$(".searchable tr").filter( ->
rex.test $(this).text()
).show()
if e.keyCode is 27
$(e.currentTarget).val ""
ev = $.Event("keyup")
ev.keyCode = 13
$(e.currentTarget).trigger(ev)
e.currentTarget.blur()

View File

@@ -0,0 +1,51 @@
body {
padding-top: 60px;
}
th.headerSortUp {
position: relative
}
th.headerSortDown {
position: relative
}
th.header {
position: relative
}
th.header:after {
content: "\f0dc";
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-decoration: inherit;
color: #000;
font-size: 18px;
padding-right: 0.5em;
float:right;
}
th.headerSortUp:after {
content: "\f0de";
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-decoration: inherit;
color: #000;
font-size: 18px;
padding-right: 0.5em;
float:right;
}
th.headerSortDown:after {
content: "\f0dd";
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
text-decoration: inherit;
color: #000;
font-size: 18px;
padding-right: 0.5em;
float:right;
}
.stat {
margin-bottom: 40px;
}
.navbar .brand:hover {
color: #fff;
}

View File

@@ -0,0 +1,27 @@
// Generated by CoffeeScript 1.6.3
(function() {
var $;
$ = jQuery;
$(function() {});
$('input.filter-list').parent('div').removeClass('hide');
$("input.filter-list").on("keyup", function(e) {
var ev, rex;
rex = new RegExp($(this).val(), "i");
$(".searchable li").hide();
$(".searchable li").filter(function() {
return rex.test($(this).text());
}).show();
if (e.keyCode === 27) {
$(e.currentTarget).val("");
ev = $.Event("keyup");
ev.keyCode = 13;
$(e.currentTarget).trigger(ev);
return e.currentTarget.blur();
}
});
}).call(this);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
// Generated by CoffeeScript 1.6.3
(function() {
var $;
$ = jQuery;
$(function() {});
$('.nodes').tablesorter({
headers: {
3: {
sorter: false
}
},
sortList: [[0, 0]]
});
$('.facts').tablesorter({
sortList: [[0, 0]]
});
$('input.filter-table').parent('div').removeClass('hide');
$("input.filter-table").on("keyup", function(e) {
var ev, rex;
rex = new RegExp($(this).val(), "i");
$(".searchable tr").hide();
$(".searchable tr").filter(function() {
return rex.test($(this).text());
}).show();
if (e.keyCode === 27) {
$(e.currentTarget).val("");
ev = $.Event("keyup");
ev.keyCode = 13;
$(e.currentTarget).trigger(ev);
return e.currentTarget.blur();
}
});
}).call(this);

View File

@@ -0,0 +1,23 @@
jQuery(function ($) {
var localise_timestamp = function(timestamp){
if (timestamp === "None"){
return '';
};
d = moment.utc(timestamp);
d.local();
return d;
};
$("[rel=utctimestamp]").each(
function(index, timestamp){
var tstamp = $(timestamp);
var tstring = tstamp.text().trim();
var result = localise_timestamp(tstring);
if (result == '') {
tstamp.text('Unknown');
} else {
tstamp.text(localise_timestamp(tstring).format('LLLL'));
};
});
});