feat(api,core): Методы в API для получения метрик заданий роботам, StatRobotMetricsController.
This commit is contained in:
9
PARR.Domain/DTOs/RobotMetrics/FilteredChartPoint.cs
Normal file
9
PARR.Domain/DTOs/RobotMetrics/FilteredChartPoint.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace PARR.Domain.DTOs.RobotMetrics
|
||||
{
|
||||
/// <summary>
|
||||
/// Статистика по роботам, согласно гибким фильтрам.
|
||||
/// </summary>
|
||||
/// <param name="Timestamp"></param>
|
||||
/// <param name="Count"></param>
|
||||
public record FilteredChartPoint(DateTimeOffset Timestamp, int Count);
|
||||
}
|
||||
16
PARR.Domain/DTOs/RobotMetrics/MetricFilter.cs
Normal file
16
PARR.Domain/DTOs/RobotMetrics/MetricFilter.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using PARR.Domain.Enums;
|
||||
|
||||
namespace PARR.Domain.DTOs.RobotMetrics
|
||||
{
|
||||
public record MetricFilter
|
||||
{
|
||||
public RobotsEnum? RobotCode { get; init; }
|
||||
public RobotStatusEnum? RobotStatusCode { get; init; }
|
||||
public TaskStatusEnum? TaskStatusCode { get; init; }
|
||||
public DateTimeOffset? DateFrom { get; init; }
|
||||
public DateTimeOffset? DateTo { get; init; }
|
||||
|
||||
// Шаг группировки в минутах (например, 2, 30, 60, 1440)
|
||||
public int IntervalMinutes { get; set; } = 30;
|
||||
}
|
||||
}
|
||||
7
PARR.Domain/DTOs/RobotMetrics/RobotStatusChartPoint.cs
Normal file
7
PARR.Domain/DTOs/RobotMetrics/RobotStatusChartPoint.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace PARR.Domain.DTOs.RobotMetrics
|
||||
{
|
||||
/// <summary>
|
||||
/// Статистика по Робот Сатусам, на графике
|
||||
/// </summary>
|
||||
public record RobotStatusChartPoint(DateTimeOffset Timestamp, int Wait, int InProgress, int Error, int Complete);
|
||||
}
|
||||
11
PARR.Domain/DTOs/RobotMetrics/TaskStatusChartPoint.cs
Normal file
11
PARR.Domain/DTOs/RobotMetrics/TaskStatusChartPoint.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace PARR.Domain.DTOs.RobotMetrics
|
||||
{
|
||||
/// <summary>
|
||||
/// Статистика по Статусам заданий роботам, на графике
|
||||
/// </summary>
|
||||
/// <param name="Timestamp"></param>
|
||||
/// <param name="Creating"></param>
|
||||
/// <param name="Updating"></param>
|
||||
/// <param name="Ok"></param>
|
||||
public record TaskStatusChartPoint(DateTimeOffset Timestamp, int Creating, int Updating, int Ok);
|
||||
}
|
||||
Reference in New Issue
Block a user