Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

change agent name to alias #290

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions iast/views/project_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get(self, request, pid):
queryset = IastAgent.objects.filter(
user__in=auth_users,
online=const.RUNNING,
bind_project_id__in=[0, pid]).values("id", "token")
bind_project_id__in=[0, pid]).values("id", "token","alias")
data = []
if queryset:
for item in queryset:
Expand All @@ -54,6 +54,7 @@ def get(self, request, pid):
'token':
item['token'],
'short_name':
'-'.join(item['token'].split('-')[:-1]),
item['alias'] if item.get('alias', None) else '-'.join(
item['token'].split('-')[:-1]),
})
return R.success(data=data)