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("@!")]
| |