Showing
1 changed file
with
17 additions
and
32 deletions
@@ -329,7 +329,12 @@ | @@ -329,7 +329,12 @@ | ||
329 | container_az2.add(newNode(scene,appNodeX+100 + margin_left_container,appNodeY+180,1,1));//右上 | 329 | container_az2.add(newNode(scene,appNodeX+100 + margin_left_container,appNodeY+180,1,1));//右上 |
330 | 330 | ||
331 | 331 | ||
332 | - var prod_elb = newNode(scene,appNodeX+155,appNodeY+50,appNodeW,appNodeH,'prod_elb'); | 332 | + var prod_elb = newNode(scene,appNodeX+150,appNodeY+50,appNodeW,appNodeH,'prod_elb'); |
333 | + var blk_elb = newNode(scene,appNodeX+290,appNodeY+50,appNodeW,appNodeH,'blk_elb'); | ||
334 | + | ||
335 | + var elbArray=new Array(); | ||
336 | + elbArray.push(prod_elb); | ||
337 | + elbArray.push(blk_elb); | ||
333 | 338 | ||
334 | //所有az1机器 | 339 | //所有az1机器 |
335 | if(respData.az1Ips){ | 340 | if(respData.az1Ips){ |
@@ -339,9 +344,11 @@ | @@ -339,9 +344,11 @@ | ||
339 | }); | 344 | }); |
340 | 345 | ||
341 | if(respData.inAz1){ | 346 | if(respData.inAz1){ |
342 | - var link = newLink(scene,prod_elb, container_az1,""); | ||
343 | - link.arrowsRadius = 10; | ||
344 | - link.strokeColor = '0,250,0'; | 347 | + for(var i=0;i<elbArray.length;i++){ |
348 | + var link = newLink(scene,elbArray[i], container_az1,""); | ||
349 | + link.arrowsRadius = 10; | ||
350 | + link.strokeColor = '0,250,'+(i*250); | ||
351 | + } | ||
345 | } | 352 | } |
346 | } | 353 | } |
347 | 354 | ||
@@ -353,36 +360,14 @@ | @@ -353,36 +360,14 @@ | ||
353 | }); | 360 | }); |
354 | 361 | ||
355 | if(respData.inAz2){ | 362 | if(respData.inAz2){ |
356 | - var link = newLink(scene,prod_elb, container_az2,""); | ||
357 | - link.arrowsRadius = 10; | ||
358 | - link.strokeColor = '0,250,0'; | 363 | + for(var i=0;i<elbArray.length;i++){ |
364 | + var link = newLink(scene,elbArray[i], container_az2,""); | ||
365 | + link.arrowsRadius = 10; | ||
366 | + link.strokeColor = '0,250,'+(i*250); | ||
367 | + } | ||
359 | } | 368 | } |
360 | } | 369 | } |
361 | 370 | ||
362 | - | ||
363 | - | ||
364 | - return ; | ||
365 | - | ||
366 | - var data = resp.data; | ||
367 | - var grayLinkColor="220,20,60"; | ||
368 | - //线下店服务指向 | ||
369 | - if('online' == data.storeService){ | ||
370 | - var link = newLink(scene,storeNginx, storeService,"online"); | ||
371 | - link.arrowsRadius = 10; | ||
372 | - }else if('gray' == data.storeService){ | ||
373 | - var link = newLink(scene,storeNginx, storeService_gray,"gray",grayLinkColor); | ||
374 | - link.arrowsRadius = 10; | ||
375 | - } | ||
376 | - | ||
377 | - //延展服务指向 | ||
378 | - if('online' == data.extendService){ | ||
379 | - var link = newLink(scene,storeNginx, extendService,"online"); | ||
380 | - link.arrowsRadius = 10; | ||
381 | - }else if('gray' == data.extendService){ | ||
382 | - var link = newLink(scene,storeNginx, extendService_gray,"gray",grayLinkColor); | ||
383 | - link.arrowsRadius = 10; | ||
384 | - } | ||
385 | - | ||
386 | } | 371 | } |
387 | 372 | ||
388 | // 节点 | 373 | // 节点 |
@@ -390,7 +375,7 @@ | @@ -390,7 +375,7 @@ | ||
390 | var node = new JTopo.Node(text); | 375 | var node = new JTopo.Node(text); |
391 | node.setLocation(x, y); | 376 | node.setLocation(x, y); |
392 | node.setSize(w, h); | 377 | node.setSize(w, h); |
393 | - if("prod_elb"==text||"gray_elb"==text){ | 378 | + if(text!=null&&text.indexOf("elb")>=0){ |
394 | node.setImage(contextPath + 'img/pstn/cloud.png', true); | 379 | node.setImage(contextPath + 'img/pstn/cloud.png', true); |
395 | node.textPosition = 'Middle_Center';// 文字居中 | 380 | node.textPosition = 'Middle_Center';// 文字居中 |
396 | }else if(text!=null&&text.length>0){ | 381 | }else if(text!=null&&text.length>0){ |
-
Please register or login to post a comment