File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ export class DataService {
1111 private baseUrl : string ;
1212
1313 constructor ( baseUrl : string ) {
14- this . baseUrl = baseUrl . replace ( / \/ $ / , "" ) ; // Remove trailing slash
14+ this . baseUrl = baseUrl . replace ( / \/ $ / , "" ) + "/" ; // Ensure trailing slash
1515 }
1616
1717 async getMetadata ( ) : Promise < BenchmarkRuns > {
18- const response = await fetch ( `${ this . baseUrl } / output/metadata.json` ) ;
18+ const response = await fetch ( `${ this . baseUrl } output/metadata.json` ) ;
1919
2020 if ( ! response . ok ) {
2121 throw new Error (
@@ -27,7 +27,7 @@ export class DataService {
2727 }
2828
2929 async getMetrics ( outputDir : string , nodeType : string ) : Promise < MetricData [ ] > {
30- const metricsPath = `${ this . baseUrl } / output/${ outputDir } /metrics-${ nodeType } .json` ;
30+ const metricsPath = `${ this . baseUrl } output/${ outputDir } /metrics-${ nodeType } .json` ;
3131 const response = await fetch ( metricsPath ) ;
3232
3333 if ( ! response . ok ) {
@@ -72,7 +72,7 @@ export function getDataSourceConfig(): DataServiceConfig {
7272 const dataSource = getEnvVar ( "DATA_SOURCE" ) || "static" ;
7373
7474 if ( dataSource === "api" && apiBaseUrl ) {
75- // API mode: use the configured API base URL
75+ // API mode: use the configured API base URL (ensure trailing slash)
7676 return { baseUrl : apiBaseUrl } ;
7777 } else {
7878 // Static mode: use current origin (empty string means relative to current domain)
You can’t perform that action at this time.
0 commit comments