diff --git a/BLAZAM/BLAZAM.csproj b/BLAZAM/BLAZAM.csproj index b9f507f9..484ef716 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 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 }); 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() + } + + 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) { 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."); 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]