Skip to content

Commit

Permalink
boottime-feature-UI
Browse files Browse the repository at this point in the history
Signed-off-by: suumona <suumona@gmail.com>
  • Loading branch information
suumona authored and ArchanaArige committed Dec 13, 2023
1 parent 718e476 commit 640fbc7
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 10 deletions.
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";

0 comments on commit 640fbc7

Please sign in to comment.