cups icon indicating copy to clipboard operation
cups copied to clipboard

Fixes web UI for non-existing printer/class

Open TheJayas opened this issue 2 years ago • 7 comments

Fixes Issue #423 : When user open the api for any unknown classes or printers, then previously it was showing a random UI with that printer/class name. Now it will throw "404:NOT FOUND" error for those cases. Example for : http://localhost:631/classes/testclass or http://localhost:631/printers/testpriner

TheJayas avatar Jan 26 '24 19:01 TheJayas

@tillkamppeter , Please check this pull request and suggest if some changes are required.

TheJayas avatar Jan 26 '24 19:01 TheJayas

@michaelrsweet , please review the new changes.

TheJayas avatar Jan 27 '24 04:01 TheJayas

Required changes are made. @michaelrsweet please review it.

TheJayas avatar Jan 28 '24 16:01 TheJayas

@michaelrsweet I have changed the templates file of classes and printers such that whenever someone directly enter web address like : http://localhost:631/classes/testclass then if there is no class with name "testclass", then that web address will render "ERROR: NO CLASS FOUND". Similiar will happens in case of printers. Previously the above web address was rendering unavailable class with name "testclass" which do not even exists.

TheJayas avatar Jan 29 '24 13:01 TheJayas

@tillkamppeter please review the changes.

TheJayas avatar Feb 01 '24 13:02 TheJayas

@tillkamppeter , please review the changes, this time I have undo all the changes that were made in .c files and I have changes two templates , "class.tmpl" and "printer.tmpl" to solve the issue.

TheJayas avatar Feb 10 '24 07:02 TheJayas

Oh sorry, I think comments are removed by mistake, and that file might be created due to my code editor's fault., these things do not have to do anything with solving issue. Wait, I will resolve these stuffs and with commit the final change again.

TheJayas avatar Feb 10 '24 22:02 TheJayas