26450 Commits

Author SHA1 Message Date
Ghostkeeper
c2057c94db
Only show troubleshooting link if there is an error
And show it next to the error.

Contributes to issue CURA-8609.
2021-10-12 17:28:09 +02:00
Ghostkeeper
cf860829c7
Provide upload request metadata as body of a PUT request
Apparently the API is now a PUT request rather than a GET request. It needs a bit more metadata which can be hard-coded for our client.

Contributes to issue CURA-8609.
2021-10-12 17:21:25 +02:00
Ghostkeeper
bfb39cf989
Add spinners and status icons per printer
These make use of the per-printer sync status to show either nothing, a spinner, a cross or a checkmark.

Contributes to issue CURA-8609.
2021-10-12 17:09:54 +02:00
Ghostkeeper
2b6a82ecf1
Match on strings for metadata
It doesn't automatically cast these in the query.

Contributes to issue CURA-8609.
2021-10-12 17:08:58 +02:00
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
052e33e66b
Don't anchor status label to button any more
It's now in a completely different place.

Contributes to issue CURA-8609.
2021-10-12 10:17:03 +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
c3d392c5cf
Show upload error or success in header once completed
According to the brand new design.

Contributes to issue CURA-8609.
2021-10-11 15:27:54 +02:00
Ghostkeeper
8ae93c6bc1
Resolve binding loops in sync spinner
Contributes to issue CURA-8609.
2021-10-11 15:19:06 +02:00
Ghostkeeper
ffd3277854
Show error if the upload failed
Contributes to issue CURA-8609.
2021-10-11 14:57:21 +02:00
Ghostkeeper
ffee4a2443
Show syncing spinner while syncing
Rather than disabling the sync button, hide it completely and show this spinner instead.

Contributes to issue CURA-8609.
2021-10-11 14:30:10 +02:00
Ghostkeeper
56eb694745
Hide refresh button if there are no offline printers
It's not considered a big use case when the user has already added some printers but would want to add more while syncing materials to those printers.

Contributes to issue CURA-8609.
2021-10-11 14:11:28 +02:00
Ghostkeeper
9ffbaa772f
Add back button to return from USB workflow to welcome screen
This allows the user to see the welcome screen instructions again. Or to switch back to internet-syncing if they accidentally pressed the USB button (or were just curious).

Contributes to issue CURA-8609.
2021-10-11 13:58:05 +02:00
Ghostkeeper
43bcd2b56a
Implement info icon with UM.StatusIcon
This way the sizes are consistent with the other similar icons in the UI.

Contributes to issue CURA-8609.
2021-10-11 13:49:45 +02:00
Ghostkeeper
da76280359
Make USB image a bit larger
This is more in line with the design.

Contributes to issue CURA-8609.
2021-10-11 13:38:41 +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
9729f4f3d2
Set properties immediately upon constructing
Instead of afterwards. A bit more efficient.

Contributes to issue CURA-8609.
2021-10-08 17:46:10 +02:00
Ghostkeeper
fb7e67b8ad
Change 'hit' to 'click'
This is more consistent with other texts.

Contributes to issue CURA-8609.
2021-10-08 16:51:04 +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
042bd46fba
Don't import CuraApplication if not type checking
Otherwise we'll get unnecessary import loops here.

Contributes to issue CURA-8609.
2021-10-08 15:59:42 +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
a7f172d836
Only show online printers in list of printers to sync to
We can only sync with printers that are currently online.
We'll just send it to the account to sync with everything. But these are the ones it should arrive with.

Contributes to issue CURA-8609.
2021-10-08 14:22:46 +02:00
Ghostkeeper
07b2c1b777
Add option to only show printers that are online
I have a feeling this will be abused later. But fine. We currently need it for the list of printers that we can sync materials to via the cloud.

Contributes to issue CURA-8609.
2021-10-08 14:21:03 +02:00
Ghostkeeper
8234276204
Add log entry when syncing with cloud printers
Not only do I now have an interface where the user doesn't get any feedback when syncing happens, but even in the log there was nothing shown when it happens.

Contributes to issue CURA-8609.
2021-10-08 14:13:54 +02:00
Ghostkeeper
32c63c2757
Add isOnline role to GlobalStacksModel
This way we can filter for only online printers or display whether printers are online or not in the future.

Contributes to issue CURA-8609.
2021-10-08 14:09:12 +02:00
Ghostkeeper
93953630ec
Update online status when updating account printer status
This updates the metadata entries. Naturally this updates every 60 seconds in Cura, but it could also manually be triggered by the refresh button.

Contributes to issue CURA-8609.
2021-10-08 14:08:02 +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
Ghostkeeper
75c7d5c4f5
Link to USB page without depending on actual order of pages
This is more future-proof. If someone were to add a page to the end, it wouldn't immediately break these buttons any more.

An example of why self-documenting code can be good.

Contributes to issue CURA-8609.
2021-10-06 16:48:52 +02:00
Ghostkeeper
d9d83b4334
Add page for when the user has no cloud printers
It should show this image, instructions, and a refresh button.
If the refresh button is pressed and the user now has more printers, it should automatically swap to the printer list. Or vice-versa if printers get deleted on the website.

Contributes to issue CURA-8609.
2021-10-06 16:42:56 +02:00
Ghostkeeper
52373c6850
Add correct links for troubleshooting buttons
Contributes to issue CURA-8609.
2021-10-06 15:46:43 +02:00
Ghostkeeper
038db1fc4f
Implement functionality of export to USB button
It now creates a similar dialogue of what the old button did. The dialogue is no longer necessary in the materials page, so I've moved it to here specifically.

Contributes to issue CURA-8609.
2021-10-06 15:20:26 +02:00
Ghostkeeper
e5dc90a519
Add USB syncing page to swipe view
Looks like a lot of blank space. May need to adjust sizes.

Contributes to issue CURA-8609.
2021-10-06 15:11:14 +02:00
Ghostkeeper
5db964aed1
Link opening sync all window to the button that should open it
This is a new button just merged in from the Master branch. With the window implemented, we can now properly open it.

Contributes to issue CURA-8609.
2021-10-06 14:25:12 +02:00
Ghostkeeper
b98da6b538
Merge branch 'master' into CURA-8609_sync_materials_to_printer
Conflicts:
	cura/Machines/Models/MaterialManagementModel.py -> Both master and my branch added an __init__ function. I merged the two __init__s to do both things that need to be done.
2021-10-06 14:22:18 +02:00
Ghostkeeper
d16217c674
Implement filter for printer list to only show printers with certain configured connections
Because here we only want to show cloud-connected printers.

Contributes to issue CURA-8609.
2021-10-05 17:44:15 +02:00
Ghostkeeper
c8931d4c23
Implement sync function for refresh button
Quite simple. There's not a lot of feedback though when you press that button. Maybe we need to look at that.

Contributes to issue CURA-8609.
2021-10-05 17:31:27 +02:00
Ghostkeeper
554f580f13
Add extra card to refresh printer list
Contributes to issue CURA-8609.
2021-10-05 17:28:26 +02:00
v27jain
89070237d9
Adding 3DI D300 (#9863)
* Add files via upload

* Add files via upload

* Add files via upload

* Delete 3di_d220.def.json

* Delete 3di_d300.def.json

* Add files via upload

* Delete 3di_d220_extruder_0.def.json

* Delete 3di_d300_extruder_0.def.json

* Add files via upload

* Update 3di_d220.def.json

* Update 3di_d300.def.json

* Delete 3di_d300_platform.stl

* Add files via upload

* Update 3di_d300.def.json

* Delete 3di_d220.def.json

* Delete 3di_d220_platform.stl
2021-10-05 16:38:50 +02:00