service
This commit is contained in:
parent
16c83ec322
commit
58f727fb49
@ -8,7 +8,9 @@ import { Observable } from 'rxjs';
|
|||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class AdditionalcontainerService {
|
export class AdditionalcontainerService {
|
||||||
baseurl = environment.sureops;
|
// baseurl = environment.sureops;
|
||||||
|
baseurl = environment.backendUrl;
|
||||||
|
|
||||||
private baseURL = "Gaurav_testing/Gaurav_testing";
|
private baseURL = "Gaurav_testing/Gaurav_testing";
|
||||||
constructor(private apiRequest: ApiRequestService,
|
constructor(private apiRequest: ApiRequestService,
|
||||||
private _http: HttpClient,) { }
|
private _http: HttpClient,) { }
|
||||||
|
|||||||
@ -39,18 +39,15 @@ export class Dashboard3Service {
|
|||||||
return this.apiRequest.delete(_http);
|
return this.apiRequest.delete(_http);
|
||||||
}
|
}
|
||||||
|
|
||||||
getById(id:number)
|
getById(id: number) {
|
||||||
{
|
|
||||||
let _http = this.getbyidURL + "/" + id;
|
let _http = this.getbyidURL + "/" + id;
|
||||||
return this.apiRequest.get(_http);
|
return this.apiRequest.get(_http);
|
||||||
}
|
}
|
||||||
|
|
||||||
addToDB(line:any):Observable<any>
|
addToDB(line: any): Observable<any> {
|
||||||
{
|
|
||||||
return this.apiRequest.put(this.editURL, line);
|
return this.apiRequest.put(this.editURL, line);
|
||||||
}
|
}
|
||||||
UpdateLineData(id:number, line:any)
|
UpdateLineData(id: number, line: any) {
|
||||||
{
|
|
||||||
// line = {
|
// line = {
|
||||||
// headers: new HttpHeaders({
|
// headers: new HttpHeaders({
|
||||||
// 'Content-Type': 'application/json'
|
// 'Content-Type': 'application/json'
|
||||||
@ -284,13 +281,27 @@ public getDynamicDashDetails(): Observable<any> {
|
|||||||
return this.apiRequest.get(`Dashboard/Dashboard`);
|
return this.apiRequest.get(`Dashboard/Dashboard`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getChartData(tableName: string, jobType: string, xAxis?:any,yAxes?:any ): Observable<any> {
|
public getChartData(tableName: string, jobType: string, xAxis?: any, yAxes?: any, sureId?: number, parameter?: string, parameterValue?: string): Observable<any> {
|
||||||
const url = `${baseUrl}/chart/getdashjson/${jobType}?tableName=${tableName}&xAxis=${xAxis}&yAxes=${yAxes}`;
|
let url = `${baseUrl}/chart/getdashjson/${jobType}?tableName=${tableName}&xAxis=${xAxis}&yAxes=${yAxes}`;
|
||||||
|
if (sureId) {
|
||||||
|
url += `&sureId=${sureId}`;
|
||||||
|
}
|
||||||
|
if (parameter) {
|
||||||
|
url += `¶meter=${encodeURIComponent(parameter)}`;
|
||||||
|
}
|
||||||
|
if (parameterValue) {
|
||||||
|
url += `¶meterValue=${encodeURIComponent(parameterValue)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return this._http.get(url);
|
return this._http.get(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getUrlChartData(tableName: string, jobType: string, xAxis:any,yAxes:any,store:any,chartUrl:any): Observable<any> {
|
public getUrlChartData(tableName: string, jobType: string, xAxis: any, yAxes: any, store: any, chartUrl: any, sureId?: number): Observable<any> {
|
||||||
const url = `${baseUrl}/chart/getdashjson/${jobType}?tableName=${tableName}&url=${chartUrl}&xAxis=${xAxis}&yAxes=${yAxes}&datastore_name=${store}`;
|
let url = `${baseUrl}/chart/getdashjson/${jobType}?tableName=${tableName}&url=${chartUrl}&xAxis=${xAxis}&yAxes=${yAxes}&datastore_name=${store}`;
|
||||||
|
if (sureId) {
|
||||||
|
url += `&sureId=${sureId}`;
|
||||||
|
}
|
||||||
return this._http.get(url);
|
return this._http.get(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,11 @@ export class AlertsService {
|
|||||||
return this.apiRequest.get(`AlertRules/columnlist/${id}/${tableName}`);
|
return this.apiRequest.get(`AlertRules/columnlist/${id}/${tableName}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
public getColumnfromurl(url: any): Observable<any> {
|
public getColumnfromurl(url: any, sureId?: number): Observable<any> {
|
||||||
return this.apiRequest.get(`chart/getAllKeys?apiUrl=${url}`);
|
let apiUrl = `chart/getAllKeys?apiUrl=${url}`;
|
||||||
|
if (sureId) {
|
||||||
|
apiUrl += `&sureId=${sureId}`;
|
||||||
|
}
|
||||||
|
return this.apiRequest.get(apiUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user