@@ -16,6 +16,7 @@ import { WorkflowRun, WorkflowRunTags } from 'app/model/workflow.run.model';
1616import { WorkflowRunService } from 'app/service/workflow/run/workflow.run.service' ;
1717import { AutoUnsubscribe } from 'app/shared/decorator/autoUnsubscribe' ;
1818import { DurationService } from 'app/shared/duration/duration.service' ;
19+ import { ProjectState } from 'app/store/project.state' ;
1920import { CleanWorkflowRun , GetWorkflowRuns } from 'app/store/workflow.action' ;
2021import { WorkflowState } from 'app/store/workflow.state' ;
2122import { Observable , Subscription } from 'rxjs' ;
@@ -31,15 +32,15 @@ import { finalize, first } from 'rxjs/operators';
3132export class WorkflowSidebarRunListComponent implements OnDestroy {
3233 @ViewChild ( 'tagsList' , { static : false } ) tagsList : ElementRef ;
3334
34- @Input ( ) project : Project ;
35-
3635 workflowRuns = new Array < WorkflowRun > ( ) ;
3736 _workflow : Workflow ;
3837 @Input ( 'workflow' )
3938 set workflow ( data : Workflow ) {
4039 if ( data ) {
4140 if ( ! this . _workflow || this . _workflow . id !== data . id ) {
41+ this . filteredTags = { } ;
4242 this . _workflow = data ;
43+ this . deleteInterval ( ) ;
4344 this . initSelectableTags ( ) ;
4445 }
4546 this . _workflow = data ;
@@ -55,6 +56,8 @@ export class WorkflowSidebarRunListComponent implements OnDestroy {
5556 @Select ( WorkflowState . getRunSidebarFilters ( ) ) filters$ : Observable < { } > ;
5657 filtersSubs : Subscription ;
5758
59+ project : Project ;
60+
5861 // search part
5962 selectedTags : Array < string > ;
6063 tagsSelectable : Array < string > ;
@@ -77,6 +80,7 @@ export class WorkflowSidebarRunListComponent implements OnDestroy {
7780 private _store : Store ,
7881 private _cd : ChangeDetectorRef
7982 ) {
83+ this . project = this . _store . selectSnapshot ( ProjectState . projectSnapshot ) ;
8084 this . _routerActivated . params . subscribe ( p => {
8185 if ( p [ 'number' ] ) {
8286 this . currentWorkflowRunNumber = p [ 'number' ] ;
@@ -88,7 +92,7 @@ export class WorkflowSidebarRunListComponent implements OnDestroy {
8892 return ;
8993 }
9094 this . workflowRuns = runs ;
91- if ( ! this . durationIntervalID && this . workflowRuns && this . workflow && this . workflowRuns . length > 0 ) {
95+ if ( this . workflowRuns && this . workflow && this . workflowRuns . length > 0 ) {
9296 this . refreshRun ( ) ;
9397 }
9498 this . _cd . markForCheck ( ) ;
0 commit comments