@@ -53,22 +53,20 @@ export class WorkflowNodeComponent implements OnInit {
53
53
subSelect : Subscription ;
54
54
55
55
selectedNodeID : number ;
56
+ ready = false ;
56
57
57
58
constructor (
58
59
private elementRef : ElementRef ,
59
60
private _workflowEventStore : WorkflowEventStore ,
60
61
private _router : Router ,
61
62
private _activatedRoute : ActivatedRoute ,
62
63
private _location : Location
63
- ) {
64
- this . _activatedRoute . queryParams . subscribe ( params => {
65
- if ( params [ 'node_id' ] ) {
66
- this . selectedNodeID = parseInt ( params [ 'node_id' ] , 10 ) ;
67
- }
68
- } ) ;
69
- }
64
+ ) { }
70
65
71
66
ngOnInit ( ) : void {
67
+ if ( this . _activatedRoute . snapshot . queryParams [ 'node_id' ] ) {
68
+ this . selectedNodeID = parseInt ( this . _activatedRoute . snapshot . queryParams [ 'node_id' ] , 10 ) ;
69
+ }
72
70
this . isSelected = this . selectedNodeID === this . node . id ;
73
71
this . subSelect = this . _workflowEventStore . selectedNode ( ) . subscribe ( n => {
74
72
if ( n && this . node ) {
@@ -104,13 +102,21 @@ export class WorkflowNodeComponent implements OnInit {
104
102
} else {
105
103
this . workflowRun = null ;
106
104
}
107
- if ( this . node && this . selectedNodeID && this . node . id === this . selectedNodeID ) {
105
+
106
+ if ( this . _activatedRoute . snapshot . queryParams [ 'node_id' ] ) {
107
+ this . selectedNodeID = parseInt ( this . _activatedRoute . snapshot . queryParams [ 'node_id' ] , 10 ) ;
108
+ }
109
+
110
+ if ( ! this . ready && this . node && this . selectedNodeID && this . node . id === this . selectedNodeID ) {
108
111
this . _workflowEventStore . setSelectedNode ( this . node , false ) ;
109
112
this . _workflowEventStore . setSelectedNodeRun ( this . currentNodeRun , false ) ;
110
113
}
114
+
115
+
111
116
if ( this . currentNodeRun && this . currentNodeRun . status === PipelineStatus . SUCCESS ) {
112
117
this . computeWarnings ( ) ;
113
118
}
119
+ this . ready = true ;
114
120
} ) ;
115
121
116
122
if ( ! this . workflowRun ) {
0 commit comments