Skip to content

Commit

Permalink
Change absolute to relative URL paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Waguramu committed Jan 14, 2025
1 parent 75574a8 commit 42dd92f
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion erdblick_app/app/coordinates.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class CoordinatesService {
}

initialize() {
this.httpClient.get("/config.json", {responseType: 'json'}).subscribe({
this.httpClient.get("config.json", {responseType: 'json'}).subscribe({
next: (data: any) => {
try {
if (data && data["extensionModules"] && data["extensionModules"]["jumpTargets"]) {
Expand Down
4 changes: 2 additions & 2 deletions erdblick_app/app/datasources.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class DataSourcesService {

postConfig(config: string) {
this.loading = true;
this.http.post("/config", config, { observe: 'response', responseType: 'text' }).subscribe({
this.http.post("config", config, { observe: 'response', responseType: 'text' }).subscribe({
next: (data: any) => {
this.messageService.showSuccess(data.body);
setTimeout(() => {
Expand All @@ -38,7 +38,7 @@ export class DataSourcesService {
this.readOnly = true;
this.errorMessage = "";
this.loading = true;
this.http.get("/config").subscribe({
this.http.get("config").subscribe({
next: (data: any) => {
if (!data) {
this.errorMessage = "Unknown error: DataSources configuration data is missing!";
Expand Down
2 changes: 1 addition & 1 deletion erdblick_app/app/inspection.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export class InspectionService {
});

let layer: TileSourceDataLayer | undefined;
let fetch = new Fetch("/tiles")
let fetch = new Fetch("tiles")
.withChunkProcessing()
.withMethod("POST")
.withBody(newRequestBody)
Expand Down
4 changes: 2 additions & 2 deletions erdblick_app/app/jump.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class JumpTargetService {
private inspectionService: InspectionService,
private menuService: RightClickMenuService,
private searchService: FeatureSearchService) {
this.httpClient.get("/config.json", {responseType: 'json'}).subscribe({
this.httpClient.get("config.json", {responseType: 'json'}).subscribe({
next: (data: any) => {
try {
if (data && data["extensionModules"] && data["extensionModules"]["jumpTargets"]) {
Expand Down Expand Up @@ -327,7 +327,7 @@ export class JumpTargetService {
mapId: mapId,
featureId: action.idParts.map((kv) => [kv.key, kv.value]).flat()
}]};
let response = await fetch("/locate", {
let response = await fetch("locate", {
body: JSON.stringify(resolveMe),
method: "POST"
}).catch((err)=>console.error(`Error during /locate call: ${err}`));
Expand Down
6 changes: 3 additions & 3 deletions erdblick_app/app/map.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export interface MapInfoItem extends Record<string, any> {
visible: boolean;
}

const infoUrl = "/sources";
const tileUrl = "/tiles";
const abortUrl = "/abort";
const infoUrl = "sources";
const tileUrl = "tiles";
const abortUrl = "abort";

/** Redefinition of coreLib.Viewport. TODO: Check if needed. */
type ViewportProperties = {
Expand Down
4 changes: 2 additions & 2 deletions erdblick_app/app/style.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ export class StyleService {

let styleUrls = [...data["styles"]] as [StyleConfigEntry];
styleUrls.forEach((styleEntry: StyleConfigEntry) => {
if (!styleEntry.url.startsWith("http") && !styleEntry.url.startsWith("/bundle")) {
styleEntry.url = `/bundle/styles/${styleEntry.url}`;
if (!styleEntry.url.startsWith("http") && !styleEntry.url.startsWith("bundle")) {
styleEntry.url = `bundle/styles/${styleEntry.url}`;
}
});

Expand Down
2 changes: 1 addition & 1 deletion erdblick_app/app/visualization.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class TileVisualization {
// Try to resolve externally referenced auxiliary tiles.
let extRefs = {requests: wasmVisualization.externalReferences()};
if (extRefs.requests && extRefs.requests.length > 0) {
let response = await fetch("/locate", {
let response = await fetch("locate", {
body: JSON.stringify(extRefs, (_, value) =>
typeof value === 'bigint'
? Number(value)
Expand Down

0 comments on commit 42dd92f

Please sign in to comment.