28 lines
800 B
TypeScript
28 lines
800 B
TypeScript
import { Injectable } from '@angular/core';
|
|
import {HttpClient} from '@angular/common/http';
|
|
import {Observable} from 'rxjs';
|
|
import {Tutorial} from '../models/tutorial.model';
|
|
import {Bean} from '../models/Bean';
|
|
import {NameValueItem} from '../models/name-value-item';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class SystemService {
|
|
|
|
baseUrl : string = 'http://localhost:8080/api/system';
|
|
constructor(private http: HttpClient) { }
|
|
|
|
getDataSourceProperties(): Observable<NameValueItem[]>{
|
|
return this.http.get<NameValueItem[]>(this.baseUrl + "/data-source-properties")
|
|
}
|
|
|
|
getAllBeans(): Observable<Bean[]> {
|
|
return this.http.get<Bean[]>(this.baseUrl+"/beans");
|
|
}
|
|
|
|
getCustomBeans(): Observable<Bean[]> {
|
|
return this.http.get<Bean[]>(this.baseUrl+"/beans/custom");
|
|
}
|
|
}
|