added a Setting Management UI

This commit is contained in:
sbwalker
2025-09-05 17:20:31 -04:00
parent 3e12910fbd
commit 94391875d5
9 changed files with 1024 additions and 4 deletions

View File

@ -240,6 +240,19 @@ namespace Oqtane.Services
/// <returns></returns>
Task DeleteSettingAsync(string entityName, int settingId);
/// <summary>
/// Gets list of unique entity names
/// </summary>
/// <returns></returns>
Task<List<string>> GetEntityNamesAsync();
/// <summary>
/// Gets a list of unique entity IDs for the given entity name
/// </summary>
/// <param name="entityName"></param>
/// <returns></returns>
Task<List<int>> GetEntityIdsAsync(string entityName);
/// <summary>
/// Gets the value of the given settingName (key) from the given key-value dictionary
/// </summary>
@ -494,6 +507,15 @@ namespace Oqtane.Services
await DeleteAsync($"{Apiurl}/{settingId}/{entityName}");
}
public async Task<List<string>> GetEntityNamesAsync()
{
return await GetJsonAsync<List<string>>($"{Apiurl}/entitynames");
}
public async Task<List<int>> GetEntityIdsAsync(string entityName)
{
return await GetJsonAsync<List<int>>($"{Apiurl}/entityids?entityname={entityName}");
}
public string GetSetting(Dictionary<string, string> settings, string settingName, string defaultValue)
{