You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2020/12/17 00:48:38 UTC
[incubator-nlpcraft] branch NLPCRAFT-194 updated: Update NCCli.scala
This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-194
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-194 by this push:
new 1d7ef98 Update NCCli.scala
1d7ef98 is described below
commit 1d7ef981995f3c3b1a580622fe5c19b347b84459
Author: Aaron Radzinski <ar...@datalingvo.com>
AuthorDate: Wed Dec 16 16:48:27 2020 -0800
Update NCCli.scala
---
.../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index f02f8a7..8fe7556 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -2452,12 +2452,10 @@ object NCCli extends App {
while (!exit) {
val rawLine = try {
- val srvStr = bo(s"${if (state.isServerOnline) s"ON " else s"OFF "}")
- val prbStr = bo(s"${if (state.isProbeOnline) s"ON " else s"OFF "}")
val acsTokStr = bo(s"${state.accessToken.getOrElse("N/A")} ")
- val prompt1 = rb(w(s" server: $srvStr")) // Server status.
- val prompt2 = rb(w(s" probe: $prbStr")) // Probe status.
+ val prompt1 = if (state.isServerOnline) gb(k(s" server: ${BO}ON$RST$GB ")) else rb(w(s" server: ${BO}OFF$RST$RB "))
+ val prompt2 = if (state.isProbeOnline) gb(k(s" probe: ${BO}ON$RST$GB ")) else rb(w(s" probe: ${BO}OFF$RST$RB "))
val prompt3 = wb(k(s" acsTok: $acsTokStr")) // Access token, if any.
val prompt4 = kb(g(s" ${Paths.get("").toAbsolutePath} ")) // Current working directory.