Skip to content

Commit 3f8f149

Browse files
srinathgitaebadirad
authored andcommitted
Fix for DHFPROD-590 and DHFPROD-1698 (#1741)
* Populating 'errors' and 'hasErrors' object (Fix for DHFPROD-1698) * Place bug icon on the correct line (DHFPROD-1698)
1 parent 74459a8 commit 3f8f149

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

quick-start/src/main/ui/app/flows/flows.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,18 @@ export class FlowsComponent implements OnInit, OnDestroy {
128128
if (this.entities && !this.paramListener) {
129129
this.registerParamListener();
130130
}
131-
this.hasErrorsInput = this.hasErrors();
131+
132132
this.markLogicVersionInput = this.getMarkLogicVersion();
133133
Observable.timer(300).subscribe(() => {
134134
this.lastDeployedInput = this.getLastDeployed();
135135
});
136136
}
137137

138+
ngDoCheck() {
139+
this.hasErrorsInput = this.hasErrors();
140+
this.errorsInput = this.getErrors();
141+
}
142+
138143
ngOnDestroy() {
139144
this.paramListener.unsubscribe();
140145
}

quick-start/src/main/ui/app/shared/components/codemirror/codemirror.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ export class CodemirrorComponent implements AfterViewInit, OnInit, OnChanges {
138138
this.instance.clearGutter('buglines');
139139

140140
if (this.error && this.error.line) {
141-
const line = this.error.line - 1;
141+
const line = this.error.line - 2;
142142
const endChar = this.instance.getDoc().getLine(line).length;
143143
this.currentError = this.instance.getDoc().markText({line: line, ch: 0}, {line: line, ch: endChar}, {className: 'error-line'});
144-
this.instance.setGutterMarker(line, 'buglines', this.makeBugMarker(line, `${this.error.msg}\nat line ${this.error.line}, column ${this.error.column}`));
144+
this.instance.setGutterMarker(line, 'buglines', this.makeBugMarker(line, `${this.error.msg}\nat line ${this.error.line - 1}, column ${this.error.column}`));
145145
this.instance.getDoc().setCursor({ line: line, ch: 0 });
146146
}
147147
}

0 commit comments

Comments
 (0)