mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
explorer/site: display empty metrics instead of "metrics not available" message
This commit updates the explorer UI to show empty metrics when no metrics are available, replacing the previous behavior of displaying a "Gas consumption details are not available" message.
This commit is contained in:
@@ -50,8 +50,8 @@ async def index():
|
||||
# Determine if metrics exist
|
||||
has_metrics = metric_stats and isinstance(metric_stats, list)
|
||||
|
||||
# Get the latest metric statistics or set to None if none are found
|
||||
latest_metric_stats = metric_stats[-1] if has_metrics else None
|
||||
# Get the latest metric statistics or return empty metrics
|
||||
latest_metric_stats = metric_stats[-1] if has_metrics else [0] * 15
|
||||
|
||||
# Retrieve the native contracts
|
||||
native_contracts = await rpc.get_native_contracts()
|
||||
|
||||
Reference in New Issue
Block a user