Hide indexing alert env var

pull/7360/head
Viktor Baranov 2 years ago
parent cdd243929f
commit b9f6a29cc6
  1. 2
      CHANGELOG.md
  2. 5
      apps/block_scout_web/lib/block_scout_web/templates/layout/app.html.eex
  3. 2
      apps/block_scout_web/priv/gettext/default.pot
  4. 2
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po
  5. 3
      config/runtime.exs

@ -8,6 +8,8 @@
### Chore ### Chore
- [#7360](https://github.com/blockscout/blockscout/pull/7360) - Manage visibility of indexing progress alert
## 5.1.4-beta ## 5.1.4-beta
### Features ### Features

@ -70,10 +70,12 @@
<!-- --> <!-- -->
<% show_maintenance_alert = Application.get_env(:block_scout_web, BlockScoutWeb.Chain)[:show_maintenance_alert] %> <% show_maintenance_alert = Application.get_env(:block_scout_web, BlockScoutWeb.Chain)[:show_maintenance_alert] %>
<%= if show_maintenance_alert do %> <%= if show_maintenance_alert do %>
<div class="alert alert-warning text-center mb-0 p-3" data-selector="indexed-status"> <div class="alert alert-warning text-center mb-0 p-3">
<%= raw(System.get_env("MAINTENANCE_ALERT_MESSAGE")) %> <%= raw(System.get_env("MAINTENANCE_ALERT_MESSAGE")) %>
</div> </div>
<% end %> <% end %>
<% 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_blocks = Chain.indexed_ratio_blocks() %>
<% indexed_ratio = <% indexed_ratio =
case Chain.finished_indexing_from_ratio?(indexed_ratio_blocks) do case Chain.finished_indexing_from_ratio?(indexed_ratio_blocks) do
@ -87,6 +89,7 @@
<%= gettext("- We're indexing this chain right now. Some of the counts may be inaccurate.") %> <%= gettext("- We're indexing this chain right now. Some of the counts may be inaccurate.") %>
</div> </div>
<% end %> <% end %>
<% end %>
<%= render BlockScoutWeb.LayoutView, "_topnav.html", current_user: Conn.get_session(@conn, :current_user), conn: @conn %> <%= render BlockScoutWeb.LayoutView, "_topnav.html", current_user: Conn.get_session(@conn, :current_user), conn: @conn %>
<main class="js-ad-dependant-pt pt-5"> <main class="js-ad-dependant-pt pt-5">

@ -81,7 +81,7 @@ msgstr ""
msgid ") may be added for each contract. Click the Add Library button to add an additional one." msgid ") may be added for each contract. Click the Add Library button to add an additional one."
msgstr "" 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 #, elixir-autogen, elixir-format
msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgid "- We're indexing this chain right now. Some of the counts may be inaccurate."
msgstr "" msgstr ""

@ -81,7 +81,7 @@ msgstr ""
msgid ") may be added for each contract. Click the Add Library button to add an additional one." msgid ") may be added for each contract. Click the Add Library button to add an additional one."
msgstr "" 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 #, elixir-autogen, elixir-format
msgid "- We're indexing this chain right now. Some of the counts may be inaccurate." msgid "- We're indexing this chain right now. Some of the counts may be inaccurate."
msgstr "" msgstr ""

@ -395,7 +395,8 @@ config :indexer,
fetch_rewards_way: System.get_env("FETCH_REWARDS_WAY", "trace_block"), fetch_rewards_way: System.get_env("FETCH_REWARDS_WAY", "trace_block"),
memory_limit: ConfigHelper.indexer_memory_limit(), memory_limit: ConfigHelper.indexer_memory_limit(),
receipts_batch_size: ConfigHelper.parse_integer_env_var("INDEXER_RECEIPTS_BATCH_SIZE", 250), 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") config :indexer, Indexer.Supervisor, enabled: !ConfigHelper.parse_bool_env_var("DISABLE_INDEXER")

Loading…
Cancel
Save