camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nferr...@apache.org
Subject [camel-k] branch master updated: chore(ux): show the same basic info with oc and kamel
Date Wed, 09 Jan 2019 08:14:23 GMT
This is an automated email from the ASF dual-hosted git repository.

nferraro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/master by this push:
     new f63c7de  chore(ux): show the same basic info with oc and kamel
f63c7de is described below

commit f63c7de2dc20bde0e0daf4efaf8fc30efb174379
Author: lburgazzoli <lburgazzoli@gmail.com>
AuthorDate: Wed Jan 9 01:09:16 2019 +0100

    chore(ux): show the same basic info with oc and kamel
---
 deploy/crd-integration-context.yaml |  8 ++++++++
 deploy/crd-integration.yaml         |  4 ++++
 deploy/resources.go                 | 12 ++++++++++++
 pkg/cmd/context_get.go              |  4 ++--
 pkg/cmd/get.go                      |  4 ++--
 5 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/deploy/crd-integration-context.yaml b/deploy/crd-integration-context.yaml
index f33ad81..7d82cd4 100644
--- a/deploy/crd-integration-context.yaml
+++ b/deploy/crd-integration-context.yaml
@@ -20,3 +20,11 @@ spec:
       type: string
       description: The IntegrationContext phase
       JSONPath: .status.phase
+    - name: Type
+      type: string
+      description: The IntegrationContext type
+      JSONPath: .metadata.labels.camel\.apache\.org\/context\.type
+    - name: Image
+      type: string
+      description: The IntegrationContext image
+      JSONPath: .status.image
diff --git a/deploy/crd-integration.yaml b/deploy/crd-integration.yaml
index af20b4c..11db52b 100644
--- a/deploy/crd-integration.yaml
+++ b/deploy/crd-integration.yaml
@@ -20,3 +20,7 @@ spec:
       type: string
       description: The Integration phase
       JSONPath: .status.phase
+    - name: Context
+      type: string
+      description: The IntegrationContext to use
+      JSONPath: .status.context
diff --git a/deploy/resources.go b/deploy/resources.go
index f256198..c9da6cb 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -2216,6 +2216,14 @@ spec:
       type: string
       description: The IntegrationContext phase
       JSONPath: .status.phase
+    - name: Type
+      type: string
+      description: The IntegrationContext type
+      JSONPath: .metadata.labels.camel\.apache\.org\/context\.type
+    - name: Image
+      type: string
+      description: The IntegrationContext image
+      JSONPath: .status.image
 
 `
 	Resources["crd-integration-platform.yaml"] =
@@ -2268,6 +2276,10 @@ spec:
       type: string
       description: The Integration phase
       JSONPath: .status.phase
+    - name: Context
+      type: string
+      description: The IntegrationContext to use
+      JSONPath: .status.context
 
 `
 	Resources["cr-example.yaml"] =
diff --git a/pkg/cmd/context_get.go b/pkg/cmd/context_get.go
index eab2390..3fdab17 100644
--- a/pkg/cmd/context_get.go
+++ b/pkg/cmd/context_get.go
@@ -77,14 +77,14 @@ func (command *contextGetCommand) run() error {
 	}
 
 	w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
-	fmt.Fprintln(w, "NAME\tTYPE\tSTATUS")
+	fmt.Fprintln(w, "NAME\tPHASE\tTYPE\tIMAGE")
 	for _, ctx := range ctxList.Items {
 		t := ctx.Labels["camel.apache.org/context.type"]
 		u := command.user && t == "user"
 		p := command.platform && t == v1alpha1.IntegrationContextTypePlatform
 
 		if u || p {
-			fmt.Fprintf(w, "%s\t%s\t%s\n", ctx.Name, t, string(ctx.Status.Phase))
+			fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", ctx.Name, string(ctx.Status.Phase), t, ctx.Status.Image)
 		}
 	}
 	w.Flush()
diff --git a/pkg/cmd/get.go b/pkg/cmd/get.go
index 619333c..1f7ab70 100644
--- a/pkg/cmd/get.go
+++ b/pkg/cmd/get.go
@@ -68,9 +68,9 @@ func (o *getCmdOptions) run(cmd *cobra.Command, args []string) error {
 	}
 
 	w := tabwriter.NewWriter(os.Stdout, 0, 8, 1, '\t', 0)
-	fmt.Fprintln(w, "NAME\tCONTEXT\tSTATUS")
+	fmt.Fprintln(w, "NAME\tPHASE\tCONTEXT")
 	for _, integration := range integrationList.Items {
-		fmt.Fprintf(w, "%s\t%s\t%s\n", integration.Name, integration.Status.Context, string(integration.Status.Phase))
+		fmt.Fprintf(w, "%s\t%s\t%s\n", integration.Name, string(integration.Status.Phase), integration.Status.Context)
 	}
 	w.Flush()
 


Mime
View raw message