Skip to content
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
6 changes: 6 additions & 0 deletions get_webstat_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ async def main():
"node_map": [],
"contract": {
"mainnet": {
"balance": "unknown",
"address": "NNxVrKjLsRkWsmGgmuNXLcMswtxTGaNQLk",
"script_hash": "2cafa46838e8b564468ebd868dcafdd99dce6221",
},
"testnet": {
"balance": "unknown",
"address": "NZAUkYbJ1Cb2HrNmwZ1pg9xYHBhm2FgtKV",
"script_hash": "3c3f4b84773ef0141576e48c3ff60e5078235891",
}
Expand Down Expand Up @@ -167,6 +169,8 @@ async def main():
node_mainnet_count = 0

for family in text_string_to_metric_families(requests.get(args.url_main).content.decode('utf-8')):
if family.name == 'neo_exporter_fs_chain_supply':
output['contract']['mainnet']['balance'] = family.samples[0].value
if family.name == 'neo_exporter_epoch':
output['network_epoch']['mainnet'] = family.samples[0].value
if family.name == 'neo_exporter_containers_number':
Expand Down Expand Up @@ -203,6 +207,8 @@ async def main():
node_testnet_count = 0

for family in text_string_to_metric_families(requests.get(args.url_test).content.decode('utf-8')):
if family.name == 'neo_exporter_fs_chain_supply':
output['contract']['testnet']['balance'] = family.samples[0].value
if family.name == 'neo_exporter_epoch':
output['network_epoch']['testnet'] = family.samples[0].value
if family.name == 'neo_exporter_containers_number':
Expand Down
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ export interface Data {
"node_map": NodeMap[]
"contract": {
"mainnet": {
"balance": number | string
"address": string
"script_hash": string
}
"testnet": {
"balance": number | string
"address": string
"script_hash": string
}
Expand Down
7 changes: 6 additions & 1 deletion src/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const Home = ({
<div className="tooltip">Total number of stored objects (counting all replicas)</div>
</div>
</Heading>
<Heading subtitle weight="semibold">{data.containers && data.containers_objects[activeNet].toLocaleString('ru-RU')}</Heading>
<Heading subtitle weight="semibold">{data.objects && data.objects[activeNet].toLocaleString('ru-RU')}</Heading>
</Tile>
</Tile>
<Tile kind="parent">
Expand Down Expand Up @@ -282,6 +282,11 @@ const Home = ({
color="grey"
>
<Heading subtitle weight="semibold">NeoFS contract</Heading>
<Heading subtitle size={6}>
<span>{`Balance: `}</span>

{`${data.contract && data.contract[activeNet].balance} GAS`}
</Heading>
<Heading subtitle size={6}>
<span>{`Address: `}</span>
{data.contract && data.contract[activeNet].address}
Expand Down