diff --git a/app.py b/app.py index a45645d..499a1a3 100644 --- a/app.py +++ b/app.py @@ -62,7 +62,7 @@ def update_load(): turbo.push(turbo.replace(render_template('_table.html', transactions=maprows), 'datatable')) maprows = recent_blocks_database.run_query() - turbo.push(turbo.replace(render_template('_blockslist.html', blocks=maprows), 'blockslist')) + # turbo.push(turbo.replace(render_template('_blockslist.html', blocks=maprows), 'blockslist')) time.sleep(1) diff --git a/log_scale.py b/log_scale.py index 24ea517..acd71cb 100644 --- a/log_scale.py +++ b/log_scale.py @@ -1,5 +1,5 @@ def invlog_scale(x): - m=10 + m=30 return (pow(2,x * m)-1)/(pow(2,m)-1) if __name__=="__main__": diff --git a/recent_blocks_database.py b/recent_blocks_database.py index 5e7f7d1..06b3a92 100644 --- a/recent_blocks_database.py +++ b/recent_blocks_database.py @@ -33,10 +33,15 @@ def calc_bars(row): lb = log_scale.invlog_scale(b) lc = log_scale.invlog_scale(c) - # relative values for the bar widths - row['bar_success'] = format_width_percentage(la) - row['bar_txerror'] = format_width_percentage(lb - la) - row['bar_bankingerror'] = format_width_percentage(lc - lb) + # relative values for the bar labels (linear scale) + row['bar_success'] = format_width_percentage(a) + row['bar_txerror'] = format_width_percentage(b - a) + row['bar_bankingerror'] = format_width_percentage(c - b) + + # relative values for the bar widths (log scale) + row['bar_success_log'] = format_width_percentage(la) + row['bar_txerror_log'] = format_width_percentage(lb - la) + row['bar_bankingerror_log'] = format_width_percentage(lc - lb) else: row['hide_bar'] = True diff --git a/templates/_blockslist.html b/templates/_blockslist.html index 2a435be..a50e110 100644 --- a/templates/_blockslist.html +++ b/templates/_blockslist.html @@ -15,13 +15,13 @@ {% if not block.hide_bar %}
-
+
{{ block.bar_success }}
-
+
{{ block.bar_txerror }}
-
+
{{ block.bar_bankingerror }}
@@ -37,9 +37,9 @@
- proc:{{ block.processed_transactions }} - fail:{{ block.txerrors }} - bank:{{ block.banking_stage_errors }} + proc:{{ block.processed_transactions }} + fail:{{ block.txerrors }} + bank:{{ block.banking_stage_errors }}