Reading subscribers from TenantRoot model
Change-Id: Ifdf5df41faddb57ccbd3da2f7de798a8224d932e
diff --git a/src/app/service-graph/components/fine-grained/fine-grained.component.ts b/src/app/service-graph/components/fine-grained/fine-grained.component.ts
index e41adf8..0fbf411 100644
--- a/src/app/service-graph/components/fine-grained/fine-grained.component.ts
+++ b/src/app/service-graph/components/fine-grained/fine-grained.component.ts
@@ -132,7 +132,7 @@
}
private setupForceLayout() {
-
+ this.$log.debug(`[XosFineGrainedTenancyGraphCtrl] Setup Force Layout`);
const tick = () => {
this.nodeGroup.selectAll('g.node')
.attr({
@@ -147,10 +147,17 @@
y2: l => l.target.y || 0,
});
};
+ const getLinkStrenght = (l: IXosServiceGraphLink) => {
+ if (l.id.indexOf('service') > -1) {
+ return 0.1;
+ }
+ return 1;
+ };
const svgDim = this.getSvgDimensions();
this.forceLayout = d3.layout.force()
.size([svgDim.width, svgDim.heigth])
.linkDistance(config.force.linkDistance)
+ .linkStrength(l => getLinkStrenght(l))
.charge(config.force.charge)
.gravity(config.force.gravity)
.on('tick', tick);
@@ -206,11 +213,6 @@
transform: `rotate(45)`
});
- nodes.append('circle')
- .attr({
- r: '4px'
- });
-
nodes.append('text')
.attr({
'text-anchor': 'middle',
@@ -333,6 +335,7 @@
this.renderTenantNodes(entering.filter('.tenant'));
this.renderNetworkNodes(entering.filter('.network'));
this.renderSubscriberNodes(entering.filter('.subscriber'));
+ this.renderSubscriberNodes(entering.filter('.tenantroot'));
}
private renderLinks(links: IXosServiceGraphLink[]) {