346 Commits

Author SHA1 Message Date
Ghostkeeper
3ffffad1ed
Send progress update when failed
And update all of the printer statuses to make them appear failed, if we have a general failure in an earlier stage.

Contributes to issue CURA-8609.
2021-10-12 16:15:58 +02:00
Ghostkeeper
0fa6f650f6
Expose printer status updates via progress update signal
This way we can ask the printer status from QML even if it's updated via a job on a different thread and different class and all that.

Contributes to issue CURA-8609.
2021-10-12 16:06:53 +02:00
Ghostkeeper
8607eb5cff
Store printer sync status flag per printer
Because we'll need to display it per printer.

Contributes to issue CURA-8609.
2021-10-12 15:49:43 +02:00
Ghostkeeper
54d51536b0
Improve error-handling per printer
We can now know which printers failed to sync and which succeeded.

Contributes to issue CURA-8609.
2021-10-12 13:55:03 +02:00
Ghostkeeper
d4d17095bb
Implement confirming for all printers to send material sync
We need to make this request for every printer.

Contributes to issue CURA-8609.
2021-10-12 13:39:04 +02:00
Ghostkeeper
f677b338fd
Always provide error message if upload failed
Contributes to issue CURA-8609.
2021-10-12 13:19:09 +02:00
Ghostkeeper
a6b6b075ea
Always provide error message if upload failed
Contributes to issue CURA-8609.
2021-10-12 13:16:28 +02:00
Ghostkeeper
4ccd4caaad
Store material profile ID received from the upload request
We'll need this later to be able to tell the server which material archive it should send to certain printers.

Contributes to issue CURA-8609.
2021-10-12 13:04:22 +02:00
Ghostkeeper
bdc269f8ab
Provide file size and an arbitrary name to the upload request
Apparently the Cloud will need to know the file size before it gets uploaded. It is used as a redundancy code to verify that it's not corrupt there.
Perhaps they should ask for a CRC instead, being more reliable against an upload containing only null bytes or whatever, but that is not up to me to decide.

Contributes to issue CURA-8609.
2021-10-12 13:00:08 +02:00
Ghostkeeper
f0d69cbef2
Add file data to PUT request
The main point of the whole request, really.

Contributes to issue CURA-8609.
2021-10-12 12:56:19 +02:00
Ghostkeeper
d5e3ed4c0e
New material API endpoint URL
This is the new URL they have settled on.

Contributes to issue CURA-8609.
2021-10-12 11:39:26 +02:00
Ghostkeeper
125c80430b
Show more information about errors we're getting
Show the error code we received in the GUI, and allow expansion for different types of errors.

Contributes to issue CURA-8609.
2021-10-12 11:30:12 +02:00
Ghostkeeper
025ef743ee
Track progress from export job
This way we can show a progress bar.

Contributes to issue CURA-8609.
2021-10-12 10:24:07 +02:00
Ghostkeeper
4661b02e4c
Move code and status related to uploading materials to separate class
There's quite a lot of status to track, errors and progress. It's better kept separate.

Contributes to issue CURA-8609.
2021-10-12 09:43:21 +02:00
Ghostkeeper
ffd3277854
Show error if the upload failed
Contributes to issue CURA-8609.
2021-10-11 14:57:21 +02:00
Ghostkeeper
e7b49ee551
Disable sync button while in progress
Need to show a bit more feedback I think. Let's see what the design said...

Contributes to issue CURA-8609.
2021-10-11 13:11:54 +02:00
Ghostkeeper
2b785343b5
Implement basic uploading of material
Steps involved are:
- Create an archive of all materials.
- Request the cloud API to provide a URL to upload the archive to.
- Upload the archive to that API.

Currently the two internet requests are asynchronous, meaning that the job will 'end' before the upload is complete. Most likely the job instance will even be deleted before we get a response from the server. So this won't work, really. Need to structure that a bit differently. But I want to save this progress because it embodies the happy path well.

Contributes to issue CURA-8609.
2021-10-08 16:02:31 +02:00
Ghostkeeper
599c59bd3a
Add a background job to upload material archives
It creates the archive now. It doesn't yet upload it.

Contributes to issue CURA-8609.
2021-10-08 15:15:57 +02:00
Ghostkeeper
0bf4a3d944
Store online status of printer in the printer's metadata
It's a little bit weird with the hidden global stack system when there's a cluster of various types of printers. But it should behave the same way.

Contributes to issue CURA-8609.
2021-10-08 13:49:20 +02:00
luz paz
d68f375e38 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot -L childs,initialy,lod,ned,te,slicable,sur,tutoriels,wont`
2021-09-07 11:33:54 -04:00
Ghostkeeper
3032221b70
Prevent division by 0 if total download size is 0
This can happen if the downloads are all so small that it gets rounded to 0kB.

Fixes Sentry issue CURA-ZM.
2020-07-06 17:23:58 +02:00
Nino van Hooff
9ffadb369d Fix ExtruderConfigurationModel.__eq__
Fixes an issue where 2 configurations
(empty, empty) and (pla, empty) were considered
equal

CURA-7248
2020-07-02 15:44:22 +02:00
Jaime van Kessel
1a04744679
Prevent crash when starting the firmware update twice
CURA-6Q
2020-06-16 09:50:18 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
c2c96faf5f Convert remaining doxygen to rst 2020-05-28 17:13:44 +02:00
Jaime van Kessel
fe27da5e8a
Remove a number of unused variables 2020-04-10 13:46:19 +02:00
Jaime van Kessel
c6dfb6e4cf
Set FirmwareUpdater in error state if file is empty
CURA-6Q
2020-04-02 16:44:18 +02:00
Jaime van Kessel
e74f049142
Fix bunch of issues found by pylint 2020-01-10 16:37:46 +01:00
Jaime van Kessel
81b33b8649
Add some missing typing 2020-01-10 14:58:53 +01:00
fieldOfView
01f5956871 Fix typo in content disposition header 2019-12-02 12:11:10 +01:00
Jaime van Kessel
c2e6116983
Add names to all the threads 2019-11-01 16:20:42 +01:00
Jaime van Kessel
552b456a69
Merge branch 'network-printer-selection-is-back' of github.com:Ultimaker/Cura 2019-10-25 12:49:18 +02:00
ChrisTerBeke
9a3ff527ac Bring back the printer selection dialog for networked printers 2019-10-25 12:25:41 +02:00
Jaime van Kessel
3491900bf1
Fix grammar in a comment 2019-10-25 11:06:01 +02:00
Ghostkeeper
969b74e1f6
Prevent crash when sync list somehow contains None
I couldn't figure out how it could ever contain None, but we received logs from a user that indicate a crash here because that set contains None and that is not orderable. This is a hotfix to fail more gracefully instead of crashing the entire application.
2019-10-24 11:56:08 +02:00
Lipu Fei
43ee68bdc7 Remove deprecated PrinterOutputDevice.setAcceptsCommands
CURA-6858
2019-10-22 14:11:36 +02:00
Lipu Fei
8b913f4009 Merge remote-tracking branch 'origin/master' into CURA-6863_duplicated_material_oddness 2019-10-14 12:23:49 +02:00
Remco Burema
09dc6ae44a Scouting: Try not to spam signals or errors as much.
nominally part of CURA-6863
2019-10-14 01:03:41 +02:00
Jaime van Kessel
05a6c9c3cf
Make code a bit smarter about reusing ExtruderConfigurationModels
This prevents a lot of unneeded signal noise
2019-10-11 11:04:16 +02:00
Diego Prado Gesto
d38e60ce06 Merge branch 'master' into feature_intent 2019-09-13 09:02:30 +02:00
Ghostkeeper
82aa0492ea
Revert "CS-171 Add R2 support" 2019-09-06 14:00:04 +00:00
Jaime van Kessel
9d5ee286b4
Merge branch 'CURA-6537_ui_feedback_on_invalid_firmware' of github.com:Ultimaker/Cura 2019-09-05 16:10:30 +02:00
ChrisTerBeke
da4fcc8ee6 Revert "Revert "Remove network manager re-creation that was causing issues""
This reverts commit a04bcbb3e9d7a193a30684cc07a55ad8141f9a0b.
2019-09-05 14:08:18 +02:00
ChrisTerBeke
a04bcbb3e9 Revert "Remove network manager re-creation that was causing issues"
This reverts commit 06d54f397096771ce3655c62a46f9413a6430369.
2019-09-05 11:05:26 +02:00
ChrisTerBeke
06d54f3970 Remove network manager re-creation that was causing issues 2019-09-04 19:19:49 +02:00
Jaime van Kessel
8c98773f55 Fix issues with sorting if no printer type is set 2019-08-27 14:18:07 +02:00
Lipu Fei
3853fb6d19 Add UI feedback on invalid firmware update
CURA-6537
2019-08-27 08:52:13 +02:00
Jaime van Kessel
63f9483037 Connect the config changed of the configuration to that of the output model 2019-08-23 17:15:08 +02:00
ChrisTerBeke
882352c99d Test fixes, not working yet 2019-08-23 17:03:39 +02:00
ChrisTerBeke
36f6dba2fc Fix not displaying configuration with both extruders empty 2019-08-23 16:23:51 +02:00