8000 fix(ui): multiple modal (#4318) · ovh/cds@bf9e5fd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit bf9e5fd

Browse files
sguiheuxrichardlt
authored andcommitted
fix(ui): multiple modal (#4318)
1 parent ea10440 commit bf9e5fd

File tree

6 files changed

+6
-8
lines changed

6 files changed

+6
-8
lines changed

ui/src/app/app.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
<div class="ui active text loader" *ngIf="displayResolver">{{ 'common_loading_project' | translate }}</div>
1616
</div>
1717
</div>
18-
</div>
18+
<app-node-edit-modal></app-node-edit-modal>
19+
</div>

ui/src/app/shared/workflow/wizard/context/wizard.context.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class WorkflowWizardNodeContextComponent implements OnInit {
8686
return;
8787
}
8888
this._store.dispatch(new FetchApplication({projectKey: this.project.key, applicationName: this.applications[i].name}));
89-
this._store.select(ApplicationsState.selectApplication(this.project.key, this.applications[i].name))
89+
this._store.selectOnce(ApplicationsState.selectApplication(this.project.key, this.applications[i].name))
9090
.pipe(filter((app) => app != null), first())
9191
.subscribe((app: Application) => {
9292
this.showCheckStatus = app.repository_fullname && app.repository_fullname !== '';

ui/src/app/shared/workflow/wizard/hook/hook.form.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { WorkflowHookModel } from 'app/model/workflow.hook.model';
77
import { WNode, WNodeHook, Workflow, WorkflowNodeHookConfigValue } from 'app/model/workflow.model';
88
import { HookService } from 'app/service/hook/hook.service';
99
import { ThemeStore } from 'app/service/services.module';
10+
import { AutoUnsubscribe } from 'app/shared/decorator/autoUnsubscribe';
1011
import { ToastService } from 'app/shared/toast/ToastService';
1112
import { UpdateWorkflow } from 'app/store/workflow.action';
1213
import { cloneDeep } from 'lodash';
@@ -18,6 +19,7 @@ import { Subscription } from 'rxjs/Subscription';
1819
templateUrl: './hook.form.html',
1920
styleUrls: ['./hook.form.scss']
2021
})
22+
@AutoUnsubscribe()
2123
export class WorkflowNodeHookFormComponent implements OnInit {
2224
@ViewChild('textareaCodeMirror') codemirror: any;
2325

ui/src/app/shared/workflow/wizard/outgoinghook/wizard.outgoinghook.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export class WorkflowWizardOutgoingHookComponent implements OnInit {
4949
availableWorkflows: Array<IdName>;
5050
loadingHooks: boolean;
5151
availableHooks: Array<WNodeHook>;
52-
wSub: Subscription;
5352
invalidJSON = false;
5453
outgoing_default_payload: {};
5554
loading = false;
@@ -149,9 +148,6 @@ export class WorkflowWizardOutgoingHookComponent implements OnInit {
149148
});
150149
} else {
151150
this.availableHooks = null;
152-
if (this.wSub) {
153-
this.wSub.unsubscribe();
154-
}
155151
}
156152
}
157153

ui/src/app/views/workflow/run/node/workflow.run.node.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class WorkflowNodeRunComponent {
8888
this.workflowName = this._routerService.getRouteSnapshotParams({}, this._router.routerState.snapshot.root)['workflowName'];
8989
let historyChecked = false;
9090
this.storeSub = this._store.select(WorkflowState.getCurrent()).subscribe((s: WorkflowStateModel) => {
91-
if (this.workflowName !== s.workflow.name) {
91+
if (!s.workflow || this.workflowName !== s.workflow.name) {
9292
return;
9393
}
9494
this.workflowRun = s.workflowRun;

ui/src/app/views/workflow/workflow.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,3 @@
131131
</section>
132132
<app-workflow-save-as-code-modal [project]="project" [workflow]="workflow" #saveAsCode>
133133
</app-workflow-save-as-code-modal>
134-
<app-node-edit-modal></app-node-edit-modal>

0 commit comments

Comments
 (0)
0