Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 1 | import * as _ from 'lodash'; |
Matteo Scandolo | a160eef | 2017-03-06 17:21:26 -0800 | [diff] [blame] | 2 | import {Observable, BehaviorSubject, Subscription} from 'rxjs'; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 3 | import {IXosModelStoreService} from '../../datasources/stores/model.store'; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 4 | import { |
| 5 | IXosServiceGraph, IXosServiceModel, IXosTenantModel, IXosCoarseGraphData, |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 6 | IXosServiceGraphNode, IXosServiceGraphLink, IXosFineGrainedGraphData |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 7 | } from '../interfaces'; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 8 | import {IXosDebouncer} from '../../core/services/helpers/debounce.helper'; |
| 9 | export interface IXosServiceGraphStore { |
| 10 | get(): Observable<IXosServiceGraph>; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 11 | getCoarse(): Observable<IXosServiceGraph>; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 12 | } |
| 13 | |
| 14 | export class XosServiceGraphStore implements IXosServiceGraphStore { |
| 15 | static $inject = [ |
| 16 | '$log', |
| 17 | 'XosModelStore', |
Matteo Scandolo | bafd8d6 | 2017-03-29 23:23:00 -0700 | [diff] [blame] | 18 | 'XosDebouncer' |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 19 | ]; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 20 | |
| 21 | // graph data store |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 22 | private graphData: BehaviorSubject<IXosFineGrainedGraphData> = new BehaviorSubject({ |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 23 | services: [], |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 24 | tenants: [], |
| 25 | networks: [], |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 26 | subscribers: [], |
| 27 | servicedependencys: [] |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 28 | }); |
| 29 | |
Matteo Scandolo | 265c204 | 2017-03-20 10:15:40 -0700 | [diff] [blame] | 30 | private emptyGraph: IXosServiceGraph = { |
| 31 | nodes: [], |
| 32 | links: [] |
| 33 | }; |
| 34 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 35 | // representation of the graph as D3 requires |
Matteo Scandolo | 265c204 | 2017-03-20 10:15:40 -0700 | [diff] [blame] | 36 | private d3CoarseGraph = new BehaviorSubject(this.emptyGraph); |
| 37 | private d3FineGrainedGraph = new BehaviorSubject(this.emptyGraph); |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 38 | |
| 39 | // storing locally reference to the data model |
| 40 | private services; |
| 41 | private tenants; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 42 | private subscribers; |
| 43 | private networks; |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 44 | private servicedependencys; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 45 | |
| 46 | // debounced functions |
| 47 | private handleData; |
| 48 | |
| 49 | // datastore |
Matteo Scandolo | a160eef | 2017-03-06 17:21:26 -0800 | [diff] [blame] | 50 | private ServiceSubscription: Subscription; |
| 51 | private TenantSubscription: Subscription; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 52 | private SubscriberSubscription: Subscription; |
| 53 | private NetworkSubscription: Subscription; |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 54 | private ServiceDependencySubscription: Subscription; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 55 | |
| 56 | constructor ( |
| 57 | private $log: ng.ILogService, |
| 58 | private XosModelStore: IXosModelStoreService, |
Matteo Scandolo | bafd8d6 | 2017-03-29 23:23:00 -0700 | [diff] [blame] | 59 | private XosDebouncer: IXosDebouncer |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 60 | ) { |
| 61 | |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 62 | this.$log.info(`[XosServiceGraphStore] Setup`); |
| 63 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 64 | // we want to have a quiet period of 500ms from the last event before doing anything |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 65 | this.handleData = this.XosDebouncer.debounce(this._handleData, 500, this, false); |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 66 | |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 67 | // observe models and populate graphData |
Matteo Scandolo | a160eef | 2017-03-06 17:21:26 -0800 | [diff] [blame] | 68 | this.ServiceSubscription = this.XosModelStore.query('Service', '/core/services') |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 69 | .subscribe( |
| 70 | (res) => { |
| 71 | this.combineData(res, 'services'); |
| 72 | }, |
| 73 | (err) => { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 74 | this.$log.error(`[XosServiceGraphStore] Service Observable: `, err); |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 75 | } |
| 76 | ); |
| 77 | |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 78 | this.ServiceDependencySubscription = this.XosModelStore.query('ServiceDependency', '/core/servicedependencys') |
| 79 | .subscribe( |
| 80 | (res) => { |
| 81 | this.combineData(res, 'servicedependencys'); |
| 82 | }, |
| 83 | (err) => { |
| 84 | this.$log.error(`[XosServiceGraphStore] Service Observable: `, err); |
| 85 | } |
| 86 | ); |
| 87 | |
Matteo Scandolo | a160eef | 2017-03-06 17:21:26 -0800 | [diff] [blame] | 88 | this.TenantSubscription = this.XosModelStore.query('Tenant', '/core/tenants') |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 89 | .subscribe( |
| 90 | (res) => { |
| 91 | this.combineData(res, 'tenants'); |
| 92 | }, |
| 93 | (err) => { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 94 | this.$log.error(`[XosServiceGraphStore] Tenant Observable: `, err); |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 95 | } |
| 96 | ); |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 97 | |
Matteo Scandolo | 0e8a842 | 2017-03-25 14:55:40 -0700 | [diff] [blame] | 98 | this.SubscriberSubscription = this.XosModelStore.query('Tenantroot', '/core/tenantroots') |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 99 | .subscribe( |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 100 | (res) => { |
| 101 | this.combineData(res, 'subscribers'); |
| 102 | }, |
| 103 | (err) => { |
| 104 | this.$log.error(`[XosServiceGraphStore] Subscriber Observable: `, err); |
| 105 | } |
| 106 | ); |
| 107 | |
| 108 | this.NetworkSubscription = this.XosModelStore.query('Network', '/core/networks') |
| 109 | .subscribe( |
| 110 | (res) => { |
| 111 | this.combineData(res, 'networks'); |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 112 | }, |
| 113 | (err) => { |
| 114 | this.$log.error(`[XosServiceGraphStore] graphData Observable: `, err); |
| 115 | } |
| 116 | ); |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 117 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 118 | // observe graphData and build Coarse and FineGrained graphs |
| 119 | this.graphData |
| 120 | .subscribe( |
| 121 | (res: IXosFineGrainedGraphData) => { |
Matteo Scandolo | 98b5f5d | 2017-03-17 17:09:05 -0700 | [diff] [blame] | 122 | this.$log.debug(`[XosServiceGraphStore] New graph data received`, res); |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 123 | this.graphDataToCoarseGraph(res); |
| 124 | this.graphDataToFineGrainedGraph(res); |
| 125 | }, |
| 126 | (err) => { |
| 127 | this.$log.error(`[XosServiceGraphStore] graphData Observable: `, err); |
| 128 | } |
| 129 | ); |
Matteo Scandolo | a160eef | 2017-03-06 17:21:26 -0800 | [diff] [blame] | 130 | } |
| 131 | |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 132 | public get() { |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 133 | return this.d3FineGrainedGraph.asObservable(); |
| 134 | } |
| 135 | |
| 136 | public getCoarse() { |
| 137 | return this.d3CoarseGraph.asObservable(); |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 138 | } |
| 139 | |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 140 | private combineData(data: any, type: 'services'|'tenants'|'subscribers'|'networks'|'servicedependencys') { |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 141 | switch (type) { |
| 142 | case 'services': |
| 143 | this.services = data; |
| 144 | break; |
| 145 | case 'tenants': |
| 146 | this.tenants = data; |
| 147 | break; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 148 | case 'subscribers': |
| 149 | this.subscribers = data; |
| 150 | break; |
| 151 | case 'networks': |
| 152 | this.networks = data; |
| 153 | break; |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 154 | case 'servicedependencys': |
| 155 | this.servicedependencys = data; |
| 156 | break; |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 157 | } |
| 158 | this.handleData(this.services, this.tenants); |
| 159 | } |
| 160 | |
| 161 | private _handleData(services: IXosServiceModel[], tenants: IXosTenantModel[]) { |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 162 | this.graphData.next({ |
| 163 | services: this.services, |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 164 | tenants: this.tenants, |
| 165 | subscribers: this.subscribers, |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 166 | networks: this.networks, |
| 167 | servicedependencys: this.servicedependencys |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 168 | }); |
| 169 | } |
| 170 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 171 | private getNodeIndexById(id: number | string, nodes: IXosServiceModel[]) { |
Matteo Scandolo | 0c61c9b | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 172 | return _.findIndex(nodes, {id: id}); |
| 173 | } |
| 174 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 175 | private d3Id(type: string, id: number) { |
| 176 | return `${type.toLowerCase()}~${id}`; |
| 177 | } |
| 178 | |
| 179 | private getTargetId(tenant: IXosTenantModel) { |
| 180 | |
| 181 | let targetId; |
| 182 | if (tenant.subscriber_service_id) { |
| 183 | targetId = this.d3Id('service', tenant.subscriber_service_id); |
| 184 | } |
| 185 | else if (tenant.subscriber_tenant_id) { |
| 186 | targetId = this.d3Id('tenant', tenant.subscriber_tenant_id); |
| 187 | } |
| 188 | else if (tenant.subscriber_network_id) { |
| 189 | targetId = this.d3Id('network', tenant.subscriber_network_id); |
| 190 | } |
| 191 | else if (tenant.subscriber_root_id) { |
Matteo Scandolo | 0e8a842 | 2017-03-25 14:55:40 -0700 | [diff] [blame] | 192 | // FIXME understand what's the correct model for the subscriber |
| 193 | targetId = this.d3Id('tenantroot', tenant.subscriber_root_id); |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 194 | } |
| 195 | return targetId; |
| 196 | } |
| 197 | |
| 198 | private getSourceId(tenant: IXosTenantModel) { |
| 199 | return this.d3Id('service', tenant.provider_service_id); |
| 200 | } |
| 201 | |
| 202 | private getNodeType(n: any) { |
| 203 | return n.class_names.split(',')[0].toLowerCase(); |
| 204 | } |
| 205 | |
| 206 | private getNodeLabel(n: any) { |
| 207 | if (this.getNodeType(n) === 'tenant') { |
| 208 | return n.id; |
| 209 | } |
| 210 | return n.humanReadableName ? n.humanReadableName : n.name; |
| 211 | } |
| 212 | |
| 213 | private removeUnwantedFineGrainedData(data: IXosFineGrainedGraphData): IXosFineGrainedGraphData { |
| 214 | data.tenants = _.filter(data.tenants, t => t.kind !== 'coarse'); |
| 215 | data.networks = _.filter(data.networks, n => { |
| 216 | const subscriber = _.findIndex(data.tenants, {subscriber_network_id: n.id}); |
| 217 | return subscriber > -1; |
| 218 | }); |
| 219 | return data; |
| 220 | } |
| 221 | |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 222 | private graphDataToCoarseGraph(data: IXosCoarseGraphData) { |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 223 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 224 | try { |
Matteo Scandolo | d487853 | 2017-03-20 17:39:55 -0700 | [diff] [blame] | 225 | const links: IXosServiceGraphLink[] = _.chain(data.servicedependencys) |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 226 | .map((t: IXosTenantModel) => { |
| 227 | return { |
| 228 | id: t.id, |
| 229 | source: this.getNodeIndexById(t.provider_service_id, data.services), |
| 230 | target: this.getNodeIndexById(t.subscriber_service_id, data.services), |
| 231 | model: t |
| 232 | }; |
| 233 | }) |
| 234 | .value(); |
| 235 | |
| 236 | const nodes: IXosServiceGraphNode[] = _.map(data.services, (s: IXosServiceModel) => { |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 237 | return { |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 238 | id: s.id, |
| 239 | label: s.name, |
| 240 | model: s |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 241 | }; |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 242 | }); |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 243 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 244 | let graph: IXosServiceGraph = { |
| 245 | nodes, |
| 246 | links |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 247 | }; |
Matteo Scandolo | 968e7f2 | 2017-03-03 11:49:18 -0800 | [diff] [blame] | 248 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 249 | this.d3CoarseGraph.next(graph); |
| 250 | } catch (e) { |
| 251 | this.d3CoarseGraph.error(e); |
| 252 | } |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 253 | } |
| 254 | |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 255 | private graphDataToFineGrainedGraph(data: IXosFineGrainedGraphData) { |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 256 | try { |
| 257 | data = this.removeUnwantedFineGrainedData(data); |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 258 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 259 | let nodes = _.reduce(Object.keys(data), (list: any[], k: string) => { |
| 260 | return list.concat(data[k]); |
| 261 | }, []); |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 262 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 263 | nodes = _.chain(nodes) |
| 264 | .map(n => { |
| 265 | n.d3Id = this.d3Id(this.getNodeType(n), n.id); |
| 266 | return n; |
| 267 | }) |
| 268 | .map(n => { |
| 269 | let node: IXosServiceGraphNode = { |
| 270 | id: n.d3Id, |
| 271 | label: this.getNodeLabel(n), |
| 272 | model: n, |
| 273 | type: this.getNodeType(n) |
| 274 | }; |
| 275 | return node; |
| 276 | }) |
| 277 | .value(); |
| 278 | |
| 279 | const links = _.reduce(data.tenants, (links: IXosServiceGraphLink[], tenant: IXosTenantModel) => { |
| 280 | const sourceId = this.getSourceId(tenant); |
| 281 | const targetId = this.getTargetId(tenant); |
Matteo Scandolo | bafd8d6 | 2017-03-29 23:23:00 -0700 | [diff] [blame] | 282 | if (!angular.isDefined(targetId) || !angular.isDefined(sourceId)) { |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 283 | // if the tenant is not pointing to anything, don't draw links |
| 284 | return links; |
| 285 | } |
| 286 | |
| 287 | const tenantToProvider = { |
| 288 | id: `${sourceId}_${tenant.d3Id}`, |
| 289 | source: this.getNodeIndexById(sourceId, nodes), |
| 290 | target: this.getNodeIndexById(tenant.d3Id, nodes), |
| 291 | model: tenant |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 292 | }; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 293 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 294 | const tenantToSubscriber = { |
| 295 | id: `${tenant.d3Id}_${targetId}`, |
| 296 | source: this.getNodeIndexById(tenant.d3Id, nodes), |
| 297 | target: this.getNodeIndexById(targetId, nodes), |
| 298 | model: tenant |
| 299 | }; |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 300 | |
Matteo Scandolo | bafd8d6 | 2017-03-29 23:23:00 -0700 | [diff] [blame] | 301 | if (angular.isDefined(tenantToProvider.source) && angular.isDefined(tenantToProvider.target)) { |
| 302 | links.push(tenantToProvider); |
| 303 | } |
| 304 | if (angular.isDefined(tenantToSubscriber.source) && angular.isDefined(tenantToSubscriber.target)) { |
| 305 | links.push(tenantToSubscriber); |
| 306 | } |
Matteo Scandolo | 6d3e80e | 2017-03-10 11:34:43 -0800 | [diff] [blame] | 307 | return links; |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 308 | }, []); |
| 309 | |
Matteo Scandolo | 265c204 | 2017-03-20 10:15:40 -0700 | [diff] [blame] | 310 | if (nodes.length === 0 && links.length === 0) { |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 311 | return; |
Matteo Scandolo | 6d3e80e | 2017-03-10 11:34:43 -0800 | [diff] [blame] | 312 | } |
| 313 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 314 | let graph: IXosServiceGraph = { |
| 315 | nodes, |
| 316 | links |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 317 | }; |
| 318 | |
Matteo Scandolo | 7629cc4 | 2017-03-13 14:12:15 -0700 | [diff] [blame] | 319 | this.d3FineGrainedGraph.next(graph); |
| 320 | } catch (e) { |
| 321 | this.d3FineGrainedGraph.error(e); |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 322 | } |
Matteo Scandolo | 7517178 | 2017-03-08 14:17:01 -0800 | [diff] [blame] | 323 | } |
Matteo Scandolo | a62adbc | 2017-03-02 15:37:34 -0800 | [diff] [blame] | 324 | } |