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