QIDITECH / QIDISlicer

QIDISlicer gets your 3D printing easier and faster.
https://qidi3d.com/
GNU Affero General Public License v3.0
40 stars 10 forks source link

Fix bugs in the machine list #15

Closed ghost closed 6 months ago

ghost commented 6 months ago

These commits fix 2 bugs I found in the machine list.

One regarding the formatting of the address of printers. The current code hardcodes the "http://" prefix to the address specified by the user, so if he writes, for example, "http://1.2.3.4", it becomes "http://http://1.2.3.4", and this is an invalid address.

The second is a UI bug regarding the display of printers with a hostname (instead of an IP address) in the machine list. When adding a printer by hostname, it doesn't appear on the list (this is a UI bug, becuase the printer is saved corectly to the config file and the page loads succesfully, but it just doesn't appear on the list). Actually it's not really a bug, but an incorrect assumption by the developer, because in the code, there is a check that validates the printer's host is only an IP address, but as you can see it can also be a hostname, so this check is redundant. I removed the check and now printers with an hostname should be displayed correctly.

Disclaimer: I couldn't build the program so I actually never tried the fixes. Please check them before deciding to merge.

QIDITECH commented 6 months ago

Thank you for your feedback, the multi-device management feature is still in its infancy, and we will continue to further optimize the feature. The two problems you mentioned do exist, but the code you provided will conflict with our subsequent optimization, so we will cancel this request. And we will solve these problems in other ways.

  1. We will restrict the input format of the IP field.
  2. We deliberately do not display the wrong IP printer, because this will only take up resources.