bugfix/Fix missing host name link

This commit is contained in:
Marko Milić 2023-12-06 09:58:38 +01:00
parent 6538d13ada
commit 049e52f5af
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;
}