-
Notifications
You must be signed in to change notification settings - Fork 204
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
Conversation
…t implementing on this feature
…rn error if termui console is nil, rename some methods
…3395-termui-console
# Conflicts: # core/constants.go
…3395-termui-console
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
…3395-termui-console
updated some texts in widgets modified config.toml to poll each 2 seconds added parameter name in interface definition
…3395-termui-console
…work/elrond-go into EN-3395-termui-console
…work/elrond-go into EN-3395-termui-console
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
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 |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
0295f50
updated gin to start in debug mode only if termui is not enabled
code refactoring in termui render
added version label in termui render