Преглед изворни кода

refactor(cli): Print node name version and app name version

So not to confuse application version with node release version
Zaiming Shi пре 5 година
родитељ
комит
a1f78b5083
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      apps/emqx_management/src/emqx_mgmt_cli.erl

+ 3 - 3
apps/emqx_management/src/emqx_mgmt_cli.erl

@@ -115,12 +115,12 @@ mgmt(_) ->
 
 
 status([]) ->
 status([]) ->
     {InternalStatus, _ProvidedStatus} = init:get_status(),
     {InternalStatus, _ProvidedStatus} = init:get_status(),
-        emqx_ctl:print("Node ~p is ~p~n", [node(), InternalStatus]),
+    emqx_ctl:print("Node ~p ~s is ~p~n", [node(), emqx_app:get_release(), InternalStatus]),
     case lists:keysearch(?APP, 1, application:which_applications()) of
     case lists:keysearch(?APP, 1, application:which_applications()) of
         false ->
         false ->
-            emqx_ctl:print("~s is not running~n", [?APP]);
+            emqx_ctl:print("Application ~s is not running~n", [?APP]);
         {value, {?APP, _Desc, Vsn}} ->
         {value, {?APP, _Desc, Vsn}} ->
-            emqx_ctl:print("~s ~s is running~n", [?APP, Vsn])
+            emqx_ctl:print("Application ~s ~s is running~n", [?APP, Vsn])
     end;
     end;
 status(_) ->
 status(_) ->
      emqx_ctl:usage("status", "Show broker status").
      emqx_ctl:usage("status", "Show broker status").