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

Statistics Page #445

Merged
merged 6 commits into from Jun 3, 2021
Merged

Statistics Page #445

merged 6 commits into from Jun 3, 2021

Conversation

song50119
Copy link
Contributor

This PR continue process #423

Copy link
Contributor

@Sirmorrison Sirmorrison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The uptime on the mockup is different from what we have implemented. From the mockup, it looks like the up time is a timer, to determine how long the app has been running.
image

Also, you currently have testnet3 on the Network it should read either testnet or mainnet
image

Comment on lines 41 to 43
return func(gtx C) D {
return pg.theme.Separator().Layout(gtx)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return func(gtx C) D {
return pg.theme.Separator().Layout(gtx)
}
return pg.theme.Separator().Layout

txs **wallet.Transactions
theme *decredmaterial.Theme
l layout.List
startupTime string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed and can be removed.

Suggested change
startupTime string

Axis: layout.Vertical,
},
}
pg.startupTime = time.Now().String()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed and can be removed.

Suggested change
pg.startupTime = time.Now().String()

pg.lineSeparator(),
item("Peers connected", strconv.Itoa(int(pg.syncStatus.ConnectedPeers))),
pg.lineSeparator(),
item("Uptime", pg.startupTime),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
item("Uptime", pg.startupTime),
item("Uptime", time.Now().String()),

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time.Now() returns the current time, Uptime should be how long the app has been running.

ui/statistics_page.go Show resolved Hide resolved
Comment on lines 59 to 60
l := pg.theme.Label(values.TextSize14, t)
r := pg.theme.Label(values.TextSize14, v)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
l := pg.theme.Label(values.TextSize14, t)
r := pg.theme.Label(values.TextSize14, v)
l := pg.theme.Body2(t)
r := pg.theme.Body2(v)

Comment on lines 92 to 93
m16 := values.MarginPadding16
return layout.Inset{Left: m16}.Layout(gtx, func(gtx C) D {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
m16 := values.MarginPadding16
return layout.Inset{Left: m16}.Layout(gtx, func(gtx C) D {
return layout.Inset{Left: values.MarginPadding16}.Layout(gtx, func(gtx C) D {

No need for the extra variable as it can fit into the Inset.

Comment on lines 108 to 110
body: func(gtx C) D {
return pg.layoutStats(gtx)
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
body: func(gtx C) D {
return pg.layoutStats(gtx)
},
body: pg.layoutStats,

ui/statistics_page.go Show resolved Hide resolved
pg.lineSeparator(),
item("Peers connected", strconv.Itoa(int(pg.syncStatus.ConnectedPeers))),
pg.lineSeparator(),
item("Uptime", pg.startupTime),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

time.Now() returns the current time, Uptime should be how long the app has been running.

@oshorefueled oshorefueled mentioned this pull request May 31, 2021
@song50119 song50119 force-pushed the statistics branch 4 times, most recently from f4ec5af to 37ccba4 Compare May 31, 2021 16:38
oshorefueled
oshorefueled previously approved these changes Jun 2, 2021
oluwandabira and others added 6 commits June 3, 2021 00:58
- Add spacing to page
- Show network name, bestblock, data directory, wallet data size, number of txs and wallet
- Use theme Separator in layout widget slice
- Correct uptime value
- Change network name with suffix to actual name
- Refresh frame for each 1 second
@oshorefueled oshorefueled merged commit 968cc18 into planetdecred:master Jun 3, 2021
tuhalang pushed a commit to tuhalang/godcr that referenced this pull request Jun 5, 2021
* Refactor Statistics Page
- Show network name, bestblock, data directory, wallet data size, number of txs and wallet

*  Use theme Separator widget to layout page list
- Correct uptime value
- Change network name with suffix to actual name
- Refresh frame after 1 second to update the uptime value
@song50119 song50119 deleted the statistics branch December 18, 2021 09:40
song50119 added a commit to song50119/godcr that referenced this pull request Apr 24, 2022
* Refactor Statistics Page
- Show network name, bestblock, data directory, wallet data size, number of txs and wallet

*  Use theme Separator widget to layout page list
- Correct uptime value
- Change network name with suffix to actual name
- Refresh frame after 1 second to update the uptime value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants