|
|
|
@ -2,7 +2,9 @@ using System; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.Extensions.Options; |
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; |
|
|
|
using Volo.Abp.EventBus.Local; |
|
|
|
|
|
|
|
namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement |
|
|
|
{ |
|
|
|
@ -10,10 +12,14 @@ namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement |
|
|
|
{ |
|
|
|
public SettingPageCreationContext SettingPageCreationContext { get; private set; } |
|
|
|
|
|
|
|
protected ILocalEventBus LocalEventBus { get; } |
|
|
|
protected SettingManagementPageOptions Options { get; } |
|
|
|
|
|
|
|
public IndexModel(IOptions<SettingManagementPageOptions> options) |
|
|
|
public IndexModel( |
|
|
|
IOptions<SettingManagementPageOptions> options, |
|
|
|
ILocalEventBus localEventBus) |
|
|
|
{ |
|
|
|
LocalEventBus = localEventBus; |
|
|
|
Options = options.Value; |
|
|
|
} |
|
|
|
|
|
|
|
@ -25,7 +31,7 @@ namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement |
|
|
|
{ |
|
|
|
await contributor.ConfigureAsync(SettingPageCreationContext); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return Page(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -33,5 +39,14 @@ namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement |
|
|
|
{ |
|
|
|
return Task.FromResult<IActionResult>(Page()); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<NoContentResult> OnPostRefreshConfigurationAsync() |
|
|
|
{ |
|
|
|
await LocalEventBus.PublishAsync( |
|
|
|
new CurrentApplicationConfigurationCacheResetEventData() |
|
|
|
); |
|
|
|
|
|
|
|
return NoContent(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|