Skip to content

Commit

Permalink
fix(ui): improve render of graph
Browse files Browse the repository at this point in the history
  • Loading branch information
sguiheux committed Jul 10, 2019
1 parent 33c557b commit b26f32c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions ui/src/app/views/workflow/show/workflow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { TranslateService } from '@ngx-translate/core';
import { Store } from '@ngxs/store';
import * as actionsWorkflow from 'app/store/workflow.action';
import { WorkflowState, WorkflowStateModel } from 'app/store/workflow.state';
import cloneDeep from 'lodash-es/cloneDeep';
import { Subscription } from 'rxjs';
import { finalize } from 'rxjs/operators';
import { PermissionValue } from '../../../model/permission.model';
Expand Down Expand Up @@ -73,7 +72,7 @@ export class WorkflowShowComponent implements OnInit {
});

this.workflowSubscription = this._store.select(WorkflowState.getCurrent()).subscribe((s: WorkflowStateModel) => {
this.detailedWorkflow = cloneDeep(s.workflow);
this.detailedWorkflow = s.workflow;
if (this.detailedWorkflow) {
this.previewWorkflow = this.detailedWorkflow.preview;
// If a node is selected, update it
Expand Down
3 changes: 2 additions & 1 deletion ui/src/app/views/workflow/workflow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,13 @@ export class WorkflowComponent {
this._store.dispatch(new CleanWorkflowState());
this.workflowSubscription = this._store.select(WorkflowState.getCurrent()).subscribe( (s: WorkflowStateModel) => {
this.sidebarMode = s.sidebar;

if (s.workflow && (!this.workflow || (this.workflow && s.workflow.id !== this.workflow.id))) {
this.workflow = s.workflow;
this.initRuns(s.projectKey, s.workflow.name);
}
if (s.workflow) {
this.workflow = s.workflow;

if (this.selectecHookRef) {
let h = Workflow.getHookByRef(this.selectecHookRef, this.workflow);
if (h) {
Expand Down

0 comments on commit b26f32c

Please sign in to comment.