The purpose of this PR is to make the APIEndpointAsset's ping button work. It'll work by making a request using the information provided by the user when creating the asset, and we'll return True if the response status code is 200, False otherwise.
I noticed that this asset's edit button was disabled even when I had no scans running. We were disabling the button if there was a scan associated with the asset and that scan was not in 'Completed' state. We have more terminal states than just 'Completed', so I've updated the query to filter on those other states as well.
In addition to the tests added in this PR, I've manually confirmed that the ping button now works.
The purpose of this PR is to make the APIEndpointAsset's ping button work. It'll work by making a request using the information provided by the user when creating the asset, and we'll return True if the response status code is 200, False otherwise.
I noticed that this asset's edit button was disabled even when I had no scans running. We were disabling the button if there was a scan associated with the asset and that scan was not in 'Completed' state. We have more terminal states than just 'Completed', so I've updated the query to filter on those other states as well.
In addition to the tests added in this PR, I've manually confirmed that the ping button now works.