-
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
Changes from 54 commits
f484c68
cc8397e
b71a66e
5b8a1b0
ad59337
28b3aaa
313d96e
4b82e47
9d5654d
abd4294
a74a017
357f8d8
52c464b
735de0c
85f3318
c6f10c6
c689c98
70ef87f
b8c3610
0919044
f566f82
0d71a5c
5caca02
0a2a128
84f58eb
dbfe388
3f2b04d
9bb0a93
a0f44e9
59fffb0
806b31f
8be5155
d050429
95fdf8c
8eb34c7
49e575a
63a0e61
3165bbe
8d39713
c837840
97fcd11
35be230
8bdf6d8
e1b56a6
c9f4685
4ee7ca5
2b6ebcc
8c74de7
26be12b
323e63a
29a9a6c
47dbd83
305b91c
9cd3287
1f15605
c45c840
0295f50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,7 +270,7 @@ var coreServiceContainer serviceContainer.Core | |
// windows: | ||
// for /f %i in ('git describe --tags --long --dirty') do set VERS=%i | ||
// go build -i -v -ldflags="-X main.appVersion=%VERS%" | ||
var appVersion = "undefined" | ||
var appVersion = core.UnVersionedAppString | ||
|
||
func main() { | ||
log := logger.DefaultLogger() | ||
|
@@ -529,6 +529,7 @@ func startNode(ctx *cli.Context, log *logger.Logger, version string) error { | |
coreComponents.StatusHandler.SetUInt64Value(core.MetricShardId, uint64(shardCoordinator.SelfId())) | ||
coreComponents.StatusHandler.SetStringValue(core.MetricNodeType, string(nodeType)) | ||
coreComponents.StatusHandler.SetUInt64Value(core.MetricRoundTime, nodesConfig.RoundDuration/milisecondsInSecond) | ||
coreComponents.StatusHandler.SetStringValue(core.MetricAppVersion, version) | ||
|
||
dataArgs := factory.NewDataComponentsFactoryArgs(generalConfig, shardCoordinator, coreComponents, uniqueDBFolder) | ||
dataComponents, err := factory.DataComponentsFactory(dataArgs) | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. For readability, you could write above: There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
||
efConfig := &config.FacadeConfig{ | ||
RestApiPort: ctx.GlobalString(restApiPort.Name), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,25 +25,14 @@ func TestTermuiStatusHandler_TermuiShouldPass(t *testing.T) { | |
assert.NotNil(t, termuiConsole) | ||
} | ||
|
||
func TestTermuiStatusHandler_TestIfMetricsAreInitialized(t *testing.T) { | ||
t.Parallel() | ||
|
||
termuiStatusHandler := statusHandler.NewTermuiStatusHandler() | ||
|
||
// check if nonce metric for example was initialized | ||
_, err := termuiStatusHandler.GetTermuiMetricByKey(core.MetricNonce) | ||
|
||
assert.Nil(t, err) | ||
assert.Equal(t, 26, termuiStatusHandler.GetMetricsCount()) | ||
} | ||
|
||
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 commentThe reason will be displayed to describe this comment to others. Learn more. For readability, delete There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
termuiStatusHandler.Increment(metricKey) | ||
valueI, err := termuiStatusHandler.GetTermuiMetricByKey(metricKey) | ||
assert.Nil(t, err) | ||
|
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
toRestAPIServer
.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