Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openstats #1

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Openstats #1

wants to merge 11 commits into from

Conversation

protolambda
Copy link

@protolambda protolambda commented Jul 27, 2020

In an effort to make eth2stats more usable as open source tool, I propose the following changes:

  • Move from multi-network to single-network, but configure references to other dashboards.
    • We go from common https://eth2stats.io/onyx-testnet to https://onyx.eth2stats.io/onyx
    • Others can host their own eth2stats sites, and cross-reference networks
    • Current dashboards are simply referenced as https://eth2stats.io/<network name> for now, to keep everything working.
  • Make brand names in color/theming more generic, allow for customization
  • Remove visitor trackers
  • Update footer to reference fork information like issues/fork repo/etc.
    • If its name is "Aleth.io", it will have the original "powered by"
    • If its name is something else, it will make it clear that it is a fork, and credits the original
  • Configurable choice between HashRouter (github pages!) and BrowserRouter (nginx/docker setup is removed, it's too specific to and higher overhead for open-source forks)
  • Github pages action, to deploy the static site too, on every change to master branch.
  • Dev tool now makes a switch between local and remote by adding a X-Local-Dev header.
  • Fix bug: websocket service was never started. The store now makes sure it is started as soon as the config is loaded.
  • Config system is updated to reflect all of the above, it looks like, see below example.
{
    "local": {
        "HTTP_API": "http://localhost:8080/api",
        "WS_API": "ws://localhost:8080/ws"
    },
    "remote": {
        // change this to some actual eth2stats-server details
        "HTTP_API": "http://localhost:8080/api",
        "WS_API": "ws://localhost:8080/ws"
    },
    "network": {
        "name": "Local",
        "joinURL": "http://localhost:8080/participate",
        "issuesURL": "https://github.com/Alethio/eth2stats-dashboard/issues",
        "forkURL": "https://github.com/ConsenSys/eth2stats-dashboard",
        "serverAddr": "localhost:80",
        "forkName": "Aleth.io"
    },
    "others": {
        "Onyx Testnet": "https://eth2stats.io/onyx-testnet",
        "Altona Testnet": "https://eth2stats.io/altona-testnet",
        "Witti Testnet (Deprecated)": "https://eth2stats.io/witti-testnet",
        "Topaz Testnet (Deprecated)": "https://eth2stats.io/topaz-testnet"
    },
    // Set to false when hosting with a dynamic webhost instead of something static like IPFS or github-pages.
    "hashRouter": true
}

do NOT merge YET: I am going to test this more, and spin up a themed eth2stats dashboard for the next eth2 attacknet 🎉

@@ -0,0 +1,27 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is copied when deloying to gh pages it should have the final production config in it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am thinking we should put some example config up, and actual running dashboards can be repository forks with their own config + optionally theme changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants