Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-connect saving status URL with Rails app #1190

Closed
jywarren opened this issue Jan 10, 2020 · 1 comment · Fixed by #1192
Closed

Re-connect saving status URL with Rails app #1190

jywarren opened this issue Jan 10, 2020 · 1 comment · Fixed by #1192

Comments

@jywarren
Copy link
Member

After #1126, we need to re-instate the extra method which saves the location of the remote Cloud Exporter status JSON file to the Exports model:

	
          /**	
           * TODO: update API to say if you pass in a custom `handleStatusUrl` you must also build your own updater	
           * and also create your own a frequency	
           * or fix this part	
           */	
          $.ajax({	
            url: "/export",	
            type: 'POST',	
            data: { status_url: statusUrl }	
          }).done(function (data) {	
            console.log('success!! ' + data);	
            updateInterval();	
          });

That sends up here: https://github.com/publiclab/mapknitter/pull/782/files#diff-0d9df75c86ab6387aa553c69b3e0033bR90

And we need to add it back in using the new API for LDI, as we do on these lines:

https://github.com/publiclab/Leaflet.DistortableImage/pull/485/files#diff-885e023f7555a1d19aae1eba08de7d3bR101-R123

Later, we need to display the different status.json file contents in a table in the Exports tab.

@jywarren
Copy link
Member Author

        // initialize the collection:
        imgGroup = L.distortableCollection({
          collection: json, // here we override the image data sent with a custom set
          fetchStatusUrl: fetchStatusUrl,
          handleStatusResponse: handleStatusResponse,
          exportUrl: 'http://34.74.118.242/api/v2/export/', // used to 
          exportStartUrl: 'http://34.74.118.242/api/v2/export/' // used to initiate the export
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant