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

En 3563 update term ui #373

Merged
merged 57 commits into from
Aug 14, 2019
Merged

En 3563 update term ui #373

merged 57 commits into from
Aug 14, 2019

Conversation

iulianpascalau
Copy link
Contributor

updated gin to start in debug mode only if termui is not enabled
code refactoring in termui render
added version label in termui render

miiu96 and others added 30 commits August 7, 2019 10:11
…rn error if termui console is nil, rename some methods
added local machine metrics
…work/elrond-go into EN-3395-termui-console

# Conflicts:
#	cmd/node/main.go
#	core/constants.go
#	statusHandler/termuiStatusHandler.go
#	statusHandler/termuic/termuiRenders/widgetsRender.go
camilbancioiu and others added 17 commits August 14, 2019 12:02
updated some texts in widgets
modified config.toml to poll each 2 seconds
added parameter name in interface definition
code refactoring in termui render
added version label in termui render
# Conflicts:
#	cmd/node/main.go
#	core/constants.go
#	statusHandler/termuiStatusHandler.go
#	statusHandler/termuiStatusHandler_test.go
#	statusHandler/termuic/termuiConsole.go
#	statusHandler/termuic/termuiRenders/widgetsRender.go
@iulianpascalau iulianpascalau self-assigned this Aug 14, 2019
@iulianpascalau iulianpascalau added the type:feature New feature or request label Aug 14, 2019
raduchis
raduchis previously approved these changes Aug 14, 2019
camilbancioiu
camilbancioiu previously approved these changes Aug 14, 2019
api/api.go Outdated
@@ -33,6 +33,7 @@ type prometheus struct {
// MainApiHandler interface defines methods that can be used from `elrondFacade` context variable
type MainApiHandler interface {
RestApiPort() string
GinDebugMode() bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Could rename Gin to RestAPIServer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

cmd/node/main.go Outdated
@@ -642,7 +643,7 @@ func startNode(ctx *cli.Context, log *logger.Logger, version string) error {
return err
}

ef := facade.NewElrondNodeFacade(currentNode, apiResolver)
ef := facade.NewElrondNodeFacade(currentNode, apiResolver, !useTermui)
Copy link
Contributor

Choose a reason for hiding this comment

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

For readability, you could write above: ginDebugMode := !useTermui then pass it as the argument to NewElrondNodeFacade.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

func TestTermuiStatusHandler_TestIncrement(t *testing.T) {
t.Parallel()

var metricKey = core.MetricNonce

termuiStatusHandler := statusHandler.NewTermuiStatusHandler()

termuiStatusHandler.SetUInt64Value(metricKey, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

For readability, delete var metricKey and use core.MetricNonce directly as the arguments to SetUInt64Value here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@iulianpascalau iulianpascalau dismissed stale reviews from camilbancioiu and raduchis via 0295f50 August 14, 2019 14:32
@iulianpascalau iulianpascalau merged commit 53f4cf7 into development Aug 14, 2019
@iulianpascalau iulianpascalau deleted the EN-3563-update-term-ui branch August 14, 2019 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants