aboutsummaryrefslogtreecommitdiffstats
path: root/so-monitoring
diff options
context:
space:
mode:
authorshinuj1989 <shinu.john@ericsson.com>2018-11-28 10:22:11 +0000
committershinuj1989 <shinu.john@ericsson.com>2018-11-28 10:26:49 +0000
commit8bc174515ba421f2163b74788454bda9bcb885b5 (patch)
treebbad4c712f269926475c8036dae3415d19e55cb4 /so-monitoring
parent5ff8f49c6b72f03e49961fcb771af2454d8a5321 (diff)
Flow loses highlighted path on page reloads
Change-Id: I7806cdd1998c4451359b452eb5c9bf1e7059fc32 Issue-ID: SO-1245 Signed-off-by: shinuj1989 <shinu.john@ericsson.com>
Diffstat (limited to 'so-monitoring')
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/src/app/data.service.ts7
-rw-r--r--so-monitoring/so-monitoring-ui/src/main/frontend/src/app/details/details.component.ts8
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);
});
}
+
}