@@ -25,7 +25,7 @@ export class InfoCenterComponent implements OnInit {
2525 ngOnInit ( ) {
2626 this . dataSource = new InfoCenterDataSource ( this . paginator , this . sort ) ;
2727
28- this . socketService . subscribeForEvent < Instance > ( EventTypeEnum . InstanceAddedEvent ) . subscribe ( ( newInstance : Instance ) => {
28+ this . socketService . subscribeForEvent < Instance > ( EventTypeEnum . InstanceAddedEvent ) . subscribe ( ( newInstance : Instance ) => {
2929 const newEntry = this . transformEventToNotificaton ( newInstance , 'new Instance added' , 'add_circle' ) ;
3030 this . applyUpdate ( newEntry ) ;
3131 } ) ;
@@ -35,13 +35,13 @@ export class InfoCenterComponent implements OnInit {
3535 this . applyUpdate ( newEntry ) ;
3636 } ) ;
3737
38- this . socketService . subscribeForEvent < Instance > ( EventTypeEnum . LinkStateChangedEvent ) . subscribe ( ( changeInstance : Instance ) => {
38+ this . socketService . subscribeForEvent < Instance > ( EventTypeEnum . StateChangedEvent ) . subscribe ( ( changeInstance : Instance ) => {
3939 const newEntry = this . transformEventToNotificaton ( changeInstance , 'Instance changed' , 'link' ) ;
4040 this . applyUpdate ( newEntry ) ;
4141 } ) ;
4242 }
4343
44- private transformEventToNotificaton ( instance : Instance , notifName : string , type : string ) {
44+ private transformEventToNotificaton ( instance : Instance , notifName : string , type : string ) : InfoCenterItem {
4545 const datePipe = new DatePipe ( 'en-US' ) ;
4646 const actualDate = datePipe . transform ( Date . now ( ) , 'dd/MM/yyyy hh:mm:ss:SSS' ) ;
4747 return { instanceId : instance . id , type : type ,
0 commit comments