mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 11:11:07 -03:30
Merge pull request #4178 from rooftopcellist/collection_datetime_str
Fix collection datetime for isolated instance info Reviewed-by: Elijah DeLee <kdelee@redhat.com> https://github.com/kdelee
This commit is contained in:
@@ -153,6 +153,12 @@ def projects_by_scm_type(since):
|
|||||||
return counts
|
return counts
|
||||||
|
|
||||||
|
|
||||||
|
def _get_isolated_datetime(last_check):
|
||||||
|
if last_check:
|
||||||
|
return last_check.isoformat()
|
||||||
|
return last_check
|
||||||
|
|
||||||
|
|
||||||
@register('instance_info')
|
@register('instance_info')
|
||||||
def instance_info(since):
|
def instance_info(since):
|
||||||
info = {}
|
info = {}
|
||||||
@@ -166,7 +172,7 @@ def instance_info(since):
|
|||||||
'cpu': instance['cpu'],
|
'cpu': instance['cpu'],
|
||||||
'memory': instance['memory'],
|
'memory': instance['memory'],
|
||||||
'managed_by_policy': instance['managed_by_policy'],
|
'managed_by_policy': instance['managed_by_policy'],
|
||||||
'last_isolated_check': instance['last_isolated_check'],
|
'last_isolated_check': _get_isolated_datetime(instance['last_isolated_check']),
|
||||||
'enabled': instance['enabled']
|
'enabled': instance['enabled']
|
||||||
}
|
}
|
||||||
info[instance['uuid']] = instance_info
|
info[instance['uuid']] = instance_info
|
||||||
|
|||||||
Reference in New Issue
Block a user