summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-overlay/src/main/webapp/ngapp/src/app/pages/analytics/Report_List/Report/chart-wizard/chart-wizard.service.ts
blob: bd5e500c6e44ca615560337c27f2bcf960bff238 (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
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {environment} from '../../../../../../environments/environment';
import {Observable} from 'rxjs';

@Injectable({
    providedIn: 'root'
})
export class ChartWizard {
    constructor(private _http: HttpClient) { }


    getChartData(reportId: string){
        return this._http.get(environment.baseUrl + 'raptor.htm?action=chart.json&c_master=' + reportId,
            { headers: new HttpHeaders({'Content-Type': 'application/json'})});
    }

    saveChartData(chartJson: any, action: any) {
        return this._http.post(environment.baseUrl + 'save_chart?action=' + action, chartJson,
            { headers: new HttpHeaders({'Content-Type': 'application/json'})});
    }

    getReportTypeData(reportId: string): Observable<any> {
        return this._http.get(environment.baseUrl + 'report/wizard/retrieve_def_tab_wise_data/' + reportId,
            { headers: new HttpHeaders({'Content-Type': 'application/json'})});
    }
}