Git Product home page Git Product logo

explorer-ui's Issues

Possible to run this UI and backend component on own infrastructure?

Hello, can I run polkascan and its supporting services myself? Something like what polkascan.io provides: give it an account and it lists the TX history for example: https://polkascan.io/polkadot/account/16ZL8yLyXv3V3L3z9ofR1ovFLziyXaN1DPq4yffMAZ9czzBD I'd like to download and install such an explorer on my own infrastructure. And I don't necessarily need the UI, but only a REST API. I looked through the various repos here, but didn't find clear answers.

Is there an "indexer" component that polls a DOT node, populates a DB, and provides an API to clients needing information such as account TX history, current block chain height, account balances etc.?

Improve search bar

The search bar should always be available, instead of showing it only on the dashboard as it is now. While typing, the search bar will show a preview with results for the user's search query.

pageSize is interchanged with blockLimit

See for example this account:

https://explorer-dev.polkascan.io/polkadot/account/16hp43x8DUZtU8L3cJy9Z8JMwTzuu8ZZRWqDZnpMhp464oEd

It creates this query, which uses the blockLimit for the pageSize :

query { getEventsByAccount( filters: { accountId: "0xfc4d6069cb980fcde6ef73a46f1894d66c152e9ddfac3a499cf6a1654ff5f55b" }, pageSize: 500000, blockLimitOffset: 13053521 ) { objects { blockNumber, eventIdx, attributeName, accountId, attributes, pallet, eventName, blockDatetime, sortValue, extrinsicIdx }, pageInfo { pageSize, pageNext, pagePrev, blockLimitOffset, blockLimitCount } } }

All Kusama session data past session 11260 is not available on Polkascan

When attempting to view Kusama session data for any session > 11260, the server returns the following CORS error: Cross Origin Resource Sharing error: MissingAllowOriginError

These URLs (for sessions > 11260) will trigger the CORs error
https://polkascan.io/kusama/session/session/11261
https://polkascan.io/kusama/session/session/11270

These URLs (for sessions <= 11260) work as expected
https://polkascan.io/kusama/session/session/11260
https://polkascan.io/kusama/session/session/11227

Screen Shot 2021-03-15 at 10 09 03 PM

Issue building docker container on M1

I keep coming across an error building the dockerfile on an M1 Pro.
This was due to not being able to install chromium for arm64.

 => ERROR [polkascan/explorer-ui builder  4/24] RUN npm i                                                          108.3s
------
 > [polkascan/explorer-ui builder  4/24] RUN npm i:
#0 79.88 npm WARN deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
#0 107.6 npm notice 
#0 107.6 npm notice New minor version of npm available! 9.5.0 -> 9.6.0
#0 107.6 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.0>
#0 107.6 npm notice Run `npm install -g [email protected]` to update!
#0 107.6 npm notice 
#0 107.6 npm ERR! code 1
#0 107.6 npm ERR! path /app/polkadapt/node_modules/puppeteer
#0 107.6 npm ERR! command failed
#0 107.6 npm ERR! command sh -c node install.js
#0 107.6 npm ERR! The chromium binary is not available for arm64.
#0 107.6 npm ERR! If you are on Ubuntu, you can install with: 
#0 107.6 npm ERR! 
#0 107.6 npm ERR!  sudo apt install chromium
#0 107.6 npm ERR! 
#0 107.6 npm ERR! 
#0 107.6 npm ERR!  sudo apt install chromium-browser
#0 107.6 npm ERR! 
#0 107.6 npm ERR! ERROR: Failed to set up Chromium r1095492! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
#0 107.6 npm ERR! Error
#0 107.6 npm ERR!     at handleArm64 (/app/polkadapt/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js:137:11)
#0 107.6 npm ERR!     at BrowserFetcher.download (/app/polkadapt/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserFetcher.js:284:13)
#0 107.6 npm ERR!     at async downloadBrowser (/app/polkadapt/node_modules/puppeteer/lib/cjs/puppeteer/node/install.js:61:5)
#0 107.6 
#0 107.6 npm ERR! A complete log of this run can be found in:
#0 107.6 npm ERR!     /root/.npm/_logs/2023-03-03T00_30_48_200Z-debug-0.log

See: https://stackoverflow.com/a/72291691/7101091
I was able to fix it using

diff --git a/explorer-ui/Dockerfile b/explorer-ui/Dockerfile
index 4a5c777..29afd6b 100644
--- a/explorer-ui/Dockerfile
+++ b/explorer-ui/Dockerfile
@@ -2,6 +2,12 @@
 
 FROM node:lts as builder
 
+RUN apt update
+RUN apt install -y chromium
+
+# skips puppeteer installing chrome and points to correct binary
+ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
+
 # The application depends on PolkADAPT, so we have to install and build PolkADAPT first.
 
 WORKDIR /app/polkadapt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.