replace deprecated api
This commit is contained in:
@@ -144,17 +144,18 @@ export class VisualizationPageComponent implements OnInit {
|
||||
|
||||
const request = this.createPlotRequest();
|
||||
|
||||
this.plotService.sendPlotRequest(request).subscribe(function(plotResponse: PlotResponse){
|
||||
console.log("response: " + JSON.stringify(plotResponse));
|
||||
that.plotView.imageUrl = "http://"+window.location.hostname+':'+window.location.port+'/'+plotResponse.imageUrl;
|
||||
that.plotView.stats = plotResponse.stats;
|
||||
this.plotService.sendPlotRequest(request).subscribe({
|
||||
next: (plotResponse: PlotResponse) => {
|
||||
this.plotView.imageUrl = "http://"+window.location.hostname+':'+window.location.port+'/'+plotResponse.imageUrl;
|
||||
this.plotView.stats = plotResponse.stats;
|
||||
document.dispatchEvent(new Event("invadersPause", {}));
|
||||
},
|
||||
(error:any) => {
|
||||
that.plotView.imageUrl = '';
|
||||
that.plotView.stats = null;
|
||||
that.showError(error.error.message);
|
||||
error: (error:any) => {
|
||||
this.plotView.imageUrl = '';
|
||||
this.plotView.stats = null;
|
||||
this.showError(error.error.message);
|
||||
document.dispatchEvent(new Event("invadersPause", {}));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user