23916 Commits

Author SHA1 Message Date
Nino van Hooff
b734830fcf Sort new_devices on online status first, name second
Since the first device might be activated in case there is no active printer yet,
it would be nice to prioritize online devices

CURA-7493
2020-06-09 17:02:21 +02:00
Jaime van Kessel
ed53557044
Merge branch 'master' of github.com:Ultimaker/Cura 2020-06-09 16:53:33 +02:00
Kostas Karmas
f26445a914 Fix mypy complaint
CURA-7454
2020-06-09 16:01:38 +02:00
Kostas Karmas
8c6a7d3098 Remove definitionChanges before removing a printer
When removing a printer, the files in %appdata%/cura/<version>/
/definition_changes/ remained intact. This commit fixes that by
making sure that the definitionChanges are removed before removing
the machine.
2020-06-09 15:56:13 +02:00
Kostas Karmas
567f6dabdc Add option to remove all printers not linked to the account
When the "Printers removed from account" message pops up, it will give
the option to the user to remove all the printers that are not linked
to his/her account from Cura. Since this action removes all
configurations, it first pops a confirmation question box, and if the
user insists, these printers are purged from Cura.

Note: In order to properly delete all the files, the printers have to
be activated first before they are removed, or else some extruder
files in %appdata%/cura/<version>/user and %appdata%/cura/<version>/
extruders remain.

CURA-7454
2020-06-09 15:40:30 +02:00
Kostas Karmas
5c898b8c57 Allow the machine manager to set an empty active machine
Gracefully handle the case where the machine manager is requested to
delete the last machine in Cura. In this case, instead of deleting
everything of this machine and still keep it as an active machine,
the machine manager will set the active machine to None.

The QML files which depend on the active machine were changed to
properly handle themselves when there is no active machine.

CURA-7454
2020-06-09 15:33:22 +02:00
Kostas Karmas
669dcc62dd Add extra "AddPrinterPagesModel" without the cancel button
This commit adds an additional AddPrinterPagesModel in Cura that does
not have the "Cancel" button in the "Add Printer" page. To achieve
that, the AddPrinterPagesModel is modified so that its initialize
function decides whether or not it will add the cancel button.

If Cura ends up in a state without an active machine, the AddPrinters
dialog will open up using the showAddPrintersUncancellableDialog signal
and display the new "Uncancellable" (is this a word?)
AddPrinterPagesModel, so that the dialog cannot be dismissed.

If Cura is closed at that point, the next time it is initiated, if the
user is logged in and there is no ActiveMachine, then instead of
displaying the entire WelcomePages wizard, it will show the
uncancellable AddPrinterPagesModel, forcing the user to add a printer.

CURA-7454
2020-06-09 15:20:15 +02:00
Nino van Hooff
f66e723866 Fix Authorization server not properly stopping after flow completes.
CURA-7490
2020-06-09 15:12:26 +02:00
Kostas Karmas
f0dda6553b Merge branch 'CURA-7455_Keep_printer_configurations_when_cloud_printer_removed_from_account' into CURA-7454_Add_remove_printers_button_in_removed_printers_from_account_message 2020-06-09 15:04:54 +02:00
Kostas Karmas
01230cff00 Merge branch 'CURA-7438_Show_cloud_connection_not_available_printer_removed_from_account' into CURA-7455_Keep_printer_configurations_when_cloud_printer_removed_from_account 2020-06-09 15:04:41 +02:00
Kostas Karmas
8e1ed6cd29 Merge branch 'master' into CURA-7454_Add_remove_printers_button_in_removed_printers_from_account_message 2020-06-09 15:03:23 +02:00
Jaime van Kessel
b6b3646f32
Merge branch 'CURA-7437_no_internet_cloud_bugs' of github.com:Ultimaker/Cura 2020-06-09 13:45:21 +02:00
Nino van Hooff
1024879f9d Process Review feedback for CURA-7438
Renames UltimakerCloudAuthentication to UltimakerCloudConstants

Cura-7438
2020-06-09 13:41:30 +02:00
Joyce-lujunxu
5da5dc0047
Add files via upload 2020-06-09 19:05:30 +08:00
Joyce-lujunxu
72f84ff489
Add files via upload 2020-06-09 19:04:51 +08:00
Nino van Hooff
32f57b8770 Merge remote-tracking branch 'origin/master' into CURA-7437_no_internet_cloud_bugs 2020-06-09 10:47:53 +02:00
Ghostkeeper
c6af6565a3
More descriptive and appropriate logging
Contributes to issue CURA-7488.
2020-06-08 17:58:42 +02:00
Ghostkeeper
7e10e74e9e
Don't send print job in chunks
Previously the print job was sent with multiple PUT requests. This was necessary since the request was made with the Python Requests library, which freezes the interface while it's running. By breaking the upload up in chunks, it would at least periodically keep updating the interface (4 times per second or so, depending on your internet speed and Ultimaker's). Later on, this was replaced by a QNetworkRequest which doesn't freeze the interface in a refactor, but it was still broken up in chunks.
Recently that was again refactored to use Uranium's HttpRequestManager, which under the covers also uses QNetworkRequest. This also doesn't freeze while uploading, which is good. However for some reason the second chunk would always give a QNetworkReply::ProtocolUnknownError, which is a bit of a catch-all error for any HTTP status codes not supported by Qt. I was not able to figure out what was really going wrong there, but it has something to do with the content-range header and making multiple requests.
Instead of fixing that, I've removed the chunking. This simplifies the code a lot and doesn't have any implications for the user, since it still doesn't freeze the interface while the network request is ongoing. It should be slightly faster to upload, and reduce load on the server too.

However the disadvantage is that the original bug is probably still there if it was a bug in the HttpRequestManager. If it was a bug in the ToolPathUploader I probably deleted the bug here.

Contributes to issue CURA-7488.
2020-06-08 17:55:07 +02:00
Ghostkeeper
d9c768e0d3
Merge branch 'CURA-7480_Remove_flicabkle_config_panel' 2020-06-08 14:26:21 +02:00
Jaime van Kessel
83fd35424b
Store data for metadata first
This should help with providing data to sentry to find out what the hell is going wrong
2020-06-08 10:31:40 +02:00
Jaime van Kessel
773edfd533
Prevent crash when camera tool was not found 2020-06-08 10:24:59 +02:00
Kostas Karmas
7ba400254d Merge branch 'CURA-7455_Keep_printer_configurations_when_cloud_printer_removed_from_account' into CURA-7454_Add_remove_printers_button_in_removed_printers_from_account_message 2020-06-08 09:22:39 +02:00
Kostas Karmas
d662c607dd Merge branch 'master' into CURA-7454_Add_remove_printers_button_in_removed_printers_from_account_message 2020-06-08 09:22:06 +02:00
Ghostkeeper
ac98caee54
Remove debugging code 2020-06-05 19:35:25 +02:00
Kostas Karmas
3073d7c349 Fix height binding loop QmlWarning in ConfigurationListView
Done during Turbo Testing and Tooling
2020-06-05 15:54:53 +02:00
Ghostkeeper
9404fe0fb9
Fix getting contentWidth in variable width mode
Undefined seems to work fine as well though.

Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
2020-06-05 15:18:10 +02:00
Ghostkeeper
44abd08b32
Use newer extruderList rather than deprecated extruders property
Done during Turbo Testing and Tooling.
2020-06-05 15:17:36 +02:00
Ghostkeeper
43980e90cd
Use extruderList rather than extruders property
Done during Turbo Testing and Tooling.
2020-06-05 15:17:36 +02:00
Ghostkeeper
336bd2bd16
Use extruderList rather than deprecated extruders property
Done during Turbo Testing and Tooling.
2020-06-05 15:17:35 +02:00
Kostas Karmas
ec62cd5671 Fix "Unable to assing null to double" QmlWarning 2020-06-05 14:20:52 +02:00
Kostas Karmas
306f58f96e Fix contentWidth reference error in ActionButton 2020-06-05 14:13:36 +02:00
Ghostkeeper
9fab964afe
Merge branch 'master' of github.com:Ultimaker/Cura 2020-06-05 13:48:52 +02:00
Remco Burema
7fd7b3a868
Merge branch 'master' of https://github.com/Ultimaker/Cura 2020-06-05 13:29:53 +02:00
Remco Burema
670f1df6c7
Show latest version nr. available in firmware-update-checker-message. 2020-06-05 13:29:21 +02:00
Kostas Karmas
42daef0a75 Remove spam info message 2020-06-05 13:20:38 +02:00
Ghostkeeper
7ec681a04d
Merge branch 'feature_support_meshes_present' of https://github.com/fieldOfView/Cura into fieldOfView-feature_support_meshes_present 2020-06-05 13:20:31 +02:00
Kostas Karmas
ea6a73e76d Fix mypy complains 2020-06-05 13:18:48 +02:00
Kostas Karmas
22b9bb77ef Fix reporting the [WinError 10038] exception traceback on sign-in
Surround the serve_forever function of the web server with a try-catch
on Windows, in order to avoid printing the entire (useless) traceback.
Now a warning message is be displayed in the log instead.

The behavior is untouched in other platforms
2020-06-05 12:59:31 +02:00
fieldOfView
33eaebe397 Change wording 2020-06-05 11:42:11 +02:00
Kostas Karmas
27b733fe3d Add "Keep printer configurations" button in removed printers message
Since keeping the printers as local ones is the default action, this
button behaves the same way as the "X" button, hiding the message.

CURA-7455
2020-06-05 11:39:26 +02:00
Kostas Karmas
da49d49d3c Merge branch 'CURA-7438_Show_cloud_connection_not_available_printer_removed_from_account' into CURA-7455_Keep_printer_configurations_when_cloud_printer_removed_from_account 2020-06-05 11:28:35 +02:00
Kostas Karmas
167a4c1f58 Make reported_device_ids a class variable
So that the actions that can be performed by the message buttons
can properly access the list and take the necessary steps to achieve
their purpose.

CURA-7438
2020-06-05 11:25:44 +02:00
Kostas Karmas
458b439a9a Rename META_REMOVED_FROM_ACCOUNT to META_LINKED_TO_ACCOUNT
The meta data entry was rename to be more representative of its
function. In addition, the bool metadata entry is now properly
handled using the parseBool function.

CURA-7438
2020-06-04 16:14:09 +02:00
Kostas Karmas
9e891c201b Merge branch 'master' into CURA-7438_Show_cloud_connection_not_available_printer_removed_from_account 2020-06-04 15:25:43 +02:00
Kostas Karmas
4bebaaaddb Display an appropriate tooltip when device is removed from the account
The tooltip is updated to reflect the case where a cloud printer is
removed from the users account.

CURA-7438
2020-06-04 15:08:27 +02:00
Kostas Karmas
ee7f2d4b38 Handle the case when a cloud printer is removed from the account
When a cloud printer is no longer received from mycloud, it is safe to
assume that the printer is removed from the account. In such a case,
the new function _devicesRemovedFromAccount(..) will retrieve all the
devices that are to be removed (i.e. they are added in Cura but they
do not exist in the clusters received from mycloud) and will remove
their output device. In addition the function will generate a message
that mentions all the devices that were no longer linked to the
account.

In order to achieve that, the Cloud/CloudOutputDeviceManager is
enriched with the dictionary self._um_cloud_printers that contains all
the currently existing cloud-enabled devices that were previously added
in Cura. In addition, the meta-data field "removed_from_account" is
added to all the cloud-enabled Cura devices to distinguish the ones
actually linked to the current account.

With these additions, the cloud devices that are removed from the
account will be automagically re-linked to it once the devices are once
again retrieved from mycloud for the specific account.

CURA-7438
2020-06-04 14:56:58 +02:00
Jaime van Kessel
fd2a7689cc
Remove overly spammy logging 2020-06-04 14:32:37 +02:00
Kostas Karmas
65dd0250b3 Change property connectionStatusMessage into a get function
This way the tooltip text can be re-evaluated every time we hover over
the instead of only once when the active machine is updated. With this
change, the text will be updated properly when there is a change.

CURA-7438
2020-06-04 14:22:14 +02:00
Jaime van Kessel
c095cb1f22
Converted the listview into a RowLayout
I have no idea why i thought a listview was needed for this when
this was made. The data shouldn't be flicable, so it makes way more sense to
use a row layout

CURA-7480
2020-06-04 14:06:03 +02:00
Gabriel Vogel
2ebf32831a remove duplicate updates for model properties 2020-06-04 13:50:24 +02:00