Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Group Description Tooltips where applicable #770

Merged
merged 3 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion BLAZAM/BLAZAM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<ServerGarbageCollection>false</ServerGarbageCollection>
<AssemblyVersion>1.2.6</AssemblyVersion>
<Version>2025.01.25.0042</Version>
<Version>2025.01.25.1350</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<RootNamespace>BLAZAM</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
Expand Down
22 changes: 6 additions & 16 deletions BLAZAMGui/UI/Dashboard/Widgets/ChangedEntriesWidget.razor
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,11 @@
</TemplateColumn>
<TemplateColumn Title=@AppLocalization["Name"]>
<CellTemplate>
<MudContextMenu>

<ChildContent>

<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>

</ChildContent>
<MenuContents>

<DirectoryEntryContextMenuItems Entry="@context.Item" />

</MenuContents>
</MudContextMenu>
<DirectoryEntryContextMenu Entry="@context.Item">
<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>
</DirectoryEntryContextMenu>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title=@AppLocalization["Changed"]>
Expand Down Expand Up @@ -79,5 +69,5 @@

}


}
26 changes: 8 additions & 18 deletions BLAZAMGui/UI/Dashboard/Widgets/ChangedPasswordsWidget.razor
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,11 @@
<Columns>
<TemplateColumn Title=@AppLocalization["Name"]>
<CellTemplate>
<MudContextMenu>

<ChildContent>

<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>

</ChildContent>
<MenuContents>

<DirectoryEntryContextMenuItems Entry="@context.Item" />

</MenuContents>
</MudContextMenu>
<DirectoryEntryContextMenu Entry="@context.Item">
<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>
</DirectoryEntryContextMenu>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title=@AppLocalization["Password changed"]>
Expand All @@ -45,7 +35,7 @@
</Columns>
<PagerContent>
<MudDataGridPager PageSizeOptions=[5,10,25,50,100] T="IDirectoryEntryAdapter" />
</PagerContent>
</PagerContent>
<NoRecordsContent>
<MudText>@AppLocalization["No matching entries"]</MudText>
</NoRecordsContent>
Expand All @@ -56,11 +46,11 @@
@code {
List<IADUser> LockedUsers = new();


protected override async Task RefreshData()
{
LoadingData = true;
LockedUsers = (await Directory.Users.FindChangedPasswordUsersAsync(false)).Where(u=>u.CanRead).ToList();
LockedUsers = (await Directory.Users.FindChangedPasswordUsersAsync(false)).Where(u => u.CanRead).ToList();
LoadingData = false;

}
Expand Down
27 changes: 9 additions & 18 deletions BLAZAMGui/UI/Dashboard/Widgets/FavoritesWidget.razor
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,11 @@
</TemplateColumn>
<TemplateColumn Title=@AppLocalization["Name"]>
<CellTemplate>
<MudContextMenu>

<ChildContent>

<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>

</ChildContent>
<MenuContents>

<DirectoryEntryContextMenuItems Entry="@context.Item" />

</MenuContents>
</MudContextMenu>
<DirectoryEntryContextMenu Entry="@context.Item">
<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>
</DirectoryEntryContextMenu>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title=@AppLocalization["Changed"]>
Expand Down Expand Up @@ -72,7 +62,8 @@
protected override async Task RefreshData()
{
LoadingData = true;
await Task.Run(() => {
await Task.Run(() =>
{
var favorites = new List<IDirectoryEntryAdapter>();
foreach (var entry in CurrentUser.State.Preferences.FavoriteEntries)
{
Expand All @@ -85,11 +76,11 @@
}
FavoriteEntries = favorites;
});

LoadingData = false;

}

protected override void RowClicked(DataGridRowClickEventArgs<IDirectoryEntryAdapter> args)
{
if (args.Item != null)
Expand Down
20 changes: 5 additions & 15 deletions BLAZAMGui/UI/Dashboard/Widgets/LockedOutUsers.razor
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,11 @@
<Columns>
<TemplateColumn Title=@AppLocalization["Name"]>
<CellTemplate>
<MudContextMenu>

<ChildContent>

<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>

</ChildContent>
<MenuContents>

<DirectoryEntryContextMenuItems Entry="@context.Item"/>

</MenuContents>
</MudContextMenu>
<DirectoryEntryContextMenu Entry="@context.Item">
<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>
</DirectoryEntryContextMenu>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title=@AppLocalization["Locked Out"]>
Expand Down
27 changes: 12 additions & 15 deletions BLAZAMGui/UI/Dashboard/Widgets/NewEntriesWidgetDataGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,21 @@
<Columns>
<TemplateColumn Title=@AppLocalization["Name"]>
<CellTemplate>
<MudContextMenu>

<ChildContent>

<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<DirectoryEntryContextMenu Entry="@context.Item">
<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
@if (context.Item is IADGroup group)
{
<GroupWithDescriptionTooltip Group="group" />
}
else
{
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>
@* <DirectoryEntryTooltipPopover Entry="context.Item">
}
</AppTooltip>
@* <DirectoryEntryTooltipPopover Entry="context.Item">
<MudText>@context.Item?.CanonicalName</MudText>
</DirectoryEntryTooltipPopover> *@

</ChildContent>
<MenuContents>

<DirectoryEntryContextMenuItems Entry="@context.Item" />

</MenuContents>
</MudContextMenu>
</DirectoryEntryContextMenu>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title=@AppLocalization["Created"]>
Expand Down
31 changes: 12 additions & 19 deletions BLAZAMGui/UI/Dashboard/Widgets/StaleEntriesWidgetDataGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@typeparam T where T : IAccountDirectoryAdapter

<MudDataGrid T="@T"

Items=Items
Dense=true
Filterable=true
Expand All @@ -21,28 +20,22 @@
<Columns>
<TemplateColumn Title=@AppLocalization["Name"]>
<CellTemplate>
<MudContextMenu>


<ChildContent>
<DirectoryEntryContextMenu Entry="@context.Item">
<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>
</DirectoryEntryContextMenu>

<AppTooltip Text="@context.Item?.OU.ToPrettyOu()">
<MudText>@context.Item?.CanonicalName</MudText>
</AppTooltip>

</ChildContent>
<MenuContents>

<DirectoryEntryContextMenuItems Entry="@context.Item" />

</MenuContents>
</MudContextMenu>

</CellTemplate>
</TemplateColumn>
<TemplateColumn Title=@AppLocalization["Last Logon"]>
<CellTemplate>
@if (context.Item?.Created != null)
{
<LastLogonTime DirectoryEntry="@context.Item"/>
<LastLogonTime DirectoryEntry="@context.Item" />
}
</CellTemplate>
</TemplateColumn>
Expand All @@ -56,14 +49,14 @@
</MudDataGrid>


@code {
#nullable disable warnings
@code {
#nullable disable warnings

private async Task<string> GetLastLogonTime(T item)
{
return await Task.Run(() =>
{
return item.LastLogonTime?.ToLocalTime().ToString();
return item.LastLogonTime?.ToLocalTime().ToString();
});
}
}
40 changes: 0 additions & 40 deletions BLAZAMGui/UI/Groups/GroupMember.razor

This file was deleted.

Loading
Loading