Skip to content

Commit cf92447

Browse files
get_pipelineid_from_workflow (#87)
1 parent 2eddc68 commit cf92447

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

lib/interface/cli/commands/root/get.cmd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ const get = new Command({
3434
default: false,
3535
group: 'general',
3636
})
37-
.option('watch_interval', {
37+
.option('watch-interval', {
3838
describe: 'Interval time at watching mode (in seconds)',
3939
default: DEFAULTS.WATCH_INTERVAL_MS / 1000,
4040
group: 'general',
4141
})
42-
.coerce('watch_interval', (watchInterval) => {
42+
.coerce('watch-interval', (watchInterval) => {
4343
return Math.max(watchInterval * 1000, DEFAULTS.WATCH_INTERVAL_MS);
4444
});
4545

lib/interface/cli/helpers/general.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const wrapHandler = (handler) => {
3737
throw err;
3838
}
3939
}
40-
await Promise.delay(argv.watch_interval);
40+
await Promise.delay(argv['watch-interval']);
4141
}
4242

4343
} catch (err) {

lib/logic/api/workflow.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ const _extractFieldsForWorkflowEntity = (workflow) => {
1818
finished: `${finished.format('YYYY-MM-DD, hh:mm:ss')}`,
1919
totalTime,
2020
status: workflow.status,
21-
pipeline: workflow.serviceName,
21+
'pipeline-name': workflow.serviceName,
2222
repository: `${workflow.repoOwner}/${workflow.repoName}`,
2323
branch: workflow.branchName,
2424
trigger: workflow.trigger,
2525
progress: workflow.progress,
26+
'pipeline-Id': workflow.serviceId,
2627
};
2728
};
2829

lib/logic/entities/Workflow.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,19 @@ class Workflow extends Entity {
55
super();
66
this.entityType = 'workflow';
77
this.info = data;
8-
this.defaultColumns = ['id', 'pipeline', 'status', 'created', 'finished', 'totalTime', 'trigger', 'repository', 'branch'];
9-
this.wideColumns = this.defaultColumns.concat([]);
8+
this.defaultColumns = ['id', 'pipeline-name', 'status', 'created', 'finished', 'totalTime', 'trigger', 'repository', 'branch'];
9+
this.wideColumns = [
10+
'id',
11+
'pipeline-name',
12+
'pipeline-Id',
13+
'status',
14+
'created',
15+
'finished',
16+
'totalTime',
17+
'trigger',
18+
'repository',
19+
'branch',
20+
];
1021
}
1122

1223
getStatus() {

0 commit comments

Comments
 (0)