Merge remote-tracking branch 'origin/TBSliver/CoreUI' into finn/MoreCoreUI

This commit is contained in:
piratefinn 2017-08-31 11:11:14 +01:00
commit ccb743ec43
11 changed files with 200 additions and 941 deletions

View file

@ -18,6 +18,16 @@ export class ApiService {
}
}
public post(url, data) {
if ( this.sessionKey != null ) {
data.session_key = this.sessionKey;
}
return this.http.post(
this.apiUrl + url,
data
).map( response => response.json() );
}
// Login API
public getSessionKey() {

View file

@ -0,0 +1,13 @@
import { Injectable } from '@angular/core';
import { ApiService } from './api-service';
@Injectable()
export class OrgGraphsService {
private orgGraphUrl = '/v1/organisation/graphs';
constructor(private api: ApiService) { }
public getGraph(name: string) {
return this.api.post(this.orgGraphUrl, { graph: name });
}
}