diff options
author | shinuj1989 <shinu.john@ericsson.com> | 2018-11-28 10:22:11 +0000 |
---|---|---|
committer | Byung-Woo Jun <byung-woo.jun@ericsson.com> | 2019-01-16 21:52:53 +0000 |
commit | 4edcfbb503366cf099a531b27c653d06a3ba32b8 (patch) | |
tree | d28d07efa9b12f41e39375c8c260a9a34f7cf927 /so-monitoring/so-monitoring-ui/src/main | |
parent | eeec4bc3875b74804b1773e59b84b8cc9bba5cc4 (diff) |
Flow loses highlighted path on page reloads
Change-Id: I7806cdd1998c4451359b452eb5c9bf1e7059fc32
Issue-ID: SO-1245
Signed-off-by: shinuj1989 <shinu.john@ericsson.com>
(cherry picked from commit 8bc174515ba421f2163b74788454bda9bcb885b5)
Diffstat (limited to 'so-monitoring/so-monitoring-ui/src/main')
-rw-r--r-- | so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts | 7 | ||||
-rw-r--r-- | so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts index 796739077c..2e8f4237f7 100644 --- a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts @@ -30,6 +30,7 @@ import { environment } from '../environments/environment'; import { HttpResponse } from '@angular/common/http';
import { PII } from './model/processInstance.model';
import { HttpErrorHandlerService } from './http-error-handler.service';
+import { ACTINST } from './model/activityInstance.model';
@Injectable({
@@ -59,12 +60,12 @@ export class DataService { }
// HTTP GET to return Activity instancs using ProcessInstanceID
- getActivityInstance(processInstanceId) {
+ getActivityInstance(processInstanceId): Promise<ACTINST[]> {
var url = environment.soMonitoringBackendURL + 'activity-instance/' + processInstanceId;
- return this.http.get(url)
+ return this.http.get<ACTINST[]>(url)
.pipe(
catchError(this.httpErrorHandlerService.handleError("GET", url))
- );
+ ).toPromise();
}
// HTTP GET to return Activity Instance using ProcessInstanceID
diff --git a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts index 4c19ba1039..bb464a9e21 100644 --- a/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts +++ b/so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts @@ -43,7 +43,6 @@ import { NgxSpinnerService } from 'ngx-spinner'; })
export class DetailsComponent implements OnInit {
-
bpmnViewer: any;
processInstanceID: string;
@@ -67,8 +66,8 @@ export class DetailsComponent implements OnInit { constructor(private route: ActivatedRoute, private data: DataService, private popup: ToastrNotificationService,
private router: Router, private spinner: NgxSpinnerService) { }
- getActInst(procInstId: string) {
- this.data.getActivityInstance(procInstId).subscribe(
+ async getActInst(procInstId: string) {
+ await this.data.getActivityInstance(procInstId).then(
(data: ACTINST[]) => {
this.activityInstance = data;
console.log(data);
@@ -90,7 +89,7 @@ export class DetailsComponent implements OnInit { });
}
- async getProcInstance(procInstId) {
+ async getProcInstance(procInstId) {
await this.data.getProcessInstance(procInstId).then(
async (data: PII) => {
this.processInstance = data;
@@ -160,4 +159,5 @@ export class DetailsComponent implements OnInit { this.getVarInst(this.processInstanceID);
});
}
+
}
|