Guest User

Untitled

a guest
Mar 22nd, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. server {
  2. listen 8000;
  3. server_name localhost;
  4. location /api/ {
  5. rewrite ^/api/(.*)$ /$1 break;
  6. proxy_pass http://localhost:8080;
  7. }
  8. location / {
  9. proxy_pass http://locahost:4200;
  10. }
  11. }
  12.  
  13. export class PentahoService {
  14. private url = 'http://localhost:8080/pentaho/api/session/userWorkspaceDir';
  15. private loginUrl = 'http://localhost:8000/api/pentaho/j_spring_security_check/';
  16.  
  17. constructor(private http: HttpClient, private messageService: MessageService) { }
  18. private log(message: string) {
  19. this.messageService.add('PentahoService: ' + message);
  20. }
  21.  
  22.  
  23. login() {
  24.  
  25. // return this.http.jsonp(this.loginUrl, 'callback');
  26. return this.http.post(this.loginUrl, user, httpOptions).pipe(
  27. tap(_ => this.log('logging in ' + user)),
  28. catchError(this.handleError('login'))
  29. );
  30. }
Add Comment
Please, Sign In to add comment