Commit d6b4e080 authored by Heinz N. Gies's avatar Heinz N. Gies

Improve function list and split it into more sections

parent 3e95eebb
......@@ -51,6 +51,38 @@
</table>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<h3>Transformations</h3>
<table>
<thead>
<tr>
<th>Functions</th>
<th>description</th>
<th>Help</th>
</tr>
</thead>
<tbody id="trans_funs">
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<h3>Histogram</h3>
<table>
<thead>
<tr>
<th>Functions</th>
<th>description</th>
<th>Help</th>
</tr>
</thead>
<tbody id="hist_funs">
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<table>
......
$(function() {
function is_hist(e) {
if (e.return == "histogram")
return true;
for (i=0; i < e.signature.length; i++) {
var s = e.signature[i];
if (s == "histogram")
return true;
}
return false;
};
function is_aggr(e) {
for (i=0; i < e.signature.length; i++) {
var s = e.signature[i];
if (s == "time")
return true;
}
return false;
};
msgpack.download("/functions", {header: {accept:"application/x-msgpack"}}, function(d) {
d.sort(function (a, b) {
if (a.name > b.name) {
......@@ -11,19 +30,32 @@ $(function() {
return 0;
});
d.forEach(function(e) {
if (e.combiner_type == "none") {
if (is_hist(e)) {
$("#hist_funs").append("<tr>" +
"<td>" + e.name +"</td>"+
"<td>" + e.desc +"</td>"+
"<td>" + e.help +"</td>"+
"</tr>")
} else if (is_aggr(e)) {
$("#aggr_funs").append("<tr>" +
"<td>" + e.name +"</td>"+
"<td>" + e.desc +"</td>"+
"<td>" + e.help +"</td>"+
"</tr>")
} else {
} else if (e.combiner_type != "none") {
$("#comb_funs").append("<tr>" +
"<td>" + e.name +"</td>"+
"<td>" + e.desc +"</td>"+
"<td>" + e.help +"</td>"+
"</tr>")
} else {
$("#trans_funs").append("<tr>" +
"<td>" + e.name +"</td>"+
"<td>" + e.desc +"</td>"+
"<td>" + e.help +"</td>"+
"</tr>")
}
})
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment