mirror of https://github.com/openspug/spug
F 修复工作台统计主机数量可能不正确的问题
parent
2f7270cfef
commit
58841d57ce
|
@ -43,7 +43,7 @@ def get_request(request):
|
||||||
|
|
||||||
|
|
||||||
def get_deploy(request):
|
def get_deploy(request):
|
||||||
host = Host.objects.count()
|
host = Host.objects.filter(deleted_at__isnull=True).count()
|
||||||
data = {x.id: {'name': x.name, 'count': 0} for x in App.objects.all()}
|
data = {x.id: {'name': x.name, 'count': 0} for x in App.objects.all()}
|
||||||
for dep in Deploy.objects.all():
|
for dep in Deploy.objects.all():
|
||||||
data[dep.app_id]['count'] += len(json.loads(dep.host_ids))
|
data[dep.app_id]['count'] += len(json.loads(dep.host_ids))
|
||||||
|
|
Loading…
Reference in New Issue