kopia lustrzana https://github.com/OpenDroneMap/WebODM
Added comments
rodzic
abb597299d
commit
2d6b2cdfae
|
@ -11,6 +11,7 @@ from app.plugins import logger
|
||||||
from .platform_helper import get_all_extended_platforms
|
from .platform_helper import get_all_extended_platforms
|
||||||
|
|
||||||
class DynamicForm(forms.Form):
|
class DynamicForm(forms.Form):
|
||||||
|
"""This dynamic form will go through all the extended platforms, and retrieve their fields"""
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
ds = kwargs.pop('data_store')
|
ds = kwargs.pop('data_store')
|
||||||
super(DynamicForm, self).__init__(*args, **kwargs)
|
super(DynamicForm, self).__init__(*args, **kwargs)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "Cloud Import",
|
"name": "Cloud Import",
|
||||||
"webodmMinVersion": "1.1.2",
|
"webodmMinVersion": "1.1.2",
|
||||||
"description": "Import images from external servers directly",
|
"description": "Import images from external sources directly",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"author": "Nicolas Chamo",
|
"author": "Nicolas Chamo",
|
||||||
"email": "nicolas@chamo.com.ar",
|
"email": "nicolas@chamo.com.ar",
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Plugin(PluginBase):
|
||||||
return ["load_buttons.js"]
|
return ["load_buttons.js"]
|
||||||
|
|
||||||
def include_css_files(self):
|
def include_css_files(self):
|
||||||
return ["font.css", "build/ImportView.css"]
|
return ["build/ImportView.css"]
|
||||||
|
|
||||||
def build_jsx_components(self):
|
def build_jsx_components(self):
|
||||||
return ["ImportView.jsx"]
|
return ["ImportView.jsx"]
|
||||||
|
@ -24,6 +24,7 @@ class Plugin(PluginBase):
|
||||||
def api_mount_points(self):
|
def api_mount_points(self):
|
||||||
api_views = [api_view for platform in get_all_extended_platforms() for api_view in platform.get_api_views()]
|
api_views = [api_view for platform in get_all_extended_platforms() for api_view in platform.get_api_views()]
|
||||||
mount_points = [MountPoint(path, view) for (path, view) in api_views]
|
mount_points = [MountPoint(path, view) for (path, view) in api_views]
|
||||||
|
# Add mount points for each extended platform that might require us to do so
|
||||||
return mount_points + [
|
return mount_points + [
|
||||||
MountPoint("projects/(?P<project_pk>[^/.]+)/tasks/(?P<pk>[^/.]+)/import", ImportFolderTaskView.as_view()),
|
MountPoint("projects/(?P<project_pk>[^/.]+)/tasks/(?P<pk>[^/.]+)/import", ImportFolderTaskView.as_view()),
|
||||||
MountPoint("platforms/(?P<platform_name>[^/.]+)/verify", PlatformsVerifyTaskView.as_view()),
|
MountPoint("platforms/(?P<platform_name>[^/.]+)/verify", PlatformsVerifyTaskView.as_view()),
|
||||||
|
|
|
@ -21,7 +21,7 @@ export default class LibraryDialog extends Component {
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
availableFolders: [],
|
availableFolders: [],
|
||||||
selectedFolder: null,
|
selectedFolder: null,
|
||||||
loadingFolders: true,
|
loadingFolders: true,
|
||||||
error: "",
|
error: "",
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,6 @@ export default class LibraryDialog extends Component {
|
||||||
|
|
||||||
componentDidUpdate(){
|
componentDidUpdate(){
|
||||||
if (this.props.platform !== null && this.props.platform.type == "library" && this.state.loadingFolders){
|
if (this.props.platform !== null && this.props.platform.type == "library" && this.state.loadingFolders){
|
||||||
// this.setState({loadingFolders: true});
|
|
||||||
$.get(`${this.props.apiURL}/cloudlibrary/${this.props.platform.name}/listfolders`)
|
$.get(`${this.props.apiURL}/cloudlibrary/${this.props.platform.name}/listfolders`)
|
||||||
.done(result => {
|
.done(result => {
|
||||||
result.folders.forEach(album => {
|
result.folders.forEach(album => {
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
{
|
{
|
||||||
"scripts": {
|
|
||||||
"dev": "webpack --watch"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react-bootstrap": "^0.32.4",
|
"react-bootstrap": "^0.32.4",
|
||||||
"react-select": "^3.0.4"
|
"react-select": "^3.0.4"
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
{% extends "app/plugins/templates/base.html" %}
|
{% extends "app/plugins/templates/base.html" %}
|
||||||
{% load bootstrap_extras %}
|
{% load bootstrap_extras %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<style>
|
|
||||||
.alert {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 100000;
|
|
||||||
width: 79vw;
|
|
||||||
bottom: 0.5em;
|
|
||||||
right: 1em;
|
|
||||||
width: 18em;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<h3>Welcome to Cloud Import!</h3>
|
<h3>Welcome to Cloud Import!</h3>
|
||||||
<h5><strong>Instructions</strong></h5>
|
<h5><strong>Instructions</strong></h5>
|
||||||
On this screen, you will be able to configure everything that is necessary for your different platforms.<BR/>
|
On this screen, you will be able to configure everything that is necessary for your different platforms.<BR/>
|
||||||
|
|
Ładowanie…
Reference in New Issue