mirror of
https://git.wownero.com/wownero/onion-wownero-blockchain-explorer.git
synced 2024-08-15 00:33:12 +00:00
/mempool page added
This commit is contained in:
parent
6bdf82b59d
commit
c9204be4de
2 changed files with 16 additions and 3 deletions
2
main.cpp
2
main.cpp
|
@ -306,7 +306,7 @@ int main(int ac, const char* av[]) {
|
||||||
|
|
||||||
CROW_ROUTE(app, "/mempool")
|
CROW_ROUTE(app, "/mempool")
|
||||||
([&](const crow::request& req) {
|
([&](const crow::request& req) {
|
||||||
return xmrblocks.mempool();
|
return xmrblocks.mempool(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
CROW_ROUTE(app, "/robots.txt")
|
CROW_ROUTE(app, "/robots.txt")
|
||||||
|
|
17
src/page.h
17
src/page.h
|
@ -651,7 +651,7 @@ public:
|
||||||
* Render mempool data
|
* Render mempool data
|
||||||
*/
|
*/
|
||||||
string
|
string
|
||||||
mempool()
|
mempool(bool add_header_and_footer = false)
|
||||||
{
|
{
|
||||||
std::vector<tx_info> mempool_txs;
|
std::vector<tx_info> mempool_txs;
|
||||||
|
|
||||||
|
@ -774,9 +774,22 @@ public:
|
||||||
return t1 > t2;
|
return t1 > t2;
|
||||||
});
|
});
|
||||||
|
|
||||||
// read index.html
|
|
||||||
|
// read mempool.html
|
||||||
string mempool_html = xmreg::read(TMPL_MEMPOOL);
|
string mempool_html = xmreg::read(TMPL_MEMPOOL);
|
||||||
|
|
||||||
|
if (add_header_and_footer)
|
||||||
|
{
|
||||||
|
add_css_style(context);
|
||||||
|
|
||||||
|
// add header and footer
|
||||||
|
string full_page = get_full_page(mempool_html);
|
||||||
|
|
||||||
|
// render the page
|
||||||
|
return mstch::render(full_page, context);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// render the page
|
// render the page
|
||||||
return mstch::render(mempool_html, context);
|
return mstch::render(mempool_html, context);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue