dashboard, p2p, vendor: visualize peers (#19247)

* dashboard, p2p: visualize peers

* dashboard: change scale to green to red
This commit is contained in:
Kurkó Mihály
2019-03-13 14:53:52 +02:00
committed by Péter Szilágyi
parent 1591b63306
commit 1a29bf0ee2
66 changed files with 48806 additions and 42924 deletions

View File

@@ -18,11 +18,14 @@
import React, {Component} from 'react';
import withStyles from 'material-ui/styles/withStyles';
import List, {ListItem, ListItemIcon, ListItemText} from 'material-ui/List';
import Icon from 'material-ui/Icon';
import withStyles from '@material-ui/core/styles/withStyles';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@material-ui/core/ListItemText';
import Icon from '@material-ui/core/Icon';
import Transition from 'react-transition-group/Transition';
import {Icon as FontAwesome} from 'react-fa';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {MENU, DURATION} from '../common';
@@ -48,6 +51,7 @@ const themeStyles = theme => ({
},
icon: {
fontSize: theme.spacing.unit * 3,
overflow: 'unset',
},
});
@@ -57,9 +61,11 @@ export type Props = {
changeContent: string => void,
};
type State = {}
// SideBar renders the sidebar of the dashboard.
class SideBar extends Component<Props> {
shouldComponentUpdate(nextProps) {
class SideBar extends Component<Props, State> {
shouldComponentUpdate(nextProps: Readonly<Props>, nextState: Readonly<State>, nextContext: any) {
return nextProps.opened !== this.props.opened;
}
@@ -78,7 +84,7 @@ class SideBar extends Component<Props> {
<ListItem button key={menu.id} onClick={this.clickOn(menu.id)} className={classes.listItem}>
<ListItemIcon>
<Icon className={classes.icon}>
<FontAwesome name={menu.icon} />
<FontAwesomeIcon icon={menu.icon} />
</Icon>
</ListItemIcon>
<ListItemText