status/README.md

137 lines
4.2 KiB
Markdown
Raw Normal View History

2019-09-16 14:53:19 +02:00
[![banner](https://raw.githubusercontent.com/oceanprotocol/art/master/github/repo-banner%402x.png)](https://oceanprotocol.com)
2019-09-16 11:28:08 +02:00
2019-09-16 14:53:19 +02:00
<h1 align="center">status</h1>
2019-09-16 11:28:08 +02:00
2019-09-16 14:53:19 +02:00
> 🐚 Overview and status checks of all Ocean Protocol RPC network connections. https://status.oceanprotocol.com
2019-09-16 11:28:08 +02:00
[![Build Status](https://travis-ci.com/oceanprotocol/status.svg?branch=master)](https://travis-ci.com/oceanprotocol/status)
[![Maintainability](https://api.codeclimate.com/v1/badges/ed14f83f8328dec5da11/maintainability)](https://codeclimate.com/github/oceanprotocol/status/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/ed14f83f8328dec5da11/test_coverage)](https://codeclimate.com/github/oceanprotocol/status/test_coverage)
2019-09-16 17:50:22 +02:00
<a href="https://status.oceanprotocol.com"><img width="1373" alt="Status Interface" src="https://user-images.githubusercontent.com/90316/64959471-7ff30000-d891-11e9-84be-96151bb7ea2d.png"></a>
2019-09-16 11:28:08 +02:00
2019-09-16 17:50:22 +02:00
- [🦑 Features](#-features)
2019-09-16 14:53:19 +02:00
- [🏄 Get Started](#-get-started)
2019-09-16 17:50:22 +02:00
- [✨ Code Style](#-code-style)
2019-12-12 21:56:55 +01:00
- [👩‍🔬 Testing](#-testing)
- [🛳 Production](#-production)
- [⬆️ Deployment](#-deployment)
- [Manual Deployment](#manual-deployment)
2019-09-16 14:53:19 +02:00
- [🎁 Contributing](#-contributing)
- [🏛 License](#-license)
2019-09-16 11:28:08 +02:00
2019-09-16 17:50:22 +02:00
## 🦑 Features
2019-12-12 21:56:55 +01:00
- Fetches and displays information for each of Ocean's remote RPC endpoints via [Parity JSON-RPC API](https://wiki.parity.io/JSONRPC) responses
- online/offline status (`eth_getBlockByNumber` & `parity_mode`)
- current block number (`eth_getBlockByNumber`)
- response time (custom `axios` interceptor)
- connected peers (`net_peerCount`)
- gas limit (`eth_getBlockByNumber`)
- gas price (`eth_gasPrice`)
- parity version (`web3_clientVersion`)
2019-09-16 17:50:22 +02:00
- current block number is linked to respective explorer
2019-12-12 21:56:55 +01:00
- automatically refetches all data every 5 sec.
2019-09-16 17:50:22 +02:00
- Gets network metadata from [@ethereum-navigator/atlas](https://github.com/ethereum-navigator/atlas)
2019-09-16 14:53:19 +02:00
## 🏄 Get Started
2019-09-16 11:28:08 +02:00
2019-12-12 21:56:55 +01:00
The app is a React app built with [Next.js](https://nextjs.org). To start local development:
2019-09-16 14:53:19 +02:00
```bash
2019-12-12 21:56:55 +01:00
git clone git@github.com:oceanprotocol/status.git
cd status
2019-09-16 14:53:19 +02:00
npm install
npm start
```
2019-09-16 11:28:08 +02:00
2019-12-12 21:56:55 +01:00
## ✨ Code Style
For linting and auto-formatting you can use from the root of the project:
```bash
# lint all js with eslint
npm run lint
# auto format all js & css with prettier, taking all configs into account
npm run format
```
2019-09-16 17:50:22 +02:00
## 👩‍🔬 Testing
Test suite is setup with [Jest](https://jestjs.io) and [react-testing-library](https://github.com/kentcdodds/react-testing-library) for unit testing.
To run all linting and unit tests:
```bash
npm test
```
For local development, you can start the test runner in a watch mode.
```bash
npm run test:watch
```
2019-12-12 21:56:55 +01:00
For analyzing the generated JavaScript bundle sizes you can use:
2019-09-16 17:50:22 +02:00
2019-12-12 21:56:55 +01:00
```bash
npm run analyze
```
## 🛳 Production
To create a production build, run from the root of the project:
2019-09-16 17:50:22 +02:00
```bash
2019-12-12 21:56:55 +01:00
npm run build
# serve production build
npm run serve
```
2019-09-16 17:50:22 +02:00
2019-12-12 21:56:55 +01:00
Outputs to `./public`.
## ⬆️ Deployment
Every branch or Pull Request is automatically deployed by [Now](https://zeit.co/now) with their GitHub integration. A link to a deployment will appear under each Pull Request.
The latest deployment of the `master` branch is automatically aliased to `status.oceanprotocol.com`.
### Manual Deployment
If needed, app can be deployed manually. Make sure to switch to Ocean Protocol org before deploying:
```bash
# first run
now login
now switch
# deploy
now
# switch alias to new deployment
now alias
2019-09-16 17:50:22 +02:00
```
2019-09-16 14:53:19 +02:00
## 🎁 Contributing
2019-09-16 11:28:08 +02:00
2019-09-16 14:53:19 +02:00
See the page titled "[Ways to Contribute](https://docs.oceanprotocol.com/concepts/contributing/)" in the Ocean Protocol documentation.
2019-09-16 11:28:08 +02:00
2019-09-16 14:53:19 +02:00
## 🏛 License
2019-09-16 11:28:08 +02:00
2019-09-16 14:53:19 +02:00
```text
Copyright 2019 Ocean Protocol Foundation Ltd.
2019-09-16 11:28:08 +02:00
2019-09-16 14:53:19 +02:00
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
2019-09-16 11:28:08 +02:00
2019-09-16 14:53:19 +02:00
http://www.apache.org/licenses/LICENSE-2.0
2019-09-16 11:28:08 +02:00
2019-09-16 14:53:19 +02:00
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2019-12-07 23:02:18 +01:00
```