Skip to content

Commit

Permalink
get_pipelineid_from_workflow (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziv-codefresh authored Jan 9, 2018
1 parent 2eddc68 commit cf92447
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/interface/cli/commands/root/get.cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ const get = new Command({
default: false,
group: 'general',
})
.option('watch_interval', {
.option('watch-interval', {
describe: 'Interval time at watching mode (in seconds)',
default: DEFAULTS.WATCH_INTERVAL_MS / 1000,
group: 'general',
})
.coerce('watch_interval', (watchInterval) => {
.coerce('watch-interval', (watchInterval) => {
return Math.max(watchInterval * 1000, DEFAULTS.WATCH_INTERVAL_MS);
});

Expand Down
2 changes: 1 addition & 1 deletion lib/interface/cli/helpers/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const wrapHandler = (handler) => {
throw err;
}
}
await Promise.delay(argv.watch_interval);
await Promise.delay(argv['watch-interval']);
}

} catch (err) {
Expand Down
3 changes: 2 additions & 1 deletion lib/logic/api/workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ const _extractFieldsForWorkflowEntity = (workflow) => {
finished: `${finished.format('YYYY-MM-DD, hh:mm:ss')}`,
totalTime,
status: workflow.status,
pipeline: workflow.serviceName,
'pipeline-name': workflow.serviceName,
repository: `${workflow.repoOwner}/${workflow.repoName}`,
branch: workflow.branchName,
trigger: workflow.trigger,
progress: workflow.progress,
'pipeline-Id': workflow.serviceId,
};
};

Expand Down
15 changes: 13 additions & 2 deletions lib/logic/entities/Workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@ class Workflow extends Entity {
super();
this.entityType = 'workflow';
this.info = data;
this.defaultColumns = ['id', 'pipeline', 'status', 'created', 'finished', 'totalTime', 'trigger', 'repository', 'branch'];
this.wideColumns = this.defaultColumns.concat([]);
this.defaultColumns = ['id', 'pipeline-name', 'status', 'created', 'finished', 'totalTime', 'trigger', 'repository', 'branch'];
this.wideColumns = [
'id',
'pipeline-name',
'pipeline-Id',
'status',
'created',
'finished',
'totalTime',
'trigger',
'repository',
'branch',
];
}

getStatus() {
Expand Down

0 comments on commit cf92447

Please sign in to comment.