mirror of https://github.com/certd/certd
fix: 修复流水线列表页报length错误的bug
parent
ca9d1eed7a
commit
9864792bbf
|
@ -128,13 +128,15 @@ export class PipelineService extends BaseService<PipelineEntity> {
|
|||
}
|
||||
const pipeline = JSON.parse(item.content);
|
||||
let stepCount = 0;
|
||||
RunnableCollection.each(pipeline.stages, (runnable: any) => {
|
||||
stepCount++;
|
||||
});
|
||||
if(pipeline.stages){
|
||||
RunnableCollection.each(pipeline.stages, (runnable: any) => {
|
||||
stepCount++;
|
||||
});
|
||||
}
|
||||
// @ts-ignore
|
||||
item.stepCount = stepCount;
|
||||
// @ts-ignore
|
||||
item.triggerCount = pipeline.triggers.length;
|
||||
item.triggerCount = pipeline.triggers?.length;
|
||||
delete item.content;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue