Commit c2133401d806a899bc13a94a6f6f3d442497eb5d
1 parent
ccc300f4
Exists in
dev
Remove cmd from website when querying agent command list from API
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
src/core/pyros_django/api/functions.py
@@ -8,8 +8,9 @@ def get_list_agent_cmd(agent_name): | @@ -8,8 +8,9 @@ def get_list_agent_cmd(agent_name): | ||
8 | commands_recivied_by_agent = AgentCmd.get_commands_sent_to_agent(agent_name) | 8 | commands_recivied_by_agent = AgentCmd.get_commands_sent_to_agent(agent_name) |
9 | number = 20 | 9 | number = 20 |
10 | agent_cmds = commands_sent_by_agent | commands_recivied_by_agent | 10 | agent_cmds = commands_sent_by_agent | commands_recivied_by_agent |
11 | - agent_cmds = agent_cmds.exclude(full_name="get_specific_cmds") | ||
12 | - agent_cmds = agent_cmds.exclude(full_name="get_all_cmds") | 11 | + agents = AgentSurvey.objects.all() |
12 | + agent_cmds = agent_cmds.exclude(sender="System", full_name="get_specific_cmds") | ||
13 | + agent_cmds = agent_cmds.exclude(sender="System", full_name="get_all_cmds") | ||
13 | agent_cmds = agent_cmds.order_by("-s_deposit_time") | 14 | agent_cmds = agent_cmds.order_by("-s_deposit_time") |
14 | agent_cmds = agent_cmds[:number] | 15 | agent_cmds = agent_cmds[:number] |
15 | return AgentCmdSerializer(agent_cmds,many=True).data | 16 | return AgentCmdSerializer(agent_cmds,many=True).data |