< Summary

Information
Class: Elsa.Dashboard.Api.Endpoints.Dashboard.WorkflowHotspots.Endpoint
Assembly: Elsa.Dashboard.Api
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Dashboard.Api/Endpoints/Dashboard/WorkflowHotspots/Endpoint.cs
Line coverage
66%
Covered lines: 4
Uncovered lines: 2
Coverable lines: 6
Total lines: 23
Line coverage: 66.6%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
Configure()100%11100%
ExecuteAsync()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Dashboard.Api/Endpoints/Dashboard/WorkflowHotspots/Endpoint.cs

#LineLine coverage
 1using Elsa.Authorization;
 2using Elsa.Abstractions;
 3using Elsa.Dashboard.Abstractions.Contracts;
 4using Elsa.Dashboard.Abstractions.Models;
 5using Elsa.Dashboard.Api.Permissions;
 6using JetBrains.Annotations;
 7
 8namespace Elsa.Dashboard.Api.Endpoints.Dashboard.WorkflowHotspots;
 9
 10[PublicAPI]
 311internal class Endpoint(IDashboardProvider dashboardProvider) : ElsaEndpoint<DashboardWorkflowHotspotsRequest, Dashboard
 12{
 13    public override void Configure()
 14    {
 315        Post("/dashboard/workflow-hotspots");
 316        RequirePermission(Elsa.Dashboard.Api.Permissions.DashboardResourcePermissions.Dashboard, CoreVerbs.View);
 317    }
 18
 19    public override async Task<DashboardWorkflowHotspotsResponse> ExecuteAsync(DashboardWorkflowHotspotsRequest request,
 20    {
 021        return await dashboardProvider.GetWorkflowHotspotsAsync(request, cancellationToken);
 022    }
 23}