Skip to content

Commit 6b284af

Browse files
authored
Datagrid detail - not pulling new data when switching between rows #778 (#779)
* #778: Datagrid detail - not pulling new data when switching between rows
1 parent d6e3be4 commit 6b284af

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

ui/src/app/components/admin/job-templates/job-templates-home/job-templates-home.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { Store } from '@ngrx/store';
2323
import { AppState, selectJobTemplatesState } from '../../../../stores/app.reducers';
2424
import { skip } from 'rxjs/operators';
2525
import { jobTemplateColumns } from '../../../../constants/jobTemplateColumns.constants';
26-
import { DeleteJobTemplate, SearchJobTemplates } from '../../../../stores/job-templates/job-templates.actions';
26+
import { DeleteJobTemplate, GetJobTemplateUsage, SearchJobTemplates } from '../../../../stores/job-templates/job-templates.actions';
2727
import { absoluteRoutes } from 'src/app/constants/routes.constants';
2828
import { Router } from '@angular/router';
2929
import { FilterAttributes } from '../../../../models/search/filterAttributes.model';
@@ -114,6 +114,9 @@ export class JobTemplatesHomeComponent implements AfterViewInit, OnDestroy {
114114

115115
onJobTemplateUsageOpenClose(event: JobTemplateModel) {
116116
this.openedJobTemplateUsage = event;
117+
if (this.openedJobTemplateUsage) {
118+
this.store.dispatch(new GetJobTemplateUsage(this.openedJobTemplateUsage.id));
119+
}
117120
}
118121

119122
ngOnDestroy(): void {

ui/src/app/components/admin/notification-rules/notification-rules-home/notification-rules-home.component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ import { Store } from '@ngrx/store';
2222
import { AppState, selectNotificationRulesState } from '../../../../stores/app.reducers';
2323
import { skip } from 'rxjs/operators';
2424
import { notificationRuleColumns } from '../../../../constants/notificationRuleColumns.constants';
25-
import { DeleteNotificationRule, SearchNotificationRules } from '../../../../stores/notification-rules/notification-rules.actions';
25+
import {
26+
DeleteNotificationRule,
27+
GetNotificationRuleUsage,
28+
SearchNotificationRules,
29+
} from '../../../../stores/notification-rules/notification-rules.actions';
2630
import { absoluteRoutes } from 'src/app/constants/routes.constants';
2731
import { Router } from '@angular/router';
2832
import { NotificationRuleModel } from '../../../../models/notificationRule.model';
@@ -120,6 +124,9 @@ export class NotificationRulesHomeComponent implements AfterViewInit, OnDestroy
120124

121125
onNotificationRuleUsageOpenClose(event: NotificationRuleModel) {
122126
this.openedNotificationRuleUsage = event;
127+
if (this.openedNotificationRuleUsage) {
128+
this.store.dispatch(new GetNotificationRuleUsage(this.openedNotificationRuleUsage.id));
129+
}
123130
}
124131

125132
ngOnDestroy(): void {

ui/src/app/components/runs/runs.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { ClrDatagridColumn, ClrDatagridStateInterface } from '@clr/angular';
1919
import { ClrDatagridSortOrder } from '@clr/angular';
2020
import { Store } from '@ngrx/store';
2121
import { AppState, selectRunState } from '../../stores/app.reducers';
22-
import { GetDagRuns } from '../../stores/runs/runs.actions';
22+
import { GetDagRunDetail, GetDagRuns } from '../../stores/runs/runs.actions';
2323
import { Subject, Subscription } from 'rxjs';
2424
import { skip } from 'rxjs/operators';
2525
import { dagRunColumns } from '../../constants/dagRunColumns.constants';
@@ -99,6 +99,9 @@ export class RunsComponent implements OnDestroy, AfterViewInit {
9999

100100
onDetailOpenClose(event: JobInstanceModel) {
101101
this.openedDetail = event;
102+
if (this.openedDetail) {
103+
this.store.dispatch(new GetDagRunDetail(this.openedDetail.id));
104+
}
102105
}
103106

104107
refresh() {

0 commit comments

Comments
 (0)