Merge pull request #724 from nchamo/fix-cloud-import

Fix Cloud Import: Task Button Is Never Shown
pull/725/head
Piero Toffanin 2019-09-08 23:17:15 -04:00 zatwierdzone przez GitHub
commit aa189f0370
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -2,7 +2,7 @@
"name": "Cloud Import",
"webodmMinVersion": "1.1.2",
"description": "Import images from external sources directly",
"version": "1.0.0",
"version": "1.0.1",
"author": "Nicolas Chamo",
"email": "nicolas@chamo.com.ar",
"repository": "https://github.com/OpenDroneMap/WebODM",

Wyświetl plik

@ -11,18 +11,20 @@ PluginsAPI.Dashboard.addNewTaskButton(
PluginsAPI.Dashboard.addTaskActionButton(
["cloudimport/build/TaskView.js"],
function(args, ImportView) {
function(args, TaskView) {
var reactElement;
$.ajax({
url: "{{ api_url }}/projects/" + args.task.project + "/tasks/" + args.task.id + "/checkforurl",
dataType: 'json',
async: false,
success: function(data) {
if (data.folder_url) {
return React.createElement(ImportView, {
reactElement = React.createElement(TaskView, {
folderUrl: data.folder_url,
});
}
}
});
return reactElement;
}
);