Commit Graph

74 Commits

Author SHA1 Message Date
Scott Shawcroft c3a96a63c0
Enable* web workflow for Pico W
* Except for circuitpython.local which depends on MDNS and will be
done in a follow up PR.

Progress on #7214
2022-11-21 16:24:05 -08:00
Jonathan Myers db28605add Fix mask for minutes field when computing modified_ns 2022-10-02 18:29:07 -07:00
Dan Halbert 52080e24eb status bar control 2022-08-30 15:23:44 -04:00
Melissa LeBlanc-Williams 1ae4d881fd Allow Move/Rename to be called from localhost 2022-08-24 14:50:42 -07:00
Neradoc dfd6fa2114 add serial number to version.json, UID like in boot_out.txt 2022-08-21 04:09:44 +02:00
Scott Shawcroft 3aa5f60cb9
Merge remote-tracking branch 'adafruit/main' into upload_folder 2022-08-17 13:15:37 -07:00
Scott Shawcroft 9a5f00a093
Remove upload button and fix mkdir parents 2022-08-17 11:31:11 -07:00
Scott Shawcroft 1287d9c22d
Merge pull request #6769 from tannewt/ww_move
Add file and directory renaming
2022-08-16 22:11:59 -07:00
Scott Shawcroft 3493be7757
Fix recursive delete, add upload labels and progress 2022-08-16 17:03:09 -07:00
Scott Shawcroft 525eb711c1
Add /code/ for online editing 2022-08-16 15:44:58 -07:00
Scott Shawcroft 85b0be83bf
Add file and directory renaming
Internally this is done with a MOVE HTTP verb. It is modeled after
WebDAV MOVE but not exact to keep the Destination header shorter
and have more consistent response codes.

Fixes #6647
2022-08-16 13:51:40 -07:00
Scott Shawcroft f1053fb963
Introduce port_yield()
This allows the web workflow send code to yield briefly when
waiting for more room to send in a socket. Waiting for an "interrupt"
could wait forever because the select task only waits for read and
error. Adding wait on write is tricky because much of the time we
don't care if the sockets are ready to write. Using yield avoids
this trickiness.
2022-08-11 11:25:34 -07:00
Scott Shawcroft 0b098f5013
Retry send if only some bytes sent
Fixes #6654 and fixes #6689
2022-08-10 11:34:49 -07:00
Dan Halbert a1d48e9978
Merge pull request #6729 from tannewt/websocket_ctrl_c
Read websocket in background to look for ctrl-c
2022-08-10 13:16:09 -04:00
Scott Shawcroft e0fb308972
Decode percent encoded file paths and set charset
Also, fix multiple file uploads from directory browser.

Fixes #6646
2022-08-09 16:36:57 -07:00
Scott Shawcroft 51b65cbea5
Read websocket in background to look for ctrl-c
Otherwise busy Python code that isn't reading input characters
won't be interruptible.

Fixes #6707
2022-08-09 13:57:03 -07:00
Scott Shawcroft 207311b02a
Merge branch 'main' into title_execution_status 2022-08-05 13:42:58 -07:00
Dan Halbert 7ab8a66cda
Merge pull request #6695 from tannewt/always_circuitpy
Get CIRCUITPY FATFS directly.
2022-08-05 11:51:35 -04:00
Scott Shawcroft 577d53dda4
Add execution status into title bar 2022-08-04 16:33:09 -07:00
Scott Shawcroft 185d3e19ec
Switch to temporary redirect for cp.local
This prevents browsers from caching it. Thanks to MakerMelissa for
the suggestion.
2022-08-04 16:25:50 -07:00
Scott Shawcroft 125b276af0
Get CIRCUITPY FATFS directly.
Otherwise, you may actually get a non-root filesystem.

Fixes #6575
2022-08-04 16:06:27 -07:00
Dan Halbert 524cc5e274
Merge pull request #6685 from tannewt/esp32_ww
Enable Web Workflow on Feather ESP32 V2
2022-08-02 21:30:23 -04:00
Scott Shawcroft f8c183bf3a
Merge pull request #6683 from Neradoc/nera-web-workflow-2
Add Authorization to Allow-Headers in web workflow
2022-08-02 11:02:30 -07:00
Neradoc 063e168810 Add Authorization to Allow-Headers in web workflow
Makes Safari happy
2022-08-02 18:40:10 +02:00
Scott Shawcroft 9661d3256c
Add more ESP32 boards and enable web workflow 2022-08-01 15:52:08 -07:00
Scott Shawcroft 462eb71570
Merge pull request #6611 from FoamyGuy/webflow_edit_page
Webflow edit page
2022-07-29 16:30:53 -07:00
Dan Halbert 8b2f061563
Merge pull request #6666 from tannewt/fix_web_paste
Lots of web workflow, C3 and title bar fixes
2022-07-29 17:10:46 -04:00
Scott Shawcroft 51006f5eeb
Merge branch 'main' into webflow_edit_page 2022-07-29 10:03:07 -07:00
Scott Shawcroft 96e870dc77
Merge pull request #6662 from andywarburton/main
Added css support to web workflow
2022-07-29 09:42:13 -07:00
Scott Shawcroft d6344812e8
Lots of web workflow, C3 and title bar fixes
* Fixes #6221 - C3 hang on `import wifi`. Enabling the WiFi PHY was
  disabling USB. Now boards that use it set CONFIG_ESP_PHY_ENABLE_USB
  explicitly.
* Fixes #6655 - Allows pasting into the web serial page. Fixes reading
  more than 0xf bytes at a time.
* Fixes #6653 - Fixes web socket encoding of payloads >125 bytes. Can
  happen when printing a long string.
* Fixes C3 responsiveness when waiting for key to enter REPL. (It
  now correctly stops sleeping.)
* Disables title bar updates when in raw REPL. Related to #6548.
* Adds version to title bar.
2022-07-28 16:06:56 -07:00
Scott Shawcroft c4c15206e7
Merge pull request #6608 from tannewt/web_workflow_port
Allow for dynamic reconfigure including port
2022-07-28 12:59:31 -07:00
Scott Shawcroft b11eb12da5
Fix modified time. Use snprintf for uint64_t printing. 2022-07-28 11:00:26 -07:00
Scott Shawcroft babd4ee618
Tweaks based on review comments 2022-07-28 08:43:36 -07:00
Scott Shawcroft df14f95398
Delete trailing spaces 2022-07-28 08:16:51 -07:00
Andy Warburton 2a0e4f7ee2 added css support to web workflow
Added a bare minimum css implementation to web workflow to improve readability
2022-07-28 12:03:22 +01:00
Scott Shawcroft 931757f4a9
Improve web workflow responsiveness
1. Run the socket select task at the same priority as CP. This is
  needed because it queues up the background work. Without it, CP
  needed to sleep to let the lower priority task go.
2. Close the active socket on disconnect. This prevents looping
  over a disconnected but not closed socket.

Fixes #6610. Fixes #6613
2022-07-26 15:29:49 -07:00
Scott Shawcroft f9cc4ec61b
Fix print chunk 2022-07-26 11:51:10 -07:00
foamyguy d0782b60cb Merge branch 'main' into webflow_edit_page
# Conflicts:
#	supervisor/shared/web_workflow/web_workflow.c
2022-07-25 19:20:05 -05:00
Scott Shawcroft f4927dd2d6
Use mp_printf instead of snprintf 2022-07-25 16:58:54 -07:00
Scott Shawcroft 6d6234443d
Merge remote-tracking branch 'adafruit/main' into web_workflow_port 2022-07-25 15:57:58 -07:00
Neradoc 09915ab0b9 compare all static ok hosts with port, add 127.0.0.1 and localhost to it
use strncmp rather than memcmp, one of the strings coul be smaller than the other
2022-07-24 15:15:10 +02:00
Neradoc 6575598ae6 HTTP headers and methods are not case sensitive
had the issue where Firefox would send "authorization" in lower case
2022-07-24 14:28:01 +02:00
Neradoc 9a6c3884a7 do options unauthenticated first, fix testing localhost 2022-07-24 14:28:01 +02:00
Neradoc 40cb0aac7c CORS preflight: allow OPTIONS without authentication
check for 127.0.0.1 without a port specified
2022-07-24 14:28:01 +02:00
foamyguy 584e27139e add back /edit/ handler and specify ES6 quote chars for jsmin 2022-07-15 19:49:03 -05:00
Scott Shawcroft 78b4159448
Allow for dynamic reconfigure including port 2022-07-15 16:33:12 -07:00
foamyguy a46a44db26 adding edit page 2022-07-15 16:25:57 -05:00
Scott Shawcroft e9dd254127
Add socket select task to wake CP
This fixes the web workflow on boards without a display.

Fixes #6552
2022-07-13 17:35:35 -07:00
Scott Shawcroft 425a0efeca
A bit more cleanup 2022-07-11 14:53:20 -07:00
Scott Shawcroft 8cfdfb95f7
Remove extra logging, auth /cp/serial and add doc 2022-07-11 14:32:28 -07:00