This commit is contained in:
2023-01-12 19:19:27 +00:00
parent 43bfeab17e
commit 98a405501b
7 changed files with 147 additions and 26 deletions

View File

@@ -90,6 +90,7 @@ namespace Sockeye.Api.Controllers
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(SockDaysOfWeek).ToString()), "Days of the week"));
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(TrialRequestStatus).ToString()), "Trial license request status"));
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(ProductGroup).ToString()), "Product group"));
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(ServerState).ToString()), "Server state"));
return Ok(ApiOkResponse.Response(ret));
}
@@ -587,6 +588,26 @@ namespace Sockeye.Api.Controllers
ReturnList.Add(new NameIdItem() { Name = LT["ProductGroupRavenPerpetual"], Id = (long)ProductGroup.RavenPerpetual });
ReturnList.Add(new NameIdItem() { Name = LT["ProductGroupRavenSubscription"], Id = (long)ProductGroup.RavenSubscription });
}
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(ServerState).ToString()).ToLowerInvariant())
{
TranslationKeysToFetch.Add("ServerStateRequested");
TranslationKeysToFetch.Add("ServerStateActiveHealthy");
TranslationKeysToFetch.Add("ServerStateActiveRequiresAttention");
TranslationKeysToFetch.Add("ServerStateFailFirstHealthCheck");
TranslationKeysToFetch.Add("ServerStateFailSecondHealthCheck");
TranslationKeysToFetch.Add("ServerStateFailedRequiresAttention");
TranslationKeysToFetch.Add("ServerStateDeActivated");
TranslationKeysToFetch.Add("ServerStateDestroyed");
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId);
ReturnList.Add(new NameIdItem() { Name = LT["ServerStateRequested"], Id = (long)ServerState.Requested });
ReturnList.Add(new NameIdItem() { Name = LT["ServerStateActiveHealthy"], Id = (long)ServerState.ActiveHealthy });
ReturnList.Add(new NameIdItem() { Name = LT["ServerStateActiveRequiresAttention"], Id = (long)ServerState.ActiveRequiresAttention });
ReturnList.Add(new NameIdItem() { Name = LT["ServerStateFailFirstHealthCheck"], Id = (long)ServerState.FailFirstHealthCheck });
ReturnList.Add(new NameIdItem() { Name = LT["ServerStateFailSecondHealthCheck"], Id = (long)ServerState.FailSecondHealthCheck });
ReturnList.Add(new NameIdItem() { Name = LT["ServerStateFailedRequiresAttention"], Id = (long)ServerState.FailedRequiresAttention });
ReturnList.Add(new NameIdItem() { Name = LT["ServerStateDeActivated"], Id = (long)ServerState.DeActivated });
ReturnList.Add(new NameIdItem() { Name = LT["ServerStateDestroyed"], Id = (long)ServerState.Destroyed });
}