feat(api): Выдача заданий агенту.
This commit is contained in:
@@ -41,6 +41,11 @@
|
||||
public const string getParam = "{id}";
|
||||
}
|
||||
|
||||
public static class AgentTask
|
||||
{
|
||||
public const string GetByIp = Base + "/agent-tasks/ip";
|
||||
}
|
||||
|
||||
//public static class EsppData
|
||||
//{
|
||||
// public const string UploadTemplates = Base + "/espp-data/templates";
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace PARR.API.Contracts.V1.Requests.Queries
|
||||
{
|
||||
public class AgentTaskGetByIpQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// По-умолчанию берётся IP-клиента
|
||||
/// </summary>
|
||||
public string? Ip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// По-умолчанию расписание на сегодня
|
||||
/// </summary>
|
||||
public DateTimeOffset? Date { get; set; }
|
||||
}
|
||||
}
|
||||
20
PARR.API/Contracts/V1/Responses/AgentTaskResponse.cs
Normal file
20
PARR.API/Contracts/V1/Responses/AgentTaskResponse.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class AgentTaskResponse
|
||||
{
|
||||
}
|
||||
|
||||
public class AgentTaskMinResponse
|
||||
{
|
||||
public List<AgentTaskMinScheduleResponse> Scheduled { get; set; } = new List<AgentTaskMinScheduleResponse>();
|
||||
}
|
||||
|
||||
public class AgentTaskMinScheduleResponse
|
||||
{
|
||||
public DateTimeOffset StartAt { get; set; }
|
||||
|
||||
public required string Script { get; set; }
|
||||
|
||||
public required string Name { get; set; }
|
||||
}
|
||||
}
|
||||
10
PARR.API/Contracts/V1/Responses/TemplateAgentResponse.cs
Normal file
10
PARR.API/Contracts/V1/Responses/TemplateAgentResponse.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace PARR.API.Contracts.V1.Responses
|
||||
{
|
||||
public class TemplateAgentResponse
|
||||
{
|
||||
public bool? IsAgent { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Script { get; set; }
|
||||
public int? TimeOutSec { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,11 @@
|
||||
public required string Solution { get; set; }
|
||||
public required string TemplateDuration { get; set; }
|
||||
|
||||
public TemplateAgentResponse? Agent { get; set; }
|
||||
|
||||
public DateTimeOffset? LastRun { get; set; }
|
||||
public DateTimeOffset NextRun { get; set; }
|
||||
|
||||
|
||||
public HostResponse? Host { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user