feat(api): Реализованы JobController, JobGroupController
This commit is contained in:
@@ -377,6 +377,17 @@
|
||||
public const string getParam = "{id}";
|
||||
}
|
||||
|
||||
public static class JobGroup
|
||||
{
|
||||
public const string GetAll = Base + "/job-groups/";
|
||||
public const string Get = Base + "/job-groups/" + getParam;
|
||||
|
||||
public const string Delete = Base + "/job-groups/" + getParam;
|
||||
public const string Create = Base + "/job-groups/";
|
||||
public const string Update = Base + "/job-groups/" + getParam;
|
||||
|
||||
public const string getParam = "{id}";
|
||||
}
|
||||
|
||||
public static class JobAutoControl
|
||||
{
|
||||
|
||||
29
PARR.API/Contracts/V1/Requests/JobGroupRequest.cs
Normal file
29
PARR.API/Contracts/V1/Requests/JobGroupRequest.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
namespace PARR.API.Contracts.V1.Requests
|
||||
{
|
||||
public class JobGroupRequest
|
||||
{
|
||||
public required string Name { get; set; }
|
||||
|
||||
public bool? IsUmbrella { get; set; }
|
||||
|
||||
public required string ShortDescription { get; set; }
|
||||
|
||||
public required string FullDescription { get; set; }
|
||||
|
||||
public required string Solution { get; set; }
|
||||
|
||||
public required string TemplateDuration { get; set; }
|
||||
|
||||
public DateTimeOffset ReferenceDate { get; set; }
|
||||
|
||||
public bool IsAutoDistributionEnabled { get; set; }
|
||||
|
||||
public bool IsAgent { get; set; }
|
||||
|
||||
public string? AgentName { get; set; }
|
||||
|
||||
public int? AgentTimeOutSec { get; set; }
|
||||
|
||||
public string? AgentScript { get; set; }
|
||||
}
|
||||
}
|
||||
19
PARR.API/Contracts/V1/Requests/JobRequest.cs
Normal file
19
PARR.API/Contracts/V1/Requests/JobRequest.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace PARR.API.Contracts.V1.Requests
|
||||
{
|
||||
public class JobRequest
|
||||
{
|
||||
public required Guid TnkId { get; set; }
|
||||
|
||||
public required Guid GroupId { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public int? MinValueRelationships { get; set; }
|
||||
|
||||
public int? MaxValueRelationships { get; set; }
|
||||
|
||||
public string? TemplateNameMask { get; set; }
|
||||
|
||||
public required string WorkName { get; set; }
|
||||
}
|
||||
}
|
||||
17
PARR.API/Contracts/V1/Requests/Queries/JobGroupQuery.cs
Normal file
17
PARR.API/Contracts/V1/Requests/Queries/JobGroupQuery.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using PARR.API.Contracts.V1.Requests.BaseRequests;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
public class JobGroupQuery: FullQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Поиск по имени
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Поиск по короткому описанию
|
||||
/// </summary>
|
||||
public string? ShortDescription { get; set; }
|
||||
}
|
||||
}
|
||||
15
PARR.API/Contracts/V1/Requests/Queries/JobQuery.cs
Normal file
15
PARR.API/Contracts/V1/Requests/Queries/JobQuery.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
public class JobQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Поиск по имени
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Поиск по Id группы работ
|
||||
/// </summary>
|
||||
public Guid? GroupId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -62,41 +62,41 @@
|
||||
}
|
||||
|
||||
|
||||
public class TemplateStats
|
||||
{
|
||||
/// <summary>
|
||||
/// Активированных шаблонов
|
||||
/// </summary>
|
||||
public int Activated { get; set; }
|
||||
//public class TemplateStats
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// Активированных шаблонов
|
||||
// /// </summary>
|
||||
// public int Activated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Синхронизировано шаблонов (TaskStatus = 30/Ok)
|
||||
/// </summary>
|
||||
public int Synchronized { get; set; }
|
||||
// /// <summary>
|
||||
// /// Синхронизировано шаблонов (TaskStatus = 30/Ok)
|
||||
// /// </summary>
|
||||
// public int Synchronized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ошибок синхронизации (RobotStatus = 33/Error)
|
||||
/// </summary>
|
||||
public int Errors { get; set; }
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Ошибок синхронизации (RobotStatus = 33/Error)
|
||||
// /// </summary>
|
||||
// public int Errors { get; set; }
|
||||
//}
|
||||
|
||||
|
||||
public class ScheduleStats
|
||||
{
|
||||
/// <summary>
|
||||
/// Активированных шаблонов
|
||||
/// </summary>
|
||||
public int Activated { get; set; }
|
||||
//public class ScheduleStats
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// Активированных шаблонов
|
||||
// /// </summary>
|
||||
// public int Activated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Синхронизировано шаблонов (TaskStatus = 30/Ok)
|
||||
/// </summary>
|
||||
public int Synchronized { get; set; }
|
||||
// /// <summary>
|
||||
// /// Синхронизировано шаблонов (TaskStatus = 30/Ok)
|
||||
// /// </summary>
|
||||
// public int Synchronized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ошибок синхронизации (RobotStatus = 33/Error)
|
||||
/// </summary>
|
||||
public int Errors { get; set; }
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Ошибок синхронизации (RobotStatus = 33/Error)
|
||||
// /// </summary>
|
||||
// public int Errors { get; set; }
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,6 +12,52 @@
|
||||
|
||||
public class JobResponse : JobBaseResponse
|
||||
{
|
||||
public int TemplatesCount { get; set; }
|
||||
|
||||
#region Статистика
|
||||
|
||||
public TemplateStats? TemplateStatistics { get; set; }
|
||||
|
||||
public ScheduleStats? ScheduleStatistics { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
public class TemplateStats
|
||||
{
|
||||
/// <summary>
|
||||
/// Активированных шаблонов
|
||||
/// </summary>
|
||||
public int Activated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Синхронизировано шаблонов (TaskStatus = 30/Ok)
|
||||
/// </summary>
|
||||
public int Synchronized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ошибок синхронизации (RobotStatus = 33/Error)
|
||||
/// </summary>
|
||||
public int Errors { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class ScheduleStats
|
||||
{
|
||||
/// <summary>
|
||||
/// Активированных шаблонов
|
||||
/// </summary>
|
||||
public int Activated { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Синхронизировано шаблонов (TaskStatus = 30/Ok)
|
||||
/// </summary>
|
||||
public int Synchronized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ошибок синхронизации (RobotStatus = 33/Error)
|
||||
/// </summary>
|
||||
public int Errors { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
38
PARR.API/Contracts/V1/Responses/JobGroupResponse.cs
Normal file
38
PARR.API/Contracts/V1/Responses/JobGroupResponse.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using PARR.DAL.Models.Job;
|
||||
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class JobGroupBaseResponse
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
|
||||
public bool? IsUmbrella { get; set; }
|
||||
|
||||
public required string ShortDescription { get; set; }
|
||||
|
||||
public required string FullDescription { get; set; }
|
||||
|
||||
public required string Solution { get; set; }
|
||||
|
||||
public required string TemplateDuration { get; set; }
|
||||
|
||||
public DateTimeOffset ReferenceDate { get; set; }
|
||||
|
||||
public bool IsAutoDistributionEnabled { get; set; }
|
||||
|
||||
public bool IsAgent { get; set; }
|
||||
|
||||
public string? AgentName { get; set; }
|
||||
|
||||
public int? AgentTimeOutSec { get; set; }
|
||||
|
||||
public string? AgentScript { get; set; }
|
||||
}
|
||||
|
||||
public class JobGroupResponse : JobGroupBaseResponse
|
||||
{
|
||||
public List<JobResponse>? Jobs { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user