Skip to content

Commit

Permalink
feat(pipeline): use really data for pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 2, 2021
1 parent 2458f72 commit 20cbea3
Showing 1 changed file with 13 additions and 29 deletions.
42 changes: 13 additions & 29 deletions web/public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,36 +69,20 @@ d3.json("data/struct.json").then(function (data) {
});

d3.json("fake/pipeline.json").then(function (data) {
let testdata = [
{
name: 'Initialize',
children: [
{ name: 'Initialize' }
]
},
{
name: 'Build', children: [
{ name: 'Pull code' },
{ name: 'Test' },
{ name: 'Build' }
]
},
{
name: 'Deploy', children: [
{ name: 'QA' },
{ name: 'UAT' },
{ name: 'STAGING' },
{ name: 'PROD' }
]
},
{
name: 'Finish', children: [
{ name: 'Finish' }
]
if (!!data) {
let pipeline = [];
let first_pipeline = data[0];
for (let stage of first_pipeline.stages) {
let jobs = [];
for (let step of stage.steps) {
jobs.push({name: step});
}
pipeline.push({
name: stage.name,
children: jobs
})
}
];

if (!!testdata) {
visualizationPipeline(testdata, '#pipeline');
visualizationPipeline(pipeline, '#pipeline');
}
});

0 comments on commit 20cbea3

Please sign in to comment.