kopia lustrzana https://github.com/OpenDroneMap/WebODM
Backend layout fix, specified node-odm-1 as a dependency of webapp to fix #71
rodzic
a0c17ec2a5
commit
33ba5312d4
|
@ -0,0 +1 @@
|
|||
test/
|
|
@ -192,7 +192,7 @@ class TaskListItem extends React.Component {
|
|||
addActionButton(" View Orthophoto", "btn-primary", "fa fa-globe", () => {
|
||||
location.href = `/map/project/${task.project}/task/${task.id}/`;
|
||||
});
|
||||
addActionButton(" View 3D Assets", "btn-primary", "fa fa-cube", () => {
|
||||
addActionButton(" View 3D Model", "btn-primary", "fa fa-cube", () => {
|
||||
location.href = `/3d/project/${task.project}/task/${task.id}/`;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -10,24 +10,25 @@
|
|||
|
||||
{% block page-wrapper %}
|
||||
<div id="page-wrapper" class="admin-area">
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
||||
{% if title %} › {{ title }}{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
<ul class="messagelist">{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
|
||||
{% endfor %}</ul>
|
||||
{% endif %}
|
||||
{% endblock messages %}
|
||||
|
||||
<!-- Content -->
|
||||
<section class="main">
|
||||
<div class="content {% block coltype %}colM{% endblock %}">
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
|
||||
{% if title %} › {{ title }}{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block messages %}
|
||||
{% if messages %}
|
||||
<ul class="messagelist">{% for message in messages %}
|
||||
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message|capfirst }}</li>
|
||||
{% endfor %}</ul>
|
||||
{% endif %}
|
||||
{% endblock messages %}
|
||||
|
||||
|
||||
{% block pretitle %}{% endblock %}
|
||||
{% block content_title %}{% if title %}<h1>{{ title }}</h1>{% endif %}{% endblock %}
|
||||
{% block content %}
|
||||
|
|
|
@ -6,6 +6,9 @@ version: '2'
|
|||
services:
|
||||
webapp:
|
||||
entrypoint: /bin/bash -c "chmod +x /webodm/*.sh && /webodm/wait-for-it.sh db:5432 -- /webodm/start.sh --create-default-pnode"
|
||||
depends_on:
|
||||
- db
|
||||
- node-odm-1
|
||||
node-odm-1:
|
||||
image: pierotofy/nodeodm
|
||||
container_name: node-odm-1
|
||||
|
|
|
@ -13,7 +13,7 @@ import json
|
|||
from django.db.models import signals
|
||||
from requests.exceptions import ConnectionError
|
||||
from .exceptions import ProcessingException
|
||||
|
||||
import simplejson
|
||||
def api(func):
|
||||
"""
|
||||
Catches JSON decoding errors that might happen when the server
|
||||
|
@ -22,9 +22,10 @@ def api(func):
|
|||
def wrapper(*args,**kwargs):
|
||||
try:
|
||||
return func(*args, **kwargs)
|
||||
except json.decoder.JSONDecodeError as e:
|
||||
except (json.decoder.JSONDecodeError, simplejson.JSONDecodeError) as e:
|
||||
raise ProcessingException(str(e))
|
||||
|
||||
|
||||
return wrapper
|
||||
|
||||
class ProcessingNode(models.Model):
|
||||
|
@ -57,7 +58,7 @@ class ProcessingNode(models.Model):
|
|||
self.last_refreshed = timezone.now()
|
||||
self.save()
|
||||
return True
|
||||
except ConnectionError:
|
||||
except:
|
||||
return False
|
||||
|
||||
def api_client(self):
|
||||
|
@ -187,8 +188,10 @@ class ProcessingNode(models.Model):
|
|||
@receiver(signals.post_save, sender=ProcessingNode, dispatch_uid="update_processing_node_info")
|
||||
def auto_update_node_info(sender, instance, created, **kwargs):
|
||||
if created:
|
||||
instance.update_node_info()
|
||||
|
||||
try:
|
||||
instance.update_node_info()
|
||||
except ProcessingException:
|
||||
pass
|
||||
|
||||
class ProcessingNodeUserObjectPermission(UserObjectPermissionBase):
|
||||
content_object = models.ForeignKey(ProcessingNode)
|
||||
|
|
2
start.sh
2
start.sh
|
@ -49,7 +49,7 @@ echo -e "\033[92m"
|
|||
echo "Congratulations! └@(・◡・)@┐"
|
||||
echo ==========================
|
||||
echo -e "\033[39m"
|
||||
echo "WebODM should be up and running!"
|
||||
echo "If there are no errors, WebODM should be up and running!"
|
||||
echo -e "\033[93m"
|
||||
echo Open a web browser and navigate to http://localhost:8000
|
||||
echo -e "\033[39m"
|
||||
|
|
Ładowanie…
Reference in New Issue