Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

fix: add support for parameters #69 #159

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/getMermaidFlowchart.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ function getMermaidFlowchart(metrics) {
const service = subscriber.replace(/\s/g,'');
if (!visitedServices.includes(service)) {
visitedServices.push(service);
mermaidSyntax+=`\n${service}[${subscriber}]`;
mermaidSyntax+=`\n ${service}[${subscriber}]`;
}
mermaidSyntax+=`\n${service} -- ${channel} --> server${i}`;
mermaidSyntax+=`\n ${service} -- "${channel}" --> server${i}`;
});

operations.pub.forEach((metadata,publisher) => {
const service = publisher.replace(/\s/g,'');
if (!visitedServices.includes(service)) {
visitedServices.push(service);
mermaidSyntax+=`\n${service}[${publisher}]`;
mermaidSyntax+=`\n ${service}[${publisher}]`;
}
mermaidSyntax+=`\nserver${i} -- ${channel} --> ${service}`;
mermaidSyntax+=`\n server${i} -- "${channel}" --> ${service}`;
});
});
i++;
});
return `graph TD${mermaidSyntax}`;
}

module.exports = getMermaidFlowchart;
module.exports = getMermaidFlowchart;
2 changes: 1 addition & 1 deletion test/appRelationsDiscovery_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.