From 0c7c7163ebec3c9b14cdfbc4fd35535a5263f3f9 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 9 Jul 2019 15:56:12 +0300 Subject: [PATCH 01/56] set timeout for loading message on the main page --- .../assets/js/lib/market_history_chart.js | 1 + apps/block_scout_web/assets/js/pages/chain.js | 14 ++++++++++++-- .../block_scout_web/templates/chain/show.html.eex | 8 ++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/apps/block_scout_web/assets/js/lib/market_history_chart.js b/apps/block_scout_web/assets/js/lib/market_history_chart.js index 615f888d8a..61c2b4695a 100644 --- a/apps/block_scout_web/assets/js/lib/market_history_chart.js +++ b/apps/block_scout_web/assets/js/lib/market_history_chart.js @@ -148,6 +148,7 @@ export function createMarketHistoryChart (el) { } $('[data-chart-error-message]').on('click', _event => { + $('[data-chart-loading-message]').removeAttr('hidden') $('[data-chart-loading-message]').show() $('[data-chart-error-message]').hide() createMarketHistoryChart($('[data-chart="marketHistoryChart"]')[0]) diff --git a/apps/block_scout_web/assets/js/pages/chain.js b/apps/block_scout_web/assets/js/pages/chain.js index f4cd0e6628..cf596e0a5f 100644 --- a/apps/block_scout_web/assets/js/pages/chain.js +++ b/apps/block_scout_web/assets/js/pages/chain.js @@ -211,7 +211,10 @@ const elements = { '[data-selector="chain-block-list"] [data-selector="loading-message"]': { render ($el, state, oldState) { if (state.blocksLoading) { - $el.show() + setTimeout(function(){ + $el.removeAttr('hidden') + $el.show() + }, 1000) } else { $el.hide() } @@ -224,7 +227,14 @@ const elements = { }, '[data-selector="transactions-list"] [data-selector="loading-message"]': { render ($el, state, oldState) { - $el.toggle(state.transactionsLoading) + if (state.transactionsLoading) { + setTimeout(function(){ + $el.removeAttr('hidden') + $el.show() + }, 1000) + } else { + $el.hide() + } } }, '[data-selector="transactions-list"]': { diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex index 0c29001697..146d84f3c5 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex @@ -5,7 +5,7 @@
-
+ diff --git a/apps/block_scout_web/lib/block_scout_web/templates/loaders/_table-loader.eex b/apps/block_scout_web/lib/block_scout_web/templates/loaders/_table-loader.eex new file mode 100644 index 0000000000..ac7cc71f56 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/loaders/_table-loader.eex @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/loaders/_tile-loader.eex b/apps/block_scout_web/lib/block_scout_web/templates/loaders/_tile-loader.eex new file mode 100644 index 0000000000..134613a5d1 --- /dev/null +++ b/apps/block_scout_web/lib/block_scout_web/templates/loaders/_tile-loader.eex @@ -0,0 +1,72 @@ +
+
+
+ + + + + + +
+
+ + +
+
+ + + + + + +
+
+
+
+
+
+ + + + + + +
+
+ + +
+
+ + + + + + +
+
+
+
+
+
+ + + + + + +
+
+ + +
+
+ + + + + + +
+
+
\ No newline at end of file diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 61d7465f49..c29cc13ce2 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -1058,7 +1058,6 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_read_contract/index.html.eex:14 #: lib/block_scout_web/templates/chain/show.html.eex:99 -#: lib/block_scout_web/templates/chain/show.html.eex:125 #: lib/block_scout_web/templates/tokens/read_contract/index.html.eex:21 msgid "Loading..." msgstr "" From 4a13b9120c15759f3c6d23e9bfaf500e850fa742 Mon Sep 17 00:00:00 2001 From: maxgrapps <50101080+maxgrapps@users.noreply.github.com> Date: Sat, 20 Jul 2019 12:11:56 +0300 Subject: [PATCH 35/56] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c8934f3d..33783ca62a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint ### Fixes +- [#2393](https://github.com/poanetwork/blockscout/pull/2393) - added templates for table loader and tile loader - [#2378](https://github.com/poanetwork/blockscout/pull/2378) - Page performance: exclude moment.js localization files except EN, remove unused css - [#2368](https://github.com/poanetwork/blockscout/pull/2368) - add two columns of smart contract info - [#2375](https://github.com/poanetwork/blockscout/pull/2375) - Update created_contract_code_indexed_at on transaction import conflict From a31447d23b120101d690d55732ba18bf6c6b20fc Mon Sep 17 00:00:00 2001 From: maxgrapps Date: Sat, 20 Jul 2019 13:53:23 +0300 Subject: [PATCH 36/56] new block loading animation --- .../assets/css/components/_tile.scss | 168 +++++++++++++++++- .../templates/chain/_block.html.eex | 167 +++++++++++++++++ apps/block_scout_web/priv/gettext/default.pot | 6 +- 3 files changed, 335 insertions(+), 6 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_tile.scss b/apps/block_scout_web/assets/css/components/_tile.scss index 8965715727..dbfd117875 100644 --- a/apps/block_scout_web/assets/css/components/_tile.scss +++ b/apps/block_scout_web/assets/css/components/_tile.scss @@ -339,9 +339,6 @@ $tile-body-a-color: #5959d8 !default; padding-left: 6px; padding-right: 6px; } - .tile-type-block { - overflow: hidden; - } } .row { @include media-breakpoint-down(lg) { @@ -351,3 +348,168 @@ $tile-body-a-color: #5959d8 !default; } } } + +// Loading Animation + +@keyframes playBlockLoadingAnimation { + 0%, 90% { + opacity: 1; + } + 100% { + opacity: 0; + } +} + +[data-selector="chain-block-list"] { + .col-lg-3:first-child { + .tile-type-block-animation { + animation: playBlockLoadingAnimation 2.1s linear forwards; + } + } +} + +.fade-up-blocks-chain { + .tile-type-block { + position: relative; + } + .tile-type-block-animation { + opacity: 0; + position: absolute; + top: -1px; + left: -4px; + width: calc(100% + 5px); + height: calc(100% + 2px); + background-color: #F6F7F9; + border-radius: 4px; + overflow: hidden; + transition: .24s ease-out; + border-top: 1px solid #dee2e6; + border-right: 1px solid #dee2e6; + border-bottom: 1px solid #dee2e6; + pointer-events: none; + .tile-type-line-up { + position: absolute; + bottom: -1px; + left: 0; + height: calc(100% + 2px); + width: 4px; + background-color: $tile-type-block-color; + transform: scaleY(0); + transform-origin: center bottom; + animation: blockLoaderLine 2s linear forwards; + z-index: 2; + } + &:after { + content: ""; + position: absolute; + top: 0; + left: 0; + bottom: 0; + width: 1px; + background-color: #dee2e6; + } + } +} + +.cube-animation-title { + font-size: 12px; + color: #a3a9b5; + position: absolute; + bottom: 10px; + left: 50%; + transform: translateX(-50%); +} + +.fade-up-blocks-chain:first-child { + .tile-type-block-animation { + opacity: 1; + } +} + +@keyframes blockLoaderLine { + 0% { + transform: scaleY(0); + } + 100% { + transform: scaleY(1); + } +} + +$cube-bezier: cubic-bezier(.25,.8,.25,1); +$cube-quantity: 5; + +.cube-animation-wrapper { + width: 560px; + height: 290px; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%) scale(0.26); + svg { + width: 50px; + margin-top: -29px; + + .side { + fill: $tile-type-block-color; + opacity: 1; + + &:nth-of-type(2) { + fill: lighten($tile-type-block-color, 30); + opacity: 0.5; + } + + &:nth-of-type(3) { + fill: lighten($tile-type-block-color, 80); + opacity: 0.5; + } + } + } + + @while $cube-quantity > 0 { + .cube-animation-row:nth-of-type(#{$cube-quantity}) { + left: 25px * $cube-quantity; + top: 15px * $cube-quantity; + } + .cube-animation-column:nth-of-type(#{$cube-quantity}) { + position: relative; + top: 14px * $cube-quantity; + left: 25px * $cube-quantity; + } + .cube-animation-column:nth-of-type(#{$cube-quantity}) svg { + transform: translate3d(0,0,0); + animation: shrink-expand 2.8s $cube-bezier forwards; + animation-delay: -0.16s * $cube-quantity; + } + + $cube-quantity: $cube-quantity - 1; + } +} + +.cube-animation-center { + position: absolute; + top: 6%; + left: 20%; +} + +.cube-animation-row { + display: flex; + flex-direction: row-reverse; + position: absolute; +} + +.cube-animation-column { + display: flex; + flex-direction: column-reverse; +} + +@keyframes shrink-expand { + 0% { + transform: scale(0); + } + 50% { + transform: scale(1); + } + 100% { + transform: scale(0); + } +} \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex index 706d18ec47..729df59a3c 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex @@ -1,5 +1,172 @@
+
+
+ Block Validated, processing... +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + +
+
+
+
+
<%= link( @block, class: "tile-title", diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 61d7465f49..b8e56412a6 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -34,7 +34,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/overview.html.eex:21 -#: lib/block_scout_web/templates/chain/_block.html.eex:11 +#: lib/block_scout_web/templates/chain/_block.html.eex:178 msgid "%{count} Transactions" msgstr "" @@ -522,7 +522,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:38 #: lib/block_scout_web/templates/block/overview.html.eex:121 -#: lib/block_scout_web/templates/chain/_block.html.eex:15 +#: lib/block_scout_web/templates/chain/_block.html.eex:182 msgid "Miner" msgstr "" @@ -1040,7 +1040,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:47 -#: lib/block_scout_web/templates/chain/_block.html.eex:23 +#: lib/block_scout_web/templates/chain/_block.html.eex:190 #: lib/block_scout_web/views/internal_transaction_view.ex:27 msgid "Reward" msgstr "" From b0984ce343afab8b37a500a1d3c2e5e0b59750be Mon Sep 17 00:00:00 2001 From: maxgrapps <50101080+maxgrapps@users.noreply.github.com> Date: Sat, 20 Jul 2019 13:55:34 +0300 Subject: [PATCH 37/56] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c8934f3d..5e1e9e2dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint ### Fixes +- [#2395](https://github.com/poanetwork/blockscout/pull/2395) - new block loading animation - [#2378](https://github.com/poanetwork/blockscout/pull/2378) - Page performance: exclude moment.js localization files except EN, remove unused css - [#2368](https://github.com/poanetwork/blockscout/pull/2368) - add two columns of smart contract info - [#2375](https://github.com/poanetwork/blockscout/pull/2375) - Update created_contract_code_indexed_at on transaction import conflict From a78bf7923e7c4ccdb2d9bbc7de20d95f861bda21 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 22 Jul 2019 10:40:52 +0300 Subject: [PATCH 38/56] use variable names as in json rpc --- .../api/rpc/eth_controller_test.exs | 6 ++-- apps/explorer/lib/explorer/eth_rpc.ex | 33 +++++++++++++------ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs index d611d519ad..3ec07ee446 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs @@ -148,9 +148,9 @@ defmodule BlockScoutWeb.API.RPC.EthControllerTest do {last_log_index, ""} = Integer.parse(List.last(response["result"])["logIndex"], 16) next_page_params = %{ - "block_number" => transaction.block_number, - "transaction_index" => transaction.index, - "log_index" => last_log_index + "blockNumber" => Integer.to_string(transaction.block_number, 16), + "transactionIndex" => transaction.index, + "logIndex" => "#{last_log_index}" } new_params = diff --git a/apps/explorer/lib/explorer/eth_rpc.ex b/apps/explorer/lib/explorer/eth_rpc.ex index 31e711d9fa..fa97a75561 100644 --- a/apps/explorer/lib/explorer/eth_rpc.ex +++ b/apps/explorer/lib/explorer/eth_rpc.ex @@ -228,17 +228,21 @@ defmodule Explorer.EthRPC do defp paging_options(%{ "paging_options" => %{ - "log_index" => log_index, - "transaction_index" => transaction_index, - "block_number" => block_number + "logIndex" => log_index, + "transactionIndex" => transaction_index, + "blockNumber" => block_number } - }) do - {:ok, - %{ - log_index: log_index, - transaction_index: transaction_index, - block_number: block_number - }} + }) + when is_integer(transaction_index) do + with {:ok, parsed_block_number} <- to_block_number(block_number), + {parsed_log_index, ""} <- Integer.parse(log_index) do + {:ok, + %{ + log_index: parsed_log_index, + transaction_index: transaction_index, + block_number: parsed_block_number + }} + end end defp paging_options(_), do: {:ok, nil} @@ -275,6 +279,15 @@ defmodule Explorer.EthRPC do defp to_block_number(_, _, _), do: {:error, "invalid block number"} + defp to_block_number(number) when is_bitstring(number) do + case Integer.parse(number, 16) do + {integer, ""} -> {:ok, integer} + _ -> {:error, "invalid block number"} + end + end + + defp to_block_number(_), do: {:error, "invalid block number"} + defp max_non_consensus_block_number(max) do case Chain.max_non_consensus_block_number(max) do {:ok, number} -> number From 993816e19e8f266a51083d257dfdc07cc1d7e3f5 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 22 Jul 2019 10:55:55 +0300 Subject: [PATCH 39/56] parse log index from hex --- .../controllers/api/rpc/eth_controller_test.exs | 2 +- apps/explorer/lib/explorer/eth_rpc.ex | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs index 3ec07ee446..4b43909ac4 100644 --- a/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs +++ b/apps/block_scout_web/test/block_scout_web/controllers/api/rpc/eth_controller_test.exs @@ -150,7 +150,7 @@ defmodule BlockScoutWeb.API.RPC.EthControllerTest do next_page_params = %{ "blockNumber" => Integer.to_string(transaction.block_number, 16), "transactionIndex" => transaction.index, - "logIndex" => "#{last_log_index}" + "logIndex" => Integer.to_string(last_log_index, 16) } new_params = diff --git a/apps/explorer/lib/explorer/eth_rpc.ex b/apps/explorer/lib/explorer/eth_rpc.ex index fa97a75561..6470e1b2af 100644 --- a/apps/explorer/lib/explorer/eth_rpc.ex +++ b/apps/explorer/lib/explorer/eth_rpc.ex @@ -234,8 +234,8 @@ defmodule Explorer.EthRPC do } }) when is_integer(transaction_index) do - with {:ok, parsed_block_number} <- to_block_number(block_number), - {parsed_log_index, ""} <- Integer.parse(log_index) do + with {:ok, parsed_block_number} <- to_number(block_number, "invalid block number"), + {:ok, parsed_log_index} <- to_number(log_index, "invalid log index") do {:ok, %{ log_index: parsed_log_index, @@ -279,14 +279,14 @@ defmodule Explorer.EthRPC do defp to_block_number(_, _, _), do: {:error, "invalid block number"} - defp to_block_number(number) when is_bitstring(number) do + defp to_number(number, error_message) when is_bitstring(number) do case Integer.parse(number, 16) do {integer, ""} -> {:ok, integer} - _ -> {:error, "invalid block number"} + _ -> {:error, error_message} end end - defp to_block_number(_), do: {:error, "invalid block number"} + defp to_number(_, error_message), do: {:error, error_message} defp max_non_consensus_block_number(max) do case Chain.max_non_consensus_block_number(max) do From 4eb63ebb6922314e20fb9f6b21bf6e38c0683171 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 22 Jul 2019 10:57:46 +0300 Subject: [PATCH 40/56] add new eth_getLogs example --- apps/explorer/lib/explorer/eth_rpc.ex | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/explorer/lib/explorer/eth_rpc.ex b/apps/explorer/lib/explorer/eth_rpc.ex index 6470e1b2af..722a21e819 100644 --- a/apps/explorer/lib/explorer/eth_rpc.ex +++ b/apps/explorer/lib/explorer/eth_rpc.ex @@ -26,7 +26,13 @@ defmodule Explorer.EthRPC do For this reason, you can use pagination options to request the next page. Pagination options params: {"block_number": 1, "transaction_index": 0, "log_index": 1} which include parameters from the last log received from the previous request. """, example: """ - {"id": 0, "jsonrpc": "2.0", "method": "eth_getLogs", "params": [{"address": "0x0000000000000000000000000000000000000026","topics": ["0x01"]}]} + {"id": 0, "jsonrpc": "2.0", "method": "eth_getLogs", + "params": [ + {"address": "0xc78Be425090Dbd437532594D12267C5934Cc6c6f", + "paging_options": {"logIndex": "3D", "blockNumber": "6423AC", "transactionIndex": 53}, + "fromBlock": "earliest", + "toBlock": "latest", + "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]}]} """ } } From 3ba1057355080bd7be79d241e9092862564f2c1f Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 22 Jul 2019 11:06:23 +0300 Subject: [PATCH 41/56] update note --- apps/explorer/lib/explorer/eth_rpc.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/explorer/lib/explorer/eth_rpc.ex b/apps/explorer/lib/explorer/eth_rpc.ex index 722a21e819..e0864ac279 100644 --- a/apps/explorer/lib/explorer/eth_rpc.ex +++ b/apps/explorer/lib/explorer/eth_rpc.ex @@ -23,7 +23,7 @@ defmodule Explorer.EthRPC do action: :eth_get_logs, notes: """ Will never return more than 1000 log entries.\n - For this reason, you can use pagination options to request the next page. Pagination options params: {"block_number": 1, "transaction_index": 0, "log_index": 1} which include parameters from the last log received from the previous request. + For this reason, you can use pagination options to request the next page. Pagination options params: {"logIndex": "3D", "blockNumber": "6423AC", "transactionIndex": 53} which include parameters from the last log received from the previous request. These three parameters are required for pagination. """, example: """ {"id": 0, "jsonrpc": "2.0", "method": "eth_getLogs", From a7fd2883bff229e5ef6d32e603d1d0ab446de234 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 22 Jul 2019 12:13:19 +0300 Subject: [PATCH 42/56] show only one decoded candidate --- apps/explorer/lib/explorer/chain/transaction.ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/explorer/lib/explorer/chain/transaction.ex b/apps/explorer/lib/explorer/chain/transaction.ex index 3b109504eb..78d162fa4e 100644 --- a/apps/explorer/lib/explorer/chain/transaction.ex +++ b/apps/explorer/lib/explorer/chain/transaction.ex @@ -416,7 +416,8 @@ defmodule Explorer.Chain.Transaction do candidates_query = from( contract_method in ContractMethod, - where: contract_method.identifier == ^method_id + where: contract_method.identifier == ^method_id, + limit: 1 ) candidates = From a5b014da77fdbb4d5543eeda55fd19169889f71a Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 22 Jul 2019 12:15:23 +0300 Subject: [PATCH 43/56] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c8934f3d..5735ca0862 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint ### Fixes +- [#2398](https://github.com/poanetwork/blockscout/pull/2398) - show only one decoded candidate - [#2378](https://github.com/poanetwork/blockscout/pull/2378) - Page performance: exclude moment.js localization files except EN, remove unused css - [#2368](https://github.com/poanetwork/blockscout/pull/2368) - add two columns of smart contract info - [#2375](https://github.com/poanetwork/blockscout/pull/2375) - Update created_contract_code_indexed_at on transaction import conflict From 8b06da3ccc291a294eb2171e7b0953b696e946e6 Mon Sep 17 00:00:00 2001 From: saneery Date: Mon, 22 Jul 2019 13:38:54 +0300 Subject: [PATCH 44/56] Add env var to manage refreshing period of average block time --- apps/explorer/config/config.exs | 12 +++++++++++- .../lib/explorer/counters/average_block_time.ex | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index defd5ae9e5..049d7a8a16 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -17,7 +17,17 @@ config :explorer, if(System.get_env("UNCLES_IN_AVERAGE_BLOCK_TIME") == "false", do: false, else: true), healthy_blocks_period: System.get_env("HEALTHY_BLOCKS_PERIOD") || :timer.minutes(5) -config :explorer, Explorer.Counters.AverageBlockTime, enabled: true +average_block_period = + try do + String.to_integer(System.get_env("AVERAGE_BLOCK_PERIOD")) + rescue + # 30 minutes + _ -> 30 * 60 + end + +config :explorer, Explorer.Counters.AverageBlockTime, + enabled: true, + period: :timer.seconds(average_block_period) config :explorer, Explorer.Chain.Cache.BlockNumber, enabled: true diff --git a/apps/explorer/lib/explorer/counters/average_block_time.ex b/apps/explorer/lib/explorer/counters/average_block_time.ex index 233c15f8b3..1065ede2bd 100644 --- a/apps/explorer/lib/explorer/counters/average_block_time.ex +++ b/apps/explorer/lib/explorer/counters/average_block_time.ex @@ -11,7 +11,7 @@ defmodule Explorer.Counters.AverageBlockTime do alias Explorer.Repo alias Timex.Duration - @refresh_period 30 * 60 * 1_000 + @refresh_period Application.get_env(:explorer, __MODULE__)[:period] @doc """ Starts a process to periodically update the counter of the token holders. From c03f6ac91cd7c83d424d8234216221e4a54001a7 Mon Sep 17 00:00:00 2001 From: saneery Date: Mon, 22 Jul 2019 14:02:07 +0300 Subject: [PATCH 45/56] Add env var to manage price chart cache frequency update --- apps/explorer/config/config.exs | 10 ++++++++++ .../lib/explorer/market/market_history_cache.ex | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index 049d7a8a16..9880489138 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -116,6 +116,16 @@ config :spandex_ecto, SpandexEcto.EctoLogger, tracer: Explorer.Tracer, otp_app: :explorer +market_history_cache_ttl = + try do + String.to_integer(System.get_env("MARKET_HISTORY_CACHE_TTL")) + rescue + # 6 hours + _ -> 60 * 60 * 6 + end + +config :explorer, Explorer.Market.MarketHistoryCache, ttl: :timer.seconds(market_history_cache_ttl) + # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. import_config "#{Mix.env()}.exs" diff --git a/apps/explorer/lib/explorer/market/market_history_cache.ex b/apps/explorer/lib/explorer/market/market_history_cache.ex index 04b6193716..5cddb7707a 100644 --- a/apps/explorer/lib/explorer/market/market_history_cache.ex +++ b/apps/explorer/lib/explorer/market/market_history_cache.ex @@ -12,7 +12,7 @@ defmodule Explorer.Market.MarketHistoryCache do @last_update_key :last_update @history_key :history # 6 hours - @cache_period 1_000 * 60 * 60 * 6 + @cache_period Application.get_env(:explorer, __MODULE__)[:ttl] @recent_days 30 def fetch do From 2757f706573e330f9b6497e101266ee01517ad80 Mon Sep 17 00:00:00 2001 From: saneery Date: Mon, 22 Jul 2019 14:13:41 +0300 Subject: [PATCH 46/56] add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c8934f3d..346c08f0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ - [#2326](https://github.com/poanetwork/blockscout/pull/2326) - fix nested constructor arguments ### Chore +- [#2401](https://github.com/poanetwork/blockscout/pull/2401) - add ENV vars to manage updating period of average block time and market history cache - [#2363](https://github.com/poanetwork/blockscout/pull/2363) - add parameters example for eth rpc - [#2342](https://github.com/poanetwork/blockscout/pull/2342) - Upgrade Postgres image version in Docker setup - [#2325](https://github.com/poanetwork/blockscout/pull/2325) - Reduce function input to address' hash only where possible From b49bdec7523747f06d3bda20f85b99ba8b0a0da6 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Mon, 22 Jul 2019 16:34:31 +0300 Subject: [PATCH 47/56] fix external library style --- .../lib/block_scout_web/views/address_contract_view.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex b/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex index 38823dba8d..57c6e11da7 100644 --- a/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex +++ b/apps/block_scout_web/lib/block_scout_web/views/address_contract_view.ex @@ -59,7 +59,7 @@ defmodule BlockScoutWeb.AddressContractView do def format_external_libraries(libraries) do Enum.reduce(libraries, "", fn %{name: name, address_hash: address_hash}, acc -> - "#{acc}#{name} : #{address_hash} \n" + "#{acc}#{name} : #{address_hash} \n" end) end From c2dec2ad27cc1449bd2cc29b619b0e7cbc0e1b55 Mon Sep 17 00:00:00 2001 From: saneery Date: Mon, 22 Jul 2019 15:45:39 +0300 Subject: [PATCH 48/56] update env vars parsing in the config.exs --- apps/explorer/config/config.exs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index 9880489138..606b5c6f0c 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -18,16 +18,14 @@ config :explorer, healthy_blocks_period: System.get_env("HEALTHY_BLOCKS_PERIOD") || :timer.minutes(5) average_block_period = - try do - String.to_integer(System.get_env("AVERAGE_BLOCK_PERIOD")) - rescue - # 30 minutes - _ -> 30 * 60 + case Integer.parse(System.get_env("AVERAGE_BLOCK_PERIOD", "")) do + {secs, ""} -> :timer.seconds(secs) + _ -> :timer.minutes(30) end config :explorer, Explorer.Counters.AverageBlockTime, enabled: true, - period: :timer.seconds(average_block_period) + period: average_block_period config :explorer, Explorer.Chain.Cache.BlockNumber, enabled: true @@ -117,14 +115,12 @@ config :spandex_ecto, SpandexEcto.EctoLogger, otp_app: :explorer market_history_cache_ttl = - try do - String.to_integer(System.get_env("MARKET_HISTORY_CACHE_TTL")) - rescue - # 6 hours - _ -> 60 * 60 * 6 + case Integer.parse(System.get_env("MARKET_HISTORY_CACHE_TTL", "")) do + {secs, ""} -> :timer.seconds(secs) + _ -> :timer.hours(6) end -config :explorer, Explorer.Market.MarketHistoryCache, ttl: :timer.seconds(market_history_cache_ttl) +config :explorer, Explorer.Market.MarketHistoryCache, ttl: market_history_cache_ttl # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. From 86d6ba97a16b12817cd4ba39d0a1dfefbd4917d5 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 22 Jul 2019 20:23:03 +0300 Subject: [PATCH 49/56] Place loaders --- CHANGELOG.md | 2 +- apps/block_scout_web/assets/package-lock.json | 41 ++++++++++++++----- .../templates/address/index.html.eex | 2 +- .../address_coin_balance/index.html.eex | 4 +- .../index.html.eex | 4 +- .../templates/address_logs/index.html.eex | 4 +- .../templates/address_token/index.html.eex | 4 +- .../address_token_transfer/index.html.eex | 4 +- .../address_transaction/index.html.eex | 4 +- .../address_validation/index.html.eex | 4 +- .../templates/block/index.html.eex | 4 +- .../block_transaction/index.html.eex | 4 +- .../templates/chain/show.html.eex | 1 - .../_table-loader.html.eex} | 0 .../_tile-loader.html.eex} | 0 .../pending_transaction/index.html.eex | 9 +--- .../templates/tokens/holder/index.html.eex | 4 +- .../templates/tokens/inventory/index.html.eex | 4 +- .../templates/tokens/transfer/index.html.eex | 4 +- .../templates/transaction/index.html.eex | 4 +- .../index.html.eex | 4 +- .../templates/transaction_log/index.html.eex | 4 +- .../transaction_token_transfer/index.html.eex | 4 +- apps/block_scout_web/priv/gettext/default.pot | 11 ++--- .../priv/gettext/en/LC_MESSAGES/default.po | 18 +++----- 25 files changed, 91 insertions(+), 57 deletions(-) rename apps/block_scout_web/lib/block_scout_web/templates/{loaders/_table-loader.eex => common_components/_table-loader.html.eex} (100%) rename apps/block_scout_web/lib/block_scout_web/templates/{loaders/_tile-loader.eex => common_components/_tile-loader.html.eex} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b7c01b4d4..21dafca1b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,9 +8,9 @@ - [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint ### Fixes +- [#2405](https://github.com/poanetwork/blockscout/pull/2405) - added templates for table loader and tile loader - [#2398](https://github.com/poanetwork/blockscout/pull/2398) - show only one decoded candidate - [#2395](https://github.com/poanetwork/blockscout/pull/2395) - new block loading animation -- [#2393](https://github.com/poanetwork/blockscout/pull/2393) - added templates for table loader and tile loader - [#2389](https://github.com/poanetwork/blockscout/pull/2389) - Reduce Lodash lib size (86% of lib methods are not used) - [#2378](https://github.com/poanetwork/blockscout/pull/2378) - Page performance: exclude moment.js localization files except EN, remove unused css - [#2368](https://github.com/poanetwork/blockscout/pull/2368) - add two columns of smart contract info diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index 22c6d216de..f20e753b49 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -3816,7 +3816,8 @@ "version": "2.1.1", "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -3840,13 +3841,15 @@ "version": "1.0.0", "resolved": false, "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3863,19 +3866,22 @@ "version": "1.1.0", "resolved": false, "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "resolved": false, "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "resolved": false, "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4006,7 +4012,8 @@ "version": "2.0.3", "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4020,6 +4027,7 @@ "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4036,6 +4044,7 @@ "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4044,13 +4053,15 @@ "version": "0.0.8", "resolved": false, "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "resolved": false, "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4071,6 +4082,7 @@ "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4159,7 +4171,8 @@ "version": "1.0.1", "resolved": false, "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4173,6 +4186,7 @@ "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4268,7 +4282,8 @@ "version": "5.1.1", "resolved": false, "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -4310,6 +4325,7 @@ "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4331,6 +4347,7 @@ "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4379,13 +4396,15 @@ "version": "1.0.2", "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.2", "resolved": false, "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true + "dev": true, + "optional": true } } }, diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/index.html.eex index 68f586adb4..c594915d9f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/index.html.eex @@ -38,7 +38,7 @@ - + <%= render BlockScoutWeb.CommonComponentsView, "_table-loader.html" %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex index 6b9459f5b3..2e71dd22ca 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_coin_balance/index.html.eex @@ -40,7 +40,9 @@
-
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex index 3bc2e7fe9b..f18638db0d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex @@ -66,7 +66,9 @@
-
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex index 3a44e0cb2d..fabbc7f7d8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_logs/index.html.eex @@ -27,7 +27,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex index 840d9cc1da..8510bdca64 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex @@ -19,7 +19,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex index c2ab502bf0..738d70883d 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_token_transfer/index.html.eex @@ -21,7 +21,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex index c3a4c94129..83c5454627 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_transaction/index.html.eex @@ -65,7 +65,9 @@
-
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex index 3f85f03aba..03b37369bc 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_validation/index.html.eex @@ -22,7 +22,9 @@ <%= gettext "Something went wrong, click to reload." %> -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex index 92b91ce287..dd8a3ed093 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/index.html.eex @@ -11,7 +11,9 @@ <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "top", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= gettext "There are no blocks." %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex index a497ab1b7e..e0847cac86 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block_transaction/index.html.eex @@ -29,7 +29,9 @@
-
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex index 2848e23b55..f0ffa52ca2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex @@ -117,7 +117,6 @@ <%= gettext "Something went wrong, click to retry." %> - diff --git a/apps/block_scout_web/lib/block_scout_web/templates/loaders/_table-loader.eex b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_table-loader.html.eex similarity index 100% rename from apps/block_scout_web/lib/block_scout_web/templates/loaders/_table-loader.eex rename to apps/block_scout_web/lib/block_scout_web/templates/common_components/_table-loader.html.eex diff --git a/apps/block_scout_web/lib/block_scout_web/templates/loaders/_tile-loader.eex b/apps/block_scout_web/lib/block_scout_web/templates/common_components/_tile-loader.html.eex similarity index 100% rename from apps/block_scout_web/lib/block_scout_web/templates/loaders/_tile-loader.eex rename to apps/block_scout_web/lib/block_scout_web/templates/common_components/_tile-loader.html.eex diff --git a/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex index 4c97be61e1..e819285629 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/pending_transaction/index.html.eex @@ -23,13 +23,8 @@ <%= gettext "There are no pending transactions." %> -
- -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex index da834dbc88..1e78b11353 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/inventory/index.html.eex @@ -27,7 +27,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex index 980cc4b05a..addaa0c359 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/transfer/index.html.eex @@ -26,7 +26,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex index 18928915f2..bce59eb00b 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction/index.html.eex @@ -28,7 +28,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex index e6623b4061..70162a3be8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex @@ -16,7 +16,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex index 3c84e7c4f9..17f480b439 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_log/index.html.eex @@ -19,7 +19,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/index.html.eex index d40dedd414..8d356a450a 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_token_transfer/index.html.eex @@ -18,7 +18,9 @@ -
+
+ <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %> +
<%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 7d8e592e3b..228501dc51 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -1077,11 +1077,6 @@ msgstr "" msgid "GraphQL" msgstr "" -#, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:32 -msgid "Loading" -msgstr "" - #, elixir-format #: lib/block_scout_web/templates/layout/_topnav.html.eex:73 msgid "RPC" @@ -1276,7 +1271,7 @@ msgid "There are no pending transactions." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/index.html.eex:16 +#: lib/block_scout_web/templates/block/index.html.eex:18 msgid "There are no blocks." msgstr "" @@ -1744,8 +1739,8 @@ msgid "here." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_token/index.html.eex:26 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:72 +#: lib/block_scout_web/templates/address_token/index.html.eex:28 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:74 msgid "CSV" msgstr "" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 5333eb95aa..7c64c47de2 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -34,7 +34,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/overview.html.eex:21 -#: lib/block_scout_web/templates/chain/_block.html.eex:11 +#: lib/block_scout_web/templates/chain/_block.html.eex:178 msgid "%{count} Transactions" msgstr "" @@ -522,7 +522,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:38 #: lib/block_scout_web/templates/block/overview.html.eex:121 -#: lib/block_scout_web/templates/chain/_block.html.eex:15 +#: lib/block_scout_web/templates/chain/_block.html.eex:182 msgid "Miner" msgstr "" @@ -1040,7 +1040,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:47 -#: lib/block_scout_web/templates/chain/_block.html.eex:23 +#: lib/block_scout_web/templates/chain/_block.html.eex:190 #: lib/block_scout_web/views/internal_transaction_view.ex:27 msgid "Reward" msgstr "" @@ -1058,7 +1058,6 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/address_read_contract/index.html.eex:14 #: lib/block_scout_web/templates/chain/show.html.eex:99 -#: lib/block_scout_web/templates/chain/show.html.eex:125 #: lib/block_scout_web/templates/tokens/read_contract/index.html.eex:21 msgid "Loading..." msgstr "" @@ -1078,11 +1077,6 @@ msgstr "" msgid "GraphQL" msgstr "" -#, elixir-format -#: lib/block_scout_web/templates/pending_transaction/index.html.eex:32 -msgid "Loading" -msgstr "" - #, elixir-format #: lib/block_scout_web/templates/layout/_topnav.html.eex:73 msgid "RPC" @@ -1277,7 +1271,7 @@ msgid "There are no pending transactions." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/index.html.eex:16 +#: lib/block_scout_web/templates/block/index.html.eex:18 msgid "There are no blocks." msgstr "" @@ -1745,8 +1739,8 @@ msgid "here." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/address_token/index.html.eex:26 -#: lib/block_scout_web/templates/address_transaction/index.html.eex:72 +#: lib/block_scout_web/templates/address_token/index.html.eex:28 +#: lib/block_scout_web/templates/address_transaction/index.html.eex:74 msgid "CSV" msgstr "" From e93b71c0f367cc4868275704bd94a3ee13f7a739 Mon Sep 17 00:00:00 2001 From: saneery Date: Tue, 23 Jul 2019 09:56:17 +0300 Subject: [PATCH 50/56] Rename cache ttl to cache period --- apps/explorer/config/config.exs | 8 ++++---- apps/explorer/lib/explorer/market/market_history_cache.ex | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/explorer/config/config.exs b/apps/explorer/config/config.exs index 606b5c6f0c..fed5124a2a 100644 --- a/apps/explorer/config/config.exs +++ b/apps/explorer/config/config.exs @@ -18,7 +18,7 @@ config :explorer, healthy_blocks_period: System.get_env("HEALTHY_BLOCKS_PERIOD") || :timer.minutes(5) average_block_period = - case Integer.parse(System.get_env("AVERAGE_BLOCK_PERIOD", "")) do + case Integer.parse(System.get_env("AVERAGE_BLOCK_CACHE_PERIOD", "")) do {secs, ""} -> :timer.seconds(secs) _ -> :timer.minutes(30) end @@ -114,13 +114,13 @@ config :spandex_ecto, SpandexEcto.EctoLogger, tracer: Explorer.Tracer, otp_app: :explorer -market_history_cache_ttl = - case Integer.parse(System.get_env("MARKET_HISTORY_CACHE_TTL", "")) do +market_history_cache_period = + case Integer.parse(System.get_env("MARKET_HISTORY_CACHE_PERIOD", "")) do {secs, ""} -> :timer.seconds(secs) _ -> :timer.hours(6) end -config :explorer, Explorer.Market.MarketHistoryCache, ttl: market_history_cache_ttl +config :explorer, Explorer.Market.MarketHistoryCache, period: market_history_cache_period # Import environment specific config. This must remain at the bottom # of this file so it overrides the configuration defined above. diff --git a/apps/explorer/lib/explorer/market/market_history_cache.ex b/apps/explorer/lib/explorer/market/market_history_cache.ex index 5cddb7707a..4ed3d9b7d2 100644 --- a/apps/explorer/lib/explorer/market/market_history_cache.ex +++ b/apps/explorer/lib/explorer/market/market_history_cache.ex @@ -12,7 +12,7 @@ defmodule Explorer.Market.MarketHistoryCache do @last_update_key :last_update @history_key :history # 6 hours - @cache_period Application.get_env(:explorer, __MODULE__)[:ttl] + @cache_period Application.get_env(:explorer, __MODULE__)[:period] @recent_days 30 def fetch do From 12bf6043d5b6745470ca807ba4e4cbf6ea56caa4 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 23 Jul 2019 10:57:19 +0300 Subject: [PATCH 51/56] preload smart contract for logs decoding --- .../block_scout_web/controllers/transaction_log_controller.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex index 0a87d12493..20272b4311 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex @@ -11,7 +11,7 @@ defmodule BlockScoutWeb.TransactionLogController do def index(conn, %{"transaction_id" => transaction_hash_string, "type" => "JSON"} = params) do with {:ok, transaction_hash} <- Chain.string_to_transaction_hash(transaction_hash_string), {:ok, transaction} <- - Chain.hash_to_transaction(transaction_hash) do + Chain.hash_to_transaction(transaction_hash, [necessity_by_association: %{[to_address: :smart_contract] => :optional}]) do full_options = Keyword.merge( [ From ab64fc4b226ab905da4e0b7d10e34da1ec54ab56 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 23 Jul 2019 11:02:22 +0300 Subject: [PATCH 52/56] mix format --- .../block_scout_web/controllers/transaction_log_controller.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex index 20272b4311..96d626b140 100644 --- a/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex +++ b/apps/block_scout_web/lib/block_scout_web/controllers/transaction_log_controller.ex @@ -11,7 +11,9 @@ defmodule BlockScoutWeb.TransactionLogController do def index(conn, %{"transaction_id" => transaction_hash_string, "type" => "JSON"} = params) do with {:ok, transaction_hash} <- Chain.string_to_transaction_hash(transaction_hash_string), {:ok, transaction} <- - Chain.hash_to_transaction(transaction_hash, [necessity_by_association: %{[to_address: :smart_contract] => :optional}]) do + Chain.hash_to_transaction(transaction_hash, + necessity_by_association: %{[to_address: :smart_contract] => :optional} + ) do full_options = Keyword.merge( [ From b74e07decb4047020c4a4b83998d517225aa28b8 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Tue, 23 Jul 2019 11:04:47 +0300 Subject: [PATCH 53/56] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b2dbee4bc..f03c39c275 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - [#2294](https://github.com/poanetwork/blockscout/pull/2294) - add healthy block period checking endpoint ### Fixes +- [#2410](https://github.com/poanetwork/blockscout/pull/2410) - preload smart contract for logs decoding - [#2398](https://github.com/poanetwork/blockscout/pull/2398) - show only one decoded candidate - [#2395](https://github.com/poanetwork/blockscout/pull/2395) - new block loading animation - [#2389](https://github.com/poanetwork/blockscout/pull/2389) - Reduce Lodash lib size (86% of lib methods are not used) From 80587f861ef920cb6a018a76b1b8114b7352d6d2 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Tue, 23 Jul 2019 18:11:28 +0300 Subject: [PATCH 54/56] Remove brackets in market cap % view --- CHANGELOG.md | 1 + .../lib/block_scout_web/templates/address/_tile.html.eex | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 634e5ac697..1f9f4f9a55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - [#2326](https://github.com/poanetwork/blockscout/pull/2326) - fix nested constructor arguments ### Chore +- [#2418](https://github.com/poanetwork/blockscout/pull/2418) - Remove parentheses in market cap percentage - [#2401](https://github.com/poanetwork/blockscout/pull/2401) - add ENV vars to manage updating period of average block time and market history cache - [#2363](https://github.com/poanetwork/blockscout/pull/2363) - add parameters example for eth rpc - [#2342](https://github.com/poanetwork/blockscout/pull/2342) - Upgrade Postgres image version in Docker setup diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address/_tile.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address/_tile.html.eex index 9680faa2a8..56f1a2bbb2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address/_tile.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address/_tile.html.eex @@ -21,7 +21,7 @@ <%= if @total_supply do %> - (<%= balance_percentage(@address, @total_supply) %>) + <%= balance_percentage(@address, @total_supply) %> <% end %> From ec31e82150330fc4bde05f0234b937319a5a872b Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 24 Jul 2019 11:09:44 +0300 Subject: [PATCH 55/56] Revert package-lock.json update --- apps/block_scout_web/assets/package-lock.json | 41 +++++-------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/apps/block_scout_web/assets/package-lock.json b/apps/block_scout_web/assets/package-lock.json index f20e753b49..22c6d216de 100644 --- a/apps/block_scout_web/assets/package-lock.json +++ b/apps/block_scout_web/assets/package-lock.json @@ -3816,8 +3816,7 @@ "version": "2.1.1", "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -3841,15 +3840,13 @@ "version": "1.0.0", "resolved": false, "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3866,22 +3863,19 @@ "version": "1.1.0", "resolved": false, "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "resolved": false, "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "resolved": false, "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -4012,8 +4006,7 @@ "version": "2.0.3", "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -4027,7 +4020,6 @@ "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4044,7 +4036,6 @@ "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4053,15 +4044,13 @@ "version": "0.0.8", "resolved": false, "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "resolved": false, "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4082,7 +4071,6 @@ "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -4171,8 +4159,7 @@ "version": "1.0.1", "resolved": false, "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -4186,7 +4173,6 @@ "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -4282,8 +4268,7 @@ "version": "5.1.1", "resolved": false, "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -4325,7 +4310,6 @@ "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4347,7 +4331,6 @@ "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4396,15 +4379,13 @@ "version": "1.0.2", "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.2", "resolved": false, "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", - "dev": true, - "optional": true + "dev": true } } }, From 11c9b16ef356d17edd229cc2962507abf814be3a Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 24 Jul 2019 11:26:14 +0300 Subject: [PATCH 56/56] Tile loader on the main page --- .../lib/block_scout_web/templates/chain/show.html.eex | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex index 5e136a1007..69d1f8b6ed 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex @@ -117,6 +117,7 @@ <%= gettext "Something went wrong, click to retry." %> + <%= render BlockScoutWeb.CommonComponentsView, "_tile-loader.html" %>