Use getApiBase() to get GraphQL Endpoint.

This commit is contained in:
netalertx-fedora
2026-01-09 22:51:36 +01:00
parent 7b15329a02
commit 494f01048e

View File

@@ -336,13 +336,12 @@ function formatDataSize(bytes) {
function loadInterfaces() {
// Build base URL dynamically
const apiBase = getApiBase();
const apiToken = getSetting("API_TOKEN");
const host = window.location.hostname;
const protocol = window.location.protocol;
const port = getSetting("GRAPHQL_PORT");
$.ajax({
url: `${protocol}//${host}:${port}/nettools/interfaces`,
url: `${apiBase}/nettools/interfaces`,
type: "GET",
headers: {
"Authorization": "Bearer " + apiToken,
@@ -418,4 +417,4 @@ $(document).ready(function() {
}, 200);
});
</script>
</script>