From 8a4275c24050b69fcaa994f120bde086888e9e4a Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 28 Jan 2026 13:59:35 -0500 Subject: [PATCH] add last synchronization date --- Oqtane.Client/Modules/Admin/Site/Index.razor | 60 +++++++++++-------- .../Resources/Modules/Admin/Site/Index.resx | 12 +++- 2 files changed, 45 insertions(+), 27 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Site/Index.razor b/Oqtane.Client/Modules/Admin/Site/Index.razor index e85de2a2..ae9d8f50 100644 --- a/Oqtane.Client/Modules/Admin/Site/Index.razor +++ b/Oqtane.Client/Modules/Admin/Site/Index.razor @@ -489,17 +489,20 @@ -
- -
- + @if (_synchronization != "False") + { +
+ +
+ +
-
+ }
- +
- @foreach (var site in _sites) { @@ -525,7 +527,7 @@
} - @if (_siteGroupDefinitionId != -1 && _siteId != -1) + @if (_siteGroupDefinitionId != -1) {
@@ -537,6 +539,15 @@
+ @if (_member == "Secondary") + { +
+ +
+ +
+
+ } }
@@ -666,12 +677,13 @@ private List _siteGroupDefinitions = new List(); private List _sites = new List(); private int _siteGroupDefinitionId = -1; - private int _siteId = -1; + private int _siteId; private string _groupName = string.Empty; private string _synchronization = "Update"; private string _notify = "True"; private string _localization = "False"; private string _member = "Primary"; + private string _synchronized = string.Empty; private bool _addSiteGroupDefinition = false; private string _tenant = string.Empty; @@ -1290,6 +1302,7 @@ if (siteGroup.SiteId == _siteId) { _member = site.Fingerprint; + _synchronized = UtcToLocal(siteGroup.SynchronizedOn).ToString(); } } } @@ -1301,24 +1314,22 @@ private async void SiteChanged(ChangeEventArgs e) { _siteId = int.Parse(e.Value.ToString()); - if (_siteId != -1) + var siteGroup = await SiteGroupService.GetSiteGroupAsync(_siteId, _siteGroupDefinitionId); + if (siteGroup != null) { - var siteGroup = await SiteGroupService.GetSiteGroupAsync(_siteId, _siteGroupDefinitionId); - if (siteGroup != null) + if (siteGroup.SiteGroupDefinition.PrimarySiteId == _siteId) { - if (siteGroup.SiteGroupDefinition.PrimarySiteId == _siteId) - { - _member = "Primary"; - } - else - { - _member = "Secondary"; - } + _member = "Primary"; } else { - _member = "False"; + _member = "Secondary"; } + _synchronized = UtcToLocal(siteGroup.SynchronizedOn).ToString(); + } + else + { + _member = "False"; } StateHasChanged(); } @@ -1328,6 +1339,7 @@ _groupName = ""; _siteId = PageState.Site.SiteId; _member = "Primary"; + _synchronized = ""; _addSiteGroupDefinition = true; } diff --git a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx index e7efa0bb..f0f8f414 100644 --- a/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx +++ b/Oqtane.Client/Resources/Modules/Admin/Site/Index.resx @@ -526,7 +526,7 @@ Localization? - Specifies if each site that is part of the group contains content which is localized in a different language + Specifies if the content of the sites in the group are localized Primary @@ -559,12 +559,18 @@ Notify? - Specifies if the site administrator of secondary sites should be notified of any synchronization activity + Specifies if the administrators of secondary sites should be notified of any synchronization activity Site: - he sites in this tenant (database) + The sites in this tenant (database) + + + Synchronized: + + + The date/time of the last synchronization for the site \ No newline at end of file