This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new f82d3f12b68 CAMEL-18406: camel-jbang - Status command
f82d3f12b68 is described below

commit f82d3f12b68079760192201e2c9196416a5c9293
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Aug 23 14:06:04 2022 +0200

    CAMEL-18406: camel-jbang - Status command
---
 docs/user-manual/modules/ROOT/pages/camel-jbang.adoc   | 18 +++++++++---------
 .../camel/dsl/jbang/core/commands/CamelJBangMain.java  | 10 +++++-----
 ...CamelStatusContext.java => CamelContextStatus.java} | 10 +++++-----
 .../{CamelStatusRoute.java => CamelRouteStatus.java}   |  6 +++---
 .../dsl/jbang/core/commands/process/CamelStatus.java   |  4 ++--
 5 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
index 3097090709b..8081bb7f6d6 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-jbang.adoc
@@ -562,16 +562,16 @@ Stopping running Camel integration (pid: 42171)
 Stopping running Camel integration (pid: 44805)
 ----
 
-=== Status of local Camel integrations
+=== Get status of Camel integrations
 
-The status command in Camel JBang is used for displaying Camel specific 
information
-for one or all of the running Camel integrations.
+The `get` command in Camel JBang is used for getting status for one
+or all of the running Camel integrations.
 
-To display the state of the running Camel integrations:
+To display the status of the running Camel integrations:
 
 [source,bash]
 ----
-camel status integration
+camel get integration
 
+------+----------+---------+-------+---------+----------+------------+------------+
 | PID  | Name     | State   | Age   | Total # | Failed # | Inflight # | Since 
Last |
 
+------+----------+---------+-------+---------+----------+------------+------------+
@@ -580,8 +580,8 @@ camel status integration
 
+------+----------+---------+-------+---------+----------+------------+------------+
 ----
 
-TIP: You can use `camel status int` or `camel status context` as a short-hand
-command for displaying the status as above.
+TIP: You can use `camel get int` or `camel get context` as a short-hand
+command for displaying the integration status as above.
 
 This displays overall information for every Camel integration, where you can 
see
 the total number of messages processed. The column _Since Last_
@@ -592,7 +592,7 @@ You can also see the status of every routes, from all the 
local Camel integratio
 
 [source,bash]
 ----
-camel status route
+camel get route
 
+------+------------+-----------------------+-------------------------------------+---------+--------+---------+--------+----------+--------+--------+--------+----------+
 | PID  | Name       | Route ID              | From                             
   | State   | Uptime |  Total  | Failed | Inflight |  Mean  |  Max   |  Min   
|  Since   |
 |      |            |                       |                                  
   |         |        |    #    |   #    |    #     |  (ms)  |  (ms)  |  (ms)  
|   Last   |
@@ -605,7 +605,7 @@ camel status route
 
+------+------------+-----------------------+-------------------------------------+---------+--------+---------+--------+----------+--------+--------+--------+----------+
 ----
 
-TIP: Use `camel status --help` to display all the available commands as 
additional will be added in upcoming releases.
+TIP: Use `camel get --help` to display all the available commands as 
additional will be added in upcoming releases.
 
 
 === Using Jolokia and Hawtio
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java
index 7528e772e7b..780d5a96d57 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/CamelJBangMain.java
@@ -20,9 +20,9 @@ import java.util.concurrent.Callable;
 
 import org.apache.camel.catalog.CamelCatalog;
 import org.apache.camel.catalog.DefaultCamelCatalog;
+import org.apache.camel.dsl.jbang.core.commands.process.CamelContextStatus;
+import org.apache.camel.dsl.jbang.core.commands.process.CamelRouteStatus;
 import org.apache.camel.dsl.jbang.core.commands.process.CamelStatus;
-import org.apache.camel.dsl.jbang.core.commands.process.CamelStatusContext;
-import org.apache.camel.dsl.jbang.core.commands.process.CamelStatusRoute;
 import org.apache.camel.dsl.jbang.core.commands.process.Hawtio;
 import org.apache.camel.dsl.jbang.core.commands.process.Jolokia;
 import org.apache.camel.dsl.jbang.core.commands.process.ListProcess;
@@ -41,9 +41,9 @@ public class CamelJBangMain implements Callable<Integer> {
                 .addSubcommand("run", new CommandLine(new Run(main)))
                 .addSubcommand("ps", new CommandLine(new ListProcess(main)))
                 .addSubcommand("stop", new CommandLine(new StopProcess(main)))
-                .addSubcommand("status", new CommandLine(new CamelStatus(main))
-                        .addSubcommand("context", new CommandLine(new 
CamelStatusContext(main)))
-                        .addSubcommand("route", new CommandLine(new 
CamelStatusRoute(main))))
+                .addSubcommand("get", new CommandLine(new CamelStatus(main))
+                        .addSubcommand("context", new CommandLine(new 
CamelContextStatus(main)))
+                        .addSubcommand("route", new CommandLine(new 
CamelRouteStatus(main))))
                 .addSubcommand("generate", new CommandLine(new 
CodeGenerator(main))
                         .addSubcommand("rest", new CommandLine(new 
CodeRestGenerator(main))))
                 .addSubcommand("jolokia", new CommandLine(new Jolokia(main)))
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatusContext.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelContextStatus.java
similarity index 95%
rename from 
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatusContext.java
rename to 
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelContextStatus.java
index 40320d32b2f..7a98702fc86 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatusContext.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelContextStatus.java
@@ -36,9 +36,9 @@ import org.apache.camel.util.json.Jsoner;
 import picocli.CommandLine;
 import picocli.CommandLine.Command;
 
-@Command(name = "integration", aliases = { "int", "integration", "context" },
-         description = "List status of the running Camel integrations")
-public class CamelStatusContext extends ProcessBaseCommand {
+@Command(name = "integration", aliases = { "int", "integration", 
"integrations", "context" },
+         description = "Get status of Camel integrations")
+public class CamelContextStatus extends ProcessBaseCommand {
 
     @CommandLine.Parameters(description = "Name or pid of running Camel 
integration", arity = "0..1")
     String name = "*";
@@ -47,7 +47,7 @@ public class CamelStatusContext extends ProcessBaseCommand {
                         description = "Sort by pid, name or age", defaultValue 
= "pid")
     String sort;
 
-    public CamelStatusContext(CamelJBangMain main) {
+    public CamelContextStatus(CamelJBangMain main) {
         super(main);
     }
 
@@ -102,7 +102,7 @@ public class CamelStatusContext extends ProcessBaseCommand {
                     new 
Column().header("Name").dataAlign(HorizontalAlign.LEFT).maxColumnWidth(30)
                             .with(r -> maxWidth(r.name, 28)),
                     new Column().header("State").with(r -> r.state),
-                    new Column().header("Age").with(r -> r.ago),
+                    new Column().header("Uptime").with(r -> r.ago),
                     new Column().header("Total #").with(r -> r.total),
                     new Column().header("Failed #").with(r -> r.failed),
                     new Column().header("Inflight #").with(r -> r.inflight),
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatusRoute.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatus.java
similarity index 97%
rename from 
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatusRoute.java
rename to 
dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatus.java
index 6998a7d1f7b..1c8f144c13f 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatusRoute.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelRouteStatus.java
@@ -36,8 +36,8 @@ import org.apache.camel.util.json.Jsoner;
 import picocli.CommandLine;
 import picocli.CommandLine.Command;
 
-@Command(name = "route", description = "List status of the running Camel 
routes")
-public class CamelStatusRoute extends ProcessBaseCommand {
+@Command(name = "route", aliases = { "route", "routes" }, description = "Get 
status of Camel routes")
+public class CamelRouteStatus extends ProcessBaseCommand {
 
     @CommandLine.Parameters(description = "Name or pid of running Camel 
integration", arity = "0..1")
     String name = "*";
@@ -46,7 +46,7 @@ public class CamelStatusRoute extends ProcessBaseCommand {
                         description = "Sort by pid, name or age", defaultValue 
= "pid")
     String sort;
 
-    public CamelStatusRoute(CamelJBangMain main) {
+    public CamelRouteStatus(CamelJBangMain main) {
         super(main);
     }
 
diff --git 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatus.java
 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatus.java
index b3064d1fd02..9eb7253d027 100644
--- 
a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatus.java
+++ 
b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/process/CamelStatus.java
@@ -20,8 +20,8 @@ import org.apache.camel.dsl.jbang.core.commands.CamelCommand;
 import org.apache.camel.dsl.jbang.core.commands.CamelJBangMain;
 import picocli.CommandLine;
 
-@CommandLine.Command(name = "status",
-                     description = "List status of the running Camel 
integrations (use --help to see sub commands)")
+@CommandLine.Command(name = "get",
+                     description = "Get status of Camel integrations (use 
--help to see sub commands)")
 public class CamelStatus extends CamelCommand {
 
     public CamelStatus(CamelJBangMain main) {

Reply via email to