2017-10-09 18:48:05 +02:00
|
|
|
import { Injectable } from '@angular/core';
|
2018-06-04 14:27:37 +02:00
|
|
|
import { Subject } from 'rxjs';
|
2017-10-09 18:48:05 +02:00
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
export class TestFeedService {
|
|
|
|
|
|
|
|
lastEvent;
|
|
|
|
newLastEvent$ = new Subject<any>();
|
|
|
|
|
|
|
|
constructor() { }
|
|
|
|
|
|
|
|
getLastEvent() {
|
|
|
|
return this.lastEvent;
|
|
|
|
}
|
|
|
|
|
|
|
|
pushNewEvent(session: string, connection: string, event: string, eventContent: string) {
|
|
|
|
this.lastEvent = ({ session: session, connection: connection, event: event, eventContent: eventContent });
|
|
|
|
this.newLastEvent$.next(this.lastEvent);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|