More preparations for testnet explorer

This commit is contained in:
aglkm
2024-05-20 02:33:19 +03:00
parent 38ee6500eb
commit 04fde44594
4 changed files with 9 additions and 9 deletions

View File

@@ -2,3 +2,7 @@
address = "127.0.0.1" address = "127.0.0.1"
log_level = "critical" log_level = "critical"
# Uncomment and change default port number (8000) if another instance of the explorer is needed to run.
# E.g. Mainnet (8000) and Testnet (8001) instances.
# port = 8000

View File

@@ -155,7 +155,7 @@ fn search(input: &str) -> Either<Template, Redirect> {
} else if input.len() == 64 { } else if input.len() == 64 {
return Either::Right(Redirect::to(uri!(block_header_by_hash(input)))); return Either::Right(Redirect::to(uri!(block_header_by_hash(input))));
// Kernel hash // Kernel
} else if input.len() == 66 { } else if input.len() == 66 {
return Either::Right(Redirect::to(uri!(kernel(input)))); return Either::Right(Redirect::to(uri!(kernel(input))));
} }

View File

@@ -93,6 +93,9 @@ pub async fn get_status(dashboard: Arc<Mutex<Dashboard>>) -> Result<(), Error> {
data.proto_ver = resp["result"]["Ok"]["protocol_version"].to_string(); data.proto_ver = resp["result"]["Ok"]["protocol_version"].to_string();
} }
// Also set cg_api value
data.cg_api = CONFIG.coingecko_api.clone();
Ok(()) Ok(())
} }
@@ -153,9 +156,6 @@ pub async fn get_market(dashboard: Arc<Mutex<Dashboard>>) -> Result<(), Error> {
let mut data = dashboard.lock().unwrap(); let mut data = dashboard.lock().unwrap();
// Save the setting into Dashboard structure for later use
data.cg_api = CONFIG.coingecko_api.clone();
if data.height.is_empty() == false { if data.height.is_empty() == false {
// Calculating coin supply // Calculating coin supply
// Adding +1 as block index starts with 0 // Adding +1 as block index starts with 0

View File

@@ -7,11 +7,7 @@
<div class="card"> <div class="card">
<div class="card-body"> <div class="card-body">
<h4>No results found.</h4><br> <h4>No results found.</h4><br>
Explorer supports requests by block number, block hash or kernel.<br><br> Explorer supports requests by block number, block hash or kernel.<br>
Examples:<br>
Block number - <a class="text-decoration-none" href="/block/2765726">2765726</a><br>
Block hash - <a class="text-decoration-none" href="/hash/0000fc4d93e5717579b955ab840165d96603f009804a228be22da76f6f906a3c">0000fc4d93e5717579b955ab840165d96603f009804a228be22da76f6f906a3c</a><br>
Kernel - <a class="text-decoration-none" href="/kernel/084caeb931b7e8cb73d6419ea74ea157a3cef19f6e9307108a8a808df58437a4ef">084caeb931b7e8cb73d6419ea74ea157a3cef19f6e9307108a8a808df58437a4ef</a>
</div> </div>
</div> </div>