[AAI] Remove Robby Maharajh & Harish Kajur as committers
[aai/sparky-fe.git] / src / generic-components / graph / TempCreateAttributes.js
1 /*
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017-2018 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21 import React from 'react';
22
23
24 export default {
25   createNodeAttributes: () => {
26     return {
27       className: 'node'
28     };
29   },
30   createShapeAttributes: () => {
31     return {
32       r: 3
33     };
34   },
35   createCircleStyle: () => {
36     return {
37       fill: 'rgb(98, 102, 104)',
38       stroke: 'rgb(78, 82, 84)',
39       strokeWidth: 1
40     };
41   },
42   createLinkAttributes: () => {
43     return {
44       className: 'link',
45       x1: 50,
46       y1: 50,
47       x2: 100,
48       y2: 500,
49     };
50   },
51   createLineStyle: () => {
52     return {
53       stroke: 'rgb(217, 218, 218)',
54       strokeWidth: 1
55     };
56   },
57   createTestCircle: () => {
58     return React.createElement('circle', {
59       cx: '100',
60       cy: '100',
61       r: '15',
62       fill: 'rgb(255, 255, 255)',
63       stroke: 'rgb(98, 102, 104)',
64       strokeWidth: '3'
65     });
66   },
67   getNodeLinkArray: () => {
68     return {
69       'graphMeta': {
70         'aaiEntityNodeDescriptors': {
71           'generalNodeClass': {
72             'class': 'aai-entity-node general-node',
73             'visualElements': [
74               {
75                 'type': 'circle',
76                 'class': 'outer',
77                 'svgAttributes': {
78                   'r': '16'
79                 }
80               },
81               {
82                 'type': 'circle',
83                 'class': 'inner',
84                 'svgAttributes': {
85                   'r': '10'
86                 }
87               },
88               {
89                 'type': 'text',
90                 'class': 'id-type-label',
91                 'displayKey': 'itemType',
92                 'shapeAttributes': {
93                   'offset': {
94                     'x': '0',
95                     'y': '33'
96                   }
97                 }
98               },
99               {
100                 'type': 'text',
101                 'class': 'id-value-label',
102                 'displayKey': 'itemNameValue',
103                 'shapeAttributes': {
104                   'offset': {
105                     'x': '0',
106                     'y': '48'
107                   }
108                 }
109               }
110             ]
111           },
112           'searchedNodeClass': {
113             'class': 'aai-entity-node search-node',
114             'visualElements': [
115               {
116                 'type': 'circle',
117                 'class': 'outer',
118                 'svgAttributes': {
119                   'r': '16'
120                 }
121               },
122               {
123                 'type': 'circle',
124                 'class': 'inner',
125                 'svgAttributes': {
126                   'r': '10'
127                 }
128               },
129               {
130                 'type': 'text',
131                 'class': 'id-type-label',
132                 'displayKey': 'itemType',
133                 'shapeAttributes': {
134                   'offset': {
135                     'x': '0',
136                     'y': '33'
137                   }
138                 }
139               },
140               {
141                 'type': 'text',
142                 'class': 'id-value-label',
143                 'displayKey': 'itemNameValue',
144                 'shapeAttributes': {
145                   'offset': {
146                     'x': '0',
147                     'y': '48'
148                   }
149                 }
150               }
151             ]
152           },
153           'selectedSearchedNodeClass': {
154             'class': 'aai-entity-node selected-search-node',
155             'visualElements': [
156               {
157                 'type': 'circle',
158                 'class': 'outer',
159                 'svgAttributes': {
160                   'r': '31'
161                 }
162               },
163               {
164                 'type': 'circle',
165                 'class': 'inner',
166                 'svgAttributes': {
167                   'r': '20'
168                 }
169               },
170               {
171                 'type': 'text',
172                 'class': 'id-type-label',
173                 'displayKey': 'itemType',
174                 'shapeAttributes': {
175                   'offset': {
176                     'x': '0',
177                     'y': '48'
178                   }
179                 }
180               },
181               {
182                 'type': 'text',
183                 'class': 'id-value-label',
184                 'displayKey': 'itemNameValue',
185                 'shapeAttributes': {
186                   'offset': {
187                     'x': '0',
188                     'y': '63'
189                   }
190                 }
191               },
192               {
193                 'type': 'button',
194                 'name': 'icon_ellipses',
195                 'class': 'node-button',
196                 'shapeAttributes': {
197                   'offset': {
198                     'x': '33',
199                     'y': '-35'
200                   }
201                 },
202                 'svgAttributes': {
203                   'className': 'node-button',
204                   'r': '10'
205                 }
206               },
207               {
208                 'type': 'button',
209                 'name': 'icon_triangle_warning',
210                 'class': 'node-button',
211                 'shapeAttributes': {
212                   'offset': {
213                     'x': '46',
214                     'y': '-12'
215                   }
216                 },
217                 'svgAttributes': {
218                   'className': 'node-button',
219                   'r': '10'
220                 }
221               }
222             ]
223           },
224           'selectedNodeClass': {
225             'class': 'aai-entity-node selected-node',
226             'visualElements': [
227               {
228                 'type': 'circle',
229                 'class': 'outer',
230                 'svgAttributes': {
231                   'r': '31'
232                 }
233               },
234               {
235                 'type': 'circle',
236                 'class': 'inner',
237                 'svgAttributes': {
238                   'r': '20'
239                 }
240               },
241               {
242                 'type': 'text',
243                 'class': 'id-type-label',
244                 'displayKey': 'itemType',
245                 'shapeAttributes': {
246                   'offset': {
247                     'x': '0',
248                     'y': '48'
249                   }
250                 }
251               },
252               {
253                 'type': 'text',
254                 'class': 'id-value-label',
255                 'displayKey': 'itemNameValue',
256                 'shapeAttributes': {
257                   'offset': {
258                     'x': '0',
259                     'y': '63'
260                   }
261                 }
262               },
263               {
264                 'type': 'button',
265                 'name': 'icon_ellipses',
266                 'class': 'node-button',
267                 'shapeAttributes': {
268                   'offset': {
269                     'x': '33',
270                     'y': '-35'
271                   }
272                 },
273                 'svgAttributes': {
274                   'className': 'node-button',
275                   'r': '10'
276                 }
277               },
278               {
279                 'type': 'button',
280                 'name': 'icon_triangle_warning',
281                 'class': 'node-button',
282                 'shapeAttributes': {
283                   'offset': {
284                     'x': '46',
285                     'y': '-12'
286                   }
287                 },
288                 'svgAttributes': {
289                   'className': 'node-button',
290                   'r': '10'
291                 }
292               }
293             ]
294           }
295         },
296         'numNodes': 6,
297         'numLinks': 5,
298         'renderTimeInMs': 4550,
299         'numLinksResolvedSuccessfullyFromCache': 0,
300         'numLinksResolvedSuccessfullyFromServer': 7,
301         'numLinkResolveFailed': 0
302       },
303       'nodes': [{
304         'id': 'TRINITY-PSERVER',
305         'itemType': 'pserver',
306         'itemNameKey': 'pserver.TRINITY-PSERVER',
307         'itemNameValue': 'TRINITY-PSERVER',
308         'itemProperties': {
309           'hostname': 'TRINITY-PSERVER',
310           'in-maint': 'false',
311           'resource-version': '1455590484'
312         },
313         'nodeMeta': {
314           'className': 'selectedSearchedNodeClass',
315           'nodeDebug': null,
316           'selfLinkResponseTimeInMs': 628,
317           'relationshipNode': false,
318           'searchTarget': true,
319           'enrichableNode': false,
320           'nodeValidated': true,
321           'nodeIssue': true
322         }
323       }, {
324         'id': 'TRINITYSIL',
325         'itemType': 'complex',
326         'itemNameKey': 'complex.TRINITYSIL',
327         'itemNameValue': 'TRINITYSIL',
328         'itemProperties': {
329           'country': 'USA',
330           'postal-code': '07748',
331           'city': 'Middletown',
332           'physical-location-id': 'TRINITYSIL',
333           'resource-version': '1459957457',
334           'street1': 'Trinity',
335           'state': 'NJ',
336           'physical-location-type': 'Trinity',
337           'region': 'US'
338         },
339         'nodeMeta': {
340           'className': 'generalNodeClass',
341           'nodeDebug': null,
342           'selfLinkResponseTimeInMs': 644,
343           'relationshipNode': false,
344           'searchTarget': false,
345           'enrichableNode': false,
346           'nodeValidated': true,
347           'nodeIssue': false
348         }
349       }, {
350         'id': 'c385bb3e-6ebd-4898-bc92-792e0ac2db50',
351         'itemType': 'vserver',
352         'itemNameKey': 'vserver.c385bb3e-6ebd-4898-bc92-792e0ac2db50',
353         'itemNameValue': 'c385bb3e-6ebd-4898-bc92-792e0ac2db50',
354         'itemProperties': {
355           'in-maint': 'false',
356           'resource-version': '1475160142',
357           'vserver-name': 'bems0001vm001',
358           'prov-status': 'ACTIVE',
359           'vserver-id': 'c385bb3e-6ebd-4898-bc92-792e0ac2db50',
360           'vserver-name2': 'bems0001vm001bem001-1452',
361           'vserver-selflink': 'TRINITY vserverLink',
362           'is-closed-loop-disabled': 'false'
363         },
364         'nodeMeta': {
365           'className': 'generalNodeClass',
366           'nodeDebug': null,
367           'selfLinkResponseTimeInMs': 2633,
368           'relationshipNode': false,
369           'searchTarget': false,
370           'enrichableNode': false
371         }
372       }, {
373         'id': '7c73d776-001d-4042-a958-37f2e419ed10',
374         'itemType': 'vserver',
375         'itemNameKey': 'vserver.7c73d776-001d-4042-a958-37f2e419ed10',
376         'itemNameValue': '7c73d776-001d-4042-a958-37f2e419ed10',
377         'itemProperties': {
378           'resource-version': '1477075390',
379           'vserver-name': 'nsbg0001vm002',
380           'prov-status': 'NVTPROV',
381           'vserver-id': '7c73d776-001d-4042-a958-37f2e419ed10',
382           'vserver-name2': 'VM-19631',
383           'vserver-selflink': 'TRINITY vserverLink'
384         },
385         'nodeMeta': {
386           'className': 'generalNodeClass',
387           'nodeDebug': null,
388           'selfLinkResponseTimeInMs': 2368,
389           'relationshipNode': false,
390           'searchTarget': false,
391           'enrichableNode': false
392         }
393       }, {
394         'id': 'fc6be93d-915e-4034-a8f9-463b70130614',
395         'itemType': 'vserver',
396         'itemNameKey': 'vserver.fc6be93d-915e-4034-a8f9-463b70130614',
397         'itemNameValue': 'fc6be93d-915e-4034-a8f9-463b70130614',
398         'itemProperties': {
399           'resource-version': '1477075398',
400           'vserver-name': 'nsbg0001vm004',
401           'prov-status': 'NVTPROV',
402           'vserver-id': 'fc6be93d-915e-4034-a8f9-463b70130614',
403           'vserver-name2': 'VM-19630',
404           'vserver-selflink': 'TRINITY vserverLink'
405         },
406         'nodeMeta': {
407           'className': 'generalNodeClass',
408           'nodeDebug': null,
409           'selfLinkResponseTimeInMs': 2621,
410           'relationshipNode': false,
411           'searchTarget': false,
412           'enrichableNode': false
413         }
414       }, {
415         'id': '8555c2ed-6818-43c5-8cf5-cd36b0169031',
416         'itemType': 'vserver',
417         'itemNameKey': 'vserver.8555c2ed-6818-43c5-8cf5-cd36b0169031',
418         'itemNameValue': '8555c2ed-6818-43c5-8cf5-cd36b0169031',
419         'itemProperties': {
420           'resource-version': '1477075396',
421           'vserver-name': 'nsbg0001vm003',
422           'prov-status': 'NVTPROV',
423           'vserver-id': '8555c2ed-6818-43c5-8cf5-cd36b0169031',
424           'vserver-name2': 'VM-19629',
425           'vserver-selflink': 'TRINITY vserverLink'
426         },
427         'nodeMeta': {
428           'className': 'generalNodeClass',
429           'nodeDebug': null,
430           'selfLinkResponseTimeInMs': 2663,
431           'relationshipNode': false,
432           'searchTarget': false,
433           'enrichableNode': false
434         }
435       }],
436       'links': [{
437         'id': 'TRINITY-PSERVER_TRINITYSIL',
438         'source': 'TRINITY-PSERVER',
439         'target': 'TRINITYSIL'
440       }, {
441         'id': 'TRINITY-PSERVER_c385bb3e-6ebd-4898-bc92-792e0ac2db50',
442         'source': 'TRINITY-PSERVER',
443         'target': 'c385bb3e-6ebd-4898-bc92-792e0ac2db50'
444       }, {
445         'id': 'TRINITY-PSERVER_7c73d776-001d-4042-a958-37f2e419ed10',
446         'source': 'TRINITY-PSERVER',
447         'target': '7c73d776-001d-4042-a958-37f2e419ed10'
448       }, {
449         'id': 'TRINITY-PSERVER_fc6be93d-915e-4034-a8f9-463b70130614',
450         'source': 'TRINITY-PSERVER',
451         'target': 'fc6be93d-915e-4034-a8f9-463b70130614'
452       }, {
453         'id': 'TRINITY-PSERVER_8555c2ed-6818-43c5-8cf5-cd36b0169031',
454         'source': 'TRINITY-PSERVER',
455         'target': '8555c2ed-6818-43c5-8cf5-cd36b0169031'
456       }]
457     };
458   }
459 };