kopia lustrzana https://github.com/OpenDroneMap/WebODM
Added unit tests, updated docs
rodzic
3e5de5ad64
commit
534fa9d565
|
@ -355,6 +355,19 @@ class TestApi(BootTestCase):
|
||||||
# Verify max images field
|
# Verify max images field
|
||||||
self.assertTrue("max_images" in res.data)
|
self.assertTrue("max_images" in res.data)
|
||||||
|
|
||||||
|
# Verify odm version
|
||||||
|
self.assertTrue("odm_version" in res.data)
|
||||||
|
|
||||||
|
# label should be hostname:port (since no label is set)
|
||||||
|
self.assertEqual(res.data['label'], pnode.hostname + ":" + str(pnode.port))
|
||||||
|
|
||||||
|
# If we update the label, the label is used instead
|
||||||
|
pnode.label = "Test"
|
||||||
|
pnode.save()
|
||||||
|
|
||||||
|
res = client.get('/api/processingnodes/{}/'.format(pnode.id))
|
||||||
|
self.assertEqual(res.data['label'], "Test")
|
||||||
|
|
||||||
# Cannot delete a processing node as normal user
|
# Cannot delete a processing node as normal user
|
||||||
res = client.delete('/api/processingnodes/{}/'.format(pnode.id))
|
res = client.delete('/api/processingnodes/{}/'.format(pnode.id))
|
||||||
self.assertTrue(res.status_code, status.HTTP_403_FORBIDDEN)
|
self.assertTrue(res.status_code, status.HTTP_403_FORBIDDEN)
|
||||||
|
|
|
@ -18,6 +18,6 @@ class Migration(migrations.Migration):
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='processingnode',
|
model_name='processingnode',
|
||||||
name='odm_version',
|
name='odm_version',
|
||||||
field=models.CharField(help_text='OpenDroneMap version used by the node.', max_length=32, null=True),
|
field=models.CharField(help_text='ODM version used by the node.', max_length=32, null=True),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
"last_refreshed": "2017-03-01T21:14:49.918276Z",
|
"last_refreshed": "2017-03-01T21:14:49.918276Z",
|
||||||
"queue_count": 0,
|
"queue_count": 0,
|
||||||
"max_images": null,
|
"max_images": null,
|
||||||
|
"label": "nodeodm.masseranolabs.com:80",
|
||||||
"available_options": [
|
"available_options": [
|
||||||
{
|
{
|
||||||
"help": "Oct-tree depth at which the Laplacian equation is solved in the surface reconstruction step. Increasing this value increases computation times slightly but helps reduce memory usage. Default: 9",
|
"help": "Oct-tree depth at which the Laplacian equation is solved in the surface reconstruction step. Increasing this value increases computation times slightly but helps reduce memory usage. Default: 9",
|
||||||
|
@ -33,9 +34,11 @@ online | bool | Whether the processing node could be reached in the last 5 minut
|
||||||
hostname | string | Hostname/IP address
|
hostname | string | Hostname/IP address
|
||||||
port | int | Port
|
port | int | Port
|
||||||
api_version | string | Version of NodeODM currently running
|
api_version | string | Version of NodeODM currently running
|
||||||
|
odm_version | string | Version of ODM currently being used
|
||||||
last_refreshed | string | Date and time this node was last seen online. This value is typically refreshed every 15-30 seconds and is used to decide whether a node is offline or not
|
last_refreshed | string | Date and time this node was last seen online. This value is typically refreshed every 15-30 seconds and is used to decide whether a node is offline or not
|
||||||
queue_count | int | Number of [Task](#task) items currently being processed/queued on this node.
|
queue_count | int | Number of [Task](#task) items currently being processed/queued on this node.
|
||||||
max_images | int | Optional maximum number of images this processing node can accept. null indicates no limit.
|
max_images | int | Optional maximum number of images this processing node can accept. null indicates no limit.
|
||||||
|
label | string | Label for the node
|
||||||
available_options | JSON[] | JSON-encoded list of options that this node is capable of handling. See [Available Options](#available-options) for more information
|
available_options | JSON[] | JSON-encoded list of options that this node is capable of handling. See [Available Options](#available-options) for more information
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue