-
Notifications
You must be signed in to change notification settings - Fork 283
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
Feature/cancel export rebased & bug fixes to customizable export UI #519
Feature/cancel export rebased & bug fixes to customizable export UI #519
Conversation
Changes: - Resolved ESLint errors(ExportAction.js & ToolbarIconSet.js) - Empty line added in assets/icons/svg/cancel.svg
@jywarren Thought 'http//export.mapknitter.org/', was a typo so updated it to have a |
@sashadev-sky I've cloned this and tested it locally. It works fine. There are no POST requests errors. |
Hi, thanks! Cc @tech4GT were we able to get https running? Thanks all!
Exciting to see this getting there!
…On Sat, Jan 11, 2020, 7:30 AM Vladimir Mikulic ***@***.***> wrote:
@sashadev-sky <https://github.com/sashadev-sky> I've cloned this and
tested it locally. It works fine. There are no POST requests errors.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#519?email_source=notifications&email_token=AAAF6JY2CSHTN4MWE6EC25TQ5G3EJA5CNFSM4KFRRUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWA3WA#issuecomment-573312472>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J4M44FQYWIDCAXFGHDQ5G3EJANCNFSM4KFRRUAA>
.
|
I think I did put in the cors code! :D |
Isn't cors distinct from running ssl to get https access?
…On Sat, Jan 11, 2020, 11:26 AM Varun Gupta ***@***.***> wrote:
Hi, thanks! Cc @tech4GT <https://github.com/tech4GT> were we able to get
https running? Thanks all! Exciting to see this getting there!
… <#m_4975143771099100894_>
On Sat, Jan 11, 2020, 7:30 AM Vladimir Mikulic *@*.***> wrote:
@sashadev-sky <https://github.com/sashadev-sky>
https://github.com/sashadev-sky I've cloned this and tested it locally.
It works fine. There are no POST requests errors. — You are receiving this
because you were mentioned. Reply to this email directly, view it on GitHub
<#519 <#519>?email_source=notifications&email_token=AAAF6JY2CSHTN4MWE6EC25TQ5G3EJA5CNFSM4KFRRUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWA3WA#issuecomment-573312472>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAF6J4M44FQYWIDCAXFGHDQ5G3EJANCNFSM4KFRRUAA
.
I think I did put in the cors code! :D
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#519?email_source=notifications&email_token=AAAF6J7CCS7MOBLFIDTZIQDQ5HXJZA5CNFSM4KFRRUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIWFOXQ#issuecomment-573331294>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAF6J5TT7NIB3MBMMKPMITQ5HXJZANCNFSM4KFRRUAA>
.
|
Yes you're right! It's not yet working on https! I'll open an issue for this! |
@tech4GT @jywarren is right. SSL is not related to CORS. |
When SSL is enabled all ajax request must also go on https://something. |
@@ -320,6 +252,81 @@ L.DistortableCollection.Edit = L.Handler.extend({ | |||
}, this); | |||
return this; | |||
}, | |||
|
|||
startExport: function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, are you sure this works? I had to move it into a closure to give it access to the this
scope.
Ah, i see, you used bind
instead, down on this line
OK!
Yes, and what's happening in some cases is also a complex bug where a 500 error can generate a CORS error, because the 500 error is a different HTTP status code (i think?), and sometimes CORS only allows GET/POST -- so sometimes resolving the underlying 500 error can make CORS errors disappear too. But they could also be legit independent CORS errors. Gah! 😅 |
NOTE: RESOLVED (see below)
|
I'm going to try changing the example images to use remote ones and see if things work locally then. |
Ah, i'd already thought of that, and they are already remote -- OK, what I did was I changed |
😄 🎉 Tested this and it works! The redirect to the status.json output file is a little weird, but it's cool. Maybe we should build more/better UI around this but I'm already doing that in publiclab/mapknitter#1192, and we can pull out the key JS parts of that and develop an export handler/UI mini repository from that code once it's running more smoothly. |
@tech4GT this may not work in gh-pages because we're on https there, but I'll turn of the https-forcing on this repo to see if we can run it without? |
@jywarren I can confirm that this works on both HTTP and HTTPS. |
Indeed it doesn't force, so we can try it at http://publiclab.github.io/Leaflet.DistortableImage/examples/export.html -- note NOT HTTPS. 🎉 It's republishing now... also i published |
YES! IT WORKS!!! Very nice folks!!! we still need HTTPS on the exporter (https://github.com/publiclab/image-sequencer-app) for this to work on Mapknitter, which is on HTTPS. But this is really awesome. Note that we're overriding the images in this example, so it doesn't matter what you do to the demo images, actually. |
This is really cool. @publiclab/is-reviewers this is actually image sequencer running in a headless Node.js kubernetes cluster in Google Cloud, generating full-res MapKnitter exports! 💥 |
Well done everyone. |
Fixes #0000 (<=== Add issue number here)
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
grunt
If tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!
=============================================
resolve
option because i'm thinking if someone is using the startExport method in the first place, the resolve will be what is passed to the Promise always? Also they can already customize the updaterexport.html
=============================================