From 60e9309f1e0952e6144fb33ac36be0468ece1955 Mon Sep 17 00:00:00 2001 From: maxgrapps Date: Wed, 3 Jul 2019 13:14:09 +0300 Subject: [PATCH 1/6] banner stats issues on sm resolutions, transactions title issue --- .../assets/css/components/_card.scss | 6 ++++ .../css/components/_dashboard-banner.scss | 29 ++++++++++++++++++- .../templates/chain/show.html.eex | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/apps/block_scout_web/assets/css/components/_card.scss b/apps/block_scout_web/assets/css/components/_card.scss index 6e50100f0d..63a8f4a852 100644 --- a/apps/block_scout_web/assets/css/components/_card.scss +++ b/apps/block_scout_web/assets/css/components/_card.scss @@ -42,6 +42,12 @@ $card-tab-icon-color-active: #20b760 !default; line-height: 1.2rem; margin-bottom: 2rem; + &.lg-card-title { + @media (max-width: 374px) { + font-size: 13px; + } + } + &.margin-bottom-md { margin-bottom: 25px; } diff --git a/apps/block_scout_web/assets/css/components/_dashboard-banner.scss b/apps/block_scout_web/assets/css/components/_dashboard-banner.scss index ade21afea5..ecde4e882b 100644 --- a/apps/block_scout_web/assets/css/components/_dashboard-banner.scss +++ b/apps/block_scout_web/assets/css/components/_dashboard-banner.scss @@ -80,6 +80,12 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa flex-direction: row; } + @media (max-width: 599px) { + padding-top: 0; + padding-bottom: 0; + flex-direction: column; + } + &::before { border-radius: 2px; content: ""; @@ -107,6 +113,11 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa line-height: 1.2; margin: 0 0 5px; + @media (max-width: 374px) { + position: relative; + top: -2px; + } + @include media-breakpoint-down(md) { margin: 0 5px 0 0; } @@ -140,13 +151,16 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa height: auto; justify-content: flex-start; margin-left: 0; - margin-top: 15px; max-width: 100%; padding: 20px 0 20px 20px; width: 250px; box-shadow: 0 0 35px 0 rgba(0, 0, 0, 0.2); } + @include media-breakpoint-down(lg) { + margin-top: 15px; + } + @include media-breakpoint-down(sm) { width: 100%; } @@ -186,4 +200,17 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa } @include stats-item($dashboard-stats-item-border-color, $dashboard-stats-item-label-color, $dashboard-stats-item-value-color); + + .dashboard-banner-network-stats-item { + @media (max-width: 374px) { + padding-left: calc(0.6rem + 4px); + padding-right: 0.5rem; + } + } + + .dashboard-banner-network-stats-value { + @media (max-width: 374px) { + font-size: 0.9rem; + } + } } \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex index 17bd9c4afe..0c29001697 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/chain/show.html.eex @@ -105,7 +105,7 @@
<%= link(gettext("View All Transactions"), to: transaction_path(BlockScoutWeb.Endpoint, :index), class: "btn-line float-right") %> -

<%= gettext "Transactions" %>

+

<%= gettext "Transactions" %>

<%= gettext "More transactions have come in" %> From f91351dbc9bc6962c3bb117f411a52e3b7035271 Mon Sep 17 00:00:00 2001 From: maxgrapps <50101080+maxgrapps@users.noreply.github.com> Date: Wed, 3 Jul 2019 13:18:19 +0300 Subject: [PATCH 2/6] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d56ddd37a9..26c4fff461 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - [#2266](https://github.com/poanetwork/blockscout/pull/2266) - allow excluding uncles from average block time calculation ### Fixes +- [#2286](https://github.com/poanetwork/blockscout/pull/2286) - banner stats issues on sm resolutions, transactions title issue - [#2284](https://github.com/poanetwork/blockscout/pull/2284) - add 404 status for not existing pages - [#2244](https://github.com/poanetwork/blockscout/pull/2244) - fix internal transactions failing to be indexed because of constraint - [#2281](https://github.com/poanetwork/blockscout/pull/2281) - typo issues, dropdown issues From 23d6b2aa103780bc1bccf251d71b2c6b1405e566 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 3 Jul 2019 16:06:19 +0300 Subject: [PATCH 3/6] Update CHANGELOG.md Bump version --- CHANGELOG.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e15b08af0c..ede02ddea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,14 @@ ## Current + +### Features + +### Fixes + +### Chore + + +## 2.0.1-beta + ### Features - [#2283](https://github.com/poanetwork/blockscout/pull/2283) - Add transactions cache - [#2182](https://github.com/poanetwork/blockscout/pull/2182) - add market history cache @@ -81,8 +91,6 @@ - [#2118](https://github.com/poanetwork/blockscout/pull/2118) - show only the last decompiled contract - [#2256](https://github.com/poanetwork/blockscout/pull/2256) - use the latest version of chromedriver -### Chore - ## 2.0.0-beta ### Features From 0bb7685cae81d5c74af8fc662e96338897e37f70 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 3 Jul 2019 17:55:55 +0300 Subject: [PATCH 4/6] Optional websockets for dev environment --- apps/indexer/config/dev/geth.exs | 2 +- apps/indexer/config/dev/parity.exs | 2 +- apps/indexer/config/dev/rsk.exs | 2 +- apps/indexer/config/prod/geth.exs | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/indexer/config/dev/geth.exs b/apps/indexer/config/dev/geth.exs index cf1113119d..b6ff92888c 100644 --- a/apps/indexer/config/dev/geth.exs +++ b/apps/indexer/config/dev/geth.exs @@ -14,7 +14,7 @@ config :indexer, subscribe_named_arguments: [ transport: EthereumJSONRPC.WebSocket, transport_options: [ - web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, + web_socket: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || EthereumJSONRPC.WebSocket.WebSocketClient, url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY" ] ] diff --git a/apps/indexer/config/dev/parity.exs b/apps/indexer/config/dev/parity.exs index d6e300f077..7a5b31a424 100644 --- a/apps/indexer/config/dev/parity.exs +++ b/apps/indexer/config/dev/parity.exs @@ -34,7 +34,7 @@ config :indexer, # ] # ], subscribe_named_arguments: [ - transport: EthereumJSONRPC.WebSocket, + transport: System.get_env("ETHEREUM_JSONRPC_WS_URL") && EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:8546" diff --git a/apps/indexer/config/dev/rsk.exs b/apps/indexer/config/dev/rsk.exs index 21138634f5..3f7399e892 100644 --- a/apps/indexer/config/dev/rsk.exs +++ b/apps/indexer/config/dev/rsk.exs @@ -19,7 +19,7 @@ config :indexer, variant: EthereumJSONRPC.RSK ], subscribe_named_arguments: [ - transport: EthereumJSONRPC.WebSocket, + transport: System.get_env("ETHEREUM_JSONRPC_WS_URL") && EthereumJSONRPC.WebSocket, transport_options: [ web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "ws://localhost:8546" diff --git a/apps/indexer/config/prod/geth.exs b/apps/indexer/config/prod/geth.exs index 859d94319c..7493135e29 100644 --- a/apps/indexer/config/prod/geth.exs +++ b/apps/indexer/config/prod/geth.exs @@ -6,7 +6,7 @@ config :indexer, transport: EthereumJSONRPC.HTTP, transport_options: [ http: EthereumJSONRPC.HTTP.HTTPoison, - url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "https://mainnet.infura.io/8lTvJTKmHPCHazkneJsY", + url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), http_options: [recv_timeout: :timer.minutes(10), timeout: :timer.minutes(10), hackney: [pool: :ethereum_jsonrpc]] ], variant: EthereumJSONRPC.Geth @@ -14,7 +14,7 @@ config :indexer, subscribe_named_arguments: [ transport: EthereumJSONRPC.WebSocket, transport_options: [ - web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY" + web_socket: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || EthereumJSONRPC.WebSocket.WebSocketClient, + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") ] ] From 165ee31da968e51cf6ffe37b49dc4017910eff4d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 3 Jul 2019 18:01:57 +0300 Subject: [PATCH 5/6] add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ede02ddea1..f97a44fa02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixes ### Chore +- [#2289](https://github.com/poanetwork/blockscout/pull/2289) - Optional websockets for dev environment ## 2.0.1-beta From f7fc61c868021a10ce88c7fb5fd7d233de477251 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Wed, 3 Jul 2019 18:12:51 +0300 Subject: [PATCH 6/6] Revoke changes for Geth --- apps/indexer/config/dev/geth.exs | 2 +- apps/indexer/config/prod/geth.exs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/indexer/config/dev/geth.exs b/apps/indexer/config/dev/geth.exs index b6ff92888c..cf1113119d 100644 --- a/apps/indexer/config/dev/geth.exs +++ b/apps/indexer/config/dev/geth.exs @@ -14,7 +14,7 @@ config :indexer, subscribe_named_arguments: [ transport: EthereumJSONRPC.WebSocket, transport_options: [ - web_socket: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || EthereumJSONRPC.WebSocket.WebSocketClient, + web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY" ] ] diff --git a/apps/indexer/config/prod/geth.exs b/apps/indexer/config/prod/geth.exs index 7493135e29..859d94319c 100644 --- a/apps/indexer/config/prod/geth.exs +++ b/apps/indexer/config/prod/geth.exs @@ -6,7 +6,7 @@ config :indexer, transport: EthereumJSONRPC.HTTP, transport_options: [ http: EthereumJSONRPC.HTTP.HTTPoison, - url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL"), + url: System.get_env("ETHEREUM_JSONRPC_HTTP_URL") || "https://mainnet.infura.io/8lTvJTKmHPCHazkneJsY", http_options: [recv_timeout: :timer.minutes(10), timeout: :timer.minutes(10), hackney: [pool: :ethereum_jsonrpc]] ], variant: EthereumJSONRPC.Geth @@ -14,7 +14,7 @@ config :indexer, subscribe_named_arguments: [ transport: EthereumJSONRPC.WebSocket, transport_options: [ - web_socket: System.get_env("ETHEREUM_JSONRPC_TRACE_URL") || EthereumJSONRPC.WebSocket.WebSocketClient, - url: System.get_env("ETHEREUM_JSONRPC_WS_URL") + web_socket: EthereumJSONRPC.WebSocket.WebSocketClient, + url: System.get_env("ETHEREUM_JSONRPC_WS_URL") || "wss://mainnet.infura.io/ws/8lTvJTKmHPCHazkneJsY" ] ]