finish initial implementing application configuration editing through webfront
todo: server configuration
This commit is contained in:
@ -8,6 +8,7 @@ namespace SharedLibraryCore.Configuration
|
||||
{
|
||||
public class ApplicationConfiguration : IBaseConfiguration
|
||||
{
|
||||
|
||||
[LocalizedDisplayName("SETUP_ENABLE_WEBFRONT")]
|
||||
[LinkedConfiguration("WebfrontBindUrl", "ManualWebfrontUrl")]
|
||||
public bool EnableWebFront { get; set; }
|
||||
@ -76,6 +77,7 @@ namespace SharedLibraryCore.Configuration
|
||||
public List<string> GlobalRules { get; set; }
|
||||
[LocalizedDisplayName("WEBFRONT_CONFIGURATION_DISALLOWED_NAMES")]
|
||||
public List<string> DisallowedClientNames { get; set; }
|
||||
[UIHint("ServerConfiguration")]
|
||||
public List<ServerConfiguration> Servers { get; set; }
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
using Newtonsoft.Json;
|
||||
using SharedLibraryCore.Interfaces;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
@ -171,6 +171,12 @@ namespace SharedLibraryCore.Services
|
||||
// the alias is the same so we can just remove it
|
||||
if (oldAlias.AliasId != existingExactAlias.AliasId && oldAlias.AliasId > 0)
|
||||
{
|
||||
await context.Clients
|
||||
.Where(_client => _client.CurrentAliasId == oldAlias.AliasId)
|
||||
.ForEachAsync(_client => _client.CurrentAliasId = existingExactAlias.AliasId);
|
||||
|
||||
await context.SaveChangesAsync();
|
||||
|
||||
entity.CurrentServer.Logger.WriteDebug($"[updatealias] {entity} has exact alias match, so we're going to try to remove aliasId {oldAlias.AliasId} with linkId {oldAlias.AliasId}");
|
||||
context.Aliases.Remove(oldAlias);
|
||||
await context.SaveChangesAsync();
|
||||
|
Reference in New Issue
Block a user