mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
pages added
This commit is contained in:
parent
d065e281fe
commit
988ebf95fd
2 changed files with 12 additions and 6 deletions
|
@ -81,7 +81,7 @@ namespace xmreg {
|
||||||
{"height" , fmt::format("{:d}", height)},
|
{"height" , fmt::format("{:d}", height)},
|
||||||
{"server_timestamp", xmreg::timestamp_to_str(server_timestamp)},
|
{"server_timestamp", xmreg::timestamp_to_str(server_timestamp)},
|
||||||
{"blocks" , mstch::array()},
|
{"blocks" , mstch::array()},
|
||||||
{"age_format" , "[h:m:d]"},
|
{"age_format" , string("[h:m:d]")},
|
||||||
{"page_no" , fmt::format("{:d}", page_no)},
|
{"page_no" , fmt::format("{:d}", page_no)},
|
||||||
{"total_page_no" , fmt::format("{:d}", height / (no_of_last_blocks))},
|
{"total_page_no" , fmt::format("{:d}", height / (no_of_last_blocks))},
|
||||||
{"is_page_zero" , bool(page_no)},
|
{"is_page_zero" , bool(page_no)},
|
||||||
|
@ -100,6 +100,8 @@ namespace xmreg {
|
||||||
start_height = start_height > 0 ? start_height : 0;
|
start_height = start_height > 0 ? start_height : 0;
|
||||||
end_height = end_height < height ? end_height : height;
|
end_height = end_height < height ? end_height : height;
|
||||||
start_height = start_height > end_height ? 0 : start_height;
|
start_height = start_height > end_height ? 0 : start_height;
|
||||||
|
end_height = end_height - start_height > no_of_last_blocks
|
||||||
|
? no_of_last_blocks : end_height;
|
||||||
|
|
||||||
cout << start_height << ", " << end_height << endl;
|
cout << start_height << ", " << end_height << endl;
|
||||||
|
|
||||||
|
@ -134,14 +136,14 @@ namespace xmreg {
|
||||||
age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}:{:02d}",
|
age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}:{:02d}",
|
||||||
delta_time[0], delta_time[1], delta_time[2],
|
delta_time[0], delta_time[1], delta_time[2],
|
||||||
delta_time[3], delta_time[4]);
|
delta_time[3], delta_time[4]);
|
||||||
context["age_format"] = "[y:d:h:m:s]";
|
context["age_format"] = string("[y:d:h:m:s]");
|
||||||
}
|
}
|
||||||
else if (delta_time[1] > 0)
|
else if (delta_time[1] > 0)
|
||||||
{
|
{
|
||||||
age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}",
|
age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}",
|
||||||
delta_time[1], delta_time[2],
|
delta_time[1], delta_time[2],
|
||||||
delta_time[3], delta_time[4]);
|
delta_time[3], delta_time[4]);
|
||||||
context["age_format"] = "[d:h:m:s]";
|
context["age_format"] = string("[d:h:m:s]");
|
||||||
}
|
}
|
||||||
|
|
||||||
// get xmr in the block reward
|
// get xmr in the block reward
|
||||||
|
|
|
@ -18,15 +18,19 @@
|
||||||
|
|
||||||
{{{mempool_info}}}
|
{{{mempool_info}}}
|
||||||
|
|
||||||
|
{{#is_page_zero}}
|
||||||
<h2>100 recent blocks<!--(height: {{height}})--></h2>
|
<h2>100 recent blocks<!--(height: {{height}})--></h2>
|
||||||
|
{{/is_page_zero}}
|
||||||
|
{{^is_page_zero}}
|
||||||
|
<h2>older blocks<!--(height: {{height}})--></h2>
|
||||||
|
{{/is_page_zero}}
|
||||||
|
|
||||||
<div class="center">
|
<div class="center">
|
||||||
|
|
||||||
<table class="center">
|
<table class="center">
|
||||||
<tr>
|
<tr>
|
||||||
<td>height</td>
|
<td>height</td>
|
||||||
<td>age {{age_format}}}</td>
|
<td>age {{age_format}}</td>
|
||||||
<td>block hash</td>
|
<td>block hash</td>
|
||||||
<td>reward/fees</td>
|
<td>reward/fees</td>
|
||||||
<td>txs</td>
|
<td>txs</td>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue