From 0a872ab91e73872bcf0cecce51f6a0e387d500ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 31 May 2026 23:59:38 +0000 Subject: [PATCH 1/2] Initial plan From 9763482642e81bdfe10a4547f195904e2a9acbe1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Jun 2026 00:31:03 +0000 Subject: [PATCH 2/2] Show project name column on dashboard stack tables Co-authored-by: niemyjski <1020579+niemyjski@users.noreply.github.com> --- .../app/frequent-controller.js | 1 + .../ClientApp.angular/app/new-controller.js | 1 + .../ClientApp.angular/app/users-controller.js | 1 + .../stacks/stacks-directive.tpl.html | 6 +++- .../Controllers/EventControllerTests.cs | 31 +++++++++++++++++++ 5 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/Exceptionless.Web/ClientApp.angular/app/frequent-controller.js b/src/Exceptionless.Web/ClientApp.angular/app/frequent-controller.js index b0e2225202..3b8e1f9f60 100644 --- a/src/Exceptionless.Web/ClientApp.angular/app/frequent-controller.js +++ b/src/Exceptionless.Web/ClientApp.angular/app/frequent-controller.js @@ -217,6 +217,7 @@ limit: 15, mode: "stack_frequent", }, + showProjectName: !$stateParams.projectId, source: vm._source + ".Events", }; vm.stats = { diff --git a/src/Exceptionless.Web/ClientApp.angular/app/new-controller.js b/src/Exceptionless.Web/ClientApp.angular/app/new-controller.js index e1dbad0269..2e1cfe1189 100644 --- a/src/Exceptionless.Web/ClientApp.angular/app/new-controller.js +++ b/src/Exceptionless.Web/ClientApp.angular/app/new-controller.js @@ -217,6 +217,7 @@ limit: 15, mode: "stack_new", }, + showProjectName: !$stateParams.projectId, source: vm._source + ".Events", }; vm.stats = { diff --git a/src/Exceptionless.Web/ClientApp.angular/app/users-controller.js b/src/Exceptionless.Web/ClientApp.angular/app/users-controller.js index f6ed12eaf3..e7e3f8e8ce 100644 --- a/src/Exceptionless.Web/ClientApp.angular/app/users-controller.js +++ b/src/Exceptionless.Web/ClientApp.angular/app/users-controller.js @@ -217,6 +217,7 @@ limit: 15, mode: "stack_users", }, + showProjectName: !$stateParams.projectId, source: vm._source + ".Events", }; vm.stats = { diff --git a/src/Exceptionless.Web/ClientApp.angular/components/stacks/stacks-directive.tpl.html b/src/Exceptionless.Web/ClientApp.angular/components/stacks/stacks-directive.tpl.html index 06345e2017..f2f3d40454 100644 --- a/src/Exceptionless.Web/ClientApp.angular/components/stacks/stacks-directive.tpl.html +++ b/src/Exceptionless.Web/ClientApp.angular/components/stacks/stacks-directive.tpl.html @@ -19,6 +19,7 @@ {{::'Summary' | translate}} + {{::'Project' | translate}} {{::'UserRatio' | translate}} {{::'Events' | translate}} {{::'First' | translate}} @@ -35,6 +36,9 @@ + + {{::stack.project_name}} + {{(stack.total_users > 0 ? stack.users / stack.total_users * 100.0 : 0) | @@ -57,7 +61,7 @@ - + {{::'Loading...' | translate}} {{vm.hasFilter() ? 'No stacks were found with the current filter.': 'No stacks were found.' | diff --git a/tests/Exceptionless.Tests/Controllers/EventControllerTests.cs b/tests/Exceptionless.Tests/Controllers/EventControllerTests.cs index 066c3d7d6c..d17361952b 100644 --- a/tests/Exceptionless.Tests/Controllers/EventControllerTests.cs +++ b/tests/Exceptionless.Tests/Controllers/EventControllerTests.cs @@ -819,6 +819,37 @@ public async Task GetEvents_StackFrequentMode_DeserializesStackSummaryModelWithR }); } + [Fact] + public async Task GetEvents_StackFrequentMode_IncludesProjectNameFields() + { + // Arrange + await CreateStacksAndEventsAsync(); + + // Act + var response = await SendRequestAsync(r => r + .AsGlobalAdminUser() + .AppendPath("events") + .QueryString("filter", "status:open") + .QueryString("mode", "stack_frequent") + .StatusCodeShouldBeOk() + ); + + string json = await response.Content.ReadAsStringAsync(TestCancellationToken); + using var document = JsonDocument.Parse(json); + + // Assert + Assert.Equal(JsonValueKind.Array, document.RootElement.ValueKind); + Assert.NotEqual(0, document.RootElement.GetArrayLength()); + + foreach (var item in document.RootElement.EnumerateArray()) + { + Assert.True(item.TryGetProperty("project_id", out var projectId), "Expected project_id field in stack summary payload."); + Assert.True(item.TryGetProperty("project_name", out var projectName), "Expected project_name field in stack summary payload."); + Assert.False(string.IsNullOrWhiteSpace(projectId.GetString())); + Assert.False(string.IsNullOrWhiteSpace(projectName.GetString())); + } + } + [InlineData(null)] [InlineData("")] [InlineData("@!")]