From b4243a93391ef028c143855337681eeff88c7ed5 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Fri, 12 Apr 2024 19:17:59 -0400 Subject: [PATCH 1/6] Fix timezone on Change Entries Widget --- .../UI/Dashboard/Widgets/ChangedEntriesWidget.razor | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/BLAZAMGui/UI/Dashboard/Widgets/ChangedEntriesWidget.razor b/BLAZAMGui/UI/Dashboard/Widgets/ChangedEntriesWidget.razor index 92001cc7..d76eddaf 100644 --- a/BLAZAMGui/UI/Dashboard/Widgets/ChangedEntriesWidget.razor +++ b/BLAZAMGui/UI/Dashboard/Widgets/ChangedEntriesWidget.razor @@ -28,7 +28,14 @@ - + + + @if (context.Item?.LastChanged != null) + { + @context.Item.LastChanged?.ToLocalTime() + } + + From 305987c897e6334efde1079196224d5c1b5d3956 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Fri, 12 Apr 2024 19:18:23 -0400 Subject: [PATCH 2/6] Show unavailable action buttons as disabled --- BLAZAMGui/UI/DirectoryEntryViewHeader.razor | 94 ++++++++++----------- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git a/BLAZAMGui/UI/DirectoryEntryViewHeader.razor b/BLAZAMGui/UI/DirectoryEntryViewHeader.razor index a6fbaae9..c8982402 100644 --- a/BLAZAMGui/UI/DirectoryEntryViewHeader.razor +++ b/BLAZAMGui/UI/DirectoryEntryViewHeader.razor @@ -56,82 +56,80 @@ } - @if (DirectoryEntry.CanEdit) - { - - - - - } - @if (accountEntry != null && accountEntry.LockedOut && accountEntry.CanUnlock) + + + + + + + @if (accountEntry != null && accountEntry.LockedOut) { } - @if (groupableEntry?.CanAssign == true) + @if (groupableEntry != null) { } - @if (accountEntry?.CanDisable == true && accountEntry is not IADComputer) + @if (accountEntry != null && accountEntry is not IADComputer) { } - @if (DirectoryEntry.CanRename) - { - + - + - - } - @if (DirectoryEntry.CanMove) - { - + - - - } - @if (DirectoryEntry.CanDelete) - { - + + + + + + + + + + + + - - - } - @if (DirectoryEntry.CanEdit) - { - - - - } @if (accountEntry != null) { From fe8ff3df9d1afa04e27efa9444dad9e65faaa16f Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Fri, 12 Apr 2024 19:18:34 -0400 Subject: [PATCH 3/6] Add comments --- BLAZAMCommon/Helpers/NetworkTools.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BLAZAMCommon/Helpers/NetworkTools.cs b/BLAZAMCommon/Helpers/NetworkTools.cs index edf957ea..608f5203 100644 --- a/BLAZAMCommon/Helpers/NetworkTools.cs +++ b/BLAZAMCommon/Helpers/NetworkTools.cs @@ -22,7 +22,12 @@ public static bool PingHost(string hostNameOrAddress) } return pingable; } - + /// + /// Checks if the following TCP port is currently open and reachable by the host machine + /// + /// The hostname, FQDN, or IP of the host to check + /// The port number to check + /// True if the port is open, otherwise false public static bool IsPortOpen(string hostNameOrAddress, int port) { return IsAnyPortOpen(hostNameOrAddress, new int[] { port }); From 2aa7826232fac896de6f455a7d7a30f93ca80ed1 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Fri, 12 Apr 2024 19:18:45 -0400 Subject: [PATCH 4/6] Move add button to end of input --- .../UI/Groups/AssignToModalContent.razor | 82 ++++++++++++------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/BLAZAMGui/UI/Groups/AssignToModalContent.razor b/BLAZAMGui/UI/Groups/AssignToModalContent.razor index 9d162b61..5f5925d0 100644 --- a/BLAZAMGui/UI/Groups/AssignToModalContent.razor +++ b/BLAZAMGui/UI/Groups/AssignToModalContent.razor @@ -2,36 +2,56 @@ - { - if(result is IADGroup){ - return !DirectoryModel.MemberOf.Contains(result as IADGroup); - } - return true; - }) /> - @foreach (var group in additionalGroups) - { - - + @{ + var count = additionalGroups.Count; + var x = 1; - + - - {additionalGroups.Remove(group.Key);}) /> - - - - + @bind-SelectedResult=@Group + CustomResultsFilter=@((result)=>{ + if(result is IADGroup){ + return !DirectoryModel.MemberOf.Contains(result as IADGroup); + } + return true; + }) /> + @if (count == 0) + { + + } + + + + @foreach (var group in additionalGroups) + { + + + + + + + {additionalGroups.Remove(group.Key);}) /> + @{ + if (count == x) + { + + + } + x++; + + } + + } - @AppLocalization["or"] OnGroupMembershipChange { get; set; } @@ -106,7 +126,7 @@ [Parameter] public IGroupableDirectoryAdapter DirectoryModel { get; set; } - private Dictionary additionalGroups = new Dictionary(); + private Dictionary additionalGroups = new Dictionary(); protected override void OnInitialized() { base.OnInitialized(); @@ -123,7 +143,7 @@ new IDirectoryEntryAdapter Group { get; set; } async void AddGroupInput() { - additionalGroups.Add(additionalGroups.Count,null); + additionalGroups.Add(additionalGroups.Count, null); await InvokeAsync(StateHasChanged); } async void AssignToGroup() @@ -134,10 +154,10 @@ DirectoryModel.AssignTo(group); if (additionalGroups.Count > 0) { - foreach(var g in additionalGroups) + foreach (var g in additionalGroups) { - if(g.Value is IADGroup gr) - DirectoryModel.AssignTo(gr); + if (g.Value is IADGroup gr) + DirectoryModel.AssignTo(gr); } } SnackBarService.Warning(DirectoryModel.CanonicalName + " has been assigned to the selected group(s) but changes must be saved."); From b6ec6b0fba8d89be09dc487d37115f29401b5b32 Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Fri, 12 Apr 2024 19:19:03 -0400 Subject: [PATCH 5/6] Change display when icon only --- BLAZAMGui/UI/Outputs/StatusCheck.razor | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/BLAZAMGui/UI/Outputs/StatusCheck.razor b/BLAZAMGui/UI/Outputs/StatusCheck.razor index cb78dc54..3cf9ed68 100644 --- a/BLAZAMGui/UI/Outputs/StatusCheck.razor +++ b/BLAZAMGui/UI/Outputs/StatusCheck.razor @@ -1,7 +1,16 @@  +@if (Text.IsNullOrEmpty()) +{ + + + +} +else +{ + @Text -@Text +} @code { [Parameter] From 83f8d7f76f366599b2bdd5cc6a73666fcd9a3e3f Mon Sep 17 00:00:00 2001 From: Chris Jacobsen Date: Fri, 12 Apr 2024 19:19:12 -0400 Subject: [PATCH 6/6] Incremeent Version --- BLAZAM/BLAZAM.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index 9e9f782f..a46b7144 100644 --- a/BLAZAM/BLAZAM.csproj +++ b/BLAZAM/BLAZAM.csproj @@ -5,8 +5,8 @@ enable enable false - 0.9.0 - 2024.04.12.2206 + 0.9.1 + 2024.04.12.2311 false BLAZAM False