forked from blockscout/blockscout
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stats: sunset "Overview" and "Mento" tabs (#1009)
- Loading branch information
Showing
12 changed files
with
198 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
.../block_scout_web/lib/block_scout_web/templates/stats/_notification_mento-reserve.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h2 class="card-title"> | ||
<%= gettext "Looking for Mento reserve stats?" %> | ||
</h2> | ||
<%= gettext "You can find them at" %> | ||
<a target='_blank' href='https://reserve.mento.org/'><%= gettext "reserve.mento.org" %></a>. |
5 changes: 5 additions & 0 deletions
5
apps/block_scout_web/lib/block_scout_web/templates/stats/_notification_mento.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h2 class="card-title"> | ||
<%= gettext "Looking for Mento statistics?" %> | ||
</h2> | ||
<%= gettext "You can find them at " %> | ||
<a target='_blank' href='https://dune.com/mento-labs-eng'><%= gettext "dune.com/mento-labs-eng" %></a>. |
5 changes: 5 additions & 0 deletions
5
apps/block_scout_web/lib/block_scout_web/templates/stats/_notification_overview.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<h2 class="card-title"> | ||
<%= gettext "Looking for blockchain statistics?" %> | ||
</h2> | ||
<%= gettext "You can find them at" %> | ||
<a target='_blank' href='https://dune.com/celo/celo-blockchain-overview'><%= gettext "dune.com/celo/celo-blockchain-overview" %></a>. |
22 changes: 22 additions & 0 deletions
22
apps/block_scout_web/lib/block_scout_web/templates/stats/_tabs.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<nav class="menu-wrap container" data-selector="stats-nabvar"> | ||
<ul class="topnav" id="topnav"> | ||
<li class="stats-link<%= if @active == "overview" do %> selected <% end %>"> | ||
<%= link gettext("Overview"), to: stats_overview_path(@conn, :overview) %> | ||
</li> | ||
<li class="stats-link<%= if @active == "addresses" do %> selected <% end %>"> | ||
<%= link gettext("Addresses"), to: stats_addresses_path(@conn, :addresses) %> | ||
</li> | ||
<li class="stats-link<%= if @active == "mento" do %> selected <% end %>"> | ||
<%= link gettext("Mento"), to: stats_mento_path(@conn, :mento) %> | ||
</li> | ||
<li class="stats-link<%= if @active == "mento-reserve" do %> selected <% end %>"> | ||
<%= link gettext("Mento Reserve"), to: stats_mento_reserve_path(@conn, :mento_reserve) %> | ||
</li> | ||
<li class="stats-link<%= if @active == "transactions" do %> selected <% end %>"> | ||
<%= link gettext("Transactions"), to: stats_transactions_path(@conn, :transactions) %> | ||
</li> | ||
<li class="stats-link<%= if @active == "epoch" do %> selected <% end %>"> | ||
<%= link gettext("Epoch Rewards"), to: stats_epoch_rewards_path(@conn, :epochs) %> | ||
</li> | ||
</ul> | ||
</nav> |
18 changes: 18 additions & 0 deletions
18
apps/block_scout_web/lib/block_scout_web/templates/stats/iframe.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<% stats_enabled = Application.get_env(:block_scout_web, :stats_enabled) %> | ||
<% stats_report_url = Application.get_env(:block_scout_web, :stats_report_url) %> | ||
<%= render BlockScoutWeb.StatsView, "_tabs.html", active: assigns[:active], conn: @conn %> | ||
|
||
<section class="container" data-page="stats-list" id="stats-container"> | ||
<section class="fs-14" data-page="stats-details"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<%= if stats_enabled do %> | ||
<div class="google-data-studio"> | ||
<iframe width=100% src="<%= get_url(stats_report_url, assigns[:active]) %>" name="myiframe" id="myiframe" frameborder="0" style="border:0;height:100vh;width:100%;" allowfullscreen></iframe> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</section> | ||
<script defer data-cfasync="false" src="<%= static_path(@conn, "/js/stats.js") %>"></script> | ||
</section> |
62 changes: 0 additions & 62 deletions
62
apps/block_scout_web/lib/block_scout_web/templates/stats/index.html.eex
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
apps/block_scout_web/lib/block_scout_web/templates/stats/notification.html.eex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<%= render BlockScoutWeb.StatsView, "_tabs.html", active: assigns[:active], conn: @conn %> | ||
|
||
<section class="container" data-page="stats-list" id="stats-container"> | ||
<section class="fs-14" data-page="stats-details"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<div class="card"> | ||
<div class="card-body"> | ||
<%= render BlockScoutWeb.StatsView, "_notification_#{assigns[:active]}.html", active: assigns[:active] %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
<script defer data-cfasync="false" src="<%= static_path(@conn, "/js/stats.js") %>"></script> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.