Provide Installed property to Agent.
This commit is contained in:
parent
40c800d1a4
commit
45a0ae383f
|
|
@ -63,6 +63,9 @@ public class Agent
|
|||
[JsonIgnore]
|
||||
public PluginDef Plugin { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public bool Installed => Plugin.Enabled;
|
||||
|
||||
/// <summary>
|
||||
/// Allow to be routed
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ public class AgentFilter
|
|||
{
|
||||
public string? AgentName { get; set; }
|
||||
public bool? Disabled { get; set; }
|
||||
public bool? Installed { get; set; }
|
||||
public bool? AllowRouting { get; set; }
|
||||
public bool? IsPublic { get; set; }
|
||||
public bool? IsRouter { get; set; }
|
||||
|
|
|
|||
|
|
@ -21,7 +21,9 @@ public partial class AgentService
|
|||
agent.Plugin = GetPlugin(agent.Id);
|
||||
}
|
||||
|
||||
return await Task.FromResult(agents);
|
||||
agents = agents.Where(x => x.Installed).ToList();
|
||||
|
||||
return agents;
|
||||
}
|
||||
|
||||
#if !DEBUG
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ public partial class AgentService
|
|||
agentId
|
||||
},
|
||||
Assembly = typeof(AgentService).Assembly.FullName.Split(',').First(),
|
||||
Name = "BotSharp.Core"
|
||||
Name = "BotSharp",
|
||||
Enabled = true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue