summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/log/log.component.ts
blob: a90a1f8e636d03cdad0102f24a67b8a1fa205989 (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
import { Component, OnInit, Input } from '@angular/core';
import { LogService } from './log.service';

@Component({
  selector: 'app-log',
  templateUrl: './log.component.html',
  styleUrls: ['./log.component.css']
})
export class LogComponent implements OnInit {

  @Input("reportId") reportId1 : string;
  @Input("reportType") reportType : string;

  showSpinner : boolean;
  logDataList : {}[];
  stepNo : string;

  
  constructor(private _logService : LogService) {
    this.showSpinner = false;
    this.logDataList = new Array();
   }

  ngOnInit() {
    this.showSpinner = true;
    if(this.reportType === "Dashboard")
    {
      this.stepNo= "3";
    }
    else
    {
      this.stepNo= "7";
    }

      this._logService.getLogData(this.reportId1)
      .subscribe((responseLogData) => {

        this.showSpinner = true;

        this.logDataList = responseLogData;

        console.log(this.logDataList);

        this.showSpinner = false;

      });
  }

}