diff --git a/.eslintrc.json b/.eslintrc.json
index cdfc891cc..1f00f9dd0 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -274,6 +274,7 @@
"hunspell",
"hunspellchecker",
"Hyperledger",
+ "istanbul",
"javascript",
"jsonwebtoken",
"jsx",
diff --git a/client/src/components/App/App.js b/client/src/components/App/App.js
index 28816bc68..2b67ef384 100644
--- a/client/src/components/App/App.js
+++ b/client/src/components/App/App.js
@@ -21,6 +21,7 @@ import Login from '../Login';
import Private from '../Route';
+/* istanbul ignore next */
const styles = theme => {
const { type } = theme.palette;
const dark = type === 'dark';
diff --git a/client/src/components/Charts/ChartStats.js b/client/src/components/Charts/ChartStats.js
index 6b37aeb55..07027891a 100644
--- a/client/src/components/Charts/ChartStats.js
+++ b/client/src/components/Charts/ChartStats.js
@@ -7,213 +7,212 @@ import compose from 'recompose/compose';
import { withStyles } from '@material-ui/core/styles';
import { connect } from 'react-redux';
import moment from 'moment-timezone';
-import {
- TabContent, TabPane, Nav, NavItem, NavLink,
-} from 'reactstrap';
+import { TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap';
import classnames from 'classnames';
import { chartSelectors, chartOperations } from '../../state/redux/charts';
import TimeChart from './TimeChart';
import {
- blockPerHourType,
- blockPerMinType,
- currentChannelType,
- getBlocksPerHourType,
- getBlocksPerMinType,
- getTransactionPerHourType,
- getTransactionPerMinType,
- transactionPerHourType,
- transactionPerMinType,
+ blockPerHourType,
+ blockPerMinType,
+ currentChannelType,
+ getBlocksPerHourType,
+ getBlocksPerMinType,
+ getTransactionPerHourType,
+ getTransactionPerMinType,
+ transactionPerHourType,
+ transactionPerMinType
} from '../types';
const {
- blockPerHourSelector,
- blockPerMinSelector,
- currentChannelSelector,
- transactionPerHourSelector,
- transactionPerMinSelector,
+ blockPerHourSelector,
+ blockPerMinSelector,
+ currentChannelSelector,
+ transactionPerHourSelector,
+ transactionPerMinSelector
} = chartSelectors;
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- chart: {
- color: dark ? '#ffffff' : undefined,
- backgroundColor: dark ? '#453e68' : undefined,
- },
- };
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ chart: {
+ color: dark ? '#ffffff' : undefined,
+ backgroundColor: dark ? '#453e68' : undefined
+ }
+ };
};
export class ChartStats extends Component {
- constructor(props) {
- super(props);
- this.state = {
- activeTab: '1',
- };
- }
-
- componentDidMount() {
- this.interVal = setInterval(() => {
- const { currentChannel } = this.props;
- this.syncData(currentChannel);
- }, 60000);
- }
-
- componentWillUnmount() {
- clearInterval(this.interVal);
- }
-
- syncData = (currentChannel) => {
- const {
- getBlocksPerHour,
- getBlocksPerMin,
- getTransactionPerHour,
- getTransactionPerMin,
- } = this.props;
-
- getBlocksPerMin(currentChannel);
- getBlocksPerHour(currentChannel);
- getTransactionPerMin(currentChannel);
- getTransactionPerHour(currentChannel);
- };
-
- timeDataSetup = (chartData = []) => {
- let dataMax = 0;
- const displayData = chartData.map((data) => {
- if (parseInt(data.count, 10) > dataMax) {
- dataMax = parseInt(data.count, 10);
- }
-
- return {
- datetime: moment(data.datetime)
- .tz(moment.tz.guess())
- .format('h:mm A'),
- count: data.count,
- };
- });
-
- dataMax += 5;
-
- return {
- displayData,
- dataMax,
- };
- };
-
- toggle = (tab) => {
- this.setState({
- activeTab: tab,
- });
- };
-
- render() {
- const { activeTab } = this.state;
- const {
- blockPerHour,
- blockPerMin,
- transactionPerHour,
- transactionPerMin,
- classes,
- } = this.props;
-
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- );
- }
+ constructor(props) {
+ super(props);
+ this.state = {
+ activeTab: '1'
+ };
+ }
+
+ componentDidMount() {
+ this.interVal = setInterval(() => {
+ const { currentChannel } = this.props;
+ this.syncData(currentChannel);
+ }, 60000);
+ }
+
+ componentWillUnmount() {
+ clearInterval(this.interVal);
+ }
+
+ syncData = currentChannel => {
+ const {
+ getBlocksPerHour,
+ getBlocksPerMin,
+ getTransactionPerHour,
+ getTransactionPerMin
+ } = this.props;
+
+ getBlocksPerMin(currentChannel);
+ getBlocksPerHour(currentChannel);
+ getTransactionPerMin(currentChannel);
+ getTransactionPerHour(currentChannel);
+ };
+
+ timeDataSetup = (chartData = []) => {
+ let dataMax = 0;
+ const displayData = chartData.map(data => {
+ if (parseInt(data.count, 10) > dataMax) {
+ dataMax = parseInt(data.count, 10);
+ }
+
+ return {
+ datetime: moment(data.datetime)
+ .tz(moment.tz.guess())
+ .format('h:mm A'),
+ count: data.count
+ };
+ });
+
+ dataMax += 5;
+
+ return {
+ displayData,
+ dataMax
+ };
+ };
+
+ toggle = tab => {
+ this.setState({
+ activeTab: tab
+ });
+ };
+
+ render() {
+ const { activeTab } = this.state;
+ const {
+ blockPerHour,
+ blockPerMin,
+ transactionPerHour,
+ transactionPerMin,
+ classes
+ } = this.props;
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
}
ChartStats.propTypes = {
- blockPerHour: blockPerHourType.isRequired,
- blockPerMin: blockPerMinType.isRequired,
- currentChannel: currentChannelType.isRequired,
- getBlocksPerHour: getBlocksPerHourType.isRequired,
- getBlocksPerMin: getBlocksPerMinType.isRequired,
- getTransactionPerHour: getTransactionPerHourType.isRequired,
- getTransactionPerMin: getTransactionPerMinType.isRequired,
- transactionPerHour: transactionPerHourType.isRequired,
- transactionPerMin: transactionPerMinType.isRequired,
+ blockPerHour: blockPerHourType.isRequired,
+ blockPerMin: blockPerMinType.isRequired,
+ currentChannel: currentChannelType.isRequired,
+ getBlocksPerHour: getBlocksPerHourType.isRequired,
+ getBlocksPerMin: getBlocksPerMinType.isRequired,
+ getTransactionPerHour: getTransactionPerHourType.isRequired,
+ getTransactionPerMin: getTransactionPerMinType.isRequired,
+ transactionPerHour: transactionPerHourType.isRequired,
+ transactionPerMin: transactionPerMinType.isRequired
};
export default compose(
- withStyles(styles),
- connect(
- state => ({
- blockPerHour: blockPerHourSelector(state),
- blockPerMin: blockPerMinSelector(state),
- transactionPerHour: transactionPerHourSelector(state),
- transactionPerMin: transactionPerMinSelector(state),
- currentChannel: currentChannelSelector(state),
- }),
- {
- getBlocksPerHour: chartOperations.blockPerHour,
- getBlocksPerMin: chartOperations.blockPerMin,
- getTransactionPerHour: chartOperations.transactionPerHour,
- getTransactionPerMin: chartOperations.transactionPerMin,
- },
- ),
+ withStyles(styles),
+ connect(
+ state => ({
+ blockPerHour: blockPerHourSelector(state),
+ blockPerMin: blockPerMinSelector(state),
+ transactionPerHour: transactionPerHourSelector(state),
+ transactionPerMin: transactionPerMinSelector(state),
+ currentChannel: currentChannelSelector(state)
+ }),
+ {
+ getBlocksPerHour: chartOperations.blockPerHour,
+ getBlocksPerMin: chartOperations.blockPerMin,
+ getTransactionPerHour: chartOperations.transactionPerHour,
+ getTransactionPerMin: chartOperations.transactionPerMin
+ }
+ )
)(ChartStats);
diff --git a/client/src/components/Charts/OrgPieChart.js b/client/src/components/Charts/OrgPieChart.js
index 993f669ff..9131d030e 100644
--- a/client/src/components/Charts/OrgPieChart.js
+++ b/client/src/components/Charts/OrgPieChart.js
@@ -8,6 +8,7 @@ import { PieChart, Pie, Tooltip, Legend } from 'recharts';
import { sha256 } from 'js-sha256';
import { transactionByOrgType } from '../types';
+/* istanbul ignore next */
const styles = theme => {
const { type } = theme.palette;
const dark = type === 'dark';
diff --git a/client/src/components/Header/HeaderView.js b/client/src/components/Header/HeaderView.js
index 0811e4ef8..639a4e15a 100644
--- a/client/src/components/Header/HeaderView.js
+++ b/client/src/components/Header/HeaderView.js
@@ -72,6 +72,7 @@ const {
const { currentChannelSelector } = chartSelectors;
const { channelsSelector } = tableSelectors;
+/* istanbul ignore next */
const styles = theme => {
const { type } = theme.palette;
const dark = type === 'dark';
diff --git a/client/src/components/Lists/Blocks.js b/client/src/components/Lists/Blocks.js
index c206aa855..21a1a08b3 100644
--- a/client/src/components/Lists/Blocks.js
+++ b/client/src/components/Lists/Blocks.js
@@ -16,550 +16,536 @@ import TransactionView from '../View/TransactionView';
import MultiSelect from '../Styled/MultiSelect';
import DatePicker from '../Styled/DatePicker';
import {
- blockListType,
- currentChannelType,
- getTransactionType,
- transactionType,
+ blockListType,
+ currentChannelType,
+ getTransactionType,
+ transactionType
} from '../types';
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- hash: {
- '&, & li, & ul': {
- overflow: 'visible !important',
- },
- },
- partialHash: {
- textAlign: 'center',
- position: 'relative !important',
- '&:hover $fullHash': {
- display: 'block',
- position: 'absolute !important',
- padding: '4px 4px',
- backgroundColor: dark ? '#5e558e' : '#000000',
- marginTop: -30,
- marginLeft: -215,
- borderRadius: 8,
- color: '#ffffff',
- opacity: dark ? 1 : undefined,
- },
- '&:hover $lastFullHash': {
- display: 'block',
- position: 'absolute !important',
- padding: '4px 4px',
- backgroundColor: dark ? '#5e558e' : '#000000',
- marginTop: -30,
- marginLeft: -415,
- borderRadius: 8,
- color: '#ffffff',
- opacity: dark ? 1 : undefined,
- },
- },
- fullHash: {
- display: 'none',
- },
- lastFullHash: {
- display: 'none',
- },
- filter: {
- width: '100%',
- textAlign: 'center',
- margin: '0px !important',
- },
- filterButton: {
- opacity: 0.8,
- margin: 'auto',
- width: '100% !important',
- 'margin-bottom': '4px',
- },
- searchButton: {
- opacity: 0.8,
- margin: 'auto',
- width: '100% !important',
- backgroundColor: dark ? undefined : '#086108',
- 'margin-bottom': '4px',
- },
- filterElement: {
- textAlign: 'center',
- display: 'flex',
- padding: '0px !important',
- '& > div': {
- width: '100% !important',
- marginTop: 20,
- },
- '& .label': {
- margin: '25px 10px 0px 10px',
- },
- },
- };
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ hash: {
+ '&, & li, & ul': {
+ overflow: 'visible !important'
+ }
+ },
+ partialHash: {
+ textAlign: 'center',
+ position: 'relative !important',
+ '&:hover $fullHash': {
+ display: 'block',
+ position: 'absolute !important',
+ padding: '4px 4px',
+ backgroundColor: dark ? '#5e558e' : '#000000',
+ marginTop: -30,
+ marginLeft: -215,
+ borderRadius: 8,
+ color: '#ffffff',
+ opacity: dark ? 1 : undefined
+ },
+ '&:hover $lastFullHash': {
+ display: 'block',
+ position: 'absolute !important',
+ padding: '4px 4px',
+ backgroundColor: dark ? '#5e558e' : '#000000',
+ marginTop: -30,
+ marginLeft: -415,
+ borderRadius: 8,
+ color: '#ffffff',
+ opacity: dark ? 1 : undefined
+ }
+ },
+ fullHash: {
+ display: 'none'
+ },
+ lastFullHash: {
+ display: 'none'
+ },
+ filter: {
+ width: '100%',
+ textAlign: 'center',
+ margin: '0px !important'
+ },
+ filterButton: {
+ opacity: 0.8,
+ margin: 'auto',
+ width: '100% !important',
+ 'margin-bottom': '4px'
+ },
+ searchButton: {
+ opacity: 0.8,
+ margin: 'auto',
+ width: '100% !important',
+ backgroundColor: dark ? undefined : '#086108',
+ 'margin-bottom': '4px'
+ },
+ filterElement: {
+ textAlign: 'center',
+ display: 'flex',
+ padding: '0px !important',
+ '& > div': {
+ width: '100% !important',
+ marginTop: 20
+ },
+ '& .label': {
+ margin: '25px 10px 0px 10px'
+ }
+ }
+ };
};
export class Blocks extends Component {
- constructor(props) {
- super(props);
- this.state = {
- dialogOpen: false,
- dialogOpenBlockHash: false,
- err: false,
- search: false,
- to: moment(),
- orgs: [],
- options: [],
- filtered: [],
- sorted: [],
- from: moment().subtract(1, 'days'),
- blockHash: {},
- };
- }
+ constructor(props) {
+ super(props);
+ this.state = {
+ dialogOpen: false,
+ dialogOpenBlockHash: false,
+ err: false,
+ search: false,
+ to: moment(),
+ orgs: [],
+ options: [],
+ filtered: [],
+ sorted: [],
+ from: moment().subtract(1, 'days'),
+ blockHash: {}
+ };
+ }
- componentDidMount() {
- const { blockList } = this.props;
- const selection = {};
- blockList.forEach((element) => {
- selection[element.blocknum] = false;
- });
- const opts = [];
- this.props.transactionByOrg.forEach((val) => {
- opts.push({ label: val.creator_msp_id, value: val.creator_msp_id });
- });
- this.setState({ selection, options: opts });
- }
+ componentDidMount() {
+ const { blockList } = this.props;
+ const selection = {};
+ blockList.forEach(element => {
+ selection[element.blocknum] = false;
+ });
+ const opts = [];
+ this.props.transactionByOrg.forEach(val => {
+ opts.push({ label: val.creator_msp_id, value: val.creator_msp_id });
+ });
+ this.setState({ selection, options: opts });
+ }
- componentWillReceiveProps(nextProps) {
- if (
- this.state.search
- && nextProps.currentChannel !== this.props.currentChannel
- ) {
- if (this.interval !== undefined) {
- clearInterval(this.interval);
- }
- this.interval = setInterval(() => {
- this.searchBlockList(nextProps.currentChannel);
- }, 60000);
- this.searchBlockList(nextProps.currentChannel);
- }
- }
+ componentWillReceiveProps(nextProps) {
+ if (
+ this.state.search &&
+ nextProps.currentChannel !== this.props.currentChannel
+ ) {
+ if (this.interval !== undefined) {
+ clearInterval(this.interval);
+ }
+ this.interval = setInterval(() => {
+ this.searchBlockList(nextProps.currentChannel);
+ }, 60000);
+ this.searchBlockList(nextProps.currentChannel);
+ }
+ }
- componentWillUnmount() {
- clearInterval(this.interVal);
- }
+ componentWillUnmount() {
+ clearInterval(this.interVal);
+ }
- handleCustomRender(selected, options) {
- if (selected.length === 0) {
- return 'Select Orgs';
- }
- if (selected.length === options.length) {
- return 'All Orgs Selected';
- }
+ handleCustomRender(selected, options) {
+ if (selected.length === 0) {
+ return 'Select Orgs';
+ }
+ if (selected.length === options.length) {
+ return 'All Orgs Selected';
+ }
- return selected.join(',');
- }
+ return selected.join(',');
+ }
- searchBlockList = async (channel) => {
- let query = `from=${new Date(this.state.from).toString()}&&to=${new Date(
- this.state.to,
- ).toString()}`;
- for (let i = 0; i < this.state.orgs.length; i++) {
- query += `&&orgs=${this.state.orgs[i]}`;
- }
- let channelhash = this.props.currentChannel;
- if (channel !== undefined) {
- channelhash = channel;
- }
- await this.props.getBlockListSearch(channelhash, query);
- };
+ searchBlockList = async channel => {
+ let query = `from=${new Date(this.state.from).toString()}&&to=${new Date(
+ this.state.to
+ ).toString()}`;
+ for (let i = 0; i < this.state.orgs.length; i++) {
+ query += `&&orgs=${this.state.orgs[i]}`;
+ }
+ let channelhash = this.props.currentChannel;
+ if (channel !== undefined) {
+ channelhash = channel;
+ }
+ await this.props.getBlockListSearch(channelhash, query);
+ };
- handleDialogOpen = async (tid) => {
- const { getTransaction, currentChannel } = this.props;
- await getTransaction(currentChannel, tid);
- this.setState({ dialogOpen: true });
- };
+ handleDialogOpen = async tid => {
+ const { getTransaction, currentChannel } = this.props;
+ await getTransaction(currentChannel, tid);
+ this.setState({ dialogOpen: true });
+ };
- handleMultiSelect = (value) => {
- this.setState({ orgs: value });
- };
+ handleMultiSelect = value => {
+ this.setState({ orgs: value });
+ };
- handleDialogClose = () => {
- this.setState({ dialogOpen: false });
- };
+ handleDialogClose = () => {
+ this.setState({ dialogOpen: false });
+ };
- handleSearch = async () => {
- if (this.interval !== undefined) {
- clearInterval(this.interval);
- }
- this.interval = setInterval(() => {
- this.searchBlockList();
- }, 60000);
- await this.searchBlockList();
- this.setState({ search: true });
- };
+ handleSearch = async () => {
+ if (this.interval !== undefined) {
+ clearInterval(this.interval);
+ }
+ this.interval = setInterval(() => {
+ this.searchBlockList();
+ }, 60000);
+ await this.searchBlockList();
+ this.setState({ search: true });
+ };
- handleClearSearch = () => {
- if (this.interval !== undefined) {
- clearInterval(this.interval);
- }
- this.setState({
- search: false,
- to: moment(),
- orgs: [],
- err: false,
- from: moment().subtract(1, 'days'),
- });
- };
+ handleClearSearch = () => {
+ if (this.interval !== undefined) {
+ clearInterval(this.interval);
+ }
+ this.setState({
+ search: false,
+ to: moment(),
+ orgs: [],
+ err: false,
+ from: moment().subtract(1, 'days')
+ });
+ };
- handleDialogOpenBlockHash = (blockHash) => {
- const blockList = this.state.search
- ? this.props.blockListSearch
- : this.props.blockList;
- const data = find(blockList, item => item.blockhash === blockHash);
+ handleDialogOpenBlockHash = blockHash => {
+ const blockList = this.state.search
+ ? this.props.blockListSearch
+ : this.props.blockList;
+ const data = find(blockList, item => item.blockhash === blockHash);
- this.setState({
- dialogOpenBlockHash: true,
- blockHash: data,
- });
- };
+ this.setState({
+ dialogOpenBlockHash: true,
+ blockHash: data
+ });
+ };
- handleDialogCloseBlockHash = () => {
- this.setState({ dialogOpenBlockHash: false });
- };
+ handleDialogCloseBlockHash = () => {
+ this.setState({ dialogOpenBlockHash: false });
+ };
- handleEye = (row, val) => {
- const { selection } = this.state;
- const data = Object.assign({}, selection, { [row.index]: !val });
- this.setState({ selection: data });
- };
+ handleEye = (row, val) => {
+ const { selection } = this.state;
+ const data = Object.assign({}, selection, { [row.index]: !val });
+ this.setState({ selection: data });
+ };
- reactTableSetup = classes => [
- {
- Header: 'Block Number',
- accessor: 'blocknum',
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['blocknum'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- width: 150,
- },
- {
- Header: 'Channel Name',
- accessor: 'channelname',
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['channelname'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- {
- Header: 'Number of Tx',
- accessor: 'txcount',
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['txcount'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- width: 150,
- },
- {
- Header: 'Data Hash',
- accessor: 'datahash',
- className: classes.hash,
- Cell: row => (
-
-
-
- {row.value}
-
- {' '}
- {row.value.slice(0, 6)}
- {' '}
- {!row.value ? '' : '... '}
-
- {' '}
-
- ),
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['datahash'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- {
- Header: 'Block Hash',
- accessor: 'blockhash',
- className: classes.hash,
- Cell: row => (
-
- this.handleDialogOpenBlockHash(row.value)}
- href="#/blocks"
- >
-
- {row.value}
-
- {' '}
- {row.value.slice(0, 6)}
- {' '}
- {!row.value ? '' : '... '}
-
- {' '}
-
- ),
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['blockhash'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- {
- Header: 'Previous Hash',
- accessor: 'prehash',
- className: classes.hash,
- Cell: row => (
-
- this.handleDialogOpenBlockHash(row.value)}
- href="#/blocks"
- >
-
- {row.value}
-
- {' '}
- {row.value.slice(0, 6)}
- {' '}
- {!row.value ? '' : '... '}
-
- {' '}
-
- ),
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['prehash'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- width: 150,
- },
- {
- Header: 'Transactions',
- accessor: 'txhash',
- className: classes.hash,
- Cell: row => (
-
- ),
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['txhash'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- ];
+ reactTableSetup = classes => [
+ {
+ Header: 'Block Number',
+ accessor: 'blocknum',
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['blocknum'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true,
+ width: 150
+ },
+ {
+ Header: 'Channel Name',
+ accessor: 'channelname',
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['channelname'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ },
+ {
+ Header: 'Number of Tx',
+ accessor: 'txcount',
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['txcount'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true,
+ width: 150
+ },
+ {
+ Header: 'Data Hash',
+ accessor: 'datahash',
+ className: classes.hash,
+ Cell: row => (
+
+
+
+ {row.value}
+
{' '}
+ {row.value.slice(0, 6)} {!row.value ? '' : '... '}
+
{' '}
+
+ ),
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['datahash'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ },
+ {
+ Header: 'Block Hash',
+ accessor: 'blockhash',
+ className: classes.hash,
+ Cell: row => (
+
+ this.handleDialogOpenBlockHash(row.value)}
+ href="#/blocks"
+ >
+
+ {row.value}
+
{' '}
+ {row.value.slice(0, 6)} {!row.value ? '' : '... '}
+ {' '}
+
+ ),
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['blockhash'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ },
+ {
+ Header: 'Previous Hash',
+ accessor: 'prehash',
+ className: classes.hash,
+ Cell: row => (
+
+ this.handleDialogOpenBlockHash(row.value)}
+ href="#/blocks"
+ >
+
+ {row.value}
+
{' '}
+ {row.value.slice(0, 6)} {!row.value ? '' : '... '}
+
{' '}
+
+ ),
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['prehash'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true,
+ width: 150
+ },
+ {
+ Header: 'Transactions',
+ accessor: 'txhash',
+ className: classes.hash,
+ Cell: row => (
+
+ ),
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['txhash'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ }
+ ];
- render() {
- const blockList = this.state.search
- ? this.props.blockListSearch
- : this.props.blockList;
- const { transaction, classes } = this.props;
- const { blockHash, dialogOpen, dialogOpenBlockHash } = this.state;
- return (
-
-
-
-
- {
- if (date > this.state.to) {
- this.setState({ err: true, from: date });
- } else {
- this.setState({ from: date, err: false });
- }
- }}
- />
-
-
-
-
{
- if (date > this.state.from) {
- this.setState({ to: date, err: false });
- } else {
- this.setState({ err: true, to: date });
- }
- }}
- >
-
- {this.state.err && (
-
- {' '}
- From date should be less than To date
-
- )}
-
-
-
-
- {
- this.handleMultiSelect(value);
- }}
- />
-
-
-
-
-
-
-
-
-
-
-
-
{
- this.setState({ sorted });
- }}
- filtered={this.state.filtered}
- onFilteredChange={(filtered) => {
- this.setState({ filtered });
- }}
- minRows={0}
- style={{ height: '750px' }}
- showPagination={!(blockList.length < 5)}
- />
+ render() {
+ const blockList = this.state.search
+ ? this.props.blockListSearch
+ : this.props.blockList;
+ const { transaction, classes } = this.props;
+ const { blockHash, dialogOpen, dialogOpenBlockHash } = this.state;
+ return (
+
+
+
+
+ {
+ if (date > this.state.to) {
+ this.setState({ err: true, from: date });
+ } else {
+ this.setState({ from: date, err: false });
+ }
+ }}
+ />
+
+
+
+
{
+ if (date > this.state.from) {
+ this.setState({ to: date, err: false });
+ } else {
+ this.setState({ err: true, to: date });
+ }
+ }}
+ >
+
+ {this.state.err && (
+
+ {' '}
+ From date should be less than To date
+
+ )}
+
+
+
+
+ {
+ this.handleMultiSelect(value);
+ }}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
{
+ this.setState({ sorted });
+ }}
+ filtered={this.state.filtered}
+ onFilteredChange={filtered => {
+ this.setState({ filtered });
+ }}
+ minRows={0}
+ style={{ height: '750px' }}
+ showPagination={!(blockList.length < 5)}
+ />
-
+
-
-
- );
- }
+
+
+ );
+ }
}
Blocks.propTypes = {
- blockList: blockListType.isRequired,
- currentChannel: currentChannelType.isRequired,
- getTransaction: getTransactionType.isRequired,
- transaction: transactionType,
+ blockList: blockListType.isRequired,
+ currentChannel: currentChannelType.isRequired,
+ getTransaction: getTransactionType.isRequired,
+ transaction: transactionType
};
Blocks.defaultProps = {
- transaction: null,
+ transaction: null
};
export default withStyles(styles)(Blocks);
diff --git a/client/src/components/Lists/TimelineStream.js b/client/src/components/Lists/TimelineStream.js
index 37dd863a5..4e70546a3 100644
--- a/client/src/components/Lists/TimelineStream.js
+++ b/client/src/components/Lists/TimelineStream.js
@@ -15,158 +15,136 @@ import BlockView from '../View/BlockView';
import blockOpen from '../../static/images/blockOpen.png';
import { blockListType, notificationsType } from '../types';
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- scrollable: {
- height: 300,
- overflowY: 'scroll',
- },
- text: {
- color: dark ? '#ffffff' : undefined,
- '& .badge-secondary': {
- backgroundColor: '#5e548f',
- },
- },
- event: {
- wordWrap: 'break-word',
- width: '90% !important',
- backgroundColor: dark ? '#423b5f !important' : undefined,
- '& p': {
- color: dark ? '#ffffff' : undefined,
- },
- '& > div': {
- color: dark ? 'red' : undefined,
- },
- },
- open: {
- height: 35,
- marginTop: -10,
- backgroundColor: 'transparent',
- },
- };
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ scrollable: {
+ height: 300,
+ overflowY: 'scroll'
+ },
+ text: {
+ color: dark ? '#ffffff' : undefined,
+ '& .badge-secondary': {
+ backgroundColor: '#5e548f'
+ }
+ },
+ event: {
+ wordWrap: 'break-word',
+ width: '90% !important',
+ backgroundColor: dark ? '#423b5f !important' : undefined,
+ '& p': {
+ color: dark ? '#ffffff' : undefined
+ },
+ '& > div': {
+ color: dark ? 'red' : undefined
+ }
+ },
+ open: {
+ height: 35,
+ marginTop: -10,
+ backgroundColor: 'transparent'
+ }
+ };
};
export class TimelineStream extends Component {
- constructor(props) {
- super(props);
- this.state = {
- dialogOpenBlockHash: false,
- blockHash: {},
- };
- }
+ constructor(props) {
+ super(props);
+ this.state = {
+ dialogOpenBlockHash: false,
+ blockHash: {}
+ };
+ }
- handleDialogOpenBlockHash = (rowValue) => {
- const { blockList } = this.props;
- const data = find(blockList, item => item.blockhash === rowValue);
- this.setState({
- dialogOpenBlockHash: true,
- blockHash: data,
- });
- };
+ handleDialogOpenBlockHash = rowValue => {
+ const { blockList } = this.props;
+ const data = find(blockList, item => item.blockhash === rowValue);
+ this.setState({
+ dialogOpenBlockHash: true,
+ blockHash: data
+ });
+ };
- handleDialogCloseBlockHash = () => {
- this.setState({ dialogOpenBlockHash: false });
- };
+ handleDialogCloseBlockHash = () => {
+ this.setState({ dialogOpenBlockHash: false });
+ };
- render() {
- const { notifications, classes } = this.props;
- const { blockHash, dialogOpenBlockHash } = this.state;
- return (
-
-
-
- {notifications.map(item => (
- }
- iconColor="#0D3799"
- container="card"
- className={classes.event}
- titleStyle={{ fontWeight: 'bold' }}
- style={{ width: '65%' }}
- cardHeaderStyle={{
- backgroundColor: '#6283D0',
- fontSize: '13pt',
- }}
- contentStyle={{
- backgroundColor: 'transparent',
- }}
- buttons={(
- this.handleDialogOpenBlockHash(item.blockhash)
- }
- >
-
-
-)}
- >
-
-
- {' '}
-Channel Name:
-
- {' '}
- {item.channelName}
- {' '}
-
-
- {' '}
-Datahash:
-
- {' '}
- {item.datahash}
- {' '}
-
-
- {' '}
-Number of Tx:
-
- {' '}
- {item.txcount}
-
-
-
-
-
-
-
- ))}
-
-
+ render() {
+ const { notifications, classes } = this.props;
+ const { blockHash, dialogOpenBlockHash } = this.state;
+ return (
+
+
+
+ {notifications.map(item => (
+ }
+ iconColor="#0D3799"
+ container="card"
+ className={classes.event}
+ titleStyle={{ fontWeight: 'bold' }}
+ style={{ width: '65%' }}
+ cardHeaderStyle={{
+ backgroundColor: '#6283D0',
+ fontSize: '13pt'
+ }}
+ contentStyle={{
+ backgroundColor: 'transparent'
+ }}
+ buttons={(
+ this.handleDialogOpenBlockHash(item.blockhash)}
+ >
+
+
+ )}
+ >
+
+ Channel Name: {item.channelName}{' '}
+
+ Datahash: {item.datahash}
+ Number of Tx: {item.txcount}
+
+
+
+
+
+
+
+ ))}
+
+
-
-
- );
- }
+
+
+ );
+ }
}
TimelineStream.propTypes = {
- blockList: blockListType.isRequired,
- notifications: notificationsType.isRequired,
+ blockList: blockListType.isRequired,
+ notifications: notificationsType.isRequired
};
export default withStyles(styles)(TimelineStream);
diff --git a/client/src/components/Lists/Transactions.js b/client/src/components/Lists/Transactions.js
index 50d98e9d0..07c93c364 100644
--- a/client/src/components/Lists/Transactions.js
+++ b/client/src/components/Lists/Transactions.js
@@ -14,424 +14,426 @@ import DatePicker from '../Styled/DatePicker';
import MultiSelect from '../Styled/MultiSelect';
import {
- currentChannelType,
- getTransactionType,
- transactionListType,
- transactionType,
+ currentChannelType,
+ getTransactionType,
+ transactionListType,
+ transactionType
} from '../types';
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- hash: {
- '&, & li': {
- overflow: 'visible !important',
- },
- },
- partialHash: {
- textAlign: 'center',
- position: 'relative !important',
- '&:hover $lastFullHash': {
- marginLeft: -400,
- },
- '&:hover $fullHash': {
- display: 'block',
- position: 'absolute !important',
- padding: '4px 4px',
- backgroundColor: dark ? '#5e558e' : '#000000',
- marginTop: -30,
- marginLeft: -215,
- borderRadius: 8,
- color: '#ffffff',
- opacity: dark ? 1 : undefined,
- },
- },
- fullHash: {
- display: 'none',
- },
- lastFullHash: {},
- filter: {
- width: '100%',
- textAlign: 'center',
- margin: '0px !important',
- },
- filterButton: {
- opacity: 0.8,
- margin: 'auto',
- width: '100% !important',
- 'margin-bottom': '4px',
- },
- searchButton: {
- opacity: 0.8,
- margin: 'auto',
- width: '100% !important',
- backgroundColor: dark ? undefined : '#086108',
- 'margin-bottom': '4px',
- },
- filterElement: {
- textAlign: 'center',
- display: 'flex',
- padding: '0px !important',
- '& > div': {
- width: '100% !important',
- marginTop: 20,
- },
- '& .label': {
- margin: '25px 10px 0px 10px',
- },
- },
- };
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ hash: {
+ '&, & li': {
+ overflow: 'visible !important'
+ }
+ },
+ partialHash: {
+ textAlign: 'center',
+ position: 'relative !important',
+ '&:hover $lastFullHash': {
+ marginLeft: -400
+ },
+ '&:hover $fullHash': {
+ display: 'block',
+ position: 'absolute !important',
+ padding: '4px 4px',
+ backgroundColor: dark ? '#5e558e' : '#000000',
+ marginTop: -30,
+ marginLeft: -215,
+ borderRadius: 8,
+ color: '#ffffff',
+ opacity: dark ? 1 : undefined
+ }
+ },
+ fullHash: {
+ display: 'none'
+ },
+ lastFullHash: {},
+ filter: {
+ width: '100%',
+ textAlign: 'center',
+ margin: '0px !important'
+ },
+ filterButton: {
+ opacity: 0.8,
+ margin: 'auto',
+ width: '100% !important',
+ 'margin-bottom': '4px'
+ },
+ searchButton: {
+ opacity: 0.8,
+ margin: 'auto',
+ width: '100% !important',
+ backgroundColor: dark ? undefined : '#086108',
+ 'margin-bottom': '4px'
+ },
+ filterElement: {
+ textAlign: 'center',
+ display: 'flex',
+ padding: '0px !important',
+ '& > div': {
+ width: '100% !important',
+ marginTop: 20
+ },
+ '& .label': {
+ margin: '25px 10px 0px 10px'
+ }
+ }
+ };
};
export class Transactions extends Component {
- constructor(props) {
- super(props);
- this.state = {
- dialogOpen: false,
- search: false,
- to: moment(),
- orgs: [],
- options: [],
- filtered: [],
- sorted: [],
- err: false,
- from: moment().subtract(1, 'days'),
- };
- }
+ constructor(props) {
+ super(props);
+ this.state = {
+ dialogOpen: false,
+ search: false,
+ to: moment(),
+ orgs: [],
+ options: [],
+ filtered: [],
+ sorted: [],
+ err: false,
+ from: moment().subtract(1, 'days')
+ };
+ }
- componentDidMount() {
- const { transactionList } = this.props;
- const selection = {};
- transactionList.forEach((element) => {
- selection[element.blocknum] = false;
- });
- const opts = [];
- this.props.transactionByOrg.forEach((val) => {
- opts.push({ label: val.creator_msp_id, value: val.creator_msp_id });
- });
- this.setState({ selection, options: opts });
- }
+ componentDidMount() {
+ const { transactionList } = this.props;
+ const selection = {};
+ transactionList.forEach(element => {
+ selection[element.blocknum] = false;
+ });
+ const opts = [];
+ this.props.transactionByOrg.forEach(val => {
+ opts.push({ label: val.creator_msp_id, value: val.creator_msp_id });
+ });
+ this.setState({ selection, options: opts });
+ }
- componentWillReceiveProps(nextProps) {
- if (
- this.state.search
- && nextProps.currentChannel !== this.props.currentChannel
- ) {
- if (this.interval !== undefined) {
- clearInterval(this.interval);
- }
- this.interval = setInterval(() => {
- this.searchTransactionList(nextProps.currentChannel);
- }, 60000);
- this.searchTransactionList(nextProps.currentChannel);
- }
- }
+ componentWillReceiveProps(nextProps) {
+ if (
+ this.state.search &&
+ nextProps.currentChannel !== this.props.currentChannel
+ ) {
+ if (this.interval !== undefined) {
+ clearInterval(this.interval);
+ }
+ this.interval = setInterval(() => {
+ this.searchTransactionList(nextProps.currentChannel);
+ }, 60000);
+ this.searchTransactionList(nextProps.currentChannel);
+ }
+ }
- componentWillUnmount() {
- clearInterval(this.interVal);
- }
+ componentWillUnmount() {
+ clearInterval(this.interVal);
+ }
- handleCustomRender(selected, options) {
- if (selected.length === 0) {
- return 'Select Orgs';
- }
- if (selected.length === options.length) {
- return 'All Orgs Selected';
- }
+ handleCustomRender(selected, options) {
+ if (selected.length === 0) {
+ return 'Select Orgs';
+ }
+ if (selected.length === options.length) {
+ return 'All Orgs Selected';
+ }
- return selected.join(',');
- }
+ return selected.join(',');
+ }
- searchTransactionList = async (channel) => {
- let query = `from=${new Date(this.state.from).toString()}&&to=${new Date(
- this.state.to,
- ).toString()}`;
- for (let i = 0; i < this.state.orgs.length; i++) {
- query += `&&orgs=${this.state.orgs[i]}`;
- }
- let channelhash = this.props.currentChannel;
- if (channel !== undefined) {
- channelhash = channel;
- }
- await this.props.getTransactionListSearch(channelhash, query);
- };
+ searchTransactionList = async channel => {
+ let query = `from=${new Date(this.state.from).toString()}&&to=${new Date(
+ this.state.to
+ ).toString()}`;
+ for (let i = 0; i < this.state.orgs.length; i++) {
+ query += `&&orgs=${this.state.orgs[i]}`;
+ }
+ let channelhash = this.props.currentChannel;
+ if (channel !== undefined) {
+ channelhash = channel;
+ }
+ await this.props.getTransactionListSearch(channelhash, query);
+ };
- handleDialogOpen = async (tid) => {
- const { currentChannel, getTransaction } = this.props;
- await getTransaction(currentChannel, tid);
- this.setState({ dialogOpen: true });
- };
+ handleDialogOpen = async tid => {
+ const { currentChannel, getTransaction } = this.props;
+ await getTransaction(currentChannel, tid);
+ this.setState({ dialogOpen: true });
+ };
- handleMultiSelect = (value) => {
- this.setState({ orgs: value });
- };
+ handleMultiSelect = value => {
+ this.setState({ orgs: value });
+ };
- handleDialogClose = () => {
- this.setState({ dialogOpen: false });
- };
+ handleDialogClose = () => {
+ this.setState({ dialogOpen: false });
+ };
- handleSearch = async () => {
- if (this.interval !== undefined) {
- clearInterval(this.interval);
- }
- this.interval = setInterval(() => {
- this.searchTransactionList();
- }, 60000);
- await this.searchTransactionList();
- this.setState({ search: true });
- };
+ handleSearch = async () => {
+ if (this.interval !== undefined) {
+ clearInterval(this.interval);
+ }
+ this.interval = setInterval(() => {
+ this.searchTransactionList();
+ }, 60000);
+ await this.searchTransactionList();
+ this.setState({ search: true });
+ };
- handleClearSearch = () => {
- this.setState({
- search: false,
- to: moment(),
- orgs: [],
- err: false,
- from: moment().subtract(1, 'days'),
- });
- };
+ handleClearSearch = () => {
+ this.setState({
+ search: false,
+ to: moment(),
+ orgs: [],
+ err: false,
+ from: moment().subtract(1, 'days')
+ });
+ };
- handleEye = (row, val) => {
- const { selection } = this.state;
- const data = Object.assign({}, selection, { [row.index]: !val });
- this.setState({ selection: data });
- };
+ handleEye = (row, val) => {
+ const { selection } = this.state;
+ const data = Object.assign({}, selection, { [row.index]: !val });
+ this.setState({ selection: data });
+ };
- render() {
- const { classes } = this.props;
- const columnHeaders = [
- {
- Header: 'Creator',
- accessor: 'creator_msp_id',
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['creator_msp_id'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- {
- Header: 'Channel Name',
- accessor: 'channelname',
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['channelname'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- {
- Header: 'Tx Id',
- accessor: 'txhash',
- className: classes.hash,
- Cell: row => (
-
- this.handleDialogOpen(row.value)}
- href="#/transactions"
- >
-
- {row.value}
-
- {' '}
- {row.value.slice(0, 6)}
- {!row.value ? '' : '... '}
-
-
- ),
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['txhash'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- {
- Header: 'Type',
- accessor: 'type',
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['type'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- {
- Header: 'Chaincode',
- accessor: 'chaincodename',
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['chaincodename'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- {
- Header: 'Timestamp',
- accessor: 'createdt',
- filterMethod: (filter, rows) => matchSorter(
- rows,
- filter.value,
- { keys: ['createdt'] },
- { threshold: matchSorter.rankings.SIMPLEMATCH },
- ),
- filterAll: true,
- },
- ];
+ render() {
+ const { classes } = this.props;
+ const columnHeaders = [
+ {
+ Header: 'Creator',
+ accessor: 'creator_msp_id',
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['creator_msp_id'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ },
+ {
+ Header: 'Channel Name',
+ accessor: 'channelname',
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['channelname'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ },
+ {
+ Header: 'Tx Id',
+ accessor: 'txhash',
+ className: classes.hash,
+ Cell: row => (
+
+ this.handleDialogOpen(row.value)}
+ href="#/transactions"
+ >
+
+ {row.value}
+
{' '}
+ {row.value.slice(0, 6)}
+ {!row.value ? '' : '... '}
+
+
+ ),
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['txhash'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ },
+ {
+ Header: 'Type',
+ accessor: 'type',
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['type'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ },
+ {
+ Header: 'Chaincode',
+ accessor: 'chaincodename',
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['chaincodename'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ },
+ {
+ Header: 'Timestamp',
+ accessor: 'createdt',
+ filterMethod: (filter, rows) =>
+ matchSorter(
+ rows,
+ filter.value,
+ { keys: ['createdt'] },
+ { threshold: matchSorter.rankings.SIMPLEMATCH }
+ ),
+ filterAll: true
+ }
+ ];
- const transactionList = this.state.search
- ? this.props.transactionListSearch
- : this.props.transactionList;
- const { transaction } = this.props;
- const { dialogOpen } = this.state;
- return (
-
-
-
-
- {
- if (date > this.state.to) {
- this.setState({ err: true, from: date });
- } else {
- this.setState({ from: date, err: false });
- }
- }}
- />
-
-
-
-
{
- if (date > this.state.from) {
- this.setState({ to: date, err: false });
- } else {
- this.setState({ err: true, to: date });
- }
- }}
- >
-
- {this.state.err && (
-
- {' '}
- From date should be less than To date
-
- )}
-
-
-
-
- {
- this.handleMultiSelect(value);
- }}
- />
-
-
-
-
-
-
-
-
-
-
-
-
{
- this.setState({ sorted });
- }}
- filtered={this.state.filtered}
- onFilteredChange={(filtered) => {
- this.setState({ filtered });
- }}
- minRows={0}
- style={{ height: '750px' }}
- showPagination={!(transactionList.length < 5)}
- />
+ const transactionList = this.state.search
+ ? this.props.transactionListSearch
+ : this.props.transactionList;
+ const { transaction } = this.props;
+ const { dialogOpen } = this.state;
+ return (
+
+
+
+
+ {
+ if (date > this.state.to) {
+ this.setState({ err: true, from: date });
+ } else {
+ this.setState({ from: date, err: false });
+ }
+ }}
+ />
+
+
+
+
{
+ if (date > this.state.from) {
+ this.setState({ to: date, err: false });
+ } else {
+ this.setState({ err: true, to: date });
+ }
+ }}
+ >
+
+ {this.state.err && (
+
+ {' '}
+ From date should be less than To date
+
+ )}
+
+
+
+
+ {
+ this.handleMultiSelect(value);
+ }}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
{
+ this.setState({ sorted });
+ }}
+ filtered={this.state.filtered}
+ onFilteredChange={filtered => {
+ this.setState({ filtered });
+ }}
+ minRows={0}
+ style={{ height: '750px' }}
+ showPagination={!(transactionList.length < 5)}
+ />
-
-
- );
- }
+
+
+ );
+ }
}
Transactions.propTypes = {
- currentChannel: currentChannelType.isRequired,
- getTransaction: getTransactionType.isRequired,
- transaction: transactionType,
- transactionList: transactionListType.isRequired,
+ currentChannel: currentChannelType.isRequired,
+ getTransaction: getTransactionType.isRequired,
+ transaction: transactionType,
+ transactionList: transactionListType.isRequired
};
Transactions.defaultProps = {
- transaction: null,
+ transaction: null
};
export default withStyles(styles)(Transactions);
diff --git a/client/src/components/Panels/AdminPanel.js b/client/src/components/Panels/AdminPanel.js
index f27bc510d..cc15f1301 100644
--- a/client/src/components/Panels/AdminPanel.js
+++ b/client/src/components/Panels/AdminPanel.js
@@ -7,8 +7,8 @@ import compose from 'recompose/compose';
import { withStyles } from '@material-ui/core/styles';
import { connect } from 'react-redux';
import ExpansionPanel, {
- ExpansionPanelSummary,
- ExpansionPanelDetails,
+ ExpansionPanelSummary,
+ ExpansionPanelDetails
} from '@material-ui/core/ExpansionPanel';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import Typography from '@material-ui/core/Typography';
@@ -18,86 +18,80 @@ import { FormControl, FormHelperText } from '@material-ui/core/FormControl';
import Select from '@material-ui/core/Select';
import ChannelForm from '../Forms/ChannelForm';
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- current: {
- color: dark ? 'rgb(42, 173, 230)' : undefined,
- },
- panel: {
- color: dark ? '#ffffff' : undefined,
- backgroundColor: dark ? '#3c3558' : undefined,
- },
- channel: {
- width: 200,
- },
- };
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ current: {
+ color: dark ? 'rgb(42, 173, 230)' : undefined
+ },
+ panel: {
+ color: dark ? '#ffffff' : undefined,
+ backgroundColor: dark ? '#3c3558' : undefined
+ },
+ channel: {
+ width: 200
+ }
+ };
};
class AdminPanel extends Component {
- handleChange = () => {};
+ handleChange = () => {};
- render() {
- const { classes } = this.props;
- return (
-
-
-
- {' '}
-ADMIN PANEL
-
-
- }
- className={classes.panel}
- >
-
- MANAGE CHANNEL
- {' '}
-
-
- {this.props.channel.currentChannel}
- {' '}
-
-
-
-
- {/*
+ render() {
+ const { classes } = this.props;
+ return (
+
+
+ ADMIN PANEL
+
+
+ }
+ className={classes.panel}
+ >
+
+ MANAGE CHANNEL{' '}
+
+
+ {this.props.channel.currentChannel}
+
+
+
+ {/*
Select Channel
*/}
-
- {/*
+
+ {/*
*/}
-
-
-
- }
- >
-
- ADD CHANNEL
-
-
-
-
-
-
-
- );
- }
+
+
+
+ }
+ >
+
+ ADD CHANNEL
+
+
+
+
+
+
+
+ );
+ }
}
function mapStateToProps(state, ownProps) {
- return {
- channelList: state.channelList.channelList,
- channel: state.channel.channel,
- };
+ return {
+ channelList: state.channelList.channelList,
+ channel: state.channel.channel
+ };
}
// function mapDispatchToProps(dispatch){
// return {actions: bindActionCreators({...partActions,...secActions}, dispatch)}
// }
export default compose(
- withStyles(styles),
- connect(mapStateToProps /* ,mapDispatchToProps */),
+ withStyles(styles),
+ connect(mapStateToProps /* ,mapDispatchToProps */)
)(AdminPanel);
diff --git a/client/src/components/Styled/DatePicker.js b/client/src/components/Styled/DatePicker.js
index f1ce0e455..2374bb173 100644
--- a/client/src/components/Styled/DatePicker.js
+++ b/client/src/components/Styled/DatePicker.js
@@ -7,54 +7,55 @@ import { withStyles } from '@material-ui/core/styles';
import ReactDatePicker from 'react-datepicker';
import 'react-datepicker/dist/react-datepicker.css';
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- date: {
- [`
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ date: {
+ [`
& .react-datepicker__input-container,
& .react-datepicker-wrapper *,
& .react-datepicker-wrapper
`]: {
- width: '100% !important',
- textAlign: 'center',
- },
- '& .react-datepicker-popper': {
- minWidth: 320,
- },
- '& .react-datepicker__time-list': {
- paddingLeft: '0px',
- },
- '& .react-datepicker__input-container *': {
- borderColor: 'rgb(211, 210, 210)',
- borderRadius: 5,
- height: 36,
- },
- '& .react-datepicker': {
- backgroundColor: dark ? '#7165ae !important' : undefined,
- },
- '& .react-datepicker__time': {
- backgroundColor: dark ? '#7165ae !important' : undefined,
- },
- '& .react-datepicker__header': {
- backgroundColor: dark ? '#564d81 !important' : undefined,
- },
- '& .react-datepicker__input-container > input': {
- background: dark ? '#7165ae' : undefined,
- color: dark ? '#ffffff' : undefined,
- },
- },
- };
+ width: '100% !important',
+ textAlign: 'center'
+ },
+ '& .react-datepicker-popper': {
+ minWidth: 320
+ },
+ '& .react-datepicker__time-list': {
+ paddingLeft: '0px'
+ },
+ '& .react-datepicker__input-container *': {
+ borderColor: 'rgb(211, 210, 210)',
+ borderRadius: 5,
+ height: 36
+ },
+ '& .react-datepicker': {
+ backgroundColor: dark ? '#7165ae !important' : undefined
+ },
+ '& .react-datepicker__time': {
+ backgroundColor: dark ? '#7165ae !important' : undefined
+ },
+ '& .react-datepicker__header': {
+ backgroundColor: dark ? '#564d81 !important' : undefined
+ },
+ '& .react-datepicker__input-container > input': {
+ background: dark ? '#7165ae' : undefined,
+ color: dark ? '#ffffff' : undefined
+ }
+ }
+ };
};
-const DatePicker = (props) => {
- const { classes, ...rest } = props;
- return (
-
-
-
- );
+const DatePicker = props => {
+ const { classes, ...rest } = props;
+ return (
+
+
+
+ );
};
export default withStyles(styles)(DatePicker);
diff --git a/client/src/components/Styled/MultiSelect.js b/client/src/components/Styled/MultiSelect.js
index 08b040cbe..73e3d58d4 100644
--- a/client/src/components/Styled/MultiSelect.js
+++ b/client/src/components/Styled/MultiSelect.js
@@ -6,56 +6,57 @@ import React from 'react';
import MultiSelect from '@khanacademy/react-multi-select';
import { withStyles } from '@material-ui/core/styles';
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- multi: {
- '& .multi-select': {
- backgroundColor: dark ? '#7165ae !important' : undefined,
- },
- '& .multi-select .select-item': {
- textAlign: 'left !important',
- },
- '& .dropdown ': {
- backgroundColor: dark ? '#7165ae !important' : undefined,
- },
- '& .dropdown-heading': {
- backgroundColor: dark ? '#7165ae !important' : undefined,
- color: dark ? '#fff !important' : undefined,
- },
- '& .multi-select * input': {
- backgroundColor: dark ? '#7165ae! important' : undefined,
- color: dark ? '#fff !important' : undefined,
- },
- '& .multi-select .select-item,.dropdown-content': {
- backgroundColor: dark ? '#7165ae !important' : undefined,
- color: dark ? '#fff !important' : undefined,
- },
- '& .multi-select .select-item:hover': {
- backgroundColor: dark ? '#594aa5 !important' : undefined,
- },
- '& .multi-select .select-item:visited': {
- backgroundColor: dark ? '#594aa5 !important' : undefined,
- },
- '& ::-webkit-input-placeholder ': {
- /* Chrome/Opera/Safari */
- color: dark ? '#fff !important' : undefined,
- },
- '& .dropdown-heading-value': {
- color: dark ? '#fff !important' : undefined,
- },
- },
- };
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ multi: {
+ '& .multi-select': {
+ backgroundColor: dark ? '#7165ae !important' : undefined
+ },
+ '& .multi-select .select-item': {
+ textAlign: 'left !important'
+ },
+ '& .dropdown ': {
+ backgroundColor: dark ? '#7165ae !important' : undefined
+ },
+ '& .dropdown-heading': {
+ backgroundColor: dark ? '#7165ae !important' : undefined,
+ color: dark ? '#fff !important' : undefined
+ },
+ '& .multi-select * input': {
+ backgroundColor: dark ? '#7165ae! important' : undefined,
+ color: dark ? '#fff !important' : undefined
+ },
+ '& .multi-select .select-item,.dropdown-content': {
+ backgroundColor: dark ? '#7165ae !important' : undefined,
+ color: dark ? '#fff !important' : undefined
+ },
+ '& .multi-select .select-item:hover': {
+ backgroundColor: dark ? '#594aa5 !important' : undefined
+ },
+ '& .multi-select .select-item:visited': {
+ backgroundColor: dark ? '#594aa5 !important' : undefined
+ },
+ '& ::-webkit-input-placeholder ': {
+ /* Chrome/Opera/Safari */
+ color: dark ? '#fff !important' : undefined
+ },
+ '& .dropdown-heading-value': {
+ color: dark ? '#fff !important' : undefined
+ }
+ }
+ };
};
-const MultiSelectcomponent = (props) => {
- const { classes, ...rest } = props;
- return (
-
-
-
- );
+const MultiSelectcomponent = props => {
+ const { classes, ...rest } = props;
+ return (
+
+
+
+ );
};
export default withStyles(styles)(MultiSelectcomponent);
diff --git a/client/src/components/Styled/Table.js b/client/src/components/Styled/Table.js
index ba3256a02..96e9b0a15 100644
--- a/client/src/components/Styled/Table.js
+++ b/client/src/components/Styled/Table.js
@@ -8,73 +8,72 @@ import ReactTable from 'react-table';
import 'react-table/react-table.css';
import classnames from 'classnames';
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- '.rt-noData': {
- color: '#ffffff !important',
- background: '#7165ae !important',
- },
- table: {
- '& .rt-tbody': {
- overflow: 'scroll !important',
- },
- '& .rt-tr-group .rt-tr': {
- paddingTop: 30,
- },
- '& .rt-td': {
- textAlign: 'center',
- },
- '& .rt-th input': {
- background: dark ? '#7165ad !important' : undefined,
- color: dark ? '#ffffff' : undefined,
- },
- },
- list: {
- '& ::-webkit-scrollbar': {
- width: '1em',
- },
- '& ::-webkit-scrollbar-track': {
- background: dark ? '#443e68' : 'rgb(238, 237, 237)',
- },
- '& ::-webkit-scrollbar-thumb': {
- background: dark ? '#6a5e9e' : 'rgb(192, 190, 190)',
- },
- '& ::-webkit-scrollbar-corner': {
- background: dark ? '#443e68' : 'rgb(238, 237, 237)',
- },
- },
- pagination: {
- '& button': {
- color: dark ? '#ffffff !important' : undefined,
- backgroundColor: dark ? '#5d538e !important' : undefined,
- },
- '& button:hover': {
- color: dark ? '#39c9f5 !important' : undefined,
- backgroundColor: dark ? '#7165ad !important' : undefined,
- },
- },
- };
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ '.rt-noData': {
+ color: '#ffffff !important',
+ background: '#7165ae !important'
+ },
+ table: {
+ '& .rt-tbody': {
+ overflow: 'scroll !important'
+ },
+ '& .rt-tr-group .rt-tr': {
+ paddingTop: 30
+ },
+ '& .rt-td': {
+ textAlign: 'center'
+ },
+ '& .rt-th input': {
+ background: dark ? '#7165ad !important' : undefined,
+ color: dark ? '#ffffff' : undefined
+ }
+ },
+ list: {
+ '& ::-webkit-scrollbar': {
+ width: '1em'
+ },
+ '& ::-webkit-scrollbar-track': {
+ background: dark ? '#443e68' : 'rgb(238, 237, 237)'
+ },
+ '& ::-webkit-scrollbar-thumb': {
+ background: dark ? '#6a5e9e' : 'rgb(192, 190, 190)'
+ },
+ '& ::-webkit-scrollbar-corner': {
+ background: dark ? '#443e68' : 'rgb(238, 237, 237)'
+ }
+ },
+ pagination: {
+ '& button': {
+ color: dark ? '#ffffff !important' : undefined,
+ backgroundColor: dark ? '#5d538e !important' : undefined
+ },
+ '& button:hover': {
+ color: dark ? '#39c9f5 !important' : undefined,
+ backgroundColor: dark ? '#7165ad !important' : undefined
+ }
+ }
+ };
};
-const Table = (props) => {
- const {
- className = '', list = false, classes, ...rest
- } = props;
- const clazz = classnames(
- classes.table,
- '-striped -highlight',
- className,
- list && classes.list,
- );
- return (
- ({ className: classes.pagination })}
- />
- );
+const Table = props => {
+ const { className = '', list = false, classes, ...rest } = props;
+ const clazz = classnames(
+ classes.table,
+ '-striped -highlight',
+ className,
+ list && classes.list
+ );
+ return (
+ ({ className: classes.pagination })}
+ />
+ );
};
export default withStyles(styles)(Table);
diff --git a/client/src/components/View/DashboardView.js b/client/src/components/View/DashboardView.js
index c46eb3cb3..95c764666 100644
--- a/client/src/components/View/DashboardView.js
+++ b/client/src/components/View/DashboardView.js
@@ -13,281 +13,263 @@ import PeersHealth from '../Lists/PeersHealth';
import TimelineStream from '../Lists/TimelineStream';
import OrgPieChart from '../Charts/OrgPieChart';
import {
- blockListType,
- dashStatsType,
- peerStatusType,
- transactionByOrgType,
+ blockListType,
+ dashStatsType,
+ peerStatusType,
+ transactionByOrgType
} from '../types';
-const styles = (theme) => {
- const { type } = theme.palette;
- const dark = type === 'dark';
- return {
- background: {
- backgroundColor: dark ? 'rgb(36, 32, 54)' : '#f0f5f9',
- },
- view: {
- paddingTop: 85,
- paddingLeft: 0,
- width: '80%',
- marginLeft: '10%',
- marginRight: '10%',
- },
- blocks: {
- height: 175,
- marginBottom: 20,
- backgroundColor: dark ? '#453e68' : '#ffffff',
- boxShadow: dark ? '1px 2px 2px rgb(215, 247, 247)' : undefined,
- },
- count: {
- marginTop: '55%',
- color: dark ? '#ffffff' : undefined,
- },
- statistic: {
- display: 'block',
- float: 'left',
- height: '100%',
- width: '25%',
- textAlign: 'center',
- fontSize: '18pt',
- color: dark ? '#ffffff' : '#000000',
- },
- vdivide: {
- '&::after': {
- borderRight: `2px ${dark ? 'rgb(40, 36, 61)' : '#dff1fe'} solid`,
- display: 'block',
- height: '45%',
- bottom: '55%',
- content: "' '",
- position: 'relative',
- },
- },
- avatar: {
- justifyContent: 'center',
- marginLeft: '60%',
- marginTop: '65%',
- },
- node: {
- color: dark ? '#183a37' : '#21295c',
- backgroundColor: dark ? 'rgb(104, 247, 235)' : '#858aa6',
- },
- block: {
- color: dark ? '#1f1a33' : '#004d6b',
- backgroundColor: dark ? 'rgb(106, 156, 248)' : '#b9d6e1',
- },
- chaincode: {
- color: dark ? 'rgb(121, 83, 109)' : '#407b20',
- backgroundColor: dark ? 'rgb(247, 205, 234)' : '#d0ecda',
- },
- transaction: {
- color: dark ? 'rgb(216, 142, 4)' : '#ffa686',
- backgroundColor: dark ? 'rgb(252, 224, 174)' : '#ffeed8',
- },
- section: {
- height: 335,
- marginBottom: '2%',
- color: dark ? '#ffffff' : undefined,
- backgroundColor: dark ? '#3c3558' : undefined,
- },
- center: {
- textAlign: 'center',
- },
- };
+/* istanbul ignore next */
+const styles = theme => {
+ const { type } = theme.palette;
+ const dark = type === 'dark';
+ return {
+ background: {
+ backgroundColor: dark ? 'rgb(36, 32, 54)' : '#f0f5f9'
+ },
+ view: {
+ paddingTop: 85,
+ paddingLeft: 0,
+ width: '80%',
+ marginLeft: '10%',
+ marginRight: '10%'
+ },
+ blocks: {
+ height: 175,
+ marginBottom: 20,
+ backgroundColor: dark ? '#453e68' : '#ffffff',
+ boxShadow: dark ? '1px 2px 2px rgb(215, 247, 247)' : undefined
+ },
+ count: {
+ marginTop: '55%',
+ color: dark ? '#ffffff' : undefined
+ },
+ statistic: {
+ display: 'block',
+ float: 'left',
+ height: '100%',
+ width: '25%',
+ textAlign: 'center',
+ fontSize: '18pt',
+ color: dark ? '#ffffff' : '#000000'
+ },
+ vdivide: {
+ '&::after': {
+ borderRight: `2px ${dark ? 'rgb(40, 36, 61)' : '#dff1fe'} solid`,
+ display: 'block',
+ height: '45%',
+ bottom: '55%',
+ content: "' '",
+ position: 'relative'
+ }
+ },
+ avatar: {
+ justifyContent: 'center',
+ marginLeft: '60%',
+ marginTop: '65%'
+ },
+ node: {
+ color: dark ? '#183a37' : '#21295c',
+ backgroundColor: dark ? 'rgb(104, 247, 235)' : '#858aa6'
+ },
+ block: {
+ color: dark ? '#1f1a33' : '#004d6b',
+ backgroundColor: dark ? 'rgb(106, 156, 248)' : '#b9d6e1'
+ },
+ chaincode: {
+ color: dark ? 'rgb(121, 83, 109)' : '#407b20',
+ backgroundColor: dark ? 'rgb(247, 205, 234)' : '#d0ecda'
+ },
+ transaction: {
+ color: dark ? 'rgb(216, 142, 4)' : '#ffa686',
+ backgroundColor: dark ? 'rgb(252, 224, 174)' : '#ffeed8'
+ },
+ section: {
+ height: 335,
+ marginBottom: '2%',
+ color: dark ? '#ffffff' : undefined,
+ backgroundColor: dark ? '#3c3558' : undefined
+ },
+ center: {
+ textAlign: 'center'
+ }
+ };
};
export class DashboardView extends Component {
- constructor(props) {
- super(props);
- this.state = {
- notifications: [],
- hasDbError: false,
- };
- }
+ constructor(props) {
+ super(props);
+ this.state = {
+ notifications: [],
+ hasDbError: false
+ };
+ }
- componentWillMount() {
- const {
- blockList,
- dashStats,
- peerStatus,
- transactionByOrg,
- blockActivity,
- } = this.props;
- if (
- blockList === undefined
- || dashStats === undefined
- || peerStatus === undefined
- || blockActivity === undefined
- || transactionByOrg === undefined
- ) {
- this.setState({ hasDbError: true });
- }
- }
+ componentWillMount() {
+ const {
+ blockList,
+ dashStats,
+ peerStatus,
+ transactionByOrg,
+ blockActivity
+ } = this.props;
+ if (
+ blockList === undefined ||
+ dashStats === undefined ||
+ peerStatus === undefined ||
+ blockActivity === undefined ||
+ transactionByOrg === undefined
+ ) {
+ this.setState({ hasDbError: true });
+ }
+ }
- componentDidMount() {
- const { blockActivity } = this.props;
- this.setNotifications(blockActivity);
- }
+ componentDidMount() {
+ const { blockActivity } = this.props;
+ this.setNotifications(blockActivity);
+ }
- componentWillReceiveProps() {
- const { blockActivity } = this.props;
- this.setNotifications(blockActivity);
- }
+ componentWillReceiveProps() {
+ const { blockActivity } = this.props;
+ this.setNotifications(blockActivity);
+ }
- setNotifications = (blockList) => {
- const notificationsArr = [];
- if (blockList !== undefined) {
- for (let i = 0; i < 3 && blockList && blockList[i]; i += 1) {
- const block = blockList[i];
- const notify = {
- title: `Block ${block.blocknum} `,
- type: 'block',
- time: block.createdt,
- txcount: block.txcount,
- datahash: block.datahash,
- blockhash: block.blockhash,
- channelName: block.channelname,
- };
- notificationsArr.push(notify);
- }
- }
- this.setState({ notifications: notificationsArr });
- };
+ setNotifications = blockList => {
+ const notificationsArr = [];
+ if (blockList !== undefined) {
+ for (let i = 0; i < 3 && blockList && blockList[i]; i += 1) {
+ const block = blockList[i];
+ const notify = {
+ title: `Block ${block.blocknum} `,
+ type: 'block',
+ time: block.createdt,
+ txcount: block.txcount,
+ datahash: block.datahash,
+ blockhash: block.blockhash,
+ channelName: block.channelname
+ };
+ notificationsArr.push(notify);
+ }
+ }
+ this.setState({ notifications: notificationsArr });
+ };
- render() {
- const {
- dashStats,
- peerStatus,
- blockActivity,
- transactionByOrg,
- } = this.props;
- const { hasDbError, notifications } = this.state;
- if (hasDbError) {
- return (
-
-
- Please verify your network configuration, database configuration and
- try again
-
-
- );
- }
- const { classes } = this.props;
- return (
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {dashStats.latestBlock}
-
-
-
- BLOCKS
-
-
-
-
-
-
-
-
-
-
- {dashStats.txCount}
-
-
-
- TRANSACTIONS
-
-
-
-
-
-
-
-
-
-
- {dashStats.peerCount}
-
-
-
- NODES
-
-
-
-
-
-
-
-
-
-
- {dashStats.chaincodeCount}
-
-
-
- CHAINCODES
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Transactions by Organization
-
-
-
-
-
-
-
-
- );
- }
+ render() {
+ const { dashStats, peerStatus, blockActivity, transactionByOrg } = this.props;
+ const { hasDbError, notifications } = this.state;
+ if (hasDbError) {
+ return (
+
+
+ Please verify your network configuration, database configuration and try
+ again
+
+
+ );
+ }
+ const { classes } = this.props;
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {dashStats.latestBlock}
+
+
+ BLOCKS
+
+
+
+
+
+
+
+
+
+ {dashStats.txCount}
+
+
+ TRANSACTIONS
+
+
+
+
+
+
+
+
+
+ {dashStats.peerCount}
+
+
+ NODES
+
+
+
+
+
+
+
+
+
+ {dashStats.chaincodeCount}
+
+
+ CHAINCODES
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Transactions by Organization
+
+
+
+
+
+
+
+ );
+ }
}
DashboardView.propTypes = {
- blockList: blockListType.isRequired,
- dashStats: dashStatsType.isRequired,
- peerStatus: peerStatusType.isRequired,
- transactionByOrg: transactionByOrgType.isRequired,
+ blockList: blockListType.isRequired,
+ dashStats: dashStatsType.isRequired,
+ peerStatus: peerStatusType.isRequired,
+ transactionByOrg: transactionByOrgType.isRequired
};
export default withStyles(styles)(DashboardView);