Merge pull request #2807 from poanetwork/422-page

422 page
pull/2826/head
Victor Baranov 5 years ago committed by GitHub
commit ca5c0ea6ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 27
      apps/block_scout_web/assets/static/images/errors-img/pic-404.svg
  3. 5
      apps/block_scout_web/lib/block_scout_web/controller.ex
  4. 12
      apps/block_scout_web/lib/block_scout_web/templates/error422/index.html.eex
  5. 5
      apps/block_scout_web/lib/block_scout_web/views/error_422.ex

@ -10,6 +10,7 @@
### Chore
- [#2817](https://github.com/poanetwork/blockscout/pull/2817) - move docker integration documentation to blockscout docs
- [#2807](https://github.com/poanetwork/blockscout/pull/2807) - 422 page
- [#2805](https://github.com/poanetwork/blockscout/pull/2805) - Update supported chains default option
- [#2801](https://github.com/poanetwork/blockscout/pull/2801) - remove unused clause in address_to_unique_tokens query

@ -0,0 +1,27 @@
<svg xmlns="http://www.w3.org/2000/svg" width="357" height="319">
<path fill="#FFF" fill-rule="evenodd" d="M178.5 148.625c98.583 0 178.5 38.14 178.5 85.187C357 280.86 277.083 319 178.5 319S0 280.86 0 233.812c0-47.047 79.917-85.187 178.5-85.187z"/>
<path fill="#9F68FF" fill-rule="evenodd" d="M198.726 152.391l11.347-2.833 16.186 16.115-11.503 3.122-16.03-16.404zm29.411 43.278l-10.899 2.702-8.093-8.057 10.606-2.859 8.386 8.214z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M228.908 155.202l-8.522-8.66 3.39-10.445 10.899-2.702-5.767 21.807zm-29.889-2.654l8.416-32.279 11.054-2.99-8.572 32.567-10.898 2.702zm27.103 12.681l-6.234 22.671-10.743 2.414 6.06-21.651 10.917-3.434z"/>
<path fill="#CAADFF" fill-rule="evenodd" d="M220.044 187.612l5.922-22.095-16.049-15.671 8.728-32.855 7.8 7.901-5.474 21.964 7.957 7.613 5.747-21.074 8.249 7.769-14.787 54.505-8.093-8.057z"/>
<path fill="#9F68FF" fill-rule="evenodd" d="M73.617 158.33l9.164-5.341-27.731-20.715-9.358 6.068 27.925 19.988z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M58.09 74.571l-10.08 5.874-2.318 57.897 9.885-5.146 2.513-58.625z"/>
<path fill="#9F68FF" fill-rule="evenodd" d="M62.667 92.186l15.879 4.267-4.668 17.472-15.88-4.267 4.669-17.472z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M74.492 100.045l-10.08 5.875-1.34 33.971 9.885-5.146 1.535-34.7z"/>
<path fill="#CAADFF" fill-rule="evenodd" d="M82.585 152.703l-10.417-7.341-6.51-4.588-10.417-7.341 1.641-45.557.486-13.499 16.927 11.929 10.417 7.34-2.127 59.057zM67.298 95.216l-1.154 32.06 6.51 4.587 1.155-32.059-6.511-4.588z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M246.418 40.027l-1.29-22.053 9.75-6.77 1.153 22.802-9.613 6.021zm-18.185-10.632l9.557-6.695 1.38 36.025-9.425 5.952-1.512-35.282zm-1.23-22.611l9.749-6.77.404 13.789-9.613 6.021-.54-13.04z"/>
<path fill="#9F68FF" fill-rule="evenodd" d="M238.161 46.997l.028-11.719 27.257 15.921-8.658 6.118-18.627-10.32zM227.525 19.61l8.791-6.864 27.256 15.921-8.658 6.118-27.389-15.175zm40.394 56.573l-8.689 6.086-29.485-17.592 8.823-6.827 29.351 18.333z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M245.467 28.613l8.588-5.56 1.174 14.126-8.588 5.56-1.174-14.126z"/>
<path fill="#CAADFF" fill-rule="evenodd" d="M267.066 62.421l.635 13.493-28.846-16.924-.135-2.873-.017-.012-.126-3.026-.357-7.582.042.025-.802-19.273.011.006-.17-3.623 17.082 9.963-.408-8.935-17.008-10.225-.641-13.41 28.064 16.873.035.731.04.019.255 6.139.311 6.521-.042-.026.376 9.072-.026.011.592 12.648-17.001-9.916.435 9.939 17.701 10.385z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M97.535 45.483l-.716 7.065L112.06 69.08l.716-7.065-15.241-16.532zM120.006 70.246l-.716 7.065 15.848 17.058 1.006-6.784-16.138-17.339zM121.259 41.213l-.716 7.065 14.459 16.461 1.498-6.994-15.241-16.532zM143.73 65.975l-1.108 7.03 16.275 16.704.971-6.394-16.138-17.34z"/>
<path fill="#9F68FF" fill-rule="evenodd" d="M112.434 62.656l-.558 6.288 8.201 2.634 3.577-6.328-11.22-2.594zM170.179 87.515l-11.647 1.874 1.084-6.712 11.937-1.586-1.374 6.424zm-35.163 6.622l1.119-7.102 11.153-1.656-.981 6.459-11.291 2.299zm-2.255-19.512l-4.539-7.408 15.81-1.337-1.053 7.239-10.218 1.506z"/>
<path fill="#CAADFF" fill-rule="evenodd" d="M171.662 81.195l-11.978 2.184-15.649-17.091-11.977 2.184 15.649 17.091-11.977 2.184-15.649-17.091 2.411-4.998-9.565-2.815-15.65-17.091 11.977-2.184 15.65 17.091 11.977-2.184-15.65-17.091 11.977-2.184 15.65 17.091-2.412 4.998 9.566 2.815 15.65 17.091z"/>
<path fill="#9F68FF" fill-rule="evenodd" d="M120.264 210.586l11.091-10.907 3.852 14.415L124.116 225l-3.852-14.414z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M120.269 210.605l-15.04-3.873 3.846 14.395L124.116 225l-3.847-14.395z"/>
<path fill="#CAADFF" fill-rule="evenodd" d="M116.414 196.175l14.985 3.694-11.136 10.713-14.985-3.694 11.136-10.713z"/>
<path fill="#9F68FF" fill-rule="evenodd" d="M30.636 25.199l8.023-8.735 3.53 11.003-8.024 8.735-3.529-11.003z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M30.64 25.214l-11.643-2.548 3.525 10.989 11.643 2.547-3.525-10.988z"/>
<path fill="#CAADFF" fill-rule="evenodd" d="M27.107 14.199l11.593 2.41-8.065 8.587-11.594-2.41 8.066-8.587z"/>
<path fill="#9F68FF" fill-rule="evenodd" d="M322.446 95.746l20.542-5.304-5.259 19.683-20.542 5.304 5.259-19.683z"/>
<path fill="#7441CC" fill-rule="evenodd" d="M322.439 95.772L307.29 80.894l-5.252 19.657 15.149 14.878 5.252-19.657z"/>
<path fill="#CAADFF" fill-rule="evenodd" d="M327.704 76.069l15.206 14.628-20.462 5.044-15.206-14.628 20.462-5.044z"/>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

@ -20,8 +20,9 @@ defmodule BlockScoutWeb.Controller do
def unprocessable_entity(conn) do
conn
|> put_status(:unprocessable_entity)
|> put_view(BlockScoutWeb.ErrorView)
|> render("422.html")
|> put_view(BlockScoutWeb.Error422View)
|> render(:index)
|> halt()
end
@doc """

@ -0,0 +1,12 @@
<section class="container">
<div class="block-not-found">
<div class="block-not-found-img">
<img alt="Page Not Found" src="/images/errors-img/pic-404.svg">
</div>
<div class="block-not-found-content">
<h1 class="card-title error-title">Unprocessable Entity</h1>
<p class="error-descr">The request was well-formed but was unable to be followed due to semantic errors. Maybe, you mistype a hash of tx/block/address?</p>
<a class="error-btn btn-line" href="/">Back Home</a>
</div>
</div>
</section>

@ -0,0 +1,5 @@
defmodule BlockScoutWeb.Error422View do
use BlockScoutWeb, :view
@dialyzer :no_match
end
Loading…
Cancel
Save