a90a1f8e636d03cdad0102f24a67b8a1fa205989
[portal/sdk.git] /
1 import { Component, OnInit, Input } from '@angular/core';
2 import { LogService } from './log.service';
3
4 @Component({
5   selector: 'app-log',
6   templateUrl: './log.component.html',
7   styleUrls: ['./log.component.css']
8 })
9 export class LogComponent implements OnInit {
10
11   @Input("reportId") reportId1 : string;
12   @Input("reportType") reportType : string;
13
14   showSpinner : boolean;
15   logDataList : {}[];
16   stepNo : string;
17
18   
19   constructor(private _logService : LogService) {
20     this.showSpinner = false;
21     this.logDataList = new Array();
22    }
23
24   ngOnInit() {
25     this.showSpinner = true;
26     if(this.reportType === "Dashboard")
27     {
28       this.stepNo= "3";
29     }
30     else
31     {
32       this.stepNo= "7";
33     }
34
35       this._logService.getLogData(this.reportId1)
36       .subscribe((responseLogData) => {
37
38         this.showSpinner = true;
39
40         this.logDataList = responseLogData;
41
42         console.log(this.logDataList);
43
44         this.showSpinner = false;
45
46       });
47   }
48
49 }