From 8eec353437eab1378ea7c33b0acad440b07507f8 Mon Sep 17 00:00:00 2001 From: Itai Gendler Date: Wed, 10 Jan 2018 10:10:41 +0200 Subject: [PATCH] Update get context handler to show the underlying data --- lib/interface/cli/commands/context/get.cmd.js | 2 +- lib/logic/api/context.js | 1 + lib/logic/entities/Context.js | 4 ++-- package.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/interface/cli/commands/context/get.cmd.js b/lib/interface/cli/commands/context/get.cmd.js index aaa8a293e..c73c9e503 100644 --- a/lib/interface/cli/commands/context/get.cmd.js +++ b/lib/interface/cli/commands/context/get.cmd.js @@ -11,7 +11,7 @@ const getRoot = require('../root/get.cmd'); const command = new Command({ command: 'contexts [name]', aliases: ['ctx', 'context'], - description: 'get-contexts', + description: 'Get contexts', builder: (yargs) => { return yargs .positional('name', { diff --git a/lib/logic/api/context.js b/lib/logic/api/context.js index 3458964b7..5aaccacda 100644 --- a/lib/logic/api/context.js +++ b/lib/logic/api/context.js @@ -9,6 +9,7 @@ const _extractFieldsForContextEntity = context => ({ name: context.metadata.name, owner: context.owner, type: context.spec.type, + spec: context.spec, }); diff --git a/lib/logic/entities/Context.js b/lib/logic/entities/Context.js index 22510143a..430a8eea4 100644 --- a/lib/logic/entities/Context.js +++ b/lib/logic/entities/Context.js @@ -6,8 +6,8 @@ class Context extends Entity { super(); this.entityType = 'context'; this.info = data; - this.defaultColumns = ['apiVersion', 'kind', 'name']; - this.wideColumns = ['apiVersion', 'kind', 'name', 'owner', 'type']; + this.defaultColumns = ['name', 'type']; + this.wideColumns = this.defaultColumns.concat(['owner']); } // get the type of the context from spec.type diff --git a/package.json b/package.json index aa9d27e1c..38a5059ad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "codefresh", - "version": "0.6.1", + "version": "0.6.3", "description": "Codefresh command line utility", "main": "index.js", "preferGlobal": true,