Merge pull request #238 from constantine2nd/develop

bugfix/Fix missing host name link
This commit is contained in:
Simon Redfern 2023-12-06 11:34:57 +01:00 committed by GitHub
commit 91f10e3b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -260,7 +260,7 @@
</div>
<div class="version_path">
<lift:loc locid="api_host">API Host: </lift:loc><a name="version_path" class="version" href="version path">version path</a>
<lift:loc locid="api_host">API Host: </lift:loc><a id="version-path" name="version_path" class="version" href="version path">version path</a>
</div>
</div>
</section>

View File

@ -60,7 +60,7 @@ function logout() {
async function makeObpApiCall() {
let timeoutInSeconds;
try {
let obpApiHost = document.getElementById("api_home_link");
let obpApiHost = document.getElementById("version-path");
if(obpApiHost) {
obpApiHost = obpApiHost.href.split("?")[0];
}
@ -76,6 +76,9 @@ async function makeObpApiCall() {
}
} catch (e) {
console.error(e);
timeoutInSeconds = 5 * 60 + 1; // Set default value to 301 seconds
console.log(`Default value ${timeoutInSeconds} is used`);
return timeoutInSeconds;
}
return timeoutInSeconds;
}