Merge pull request #1033 from poanetwork/sa-graphql-api-link-on-navbar

Add GraphiQL link to topnav
pull/1032/head
Sebastian Abondano 6 years ago committed by GitHub
commit 7ad6ae77d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/block_scout_web/lib/block_scout_web/templates/api_docs/index.html.eex
  2. 20
      apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex
  3. 39
      apps/block_scout_web/priv/gettext/default.pot
  4. 39
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -4,7 +4,7 @@
<h1 class="card-title mb-0">API Documentation</h2> <h1 class="card-title mb-0">API Documentation</h2>
<small class="text-monospace text-primary" data-endpoint-url="<%= BlockScoutWeb.Endpoint.url() %>/api">[ <%= gettext "Base URL:" %> <%= @conn.host %>/api ]</small> <small class="text-monospace text-primary" data-endpoint-url="<%= BlockScoutWeb.Endpoint.url() %>/api">[ <%= gettext "Base URL:" %> <%= @conn.host %>/api ]</small>
<p class="mt-4"><%= gettext "This API is provided for developers transitioning their applications from Etherscan to Explorer. It supports GET and POST requests." %></p> <p class="mt-4"><%= gettext "This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests." %></p>
</div> </div>
</div> </div>

@ -56,13 +56,25 @@
<%= gettext("Accounts") %> <%= gettext("Accounts") %>
<% end %> <% end %>
</li> </li>
<li class="nav-item"> <li class="nav-item dropdown">
<%= link to: api_docs_path(@conn, :index), class: "nav-link topnav-nav-link" do %> <a href="#" role="button" id="navbarAPIsDropdown" class="nav-link topnav-nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="nav-link-icon"> <span class="nav-link-icon">
<%= render BlockScoutWeb.IconsView, "_api_icon.html" %> <%= render BlockScoutWeb.IconsView, "_api_icon.html" %>
</span> </span>
<%= gettext("API") %> <%= gettext("APIs") %>
<% end %> </a>
<div class="dropdown-menu" aria-labeledby="navbarTransactionsDropdown">
<%= link(
gettext("GraphQL"),
class: "dropdown-item",
to: "/graphiql"
) %>
<%= link(
gettext("RPC"),
class: "dropdown-item",
to: api_docs_path(@conn, :index)
) %>
</div>
</li> </li>
</ul> </ul>
<div class="search-form d-lg-flex d-inline-block"> <div class="search-form d-lg-flex d-inline-block">

@ -83,11 +83,6 @@ msgstr ""
msgid "A string with the name of the module to be invoked." msgid "A string with the name of the module to be invoked."
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:64
msgid "API"
msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_metatags.html.eex:4 #: lib/block_scout_web/templates/api_docs/_metatags.html.eex:4
msgid "API endpoints for the %{subnetwork}" msgid "API endpoints for the %{subnetwork}"
@ -660,12 +655,12 @@ msgid "Owner Address"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:95 #: lib/block_scout_web/templates/layout/_topnav.html.eex:107
msgid "POA Core" msgid "POA Core"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:94 #: lib/block_scout_web/templates/layout/_topnav.html.eex:106
msgid "POA Sokol" msgid "POA Sokol"
msgstr "" msgstr ""
@ -757,13 +752,13 @@ msgid "Responses"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 #: lib/block_scout_web/templates/layout/_topnav.html.eex:83
#: lib/block_scout_web/templates/layout/_topnav.html.eex:78 #: lib/block_scout_web/templates/layout/_topnav.html.eex:90
msgid "Search" msgid "Search"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 #: lib/block_scout_web/templates/layout/_topnav.html.eex:83
msgid "Search by address, transaction hash, or block number" msgid "Search by address, transaction hash, or block number"
msgstr "" msgstr ""
@ -872,11 +867,6 @@ msgstr ""
msgid "There are no transfers for this Token." msgid "There are no transfers for this Token."
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/index.html.eex:7
msgid "This API is provided for developers transitioning their applications from Etherscan to Explorer. It supports GET and POST requests."
msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:23 #: lib/block_scout_web/templates/transaction/overview.html.eex:23
msgid "This transaction is pending confirmation." msgid "This transaction is pending confirmation."
@ -1221,3 +1211,22 @@ msgstr ""
#: lib/block_scout_web/templates/address_transaction/index.html.eex:82 #: lib/block_scout_web/templates/address_transaction/index.html.eex:82
msgid "Loading" msgid "Loading"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/layout/_topnav.html.eex:64
msgid "APIs"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:68
msgid "GraphQL"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/index.html.eex:7
msgid "This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests."
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:73
msgid "RPC"
msgstr ""

@ -83,11 +83,6 @@ msgstr ""
msgid "A string with the name of the module to be invoked." msgid "A string with the name of the module to be invoked."
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:64
msgid "API"
msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/api_docs/_metatags.html.eex:4 #: lib/block_scout_web/templates/api_docs/_metatags.html.eex:4
msgid "API endpoints for the %{subnetwork}" msgid "API endpoints for the %{subnetwork}"
@ -660,12 +655,12 @@ msgid "Owner Address"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:95 #: lib/block_scout_web/templates/layout/_topnav.html.eex:107
msgid "POA Core" msgid "POA Core"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:94 #: lib/block_scout_web/templates/layout/_topnav.html.eex:106
msgid "POA Sokol" msgid "POA Sokol"
msgstr "" msgstr ""
@ -757,13 +752,13 @@ msgid "Responses"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 #: lib/block_scout_web/templates/layout/_topnav.html.eex:83
#: lib/block_scout_web/templates/layout/_topnav.html.eex:78 #: lib/block_scout_web/templates/layout/_topnav.html.eex:90
msgid "Search" msgid "Search"
msgstr "" msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:71 #: lib/block_scout_web/templates/layout/_topnav.html.eex:83
msgid "Search by address, transaction hash, or block number" msgid "Search by address, transaction hash, or block number"
msgstr "" msgstr ""
@ -872,11 +867,6 @@ msgstr ""
msgid "There are no transfers for this Token." msgid "There are no transfers for this Token."
msgstr "" msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/index.html.eex:7
msgid "This API is provided for developers transitioning their applications from Etherscan to Explorer. It supports GET and POST requests."
msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/transaction/overview.html.eex:23 #: lib/block_scout_web/templates/transaction/overview.html.eex:23
msgid "This transaction is pending confirmation." msgid "This transaction is pending confirmation."
@ -1221,3 +1211,22 @@ msgstr ""
#: lib/block_scout_web/templates/address_transaction/index.html.eex:82 #: lib/block_scout_web/templates/address_transaction/index.html.eex:82
msgid "Loading" msgid "Loading"
msgstr "" msgstr ""
#: lib/block_scout_web/templates/layout/_topnav.html.eex:64
msgid "APIs"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:68
msgid "GraphQL"
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/api_docs/index.html.eex:7
msgid "This API is provided for developers transitioning their applications from Etherscan to BlockScout. It supports GET and POST requests."
msgstr ""
#, elixir-format
#: lib/block_scout_web/templates/layout/_topnav.html.eex:73
msgid "RPC"
msgstr ""

Loading…
Cancel
Save