diff --git a/CHANGELOG.md b/CHANGELOG.md index a4be3c50d7..c16eab8752 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ### Chore +- [#7360](https://github.com/blockscout/blockscout/pull/7360) - Manage visibility of indexing progress alert + ## 5.1.4-beta ### Features diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex index a93ab51265..7e561dfe2f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex @@ -70,22 +70,25 @@ <% show_maintenance_alert = Application.get_env(:block_scout_web, BlockScoutWeb.Chain)[:show_maintenance_alert] %> <%= if show_maintenance_alert do %> -
+
<%= raw(System.get_env("MAINTENANCE_ALERT_MESSAGE")) %>
<% end %> - <% indexed_ratio_blocks = Chain.indexed_ratio_blocks() %> - <% indexed_ratio = - case Chain.finished_indexing_from_ratio?(indexed_ratio_blocks) do - false -> indexed_ratio_blocks - _ -> Chain.indexed_ratio_internal_transactions() - end %> - <%= if not Chain.finished_indexing_from_ratio?(indexed_ratio) do %> -
- <%= render BlockScoutWeb.CommonComponentsView, "_loading_spinner.html" %> - - <%= gettext("- We're indexing this chain right now. Some of the counts may be inaccurate.") %> -
+ <% hide_indexing_progress_alert = Application.get_env(:indexer, :hide_indexing_progress_alert) %> + <%= unless hide_indexing_progress_alert do %> + <% indexed_ratio_blocks = Chain.indexed_ratio_blocks() %> + <% indexed_ratio = + case Chain.finished_indexing_from_ratio?(indexed_ratio_blocks) do + false -> indexed_ratio_blocks + _ -> Chain.indexed_ratio_internal_transactions() + end %> + <%= if not Chain.finished_indexing_from_ratio?(indexed_ratio) do %> +
+ <%= render BlockScoutWeb.CommonComponentsView, "_loading_spinner.html" %> + + <%= gettext("- We're indexing this chain right now. Some of the counts may be inaccurate.") %> +
+ <% end %> <% end %> <%= render BlockScoutWeb.LayoutView, "_topnav.html", current_user: Conn.get_session(@conn, :current_user), conn: @conn %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 0cfa904e37..58569fc682 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -81,7 +81,7 @@ msgstr "" msgid ") may be added for each contract. Click the Add Library button to add an additional one." msgstr "" -#: lib/block_scout_web/templates/layout/app.html.eex:87 +#: lib/block_scout_web/templates/layout/app.html.eex:89 #, elixir-autogen, elixir-format msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." 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 8ec08d8c8d..62de8334c8 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 @@ -81,7 +81,7 @@ msgstr "" msgid ") may be added for each contract. Click the Add Library button to add an additional one." msgstr "" -#: lib/block_scout_web/templates/layout/app.html.eex:87 +#: lib/block_scout_web/templates/layout/app.html.eex:89 #, elixir-autogen, elixir-format msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgstr "" diff --git a/config/runtime.exs b/config/runtime.exs index 853c4843bf..130d955ead 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -395,7 +395,8 @@ config :indexer, fetch_rewards_way: System.get_env("FETCH_REWARDS_WAY", "trace_block"), memory_limit: ConfigHelper.indexer_memory_limit(), receipts_batch_size: ConfigHelper.parse_integer_env_var("INDEXER_RECEIPTS_BATCH_SIZE", 250), - receipts_concurrency: ConfigHelper.parse_integer_env_var("INDEXER_RECEIPTS_CONCURRENCY", 10) + receipts_concurrency: ConfigHelper.parse_integer_env_var("INDEXER_RECEIPTS_CONCURRENCY", 10), + hide_indexing_progress_alert: ConfigHelper.parse_bool_env_var("INDEXER_HIDE_INDEXING_PROGRESS_ALERT") config :indexer, Indexer.Supervisor, enabled: !ConfigHelper.parse_bool_env_var("DISABLE_INDEXER")