Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
6ff81d6d
Commit
6ff81d6d
authored
Dec 30, 2022
by
Yuri Mikhin
Committed by
Yuri Mikhin
Jan 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new charts.
parent
5e71222f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
52 deletions
+95
-52
stats.ts
types/client/stats.ts
+2
-1
ChartsWidgetsList.tsx
ui/stats/ChartsWidgetsList.tsx
+2
-2
charts-scheme.ts
ui/stats/constants/charts-scheme.ts
+91
-49
No files found.
types/client/stats.ts
View file @
6ff81d6d
...
@@ -4,6 +4,7 @@ export enum StatsSectionId {
...
@@ -4,6 +4,7 @@ export enum StatsSectionId {
'
all
'
,
'
all
'
,
'
accounts
'
,
'
accounts
'
,
'
blocks
'
,
'
blocks
'
,
'
tokens
'
,
'
transactions
'
,
'
transactions
'
,
'
gas
'
,
'
gas
'
,
}
}
...
@@ -19,7 +20,7 @@ export enum StatsIntervalId {
...
@@ -19,7 +20,7 @@ export enum StatsIntervalId {
}
}
export
type
StatsChart
=
{
export
type
StatsChart
=
{
i
d
:
string
;
apiI
d
:
string
;
title
:
string
;
title
:
string
;
description
:
string
;
description
:
string
;
}
}
ui/stats/ChartsWidgetsList.tsx
View file @
6ff81d6d
...
@@ -44,10 +44,10 @@ const ChartsWidgetsList = ({ charts, interval }: Props) => {
...
@@ -44,10 +44,10 @@ const ChartsWidgetsList = ({ charts, interval }: Props) => {
>
>
{
section
.
charts
.
map
((
chart
)
=>
(
{
section
.
charts
.
map
((
chart
)
=>
(
<
GridItem
<
GridItem
key=
{
chart
.
i
d
}
key=
{
chart
.
apiI
d
}
>
>
<
ChartWidgetContainer
<
ChartWidgetContainer
id=
{
chart
.
i
d
}
id=
{
chart
.
apiI
d
}
title=
{
chart
.
title
}
title=
{
chart
.
title
}
description=
{
chart
.
description
}
description=
{
chart
.
description
}
interval=
{
interval
}
interval=
{
interval
}
...
...
ui/stats/constants/charts-scheme.ts
View file @
6ff81d6d
import
type
{
StatsSection
}
from
'
types/client/stats
'
;
import
type
{
StatsSection
}
from
'
types/client/stats
'
;
export
const
statsChartsScheme
:
Array
<
StatsSection
>
=
[
export
const
statsChartsScheme
:
Array
<
StatsSection
>
=
[
{
id
:
'
accounts
'
,
title
:
'
Accounts
'
,
charts
:
[
{
apiId
:
'
activeAccounts
'
,
title
:
'
Active accounts
'
,
description
:
'
Active accounts number per period
'
,
},
{
apiId
:
'
accountsGrowth
'
,
title
:
'
Accounts growth
'
,
description
:
'
Cumulative accounts number per period
'
,
},
],
},
{
id
:
'
transactions
'
,
title
:
'
Transactions
'
,
charts
:
[
{
apiId
:
'
averageTxnFee
'
,
title
:
'
Average transaction fee
'
,
description
:
'
The average amount in USD spent per transaction
'
,
},
{
apiId
:
'
txnsFee
'
,
title
:
'
Transactions fees
'
,
description
:
'
Amount of tokens paid as fees
'
,
},
{
apiId
:
'
newTxns
'
,
title
:
'
New transactions
'
,
description
:
'
New transactions number
'
,
},
{
apiId
:
'
txnsGrowth
'
,
title
:
'
Transactions growth
'
,
description
:
'
Cumulative transactions number
'
,
},
],
},
{
{
id
:
'
blocks
'
,
id
:
'
blocks
'
,
title
:
'
Blocks
'
,
title
:
'
Blocks
'
,
charts
:
[
charts
:
[
{
{
i
d
:
'
newBlocksPerDay
'
,
apiI
d
:
'
newBlocksPerDay
'
,
title
:
'
New blocks
'
,
title
:
'
New blocks
'
,
description
:
'
New blocks number per day
'
,
description
:
'
New blocks number
'
,
},
{
apiId
:
'
averageBlockSize
'
,
title
:
'
Average block size
'
,
description
:
'
Average size of blocks in bytes
'
,
},
],
},
{
id
:
'
tokens
'
,
title
:
'
Tokens
'
,
charts
:
[
{
apiId
:
'
nativeCoinHoldersGrowth
'
,
title
:
'
Native coin holders growth
'
,
description
:
'
Cumulative token holders number for the period
'
,
},
{
apiId
:
'
newNativeCoinTransfers
'
,
title
:
'
New native coins transfers
'
,
description
:
'
New token transfers number for the period
'
,
},
{
apiId
:
'
nativeCoinSupply
'
,
title
:
'
Native coin circulating supply
'
,
description
:
'
Amount of token circulating supply for the period
'
,
},
],
},
{
id
:
'
gas
'
,
title
:
'
Gas
'
,
charts
:
[
{
apiId
:
'
averageGasLimit
'
,
title
:
'
Average gas limit
'
,
description
:
'
Average gas limit per block for the period
'
,
},
{
apiId
:
'
gasUsedGrowth
'
,
title
:
'
Gas used growth
'
,
description
:
'
Cumulative gas used for the period
'
,
},
{
apiId
:
'
averageGasPrice
'
,
title
:
'
Average gas price
'
,
description
:
'
Average gas price for the period
'
,
},
},
// {
// id: 'average-block-size',
// title: 'Average block size',
// description: 'Average size of blocks in bytes',
// },
],
],
},
},
// {
// id: 'transactions',
// title: 'Transactions',
// charts: [
// {
// id: 'average-transaction-fee',
// title: 'Average transaction fee',
// description: 'The average amount in USD spent per transaction',
// },
// {
// id: 'transactions-fees',
// title: 'Transactions fees',
// description: 'Amount of tokens paid as fees',
// },
// {
// id: 'new-transactions',
// title: 'Transactions fees',
// description: 'New transactions number per period',
// },
// {
// id: 'transactions-growth',
// title: 'Transactions growth',
// description: 'Cumulative transactions number per period',
// },
// ],
// },
// {
// id: 'accounts',
// title: 'Accounts',
// charts: [
// {
// id: 'active-accounts',
// title: 'Active accounts',
// description: 'Active accounts number per period',
// },
// {
// id: 'accounts-growth',
// title: 'Accounts growth',
// description: 'Cumulative accounts number per period',
// },
// ],
// },
];
];
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment