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

Boottime-Feature-UI #474

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion client/src/components/Lists/Chaincodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import Dialog from '@material-ui/core/Dialog';
import ReactTable from '../Styled/Table';
import { chaincodeListType } from '../types';
import ChaincodeMetaDataView from '../View/ChaincodeMetaDataView';
import {
E009
} from './constants';
import { Info } from '@material-ui/icons';

const styles = theme => {
const { type } = theme.palette;
Expand Down Expand Up @@ -120,7 +124,12 @@ export class Chaincodes extends Component {
filterAll: true
},
{
Header: 'Transaction Count',
Header: <span>
Transaction Count
<sup title={E009} style={{ padding: '3px' }}>
<Info style={{ fontSize: 'medium',marginTop:'5px' }} />
</sup>
</span>,
accessor: 'txCount',
filterMethod: (filter, rows) =>
matchSorter(
Expand Down
54 changes: 45 additions & 9 deletions client/src/components/Lists/Channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import React, { Component } from 'react';
import matchSorter from 'match-sorter';
import ReactTable from '../Styled/Table';
import { channelsType } from '../types';
import {
E006,
E007,
E008
} from './constants';
import { Info } from '@material-ui/icons';
import moment from 'moment';

class Channels extends Component {
reactTableSetup = () => [
Expand Down Expand Up @@ -35,7 +42,29 @@ class Channels extends Component {
filterAll: true
},
{
Header: 'Blocks',
Header: <span>
Total Blocks
<sup title={E006} style={{ padding: '3px' }}>
<Info style={{ fontSize: 'medium',marginTop:'5px' }} />
</sup>
</span>,
accessor: 'totalBlocks',
filterMethod: (filter, rows) =>
matchSorter(
rows,
filter.value,
{ keys: ['totalBlocks'] },
{ threshold: matchSorter.rankings.SIMPLEMATCH }
),
filterAll: true
},
{
Header: <span>
Blocks
<sup title={E007} style={{ padding: '3px' }}>
<Info style={{ fontSize: 'medium',marginTop:'5px' }} />
</sup>
</span>,
accessor: 'blocks',
filterMethod: (filter, rows) =>
matchSorter(
Expand All @@ -48,7 +77,12 @@ class Channels extends Component {
width: 125
},
{
Header: 'Transactions',
Header: <span>
Transactions
<sup title={E008} style={{ padding: '3px' }}>
<Info style={{ fontSize: 'medium',marginTop:'5px' }} />
</sup>
</span>,
accessor: 'transactions',
filterMethod: (filter, rows) =>
matchSorter(
Expand All @@ -64,13 +98,15 @@ class Channels extends Component {
Header: 'Timestamp',
accessor: 'createdat',
filterMethod: (filter, rows) =>
matchSorter(
rows,
filter.value,
{ keys: ['createdat'] },
{ threshold: matchSorter.rankings.SIMPLEMATCH }
),
filterAll: true
matchSorter(
rows,
filter.value,
{ keys: ['createdat'] },
{ threshold: matchSorter.rankings.SIMPLEMATCH }
),
filterAll: true,
Cell: ({ value }) =>
moment.utc(value).format('YYYY-MM-DD, HH:mm:ss UTC')
}
];

Expand Down
4 changes: 4 additions & 0 deletions client/src/components/Lists/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ export const E004 = limit =>
export const E005 = `Maximum allowed No of Block(s) is ${
rangeLimitOptions[rangeLimitOptions.length - 1]
}. Set lower range for better performance.`;
export const E006 = "Total block count in ledger";
export const E007 = "Blocks available after purge/boot-time";
export const E008 = "Transactions available after purge/boot-time";
export const E009 = "Transactions available after purge/boot-time";