Michael Müller 5d82253257 Display state of Grandpa (#134)
* Make it clear that settings apply only to list view

Since the consensus view will be added users could
mistake the settings as being applied there as well.

* Add Jdenticon

* Add Grandpa consensus visualisation

* Remove fade-in animation

* Update packages and yarn.lock

* Broadcast only delta of what changed

* Minor code improvements

* Use NodeId instead of Address in first dimension

By using the NodeId instead of the Address in the first
dimension of the consensus matrice we save quite some
space in the payload which is sent to the browser.

The commit also contains some minor refactoring.

* Refactoring and improving naming

* Display boxes only after size has been detected

This look a bit nicer, otherwise the UI will still adapt
the box sizes once everything has already been loaded up.

* Fix cache

* Send consensus info on first subscribe

So that frontend can immediately display the current state
and doesn't have to aggregate first.

* Increase cache size

* Send deltas only if block in cache

Otherwise the UI will update old blocks which
are still visible to an empty shell.

* Adjust cache size

* Make cache sizes dependent

* Ensure authority caches are aligned

If only one authority has already submitted consensus info
for a new block then the cache of that one is offset by one
from all other authorities.

* Handle restarts on authority set changes properly

* Fix backfill mechanism

* Extract function

* Display only blocks since last authority set change

* Handle authority set sent on connect

When nodes lose their connection to telemetry
or connect on first time they sent their current
authority set for the UI to have something to
display.

These sets don't contain an explicit block number,
because the set didn't change -- it just got resent.
In this case the set is `undefined`.

* Introduce Authority type

This is necessary to cover the case where one
node connects, submits its authority set containing
another node which has not yet connected to Telemetry.

In this case we still want to create a shell object
and fill it with the address.

* Handle corner case

In the case of only one block having been produced, two authorities,
and only one authority connected, the UI did not show up.

* Display placeholder if name not yet available

* Replace with camelCase

* Replace with correct types

* Replace grandpa icon

* Change consensus icon to cube (finalized block icon)

* Upgrade dependencies

* Implement thin backend instead of thick

* Cleanup and minor improvements

* Minor refactoring

* Extract common code into function

* Switch module to class

* Remove unused code

* Clean markup

* Remove unused code

* Revert "Upgrade dependencies"

This reverts commit bf4d9ea48b3417860ccf40f0c5122027ffc59689.

* Update polkadot-identicon in frontend

Change version number to `^1.1.45` and run
`npm update polkadot-identicon`.

* Run yarn install

* Update react-measure to 2.3.0

Changed version number, ran

	cd packages/frontend/ && npm update react-reasure &&
	cd ../../ && yarn install

* Improve typing by introducing partial type

* Reduce indexing operations

* Shorten function

* Shorten function

* Introduce initialiseConsensusViewByRef

* Remove dead conditional branch

* Return consensusView ref from initialiseConsensusView

*  Handle consensusView ref returned from initialiseConsensusView
2019-05-20 13:20:40 +02:00
2019-05-20 13:20:40 +02:00
2019-03-19 15:18:22 +01:00
2018-07-06 17:53:42 +02:00
2018-09-25 11:53:57 +02:00
2019-03-19 15:18:22 +01:00
2018-06-18 18:39:56 +02:00
2019-03-19 15:18:22 +01:00
2019-03-19 10:37:10 +01:00
2018-07-02 16:07:16 +02:00
2019-05-20 13:20:40 +02:00

Polkadot Telemetry

Getting Started

After cloning the repo, make sure to grab the latest stable version of node and install dependencies before doing anything.

nvm install stable
yarn

Terminal 1 - Backend

yarn start:backend

Terminal 2 - Frontend

yarn start:frontend

Terminal 3 - Node

./target/debug/polkadot --dev --telemetry-url ws://localhost:1024

Run via Docker

To run via docker make sure that you have Docker Desktop

docker-compose up --build -d
  • -d stands for detach, if you would like to see logs i recommend using Kitmatic or dont use the -d
  • --build will build the images and rebuild, but this is not required everytime
  • If you want to makes UI changes, there is no need to rebuild the image as the files are being copied in via volumes.

Now navigate to localhost:3000 in your browser to view the app.

S
Description
No description provided
Readme GPL-3.0 97 MiB
Languages
Rust 62.6%
TypeScript 31.7%
CSS 4.6%
JavaScript 0.6%
Dockerfile 0.3%
Other 0.1%