46 lines
951 B
TypeScript
46 lines
951 B
TypeScript
import { Component, Input, OnInit, AfterViewChecked, ViewChild } from '@angular/core';
|
|
import { HttpClient , HttpHeaders, HttpParams} from '@angular/common/http';
|
|
import { TokenService, TokenProvider } from './login/token.service'
|
|
import 'rxjs/Rx';
|
|
import { Injectable } from '@angular/core';
|
|
import { Toolbox } from '../services/toolbox';
|
|
import {RestBase} from './rest-base';
|
|
|
|
|
|
@Injectable()
|
|
export class ServiceService implements OnInit {
|
|
|
|
|
|
constructor(public restBase: RestBase) {
|
|
}
|
|
|
|
|
|
ngOnInit(){
|
|
|
|
}
|
|
|
|
getServiceIdsLabels() {
|
|
return this.restBase.get("service/listAllLabelIDs");
|
|
}
|
|
|
|
getServiceIds(){
|
|
return this.restBase.get("services");
|
|
}
|
|
|
|
getAllServices(){
|
|
return this.restBase.get("service/getAll");
|
|
}
|
|
|
|
create(service){
|
|
return this.restBase.post("service/create", service);
|
|
}
|
|
|
|
delete(serviceID){
|
|
var service = {"id": serviceID};
|
|
return this.restBase.post("service/delete", service);
|
|
}
|
|
|
|
}
|
|
|
|
|