use port 17333 by default

Not sure how this is supposed to work. To be able to support
Angular's development server and Spring as a standalone application
I had to hardcode the port Spring uses.
The problem is, that Angular runs on port 4200. Angular is compiled
to static files. So I cannot dynamically add the port that is
configured for Spring. But Angular has to be able to talk to the
Spring application.
I chose port 17333, because it does not collide with the standard
Tomcat port (8080).
This commit is contained in:
2020-03-12 19:54:13 +01:00
parent 9a311313ec
commit ec4f445b8d
5 changed files with 14 additions and 9 deletions

View File

@@ -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+':8080/'+plotResponse.thumbnailUrl;
plotResponse.imageUrl = "http://"+window.location.hostname+':8080/'+plotResponse.imageUrl;
plotResponse.thumbnailUrl = "http://"+window.location.hostname+':17333/'+plotResponse.thumbnailUrl;
plotResponse.imageUrl = "http://"+window.location.hostname+':17333/'+plotResponse.imageUrl;
let galleryItem = new GalleryItem(splitByValue, plotResponse);
that.galleryItems.push(galleryItem);
that.sortAndFilterGallery();

View File

@@ -40,7 +40,7 @@ export class PlotService {
}
getTagFields(): Observable<Array<string>> {
return this.http.get<Array<string>>('//'+window.location.hostname+':8080/fields');
return this.http.get<Array<string>>('//'+window.location.hostname+':17333/fields');
}
autocomplete(query: string, caretIndex: number, resultMode: ResultMode): Observable<AutocompleteResult>
@@ -51,17 +51,17 @@ export class PlotService {
.set('query', query)
.set('resultMode', resultMode)
};
return this.http.get<AutocompleteResult>('//'+window.location.hostname+':8080/autocomplete', options);
return this.http.get<AutocompleteResult>('//'+window.location.hostname+':17333/autocomplete', options);
}
sendPlotRequest(plotRequest: PlotRequest): Observable<PlotResponse>{
//console.log("send plot request: "+ JSON.stringify(plotRequest));
return this.http.post<PlotResponse>('//'+window.location.hostname+':8080/plots', plotRequest);
return this.http.post<PlotResponse>('//'+window.location.hostname+':17333/plots', plotRequest);
}
getFilterDefaults(): Observable<FilterDefaults>{
return this.http.get<FilterDefaults>('//'+window.location.hostname+':8080/filters/defaults')
return this.http.get<FilterDefaults>('//'+window.location.hostname+':17333/filters/defaults')
}
splitQuery(query: string, splitBy:string) : Observable<Array<string>>{

View File

@@ -133,7 +133,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+':8080/'+plotResponse.imageUrl;
that.plotView.imageUrl = "http://"+window.location.hostname+':17333/'+plotResponse.imageUrl;
document.dispatchEvent(new Event("invadersPause", {}));
},
error => {