refactor Site Groups
This commit is contained in:
@@ -484,23 +484,10 @@
|
||||
<div class="col-sm-9">
|
||||
<select id="synchronization" class="form-select" @bind="@_synchronization">
|
||||
<option value="False">@SharedLocalizer["No"]</option>
|
||||
<option value="Compare">@Localizer["Compare"]</option>
|
||||
<option value="Update">@Localizer["Update"]</option>
|
||||
<option value="True">@Localizer["Yes"]</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@if (_synchronization != "False")
|
||||
{
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="notify" HelpText="Specifies if the administrators of secondary sites should be notified of any synchronization activity" ResourceKey="Notify">Notify? </Label>
|
||||
<div class="col-sm-9">
|
||||
<select id="notify" class="form-select" @bind="@_notify">
|
||||
<option value="False">@SharedLocalizer["No"]</option>
|
||||
<option value="True">@SharedLocalizer["Yes"]</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="localization" HelpText="Specifies if the content of the sites in the group are localized" ResourceKey="Localization">Localization? </Label>
|
||||
<div class="col-sm-9">
|
||||
@@ -539,14 +526,35 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@if (_member == "Secondary")
|
||||
@if (_member == "Secondary" && _synchronization == "True")
|
||||
{
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="synchronized" HelpText="The date/time of the last synchronization for the site" ResourceKey="Synchronized">Synchronized: </Label>
|
||||
<Label Class="col-sm-3" For="synchronize" HelpText="Specifies the synchronization approach between the primary site and the selected site" ResourceKey="Synchronize">Synchronize? </Label>
|
||||
<div class="col-sm-9">
|
||||
<input id="synchronized" class="form-control" @bind="@_synchronized" disabled />
|
||||
<select id="synchronize" class="form-select" @bind="@_synchronize">
|
||||
<option value="False">@Localizer["Compare"]</option>
|
||||
<option value="True">@Localizer["Update"]</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="notify" HelpText="Specifies if site administrators should be notified of any synchronization activity" ResourceKey="Notify">Notify? </Label>
|
||||
<div class="col-sm-9">
|
||||
<select id="notify" class="form-select" @bind="@_notify">
|
||||
<option value="False">@SharedLocalizer["No"]</option>
|
||||
<option value="True">@SharedLocalizer["Yes"]</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@if (!string.IsNullOrEmpty(_synchronized))
|
||||
{
|
||||
<div class="row mb-1 align-items-center">
|
||||
<Label Class="col-sm-3" For="synchronized" HelpText="The date/time of the last synchronization for the site" ResourceKey="Synchronized">Synchronized: </Label>
|
||||
<div class="col-sm-9">
|
||||
<input id="synchronized" class="form-control" @bind="@_synchronized" disabled />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
<div class="row mb-1 align-items-center">
|
||||
@@ -594,7 +602,7 @@
|
||||
<br />
|
||||
<button type="button" class="btn btn-success" @onclick="SaveSite">@SharedLocalizer["Save"]</button>
|
||||
<ActionDialog Header="Delete Site" Message="@Localizer["Confirm.DeleteSite"]" Action="Delete" Security="SecurityAccessLevel.Host" Class="btn btn-danger" OnClick="@(async () => await DeleteSite())" ResourceKey="DeleteSite" />
|
||||
@if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host) && _siteGroupDefinitions.Any(item => item.PrimarySiteId == PageState.Site.SiteId && item.Synchronization != null))
|
||||
@if (UserSecurity.IsAuthorized(PageState.User, RoleNames.Host) && _siteGroupDefinitions.Any(item => item.PrimarySiteId == PageState.Site.SiteId && item.Synchronization))
|
||||
{
|
||||
<button type="button" class="btn btn-primary ms-1" @onclick="SynchronizeSite">@Localizer["Synchronize"]</button>
|
||||
}
|
||||
@@ -679,10 +687,11 @@
|
||||
private int _siteGroupDefinitionId = -1;
|
||||
private int _siteId;
|
||||
private string _groupName = string.Empty;
|
||||
private string _synchronization = "Update";
|
||||
private string _notify = "True";
|
||||
private string _synchronization = "True";
|
||||
private string _localization = "False";
|
||||
private string _member = "Primary";
|
||||
private string _synchronize = "True";
|
||||
private string _notify = "True";
|
||||
private string _synchronized = string.Empty;
|
||||
private bool _addSiteGroupDefinition = false;
|
||||
|
||||
@@ -1265,15 +1274,7 @@
|
||||
if (group != null)
|
||||
{
|
||||
_groupName = group.Name;
|
||||
if (group.Synchronization == null)
|
||||
{
|
||||
_synchronization = "False";
|
||||
}
|
||||
else
|
||||
{
|
||||
_synchronization = (group.Synchronization.Value) ? "Update" : "Compare";
|
||||
}
|
||||
_notify = group.Notify.ToString();
|
||||
_synchronization = group.Synchronization.ToString();
|
||||
_localization = group.Localization.ToString();
|
||||
|
||||
if (_sites.Count == 0)
|
||||
@@ -1302,6 +1303,8 @@
|
||||
if (siteGroup.SiteId == _siteId)
|
||||
{
|
||||
_member = site.Fingerprint;
|
||||
_synchronize = siteGroup.Synchronize.ToString();
|
||||
_notify = siteGroup.Notify.ToString();
|
||||
_synchronized = UtcToLocal(siteGroup.SynchronizedOn).ToString();
|
||||
}
|
||||
}
|
||||
@@ -1347,10 +1350,6 @@
|
||||
{
|
||||
SiteGroupDefinition siteGroupDefinition = null;
|
||||
|
||||
bool? synchronization = null;
|
||||
if (_synchronization == "Compare") synchronization = false;
|
||||
if (_synchronization == "Update") synchronization = true;
|
||||
|
||||
if (_siteGroupDefinitionId == -1)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_groupName))
|
||||
@@ -1359,8 +1358,7 @@
|
||||
{
|
||||
Name = _groupName,
|
||||
PrimarySiteId = _siteId,
|
||||
Synchronization = synchronization,
|
||||
Notify = bool.Parse(_notify),
|
||||
Synchronization = bool.Parse(_synchronization),
|
||||
Localization = bool.Parse(_localization),
|
||||
Synchronize = false
|
||||
};
|
||||
@@ -1374,8 +1372,7 @@
|
||||
{
|
||||
siteGroupDefinition.Name = _groupName;
|
||||
siteGroupDefinition.PrimarySiteId = (_member == "Primary") ? _siteId : siteGroupDefinition.PrimarySiteId;
|
||||
siteGroupDefinition.Synchronization = synchronization;
|
||||
siteGroupDefinition.Notify = bool.Parse(_notify);
|
||||
siteGroupDefinition.Synchronization = bool.Parse(_synchronization);
|
||||
siteGroupDefinition.Localization = bool.Parse(_localization);
|
||||
siteGroupDefinition = await SiteGroupDefinitionService.UpdateSiteGroupDefinitionAsync(siteGroupDefinition);
|
||||
}
|
||||
@@ -1393,7 +1390,9 @@
|
||||
siteGroup = new SiteGroup
|
||||
{
|
||||
SiteGroupDefinitionId = siteGroupDefinition.SiteGroupDefinitionId,
|
||||
SiteId = _siteId
|
||||
SiteId = _siteId,
|
||||
Synchronize = bool.Parse(_synchronize),
|
||||
Notify = bool.Parse(_notify)
|
||||
};
|
||||
await SiteGroupService.AddSiteGroupAsync(siteGroup);
|
||||
}
|
||||
@@ -1403,6 +1402,12 @@
|
||||
{
|
||||
await SiteGroupService.DeleteSiteGroupAsync(siteGroup.SiteGroupId);
|
||||
}
|
||||
else
|
||||
{
|
||||
siteGroup.Synchronize = bool.Parse(_synchronize);
|
||||
siteGroup.Notify = bool.Parse(_notify);
|
||||
await SiteGroupService.UpdateSiteGroupAsync(siteGroup);
|
||||
}
|
||||
}
|
||||
|
||||
await LoadSiteGroups();
|
||||
@@ -1452,7 +1457,7 @@
|
||||
}
|
||||
|
||||
// mark secondary sites for synchronization
|
||||
foreach (var group in _siteGroupDefinitions.Where(item => item.PrimarySiteId == PageState.Site.SiteId && item.Synchronization != null))
|
||||
foreach (var group in _siteGroupDefinitions.Where(item => item.PrimarySiteId == PageState.Site.SiteId && item.Synchronization))
|
||||
{
|
||||
group.Synchronize = true;
|
||||
await SiteGroupDefinitionService.UpdateSiteGroupDefinitionAsync(group);
|
||||
|
||||
@@ -559,7 +559,7 @@
|
||||
<value>Notify?</value>
|
||||
</data>
|
||||
<data name="Notify.HelpText" xml:space="preserve">
|
||||
<value>Specifies if the administrators of secondary sites should be notified of any synchronization activity</value>
|
||||
<value>Specifies if site administrators should be notified of any synchronization activity</value>
|
||||
</data>
|
||||
<data name="Site.Text" xml:space="preserve">
|
||||
<value>Site:</value>
|
||||
@@ -573,4 +573,10 @@
|
||||
<data name="Synchronized.HelpText" xml:space="preserve">
|
||||
<value>The date/time of the last synchronization for the site</value>
|
||||
</data>
|
||||
<data name="Synchronize.Text" xml:space="preserve">
|
||||
<value>Synchronize?</value>
|
||||
</data>
|
||||
<data name="Synchronize.HelpText" xml:space="preserve">
|
||||
<value>Specifies the synchronization approach between the primary site and the selected site</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -53,7 +53,7 @@ namespace Oqtane.Infrastructure
|
||||
var groups = siteGroupDefinitionRepository.GetSiteGroupDefinitions();
|
||||
|
||||
// iterate through groups which need to be synchronized
|
||||
foreach (var group in groups.Where(item => item.Synchronization != null && item.Synchronize))
|
||||
foreach (var group in groups.Where(item => item.Synchronization && item.Synchronize))
|
||||
{
|
||||
// get data
|
||||
if (siteGroups == null)
|
||||
@@ -177,7 +177,7 @@ namespace Oqtane.Infrastructure
|
||||
secondarySite.DeletedOn = primarySite.DeletedOn;
|
||||
|
||||
var siteRepository = provider.GetRequiredService<ISiteRepository>();
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
siteRepository.UpdateSite(secondarySite);
|
||||
}
|
||||
@@ -195,7 +195,7 @@ namespace Oqtane.Infrastructure
|
||||
syncManager.AddSyncEvent(alias, EntityNames.Site, secondarySite.SiteId, SyncEventActions.Refresh);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(log) && siteGroup.SiteGroupDefinition.Notify)
|
||||
if (!string.IsNullOrEmpty(log) && siteGroup.Notify)
|
||||
{
|
||||
// send change log to administrators
|
||||
SendNotifications(provider, secondarySite.SiteId, secondarySite.Name, log);
|
||||
@@ -244,7 +244,7 @@ namespace Oqtane.Infrastructure
|
||||
|
||||
if (role == null)
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
roleRepository.AddRole(secondaryRole);
|
||||
}
|
||||
@@ -252,7 +252,7 @@ namespace Oqtane.Infrastructure
|
||||
}
|
||||
else
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
roleRepository.UpdateRole(secondaryRole);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ namespace Oqtane.Infrastructure
|
||||
// remove roles in the secondary site which do not exist in the primary site
|
||||
foreach (var secondaryRole in secondaryRoles.Where(item => !primaryRoles.Select(item => item.Name).Contains(item.Name)))
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
roleRepository.DeleteRole(secondaryRole.RoleId);
|
||||
}
|
||||
@@ -323,7 +323,7 @@ namespace Oqtane.Infrastructure
|
||||
|
||||
if (folder == null)
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
folderRepository.AddFolder(secondaryFolder);
|
||||
}
|
||||
@@ -331,7 +331,7 @@ namespace Oqtane.Infrastructure
|
||||
}
|
||||
else
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
folderRepository.UpdateFolder(secondaryFolder);
|
||||
}
|
||||
@@ -370,7 +370,7 @@ namespace Oqtane.Infrastructure
|
||||
|
||||
if (file == null)
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
fileRepository.AddFile(secondaryFile);
|
||||
ReplicateFile(folderRepository, primaryFolder, primaryFile, secondaryFolder, secondaryFile);
|
||||
@@ -379,7 +379,7 @@ namespace Oqtane.Infrastructure
|
||||
}
|
||||
else
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
fileRepository.UpdateFile(secondaryFile);
|
||||
ReplicateFile(folderRepository, primaryFolder, primaryFile, secondaryFolder, secondaryFile);
|
||||
@@ -393,7 +393,7 @@ namespace Oqtane.Infrastructure
|
||||
// remove files in the secondary site which do not exist in the primary site
|
||||
foreach (var secondaryFile in secondaryFiles.Where(item => !primaryFiles.Select(item => item.Name).Contains(item.Name)))
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
fileRepository.DeleteFile(secondaryFile.FileId);
|
||||
var secondaryPath = Path.Combine(folderRepository.GetFolderPath(secondaryFolder), secondaryFile.Name);
|
||||
@@ -406,7 +406,7 @@ namespace Oqtane.Infrastructure
|
||||
// remove folders in the secondary site which do not exist in the primary site
|
||||
foreach (var secondaryFolder in secondaryFolders.Where(item => !primaryFolders.Select(item => item.Path).Contains(item.Path)))
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
folderRepository.DeleteFolder(secondaryFolder.FolderId);
|
||||
}
|
||||
@@ -490,7 +490,7 @@ namespace Oqtane.Infrastructure
|
||||
|
||||
if (page == null)
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
secondaryPage = pageRepository.AddPage(secondaryPage);
|
||||
}
|
||||
@@ -498,7 +498,7 @@ namespace Oqtane.Infrastructure
|
||||
}
|
||||
else
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
secondaryPage = pageRepository.UpdatePage(secondaryPage);
|
||||
}
|
||||
@@ -558,7 +558,7 @@ namespace Oqtane.Infrastructure
|
||||
if (module == null)
|
||||
{
|
||||
// add new module
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
module = moduleRepository.AddModule(secondaryPageModule.Module);
|
||||
updateContent = true;
|
||||
@@ -569,7 +569,7 @@ namespace Oqtane.Infrastructure
|
||||
{
|
||||
secondaryPageModule.ModuleId = module.ModuleId;
|
||||
secondaryPageModule.Module = null; // remove tracking
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
secondaryPageModule = pageModuleRepository.AddPageModule(secondaryPageModule);
|
||||
}
|
||||
@@ -582,7 +582,7 @@ namespace Oqtane.Infrastructure
|
||||
// update existing module
|
||||
if (primaryPageModule.Module.ModifiedOn > siteGroup.SynchronizedOn)
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
moduleRepository.UpdateModule(secondaryPageModule.Module);
|
||||
updateContent = true;
|
||||
@@ -591,7 +591,7 @@ namespace Oqtane.Infrastructure
|
||||
}
|
||||
if (primaryPageModule.ModifiedOn > siteGroup.SynchronizedOn)
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
secondaryPageModule = pageModuleRepository.UpdatePageModule(secondaryPageModule);
|
||||
}
|
||||
@@ -613,7 +613,7 @@ namespace Oqtane.Infrastructure
|
||||
var secondaryModuleContent = ((ISynchronizable)moduleObject).ExtractModule(secondaryPageModule.Module);
|
||||
if (primaryModuleContent != secondaryModuleContent)
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
((ISynchronizable)moduleObject).LoadModule(secondaryPageModule.Module, primaryModuleContent, primaryPageModule.Module.ModuleDefinition.Version);
|
||||
}
|
||||
@@ -648,7 +648,7 @@ namespace Oqtane.Infrastructure
|
||||
}
|
||||
if (!primaryPageModules.Any(item => item.PageId == primaryPageId && item.Module.ModuleDefinitionName == secondaryPageModule.Module.ModuleDefinitionName && item.Title.ToLower() == secondaryPageModule.Title.ToLower()))
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
pageModuleRepository.DeletePageModule(secondaryPageModule.PageModuleId);
|
||||
}
|
||||
@@ -659,7 +659,7 @@ namespace Oqtane.Infrastructure
|
||||
// remove pages in the secondary site which do not exist in the primary site
|
||||
foreach (var secondaryPage in secondaryPages.Where(item => !primaryPages.Select(item => item.Path).Contains(item.Path)))
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value)
|
||||
if (siteGroup.Synchronize)
|
||||
{
|
||||
pageRepository.DeletePage(secondaryPage.PageId);
|
||||
}
|
||||
@@ -710,7 +710,7 @@ namespace Oqtane.Infrastructure
|
||||
secondarySetting.SettingName = primarySetting.SettingName;
|
||||
secondarySetting.SettingValue = primarySetting.SettingValue;
|
||||
secondarySetting.IsPrivate = primarySetting.IsPrivate;
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value && !excludedSettings.Any(item => item.EntityName == secondarySetting.EntityName && item.SettingName == secondarySetting.SettingName))
|
||||
if (siteGroup.Synchronize && !excludedSettings.Any(item => item.EntityName == secondarySetting.EntityName && item.SettingName == secondarySetting.SettingName))
|
||||
{
|
||||
settingRepository.AddSetting(secondarySetting);
|
||||
updated = true;
|
||||
@@ -722,7 +722,7 @@ namespace Oqtane.Infrastructure
|
||||
{
|
||||
secondarySetting.SettingValue = primarySetting.SettingValue;
|
||||
secondarySetting.IsPrivate = primarySetting.IsPrivate;
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value && !excludedSettings.Any(item => item.EntityName == secondarySetting.EntityName && item.SettingName == secondarySetting.SettingName))
|
||||
if (siteGroup.Synchronize && !excludedSettings.Any(item => item.EntityName == secondarySetting.EntityName && item.SettingName == secondarySetting.SettingName))
|
||||
{
|
||||
settingRepository.UpdateSetting(secondarySetting);
|
||||
updated = true;
|
||||
@@ -735,7 +735,7 @@ namespace Oqtane.Infrastructure
|
||||
// any remaining secondary settings need to be deleted
|
||||
foreach (var secondarySetting in secondarySettings)
|
||||
{
|
||||
if (siteGroup.SiteGroupDefinition.Synchronization.Value && !excludedSettings.Any(item => item.EntityName == secondarySetting.EntityName && item.SettingName == secondarySetting.SettingName))
|
||||
if (siteGroup.Synchronize && !excludedSettings.Any(item => item.EntityName == secondarySetting.EntityName && item.SettingName == secondarySetting.SettingName))
|
||||
{
|
||||
settingRepository.DeleteSetting(secondarySetting.EntityName, secondarySetting.SettingId);
|
||||
updated = true;
|
||||
|
||||
@@ -24,8 +24,7 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||
SiteGroupDefinitionId = AddAutoIncrementColumn(table, "SiteGroupDefinitionId");
|
||||
Name = AddStringColumn(table, "Name", 200);
|
||||
PrimarySiteId = AddIntegerColumn(table, "PrimarySiteId");
|
||||
Synchronization = AddBooleanColumn(table, "Synchronization", true);
|
||||
Notify = AddBooleanColumn(table, "Notify");
|
||||
Synchronization = AddBooleanColumn(table, "Synchronization");
|
||||
Synchronize = AddBooleanColumn(table, "Synchronize");
|
||||
Localization = AddBooleanColumn(table, "Localization");
|
||||
|
||||
@@ -42,8 +41,6 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||
|
||||
public OperationBuilder<AddColumnOperation> Synchronization { get; set; }
|
||||
|
||||
public OperationBuilder<AddColumnOperation> Notify { get; set; }
|
||||
|
||||
public OperationBuilder<AddColumnOperation> Synchronize { get; set; }
|
||||
|
||||
public OperationBuilder<AddColumnOperation> Localization { get; set; }
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||
SiteGroupId = AddAutoIncrementColumn(table, "SiteGroupId");
|
||||
SiteGroupDefinitionId = AddIntegerColumn(table, "SiteGroupDefinitionId");
|
||||
SiteId = AddIntegerColumn(table, "SiteId");
|
||||
Synchronize = AddBooleanColumn(table, "Synchronize");
|
||||
Notify = AddBooleanColumn(table, "Notify");
|
||||
SynchronizedOn = AddDateTimeColumn(table, "SynchronizedOn", true);
|
||||
|
||||
AddAuditableColumns(table);
|
||||
@@ -41,6 +43,10 @@ namespace Oqtane.Migrations.EntityBuilders
|
||||
|
||||
public OperationBuilder<AddColumnOperation> SiteId { get; set; }
|
||||
|
||||
public OperationBuilder<AddColumnOperation> Synchronize { get; set; }
|
||||
|
||||
public OperationBuilder<AddColumnOperation> Notify { get; set; }
|
||||
|
||||
public OperationBuilder<AddColumnOperation> SynchronizedOn { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,16 @@ namespace Oqtane.Models
|
||||
/// </summary>
|
||||
public int SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the site synchronization approach (false = compare, true = update)
|
||||
/// </summary>
|
||||
public bool Synchronize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the site administrator should be notified of any synchronization activity
|
||||
/// </summary>
|
||||
public bool Notify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The last date/time the site was synchronized
|
||||
/// </summary>
|
||||
|
||||
@@ -18,14 +18,9 @@ namespace Oqtane.Models
|
||||
public int PrimarySiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the group supports synchronization (null = no, false = compare, true = update)
|
||||
/// Indicates if the group supports synchronization
|
||||
/// </summary>
|
||||
public bool? Synchronization { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates if the site administrator should be notified of any synchronization activity
|
||||
/// </summary>
|
||||
public bool Notify { get; set; }
|
||||
public bool Synchronization { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies if the group needs to be synchronized
|
||||
|
||||
Reference in New Issue
Block a user