diff --git a/pdb-js/src/app/gallery-view/gallery-view.component.ts b/pdb-js/src/app/gallery-view/gallery-view.component.ts index cf81eab..9c620fb 100644 --- a/pdb-js/src/app/gallery-view/gallery-view.component.ts +++ b/pdb-js/src/app/gallery-view/gallery-view.component.ts @@ -266,8 +266,8 @@ export class GalleryViewComponent implements OnInit { that.progress = 100 * (that.totalNumberImages - that.splitByValuesQueue.length) / that.totalNumberImages; - plotResponse.thumbnailUrl = "http://"+window.location.hostname+':17333/'+plotResponse.thumbnailUrl; - plotResponse.imageUrl = "http://"+window.location.hostname+':17333/'+plotResponse.imageUrl; + plotResponse.thumbnailUrl = "http://"+window.location.hostname+':'+window.location.port+'/'+plotResponse.thumbnailUrl; + plotResponse.imageUrl = "http://"+window.location.hostname+':'+window.location.port+'/'+plotResponse.imageUrl; let galleryItem = new GalleryItem(splitByValue, plotResponse); that.galleryItems.push(galleryItem); that.sortAndFilterGallery(); diff --git a/pdb-js/src/app/plot.service.ts b/pdb-js/src/app/plot.service.ts index a3872a7..9f93370 100644 --- a/pdb-js/src/app/plot.service.ts +++ b/pdb-js/src/app/plot.service.ts @@ -40,7 +40,7 @@ export class PlotService { } getTagFields(): Observable> { - return this.http.get>('//'+window.location.hostname+':17333/fields'); + return this.http.get>('//'+window.location.hostname+':'+window.location.port+'/fields'); } autocomplete(query: string, caretIndex: number, resultMode: ResultMode): Observable @@ -51,17 +51,17 @@ export class PlotService { .set('query', query) .set('resultMode', resultMode) }; - return this.http.get('//'+window.location.hostname+':17333/autocomplete', options); + return this.http.get('//'+window.location.hostname+':'+window.location.port+'/autocomplete', options); } sendPlotRequest(plotRequest: PlotRequest): Observable{ //console.log("send plot request: "+ JSON.stringify(plotRequest)); - return this.http.post('//'+window.location.hostname+':17333/plots', plotRequest); + return this.http.post('//'+window.location.hostname+':'+window.location.port+'/plots', plotRequest); } getFilterDefaults(): Observable{ - return this.http.get('//'+window.location.hostname+':17333/filters/defaults') + return this.http.get('//'+window.location.hostname+':'+window.location.port+'/filters/defaults') } splitQuery(query: string, splitBy:string) : Observable>{ diff --git a/pdb-js/src/app/visualization-page/visualization-page.component.ts b/pdb-js/src/app/visualization-page/visualization-page.component.ts index 8af7d78..75eefdc 100644 --- a/pdb-js/src/app/visualization-page/visualization-page.component.ts +++ b/pdb-js/src/app/visualization-page/visualization-page.component.ts @@ -140,7 +140,7 @@ export class VisualizationPageComponent implements OnInit { this.plotService.sendPlotRequest(request).subscribe(function(plotResponse){ console.log("response: " + JSON.stringify(plotResponse)); - that.plotView.imageUrl = "http://"+window.location.hostname+':17333/'+plotResponse.imageUrl; + that.plotView.imageUrl = "http://"+window.location.hostname+':'+window.location.port+'/'+plotResponse.imageUrl; document.dispatchEvent(new Event("invadersPause", {})); }, error => {