You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
111 lines
6.3 KiB
111 lines
6.3 KiB
<section>
|
|
<section class="container__section container__section--partitioned">
|
|
<div class="chain container__subsection">
|
|
<div class="chain__container">
|
|
<img class="chain__image" src="<%= static_path(@conn, "/images/blocks.svg") %>" />
|
|
<div class="chain__title"><%= gettext("Skipped") %></div>
|
|
<div class="chain__title chain__title--data"><%= @chain.skipped_blocks |> Cldr.Number.to_string! %></div>
|
|
</div>
|
|
<div class="chain__container">
|
|
<img class="chain__image" src="<%= static_path(@conn, "/images/last_block.svg") %>" />
|
|
<div class="chain__title"><%= gettext("Lag") %></div>
|
|
<div class="chain__title chain__title--data"><%= @chain.lag |> Timex.format_duration(:humanized) %></div>
|
|
</div>
|
|
<div class="chain__container chain__container--secondary">
|
|
<img class="chain__image" src="<%= static_path(@conn, "/images/average_time.svg") %>" />
|
|
<div class="chain__title"><%= gettext("BPM") %></div>
|
|
<div class="chain__title chain__title--data"><%= @chain.block_velocity |> Cldr.Number.to_string! %></div>
|
|
</div>
|
|
<div class="chain__container">
|
|
<img class="chain__image" src="<%= static_path(@conn, "/images/transactions.svg") %>" />
|
|
<div class="chain__title"><%= gettext("TPM") %></div>
|
|
<div class="chain__title chain__title--data"><%= @chain.transaction_velocity |> Cldr.Number.to_string! %></div>
|
|
</div>
|
|
</div>
|
|
<div class="chain container__subsection">
|
|
<div class="chain__container">
|
|
<img class="chain__image" src="<%= static_path(@conn, "/images/blocks.svg") %>" />
|
|
<div class="chain__title"><%= gettext("Block") %></div>
|
|
<div class="chain__title chain__title--data">#<%= @chain.number %></div>
|
|
</div>
|
|
<div class="chain__container">
|
|
<img class="chain__image" src="<%= static_path(@conn, "/images/last_block.svg") %>" />
|
|
<div class="chain__title"><%= gettext("Last Block") %></div>
|
|
<div class="chain__title chain__title--data"><%= @chain.timestamp |> Timex.from_now() %></div>
|
|
</div>
|
|
<div class="chain__container chain__container--secondary">
|
|
<img class="chain__image" src="<%= static_path(@conn, "/images/average_time.svg") %>" />
|
|
<div class="chain__title"><%= gettext("Average Block Time") %></div>
|
|
<div class="chain__title chain__title--data"><%= @chain.average_time |> Timex.format_duration(:humanized) %></div>
|
|
</div>
|
|
<div class="chain__container">
|
|
<img class="chain__image" src="<%= static_path(@conn, "/images/transactions.svg") %>" />
|
|
<div class="chain__title"><%= gettext("Transactions") %></div>
|
|
<div class="chain__title chain__title--data"><%= gettext("%{count} per day", count: Cldr.Number.to_string!(@chain.transaction_count)) %></div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
|
|
<section>
|
|
<section class="container__section container__section--partitioned">
|
|
<div class="blocks container__subsection">
|
|
<div class="blocks__container blocks__container--title">
|
|
<h2 class="blocks__title"><%= gettext "Blocks" %></h2>
|
|
</div>
|
|
<div class="blocks__container">
|
|
<table class="blocks__table">
|
|
<thead class="blocks__header">
|
|
<tr>
|
|
<th class="blocks__column-header"><%= gettext "Height" %></th>
|
|
<th class="blocks__column-header"><%= gettext "Age" %></th>
|
|
<th class="blocks__column-header"><%= gettext "Transactions" %></th>
|
|
<th class="blocks__column-header"><%= gettext "Gas Used" %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%= for block <- @chain.blocks do %>
|
|
<tr class="blocks__row">
|
|
<td class="blocks__column blocks__column--height"><%= link(block.number, to: block_path(@conn, :show, @conn.assigns.locale, block.number), class: "blocks__link") %></td>
|
|
<td class="blocks__column blocks__column--age"><%= block.timestamp |> Timex.from_now %></td>
|
|
<td class="blocks__column blocks__column--transactions-count"><%= block.transactions |> Enum.count %></td>
|
|
<td class="blocks__column blocks__column--gas-used"><%= block.gas_used |> Cldr.Number.to_string! %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="transactions container__subsection">
|
|
<div class="transactions__container transactions__container--title">
|
|
<h2 class="transactions__title"><%= gettext "Transactions" %></h2>
|
|
</div>
|
|
<div class="transactions__container">
|
|
<table class="transactions__table">
|
|
<thead class="transactions__header">
|
|
<tr>
|
|
<th class="transactions__column-header"><%= gettext "Hash" %></th>
|
|
<th class="transactions__column-header"><%= gettext "Block" %></th>
|
|
<th class="transactions__column-header transactions__column-header--optional"><%= gettext "Age" %></th>
|
|
<th class="transactions__column-header"><%= gettext "Value" %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<%= for transaction <- @chain.transactions do %>
|
|
<tr class="transactions__row">
|
|
<td class="transactions__column transactions__column--hash">
|
|
<div class="transactions__hash-container" title="<%= transaction.hash %>">
|
|
<%= link(transaction.hash, to: transaction_path(@conn, :show, @conn.assigns.locale, transaction.hash), class: "transactions__link transactions__link--truncated transactions__link--hash") %>
|
|
</div>
|
|
</td>
|
|
<td class="transactions__column transactions__column--block"><%= link(transaction.block.number, to: block_path(@conn, :show, @conn.assigns.locale, transaction.block.number), class: "transactions__link") %></td>
|
|
<td class="transactions__column transactions__column--age transactions__column--optional"><%= transaction.block.timestamp |> Timex.from_now() %></td>
|
|
<td class="transactions__column transactions__column--value"><%= Decimal.div(Decimal.new(transaction.value), Decimal.new(1_000_000_000_000_000_000)) |> Decimal.to_string(:normal) %> <%= gettext "POA" %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
|