Skip to content

Commit

Permalink
Update get context handler to show the underlying data
Browse files Browse the repository at this point in the history
  • Loading branch information
Itai Gendler authored and Itai Gendler committed Jan 10, 2018
1 parent 78f18fc commit 8eec353
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/interface/cli/commands/context/get.cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down
1 change: 1 addition & 0 deletions lib/logic/api/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const _extractFieldsForContextEntity = context => ({
name: context.metadata.name,
owner: context.owner,
type: context.spec.type,
spec: context.spec,
});


Expand Down
4 changes: 2 additions & 2 deletions lib/logic/entities/Context.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codefresh",
"version": "0.6.1",
"version": "0.6.3",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
Expand Down

0 comments on commit 8eec353

Please sign in to comment.