Get region names from API instead of hard-coding them

This commit is contained in:
2024-05-06 16:57:12 -04:00
parent 4c4db6a734
commit 8ea657c757
21 changed files with 333 additions and 107 deletions

View File

@ -83,6 +83,13 @@ import { settings, elements, regionNames, apiGet, apiPost, apiPut, parseParams,
}
};
// Callback for region API call
var displayRegion = function(response)
{
if (response.label && response.label.length)
ui.location.innerHTML = response.label;
};
// Callback for volume API call
var displayVolume = function(response)
{
@ -117,6 +124,8 @@ import { settings, elements, regionNames, apiGet, apiPost, apiPut, parseParams,
}
ui.saveButton.disabled = false;
apiGet("/regions/" + data.volume.region, displayRegion, null);
};
// Click handler for save button