@@ -511,12 +511,12 @@ function drawGraphForDrops(g, drawGraph, oids, doSpecs) {
511
511
512
512
if ( modified ) {
513
513
drawGraph ( ) ;
514
+ zoomFit ( ) ;
514
515
}
515
516
516
517
var time3 = new Date ( ) . getTime ( ) ;
517
518
console . log ( 'Took %d [ms] to draw the hole thing' , ( time3 - time2 ) )
518
519
519
- zoomFit ( )
520
520
}
521
521
522
522
function setStatusColor ( status ) {
@@ -580,11 +580,18 @@ function startStatusQuery(serverUrl, sessionId, selectedNode, graph_update_handl
580
580
// to know when we go to RUNNING.
581
581
// During RUNNING (or potentially FINISHED/CANCELLED, if the execution is
582
582
// extremely fast) we need to start updating the status of the graph
583
- if ( status == 3 || status == 4 || status == 5 ) {
583
+ if ( status === 3 || status === 4 || status = == 5 ) {
584
584
startGraphStatusUpdates ( serverUrl , sessionId , selectedNode , delay ,
585
585
status_update_handler ) ;
586
586
}
587
- else if ( status == 0 || status == 1 || status == 2 || status == - 1 ) {
587
+ else if ( status === 0 || status === 1 || status === 2 || status === - 1 ) {
588
+ if ( status === 2 ) {
589
+ // Visualise the drops if we are trying to 'deploy' them.
590
+ var keys = Object . keys ( doSpecs ) ;
591
+ keys . sort ( ) ;
592
+ var statuses = keys . map ( function ( k ) { return { "status" : 0 } } ) ;
593
+ status_update_handler ( statuses ) ;
594
+ }
588
595
// schedule a new JSON request
589
596
updateGraphDelayTimer = d3 . timer ( updateGraph , delay ) ;
590
597
updateGraphDelayTimerActive = true ;
@@ -605,7 +612,9 @@ function startStatusQuery(serverUrl, sessionId, selectedNode, graph_update_handl
605
612
606
613
function _addNode ( g , doSpec ) {
607
614
608
- if ( g . hasNode ( g ) ) {
615
+ var oid = doSpec . oid ;
616
+
617
+ if ( g . hasNode ( oid ) ) {
609
618
return false ;
610
619
}
611
620
@@ -627,7 +636,6 @@ function _addNode(g, doSpec) {
627
636
notes += 'storage: ' + doSpec . storage ;
628
637
}
629
638
630
- var oid = doSpec . oid ;
631
639
var html = '<div class="drop-label ' + typeShape + '" id="id_' + oid + '">' ;
632
640
html += '<span class="notes">' + notes + '</span>' ;
633
641
oid_date = doSpec . oid . split ( "_" ) [ 0 ] ;
0 commit comments