blob: ff031a5a53c6d7d8abb79715e26a280ff0d448d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
import { Component, OnInit, Input } from '@angular/core';
import { LogService } from './log.service';
import { environment } from '../../../../../../environments/environment';
import { Router } from '@angular/router';
@Component({
selector: 'app-log',
templateUrl: './log.component.html',
styleUrls: ['./log.component.css']
})
export class LogComponent implements OnInit {
@Input("reportId") repId: string;
@Input("reportType") reportType: string;
showSpinner: boolean;
logDataList: {}[];
finalLogDataList: {}[];
stepNo: string;
canReportRun: boolean;
constructor(private _logService: LogService, private _router: Router) {
this.showSpinner = false;
this.logDataList = new Array();
this.finalLogDataList = new Array();
this.canReportRun = false;
}
ngOnInit() {
this.showSpinner = true;
if (this.reportType === "Dashboard") {
this.stepNo = "3";
}
else {
this.stepNo = "7";
}
this._logService.getLogData(this.repId)
.subscribe((responseLogData) => {
this.showSpinner = true;
this.logDataList = responseLogData;
this.showSpinner = false;
});
}
linkToReport(reportID: string, queryParameters: string) {
if(queryParameters != '' && queryParameters.includes('groupSelectValue') && queryParameters.substring(queryParameters.indexOf('&groupSelectValue=')+ ('&groupSelectValue=').length,queryParameters.indexOf('&fromReportLog=')).length>0){
this._router.navigate(['v2/run', reportID, queryParameters,queryParameters.substring(queryParameters.indexOf('&groupSelectValue=')+ ('&groupSelectValue=').length,queryParameters.indexOf('&fromReportLog='))]);
}else{
this._router.navigate(['v2/run', reportID, queryParameters]);
}
}
}
|