SPARK-1773: rows in table
This commit is contained in:
1 parent
659bf6b208
commit
4d0a793ecc
1 file changed
+25
-9
@@ -1,6 +1,6 @@
|
||||
$( document ).ready(function (){
|
||||
let urlParams = new URLSearchParams(window.location.search);
|
||||
let num_rows = urlParams.get('r');
|
||||
num_rows = urlParams.get('r');
|
||||
let show_rows = urlParams.get('showrows');
|
||||
|
||||
let trace_data_url = "/perf_trace_data";
|
||||
@@ -33,18 +33,29 @@ $( document ).ready(function (){
|
||||
function list_rows(show_rows, data) {
|
||||
$.each(data, function(index, value){
|
||||
if(value.session_name === show_rows){
|
||||
let summary_info = "";
|
||||
let summary_info = "<table class='table bts-data-table'>";
|
||||
summary_info += "<thead><tr><th>Trace Time</th>" +
|
||||
"<th>Order Key</th>" +
|
||||
"<th>MD</th>" +
|
||||
"<th>Spreader</th>" +
|
||||
"<th>Fix</th>" +
|
||||
"<th>Total</th></tr></thead><tbody>";
|
||||
|
||||
$.each(value.rows, function(key, val) {
|
||||
summary_info += "<div>";
|
||||
summary_info += "<tr>";
|
||||
console.log(val);
|
||||
|
||||
$.each(val, function(key, val) {
|
||||
summary_info += key + ": " + val + "; ";
|
||||
});
|
||||
summary_info += "<td>" + val.trace_time + "</td>" +
|
||||
"<td>" + val.order_key + "</td>" +
|
||||
"<td>" + val.md + "</td>" +
|
||||
"<td>" + val.spreader + "</td>" +
|
||||
"<td>" + val.fix + "</td>" +
|
||||
"<td>" + val.total + "</td>";
|
||||
|
||||
summary_info += "</div>";
|
||||
|
||||
summary_info += "</tr>";
|
||||
});
|
||||
|
||||
summary_info += "</tbody></table>";
|
||||
$("#output").html(summary_info);
|
||||
return false;
|
||||
}
|
||||
@@ -90,7 +101,12 @@ function display_session (index, value) {
|
||||
session_info += "<li id='" + value.session_name + "' class='is-size-5'><b>Session:</b> " + value.session_name + "</li>";
|
||||
session_info += "<li><b>Build Type:</b> " + value.build_type + "</li>";
|
||||
session_info += "<li><b>Version:</b> " + value.version + "</li>";
|
||||
session_info += "<li><a href='?showrows=" + value.session_name + "'><b>Rows:</b> " + value.n_rows + "</a></li>";
|
||||
if(num_rows != null) {
|
||||
session_info += "<li><a href='?showrows=" + value.session_name + "&r=" + num_rows + "'><b>Rows:</b> " + value.n_rows + "</a></li>";
|
||||
}
|
||||
else {
|
||||
session_info += "<li><a href='?showrows=" + value.session_name + "'><b>Rows:</b> " + value.n_rows + "</a></li>";
|
||||
}
|
||||
|
||||
$(value.summaries).each(function(i,v){
|
||||
if(v.value === "total") {
|
||||
|
||||
Reference in new issue
Block a user