Skip to content

Commit

Permalink
change url creation to be slightly more abstract for more general ser…
Browse files Browse the repository at this point in the history
…ver creation
  • Loading branch information
JudahNour committed Aug 11, 2023
1 parent 512b856 commit a4cef53
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/gopogh-server/flake_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -762,15 +762,16 @@ async function init() {
await new Promise(resolve => google.charts.setOnLoadCallback(resolve));

let url;
const basePath = 'http://localhost:8080' // Base Server Path. Modify to actual server path if deploying
if (desiredEnvironment === undefined) {
// URL for displaySummaryChart
url = 'http://localhost:8080/summary'
url = basePath + '/summary'
} else if (desiredTest === undefined) {
// URL for displayEnvironmentChart
url = 'http://localhost:8080/env' + '?env=' + desiredEnvironment + '&tests_in_top=' + desiredTestNumber;
url = basePath + '/env' + '?env=' + desiredEnvironment + '&tests_in_top=' + desiredTestNumber;
} else {
// URL for displayTestAndEnvironmentChart
url = 'http://localhost:8080/test' + '?env=' + desiredEnvironment + '&test=' + desiredTest;
url = basePath + '/test' + '?env=' + desiredEnvironment + '&test=' + desiredTest;
}

// Fetch data from the determined URL
Expand Down

0 comments on commit a4cef53

Please sign in to comment.