premix report page: chunked table cell using monospace font

This commit is contained in:
andri lim 2019-02-16 18:46:08 +07:00 committed by zah
parent a1242d2538
commit 00989e9c9a
2 changed files with 12 additions and 3 deletions

View File

@ -23,6 +23,13 @@ var premix = function() {
}
}
function renderCells(row, cls, cells) {
for(var text of cells) {
let cell = $(`<td ${cls}>${split32(text)}</td>`).appendTo(row);
if(text.length > 32) cell.addClass('tm-monospace-cell');
}
}
return {
fields: ['op', 'pc', 'gas', 'gasCost', 'depth'],
@ -37,9 +44,7 @@ var premix = function() {
let ncr = nimbus instanceof Object ? nimbus[x].toString().toLowerCase() : nimbus;
let gcr = geth instanceof Object ? geth[x].toString().toLowerCase() : geth;
let cls = ncr == gcr ? '' : 'class="uk-text-danger"';
$(`<td ${cls}>${split32(x)}</td>`).appendTo(row);
$(`<td ${cls}>${split32(ncr)}</td>`).appendTo(row);
$(`<td ${cls}>${split32(gcr)}</td>`).appendTo(row);
renderCells(row, cls, [x, ncr, gcr]);
},
newSection: function(container, title, colored) {

View File

@ -22,6 +22,10 @@
overflow-y: auto;
padding-left:40px;
}
.tm-monospace-cell {
font-family: "Courier New", Courier, monospace;
font-weight: 500;
}
.uk-nav-default > li > a.tm-text-danger {
color: #f0506e;
}