Skip to content

Commit

Permalink
Fix items with duplicate name in provider status list
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryp Toon committed Nov 21, 2024
1 parent f4f323a commit 00465b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions blocksmurfer/main/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ def providers_status(network='btc'):
except Exception as e:
err = str(e)
request_time = time.time() - request_start_time
results = (blockcount, request_time, err, provider_item)
provider_stats.update({provider: results})
results = (blockcount, request_time, err, provider)
provider_stats.update({provider_item: results})

return render_template('providers_status.html', title=_('Providers Status'),
subtitle=_('Service providers current status'),
Expand Down
4 changes: 2 additions & 2 deletions blocksmurfer/templates/providers_status.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ <h2>{{ network.name|capitalize }} Providers Status</h2>
</thead>
{% for provider in provider_stats %}
<tr>
<td>{{ provider|capitalize }}</td>
<td>{{ provider_stats[provider][3] }}</td>
<td>{{ provider_stats[provider][3]|capitalize }}</td>
<td>{{ provider }}</td>
<td>{{ provider_stats[provider][0] if provider_stats[provider][0] else "-" }}</td>
<td>{{ "{:,.3f}".format(provider_stats[provider][1]) }}</td>
<td>{{ "OK" if not provider_stats[provider][2] else "Error" }}</td>
Expand Down

0 comments on commit 00465b6

Please sign in to comment.