Commit Graph

510 Commits

Author SHA1 Message Date
Daniel Markstedt
28de92a00c
Enable unzipping of individual archive members (#385)
* Enable unzipping of individual archive members

* Add code comments
2021-10-26 15:05:15 -05:00
Daniel Markstedt
3546764722
Better error handling in ISO image creation (#379) 2021-10-26 15:03:29 -05:00
Uwe Seimet
79c5da9432
Use long long instead of long for image size (#383) 2021-10-26 06:41:17 -07:00
Daniel Markstedt
87640a7c2c
More verbose unzipping; don't overwrite existing files (#378) 2021-10-25 20:58:16 -05:00
Uwe Seimet
cc1783c1cd
Improved remote connection error handling (#376)
* Improved remote connection error handling

* Improved error handling by adding a magic string to each message

* Interface comment update

* Interface comment update

* Improve error messages

* Clients send the magic word to authenticate

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-10-25 16:04:10 -07:00
Daniel Markstedt
7725556626
Use Type Writer font on the OLED screen (Author: Mandy Smith) (#377)
* Use Type Writer font on the OLED screen

* Add README crediting Mandy Smith + note on permission
2021-10-25 17:41:36 -05:00
Daniel Markstedt
e3794619b4
OLED screen: Clean exit on error; proper handling of removable devices; signal handling; splash screen (#364)
* Clean exit on errors

* Avoid unnecessary scrolling

* Fix bug where removable media wasn't updated

* Add signal handler, solution from https://stackoverflow.com/questions/1112343/how-do-i-capture-sigint-in-python

* Display a splash screen on startup

* Introduce stop splash

* Add parameters to enable the SIGTERM handling to take effect

* Change to a less busy stop splash

* Less busy start splash

* Iterate on splash bitmaps

* Iterate on splash bitmap

* Add check for libopenjp2-7-dev in the start script

* Iterate on splash bitmap

* Iterate on splash bitmap
2021-10-24 21:13:32 -05:00
Daniel Markstedt
960cc91168
Iterate on webapp config UX (#371)
* Iterate on webapp config ux

* Labels were only adding clutter

* Add confirmation modals
2021-10-24 21:09:35 -05:00
Pacjunk
d334669722
Update drive_properties.json (#372)
Add RZ22, RZ23, RZ24, RZ26L, RZ28M, RZ29B & RZ56
2021-10-24 18:33:33 -07:00
Daniel Markstedt
dd6d289395 Fix incorrect path to zip file to unzip; improve error handling 2021-10-24 11:07:26 -07:00
Daniel Markstedt
ea0d4cc4b6 Fix zipfile handling 2021-10-24 10:27:44 -07:00
Daniel Markstedt
df12ceb028 Add missing endif, and clean up indentation 2021-10-24 10:19:07 -07:00
Daniel Markstedt
17fc99d0fc
Merge branch 'develop' into rdmark_inline_prop 2021-10-24 09:57:08 -07:00
Eric Helgeson
e2f6ce8bc2
Merge pull request #365 from akuker/issue_356
Clean up config files after error
2021-10-24 11:53:47 -05:00
Eric Helgeson
1b17b8272c
Merge pull request #368 from akuker/manual_unzip
Bring back manual unzip
2021-10-24 11:53:14 -05:00
Uwe Seimet
dcbee64750
Do not consider NONE operation an error (#369)
* Do not consider NONE operation an error

* Cleanup

* Code cleanup from other PR
2021-10-23 23:10:31 -07:00
Daniel Markstedt
6c60dcf550 Display image properties inline in the image list, and remove the previous UI 2021-10-23 23:00:40 -07:00
Daniel Markstedt
7d21a284cd Use href to go back to index page 2021-10-23 10:39:16 -07:00
Troy
40432c9de0
All Sense/ASC/ASCQ data is cleared properly (#367)
* All Sense/ASC/ASCQ data is cleared properly

* Forgot to guard the status clear for REQUEST SENSE

Co-authored-by: Troy <jokker@gmail.com>
2021-10-22 20:16:37 +02:00
Daniel Markstedt
39bd6b7ee9 Bring back manual unzip, remove automatic unzip on upload, and show only relevant controls for zip files 2021-10-22 06:42:28 -07:00
Uwe Seimet
ac4abbbe73
Unlink created image file if fallocate() or copying failed (#363)
* Unlink created image file if fallocate() failed

* Also delete destination file after copying if something goes wrong
2021-10-21 18:17:58 -07:00
Daniel Markstedt
e059432402 Clean up config files after error 2021-10-21 17:10:25 -07:00
Daniel Markstedt
269b718ec7
Configurable OLED screen rotation (#359)
* Read rotation from the 1st command line arg

* Configure screen rotation during installation

* Better argument validation + use human readable arguments

* Cleanup
2021-10-20 21:33:06 -05:00
Uwe Seimet
dbaf5dcd30
rasctl output update (#357) 2021-10-20 19:55:48 -05:00
Daniel Markstedt
a47588ab22
Scroll the OLED screen output vertically when overflowing (#358)
* Show only the two last chars of type to save space

* Display rascsi version

* Show more relevant info on removable and bridge devices; Also cleanup

* MO is also removable

* Special handling for BR device

* OLED screen output scrolls vertically when overflowing
2021-10-20 19:55:09 -05:00
Daniel Markstedt
3856fd853b
Remove legacy device status logging (#355) 2021-10-20 18:21:08 -05:00
Daniel Markstedt
cbe3642054
OLED Monitor: use venv and leverage start script in systemd service (#347)
* Add start script for oled monitor

* systemd service definition for oled monitor

* Remove superfluous file

* Bump library versions to avoid erroring out

* Revert mistaken changes

* Revert mistaken changes
2021-10-19 20:01:32 -05:00
Daniel Markstedt
e10a99c24c
OLED Screen: Inquire device status over the protobuf interface (#349)
* Inquire device status over the protobuf interface

* Correct docstring

* Direct URL to make website

* Add protobuf lib to gitignore
2021-10-19 19:59:04 -05:00
Daniel Markstedt
8ab16a1fb2
Restart monitor_rascsi from the Web UI (#341) 2021-10-19 17:58:30 -07:00
Daniel Markstedt
1cae11bcac
Tweak help text and disk status message in Web UI (#337)
* Bring back data important to the user to a more prominent location

* Tweak labels

* More help text

* Tweak messages shown in UI to better align with current develop
2021-10-19 19:44:16 -05:00
Daniel Markstedt
84ba78327b
Feature afpshare in rascsi-web (#333)
* Define afp_dir

* Implement generic download_to_dir() method

* Display AFP share download only when netatalk is running

* Make url input required

* Better help text

* Fix server error

* Better error handling

* Typo fix

* Tweak helptext

* Show number of afpd processes running

* Tweak label
2021-10-19 19:43:15 -05:00
Uwe Seimet
00e8855e41
Fixed capacity calculation for small drives (#346) 2021-10-19 08:45:41 -07:00
Daniel Markstedt
b8722efe0b
Graceful shutdown of rascsi in the systemd service (#338) 2021-10-18 08:43:57 -07:00
Uwe Seimet
62a104f75d
Added SHUT_DOWN command, split rascsi.cpp (#334)
* Added TERMINATE command

* Help text update

* Created ras_util namespace

* Created protobuf_util namespace

* Extracted RascsiImage from rascsi for better modularity

* Fixed wrong filenames (class name differed)

* No need for response handler to be a singleton

* Class renaming

* Renaming

* Moved code

* Moved code

* Image folder handling optimizations

* Updated device factory handling

* DeviceFactory constructor should be private (singleton)

* Renamed TERMINATE to SHUT_DOWN

* Fixed capacity calculation for INQUIRY data

* ATTACH and DETACH return the resulting device list for convenience

* Interface comment update

* Moved code, check fd

* Use new command when returning result for ATTACH/DETACH

* Updated interface comments
2021-10-17 08:51:14 +02:00
Daniel Markstedt
641b176f93
More form validation (#332)
* Add required properties to more text fields

* Tweak input field
2021-10-16 21:31:34 -07:00
Daniel Markstedt
8fb8a42825
Hide controls when appropriate (#327)
* Hide image file controls when it is attached

* Hide device actions when no device is attached
2021-10-14 19:49:06 -05:00
Daniel Markstedt
8e0e0c89ac
Fix image dir paths that was broken by refactoring (#329)
* Fix image download that was broken by images dir refactoring

* Fix two more instances of image dir path construction
2021-10-14 19:47:33 -05:00
Daniel Markstedt
156367a827
Update handling for CD property creation, and deletion (#326) 2021-10-14 19:47:02 -05:00
Daniel Markstedt
992095ffd5
Config saving/loading validation (#331)
* Add validation for config loading/deleting

* Disallow saving an empty config

* Typo fix

* Update help text for clarity

* Consistent capitalization
2021-10-14 19:46:25 -05:00
Uwe Seimet
84f40c7fe9
Issue 319, detach all devices on SIGKILL/SIGTERM (#328)
* Removed size validation for MOs

* rasctl -D detaches all devices

* Detach all devices on Ctrl-C (KILL signal)

* Added comment

* Also detach all devices on SIGTERM
2021-10-14 13:25:10 -07:00
Daniel Markstedt
e0f5a7e17c
Change properties file name pattern to include the original file ending; other cleanup (#325) 2021-10-13 20:51:45 -05:00
Daniel Markstedt
9535a2e001
Text field validation (#324) 2021-10-13 20:30:30 -05:00
Daniel Markstedt
e58f96318a
Add client side image size validation (#322) 2021-10-13 20:00:41 -05:00
Daniel Markstedt
e34529fa2c
Remove image padding (#312)
* Remove special handling of CD image padding

* Remove image padding, since it is no longer needed
2021-10-13 18:00:31 -07:00
Daniel Markstedt
f2d889aca1
Show image size under DEVICE INFO (#314) 2021-10-13 19:56:53 -05:00
Daniel Markstedt
9bd0b9802b
Detach all devices when shutting down/restarting (#323)
* Detach all before shutting down / restarting

* Additional message
2021-10-13 19:55:25 -05:00
Daniel Markstedt
fa12f49078
Inquire the server about current image dir (#313) 2021-10-13 19:54:29 -05:00
Uwe Seimet
c68c17e366
File size filtering update (#320)
* Updated logging

* Updated logging

* Updated logging

* Updated ID/LUN parsing

* Updated handling of max_id

* The -HD option sets type to SAHD

* Replaced is_sasi by device type

* Updated logging

* Logging update

* Improved LUN evaluation

* Check LUN against UnitMax

* Comment update

* LUN parsing update

* Logging update

* Logging update

* Updated ReportLuns

* Updated REPORT LUNS

* Cleanup

* Updated REPORT LUNS

* Updated Execute()

* Updated LUN handling

* Check for consecutive LUNs

* Added LUN check for remotely attached devices

* Remember LUN selected by IDENTIFY

* Evaluate LUN from IDENTIFY message

* Added comment

* Updated REPORT LUNS

* Initlize LUN

* Logging update

* Support 32 LUNs

* rasctl display update

* Updated LUN check for LUNSs > 7

* Simplified LUN validation

* Fixed wrong ID/LUN handling with values > 9

* Log level update

* Manpage update

* rascsi parser update

* Updated error handling

* Updated error handling

* Updated LUN setup validation

* Updated logging

* Improved validation of consecutive LUNs

* Renaming

* Detach all LUNs equal to or higher than the one specified

* File size is not required anymore to be a multiple of the block size

* Renaming
2021-10-13 09:41:21 -07:00
Uwe Seimet
89d66ef02b
Support for multiple SCSI LUNs (#318)
* Updated logging

* Updated logging

* Updated logging

* Updated ID/LUN parsing

* Updated handling of max_id

* The -HD option sets type to SAHD

* Replaced is_sasi by device type

* Updated logging

* Logging update

* Improved LUN evaluation

* Check LUN against UnitMax

* Comment update

* LUN parsing update

* Logging update

* Logging update

* Updated ReportLuns

* Updated REPORT LUNS

* Cleanup

* Updated REPORT LUNS

* Updated Execute()

* Updated LUN handling

* Check for consecutive LUNs

* Added LUN check for remotely attached devices

* Remember LUN selected by IDENTIFY

* Evaluate LUN from IDENTIFY message

* Added comment

* Updated REPORT LUNS

* Initlize LUN

* Logging update

* Support 32 LUNs

* rasctl display update

* Updated LUN check for LUNSs > 7

* Simplified LUN validation

* Fixed wrong ID/LUN handling with values > 9

* Log level update

* Manpage update

* rascsi parser update

* Updated error handling

* Updated error handling

* Updated LUN setup validation

* Updated logging

* Improved validation of consecutive LUNs

* Renaming

* Detach all LUNs equal to or higher than the one specified

* Add support for LUN in the device list

* Add ability to show device info for LUNs

* Make it possible to detach and eject LUNs

* Show full path to prop file

* Show only LUN columns when non-0 LUNs present

* Support for attaching LUNs

* Add helptext

* Fix handling of removable media

* Retain the previous behavior of recommending the next unoccupied id

* SCSI ID validation no longer needed due to changed logic

* Make use of recommended id everywhere

* Docstring

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-10-13 11:03:31 +02:00
Uwe Seimet
be090de0cc
Fix block size handling (512 bytes) for CDs (#316)
* Replaced code that assumes CDs having 2048 bytes per sector

* Comment update

* Logging update

* Logging update

* Set sector size before calling Open()
2021-10-10 00:03:51 -07:00
Uwe Seimet
dd5cad616f
Updated/Removed CD-ROM size checks (#315) 2021-10-08 14:59:23 -07:00
Uwe Seimet
f5a6f5dce2
Removed ISO CD block size check, optionally set r/o status when copying a file (#311)
* Removed ISO CD-ROM block size check

* Removed CD size checks

* Replicate read-only status when copying an image file

* Cleanup

* Copied images can optionally be created read-only

* Check path of default image folder

* Comment update

* Updated error message
2021-10-08 04:05:57 -07:00
Jonathan Karras
5bd8807c9e
Fix script errors in easyinstall.sh (#297)
* Fix minor errors in easyinstall.sh and start.sh

* Make easyinstall directory portable

* Remove directory check from easyinstall.sh

* Revert to requiring the checkout dir to be /home/pi/RASCSI

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-10-07 18:00:49 -07:00
Uwe Seimet
f7cdc917ad
Sector size must be set before Open() (#307) 2021-10-07 06:31:42 -07:00
Uwe Seimet
a638fec8a8
Feature interface granularity (#304)
* Added VERSION_INFO

* Added LOG_LEVEL_INFO

* Added RESERVED_IDS_INFO

* Renaming

* Renaming

* Split rasctl

* Code cleanup

* Removed unused method

* Include cleanup

* More cleanup

* More cleanup

* Simplified sending commands

* Fully set up command

* Further simplified sending commands

* Moved code

* Include cleanup

* Reject reserving an ID that is in use

* Update rascsi-web for the changes in protobuf interface

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-10-06 23:25:43 +02:00
Daniel Markstedt
c3aede9873
Fix calls to list_files() (#303) 2021-10-05 21:42:48 -05:00
Daniel Markstedt
5727f3ba0f
Feature image padding (#269)
* Implement pad_image method

* Reintroduce list_files method, rename the other to list_images

* Add iso file padding UI

* HDD image UI

* Tweak label

* Store padded image in the right dir

* Show only images that need padding

* Support padding MO images

* Cleanup

* UI flow to show drive properites (#270)

* Adjust MO padding to align with current develop

* Add docstrings

* Fix image padding code

* Tweak labels
2021-10-05 21:12:51 -05:00
Daniel Markstedt
7717890b5f
Feature config dir (#299)
* Define a separate config directory

* Create config dir when installing

* Fix typo

* Introduce delete_file method for deleting non-image files

* Add docstring
2021-10-05 20:58:49 -05:00
Daniel Markstedt
8f09f97d30
Cleanup rascsi-web mocking for current develop (#301) 2021-10-05 20:39:26 -05:00
Uwe Seimet
b79fd17f6f
Reserved IDs should only have an effect on ATTACH (#298)
* Reserved IDs should only have an effect on ATTACH

* Updated evaluation of reserved ID string
2021-10-04 14:22:32 -07:00
Daniel Markstedt
80e746b209
Feature show drive properties in webui (#290)
* Implement pad_image method

* Reintroduce list_files method, rename the other to list_images

* Add iso file padding UI

* HDD image UI

* Tweak label

* Store padded image in the right dir

* Show only images that need padding

* Support padding MO images

* Cleanup

* UI flow to show drive properites (#270)

* Adjust MO padding to align with current develop

* Add docstrings

* Remove image padding code

* Cleanup

* Cleanup
2021-10-02 09:33:31 -07:00
Eric Helgeson
d34c85d103
Merge pull request #293 from akuker/fix_hardcoded_filetypes
Query rascsi for the supported file endings to be used in the Web UI
2021-10-02 10:39:39 -05:00
Daniel Markstedt
00d7f8729a
manpages for rasdump and sasidump (#295)
* Fixed compile time issues

* Fix compile time error in sasidump.cpp

* Fix comment in Makefile

* Fix compile time error in sasidump.cpp

* Restore rasdump and sasidump to BIN_ALL

* Fix typo

* Install rasdump and sasidump

* manpage for rasdump

* Create manpage for sasidump

Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-10-02 08:16:35 +02:00
Uwe Seimet
0fb8753920
Fixed compile time issues (#294)
* Fixed compile time issues

* Fix compile time error in sasidump.cpp

* Fix comment in Makefile

* Fix compile time error in sasidump.cpp

* Restore rasdump and sasidump to BIN_ALL

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-10-01 16:28:14 -07:00
Daniel Markstedt
af4e3dfe80
Translate source code in x68k (#289)
* Translate code comments

* Remove documentation that is contained in wiki

* Translate code comments

* Remove documentation that is contained in wiki

* Translate configuration file

* Remove documentation that is covered by wiki

* Translate code comments

* Translate strings and code comments

* Cleanup
2021-10-01 15:23:53 -05:00
Uwe Seimet
6d32a8d102
Link to directory is not a valid image file (#292) 2021-09-30 14:31:09 -07:00
Daniel Markstedt
4945862c91 Query rascsi for the supported file endings, rather than hardcode lists in python code 2021-09-30 14:10:51 -07:00
Uwe Seimet
c581c12d33
Set SADI product name to SASI HD (#291) 2021-09-30 10:37:12 -07:00
Uwe Seimet
969220565b
Fixed issue with protected devices/media, added IMAGE_FILE_INFO command (#288)
* Fixed issue with attaching protected devices

* Fixed same issue when inserting a file

* Added IMAGE_FILE_INFO command

* rasctl output update

* Added file mode and type

* Datat type update

* Reverted change

* Update web ui for protobuf changes

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-09-30 10:22:57 -07:00
Eric Helgeson
998cc2d66f
Merge pull request #286 from akuker/webui_cleanup
Webui cleanup
2021-09-29 19:58:15 -05:00
Eric Helgeson
04095edaf9
Merge pull request #281 from akuker/feature_hidden_help
Hidden help text for each section
2021-09-29 19:56:48 -05:00
Eric Helgeson
7c5e942aff
Merge pull request #282 from akuker/fix_attaching_removable
Fix attaching removable devices in the Web UI
2021-09-29 19:53:11 -05:00
Eric Helgeson
d73cfb38ec
Merge pull request #285 from akuker/fix_dec_profiles
Fix DEC vendor strings
2021-09-29 19:52:08 -05:00
Daniel Markstedt
0e4c2b7fd7 Add more docstrings 2021-09-29 09:48:34 -07:00
Uwe Seimet
682d35f1e6
Improve MO support by removing capacity restrictions (#284)
* Improve MO support by removing capacity restrictions, resolves #283

* Updated geometry handling
2021-09-29 09:05:30 -07:00
Daniel Markstedt
b3936405f2 Fix DEC vendor strings 2021-09-29 07:07:49 -07:00
Daniel Markstedt
44298bf031 Add docstrings and clean up layout 2021-09-29 07:03:10 -07:00
nsafran1217
b3b740e3cc
Issue 278: fix ModeSense(6) and ModeSense(10) (#280)
* Change ModeSense(6) and ModeSense(10) to return proper length of data

* Fix size of block descripter returned from ModeSense(10)
2021-09-29 09:02:45 +02:00
Daniel Markstedt
ff00b6005c Fix bugs with attaching removable images 2021-09-28 16:04:16 -07:00
Daniel Markstedt
23586cc1c9 Hidden help text for each section 2021-09-28 13:39:08 -07:00
Daniel Markstedt
bfdaec6c15
Restore APPLE GENUINE; tweak other labels (#276) 2021-09-27 19:32:58 -05:00
Uwe Seimet
97c2a11329
MAPPING_INFO command, returning the mapping of extensions to types (#275)
* Added MAPPING_INFO command, returning the mapping of extensions to types

* Updated help message

* Set explicit vendor/product/revision for .hda extension

* Added leading blanks to vendor and product for .hda

* Product string update

* Fixed typo in help string

* Manpage update

* Spoof hda as a Quantum Fireball

Co-authored-by: Daniel Markstedt <markstedt@gmail.com>
2021-09-27 16:39:50 -07:00
akuker
c98dec8f44
SCSIMON immediately dies and doesn't collect any data (#271)
* SCSIMON immediately exits due to an introduced code error

* Fix string printout

Co-authored-by: Tony Kuker <akuker@gmail.com>
2021-09-26 08:46:23 +02:00
Daniel Markstedt
18e55bea2d
Feature attach suggestion (#260)
* Issue 232 -- will not generate PC98 emulator image formats

* Introducing dropdown for selecting device type which defaults to a recommendation based on file ending, while removing the quiet logic to autodetect type on the frond end side

* Added device type to PbImageFile

* Comment update

* Code cleanup

* More code cleanup

* Extraced methods

* Extracted methods

* Renaming

* Moved code

* Visility update

* Updated error handling

* Removed duplicate error handling

* Removed duplicate code

* Code cleanup

* Moved code

* Moved code

* Leverage new device type field for files in protobuf interface

* Tweak label

* Tweak template

* Fix bug

* Add types legend

* Add tip about renaming image files

Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-25 22:27:43 -05:00
Daniel Markstedt
3d0c200521
Have current log level selected by default in dropdown (#268)
* Have current log level selected

* Simplify footer
2021-09-25 21:33:21 -05:00
Tony Kuker
99bf0d3877 Update Pillow version to 8.3.2 2021-09-24 22:15:19 -05:00
Daniel Markstedt
13113178fa
X68000 rasctl code and docs, from RaSCSI 1.52 by GIMONS. Translated by me. Untested. (#255) 2021-09-24 21:07:30 -05:00
Eric Helgeson
01443ec653
Merge pull request #250 from akuker/fix_uploads
Fix the file upload functionality
2021-09-24 18:35:18 -05:00
Daniel Markstedt
75245a8b42 Customize dropzone stylesheet, adding a drop shadow to markers 2021-09-24 16:31:45 -07:00
Daniel Markstedt
b73ef29f06 Use native unzip instead of python zipfile lib for better performance 2021-09-24 14:48:54 -07:00
Daniel Markstedt
c9c97baa3c Fix example 2021-09-24 13:30:59 -07:00
Daniel Markstedt
fa3956c5c3 Fix example 2021-09-24 13:30:59 -07:00
Daniel Markstedt
23e6503263 Add more examples to rascsi.service 2021-09-24 13:30:59 -07:00
Daniel Markstedt
5abb0ea405 Update wording 2021-09-24 13:30:59 -07:00
Daniel Markstedt
37bf38190b Bump max file size limit to 4GB 2021-09-24 13:30:59 -07:00
Daniel Markstedt
c4959210d5 Blocks have been removed 2021-09-24 13:30:59 -07:00
Daniel Markstedt
386347e136 Tweak labels 2021-09-24 13:30:59 -07:00
Daniel Markstedt
c13c00cdea Fix typo 2021-09-24 13:30:59 -07:00
Daniel Markstedt
a581fb6966 Correct drive data 2021-09-24 13:30:59 -07:00
Daniel Markstedt
1c3d299dd7 Add Mac drives 2021-09-24 13:30:59 -07:00
Daniel Markstedt
11c1a5623a Correct drive data 2021-09-24 13:30:59 -07:00
Daniel Markstedt
ff13408bc9 Improve error handling of unzip method; clean up unused code 2021-09-24 13:30:59 -07:00
Daniel Markstedt
b4562e23cc Fix typo 2021-09-24 13:30:59 -07:00
Daniel Markstedt
66c45e4bf6 Make unzipping work 2021-09-24 13:30:59 -07:00
Daniel Markstedt
d9bb875a27 Unzip and delete zip files after upload; validate upload file suffix 2021-09-24 13:30:59 -07:00
Daniel Markstedt
f336675f35 Revert changes incorporated in another PR 2021-09-24 13:30:59 -07:00
Daniel Markstedt
f87792f188 Cleanup 2021-09-24 13:30:59 -07:00
Daniel Markstedt
fbc4ad1697 Switch to the basic stylesheet 2021-09-24 13:30:59 -07:00
Daniel Markstedt
3c9f4f708b Cleanup 2021-09-24 13:30:59 -07:00
Daniel Markstedt
ac388b57ed More style fixes 2021-09-24 13:30:59 -07:00
Daniel Markstedt
cb654c8049 Fix styling of dropzone form 2021-09-24 13:30:59 -07:00
Daniel Markstedt
bae1554b1f Don't hard code max file size 2021-09-24 13:30:59 -07:00
Daniel Markstedt
5ebbe8f107 Cleanup and better messages 2021-09-24 13:30:59 -07:00
Daniel Markstedt
b09810b46b Use dropzone and pydrop for file uploading 2021-09-24 13:30:59 -07:00
Daniel Markstedt
e98930cfff Remove redundant information 2021-09-24 13:30:59 -07:00
Daniel Markstedt
2cee644350 Correct drive sizes for Microp drives. Their true block_size is 256 kb, but should function with 512 kb as well. 2021-09-24 13:30:59 -07:00
Daniel Markstedt
22976029ce Fix language in 502 page 2021-09-24 13:30:59 -07:00
Daniel Markstedt
c2be764aa6 Revert to previous upload code, but keeping the secure filename improvement 2021-09-24 13:30:59 -07:00
Daniel Markstedt
e33e5c0560 Use unified terminology 2021-09-24 13:30:59 -07:00
Daniel Markstedt
71b04d8871 Add Cancel link on the bottom of the page as well 2021-09-24 13:30:59 -07:00
Daniel Markstedt
250d63d483 Display available disk space on the Pi 2021-09-24 13:30:59 -07:00
Daniel Markstedt
dfea050d60 Secure file names also for generic image file creation 2021-09-24 13:30:59 -07:00
Daniel Markstedt
5ded484166 Use secure file names when creating image files 2021-09-24 13:30:59 -07:00
Daniel Markstedt
dcd516aa48 Move arithmetic to Python code 2021-09-24 13:30:59 -07:00
Daniel Markstedt
57bbcbd639 Address issue#61 by allowing only recognized file types to be picked for upload 2021-09-24 13:30:59 -07:00
Daniel Markstedt
d31db7c316 Remove file type check since it happens after uploading has completed 2021-09-24 13:30:59 -07:00
Daniel Markstedt
c150a6c7b8 Use save() to upload files, to address file corruption issues with the previous solution. Also adds file ending validation which has been requested by users. 2021-09-24 13:30:58 -07:00
Daniel Markstedt
3a0578e0bb Improve error message 2021-09-24 13:30:58 -07:00
Daniel Markstedt
1cd5e8cea1 Fix saving and loading device params in config files 2021-09-24 13:30:58 -07:00
Daniel Markstedt
ef28a5b491 Bump point release of four dependencies, then lock down versions again 2021-09-24 13:30:58 -07:00
Daniel Markstedt
4331f68f3a Use compatible version clause for Python dependency management 2021-09-24 13:30:58 -07:00
Daniel Markstedt
c6ef573d3b Revert granular SCHD detection on the web ui side, since there are a plethora of hard drive image file endings out there 2021-09-24 13:30:58 -07:00
Daniel Markstedt
8454021f6b Allow for more recent python libraries, rather than fixed at a particular version 2021-09-24 13:30:58 -07:00
Daniel Markstedt
6b1c099039 Cleanup 2021-09-24 13:30:58 -07:00
Daniel Markstedt
f830003c72 Store drive size instead of block number 2021-09-24 13:30:58 -07:00
Daniel Markstedt
587e64e17e Move scsi id reservation management to the backend 2021-09-24 13:30:58 -07:00
Daniel Markstedt
e10231c0e7 More descriptive text on index.html 2021-09-24 13:30:58 -07:00
Eric Helgeson
4fed455645
Merge pull request #246 from akuker/feature_backend_reserve
Manage scsi id reservations on the rascsi backend; Store drive size instead of blocks; sundry minor fixes
2021-09-24 15:17:56 -05:00
Daniel Markstedt
8fbc834fa0 Fix example 2021-09-24 13:06:26 -07:00
Daniel Markstedt
c440849c7e Fix example 2021-09-24 13:05:21 -07:00
Daniel Markstedt
c428782565 Add more examples to rascsi.service 2021-09-24 13:01:48 -07:00
Daniel Markstedt
e21f2dd8c1 Update wording 2021-09-24 12:49:13 -07:00
Uwe Seimet
829356a32c
protobuf interface returns assumed device type (#259)
* Added device type to PbImageFile

* Comment update

* Code cleanup

* More code cleanup

* Extraced methods

* Extracted methods

* Renaming

* Moved code

* Visility update

* Updated error handling

* Removed duplicate error handling

* Removed duplicate code

* Code cleanup

* Moved code

* Moved code
2021-09-24 08:48:48 +02:00
Daniel Markstedt
eaa7257b25 Blocks have been removed 2021-09-23 17:28:22 -07:00
Daniel Markstedt
7b8a5f6c76 Fix typo 2021-09-22 21:00:55 -07:00
Daniel Markstedt
00abd387dc Correct drive data 2021-09-22 20:59:50 -07:00
Daniel Markstedt
31577ab8c4 Merge branch 'develop' into feature_backend_reserve 2021-09-22 20:41:25 -07:00
Daniel Markstedt
e2ea9b36d0 Add Mac drives 2021-09-22 20:37:27 -07:00
Daniel Markstedt
8922df56b8 Correct drive data 2021-09-22 20:34:00 -07:00
Uwe Seimet
fdee57e421
Issues 245 & 247, improved symlink handling (#252)
* Extensions are case-insensitive

* Made options case-sensitive, synchronized rasctl and rascsi options

* Manpage and help update

* Added comment

* Updated log message

* Warn about invalid files in image folder

* Updated handling of block devices

* Updated symlink handling

* Fixed wrong handle being closed

* Copy links as links

* Logging update

* Added -D_FILE_OFFSET_BITS=64 for better support of huge files

* Logging update

* Added comment

* Use readdir instead of directory_iterator (issue with outdated C++ libs)

* Updated symlink handling

* Updated link handling

* Updated logging

* Updated error logging

* Fixed condition

* Updated setting default image folder

* Comment update
2021-09-22 08:40:46 -07:00
No0ne
b92a762acc
Update nginx-default.conf (#241)
Update nginx-default.conf to enable the web ui via IPv6
2021-09-20 18:17:17 -07:00
Daniel Markstedt
d434dfe918 Improve error message 2021-09-20 10:47:00 -07:00
Daniel Markstedt
d1ef834ffd Fix saving and loading device params in config files 2021-09-20 10:46:48 -07:00
Daniel Markstedt
12483a58f5 Bump point release of four dependencies, then lock down versions again 2021-09-20 08:58:36 -07:00
Daniel Markstedt
a6b0a40a78 Use compatible version clause for Python dependency management 2021-09-20 07:10:42 -07:00
Daniel Markstedt
8bc5789ba6 Revert granular SCHD detection on the web ui side, since there are a plethora of hard drive image file endings out there 2021-09-19 21:48:49 -07:00
Daniel Markstedt
5507d7c530 Allow for more recent python libraries, rather than fixed at a particular version 2021-09-19 19:38:24 -07:00
Daniel Markstedt
7f1c3f7395 Cleanup 2021-09-19 18:39:07 -07:00
Daniel Markstedt
591bbb4325 Store drive size instead of block number 2021-09-19 18:35:15 -07:00
Daniel Markstedt
133372ff09 Move scsi id reservation management to the backend 2021-09-19 15:57:28 -07:00
Daniel Markstedt
40becc344a More descriptive text on index.html 2021-09-19 15:47:11 -07:00
Daniel Markstedt
9795c553be
RaSCSI logo favicons (#237) 2021-09-19 14:36:43 -07:00
Daniel Markstedt
15febd1ee6
Disk image profile management using a sidecar config file (#242)
* Handle a case where reserved ids on the Web UI side are not actually reserved on the backend side

* Better error handling when no device is found in list_devices

* Better warning message

* Tag message as error

* Fix device_info

* Get reserved ids from the server instead of storing a client side state, which caused front and backend to get out of sync in certain cases.

* Initial implementation of sidecar configuration reading and writing

* Use bytes for drive image creation internally

* Add named drive section

* Move header to base.html

* Create the disk profile list page

* Make lists of HDDs, CDRs, and Removable drives

* Implement disk image + sidecar creation

* Implement CD-ROM device sidecar creation method

* Add more device configurations

* Add disclaimer

* Hide URL if none is provided

* Make the web ui use the new protobuf parameter maps

* Make daynaport attaching UI more flexible

* Use the protobuf interface to create image files

* Use new create image method for the sidecar flow as well

* Move file deletion logic to protobuf commands; Refactor saving/loading config files

* Update disk image creation

* Fix error

* Disk images the script makes are in Mac format

* Add blurb about the risks with using Lido driver (issue#40) to the easyinstall script, while pushing less for using that feature.

* Make shutdown and reboot async operations

* More informative footer contents

* Wordsmith the Mac drive options

* Link to relevant section in the wiki

* Added GET_IMAGE_FILES

* Added default folder to GET_IMAGE_FILES

* Renaming

* Updated setting image folder

* Lists available net interfaces as a drop down when attaching daynaport

* Macs should use the hds image file ending

* Fixed default image folder handling

* Refer to device properties, instead of sidecars

* Added NETWORK_INTERFACES_INFO

* Filter "lo"

* Use PF_INET in favor of PF_INET6

* Added network interfaces to server info

* Drive property file ending defined in one place; Add handling of common urllib and file system exceptions.

* Use protobuf interface to get network interface info

* Use protobuf interface for list_files

* Repeated field cleanup

* Renaming

* Added DEVICE_TYPES_INFO

* Comment update

* Added -y option to rasctl

* Add the remaining recommended drive profiles provided by rpajarola

* Fix typos

* Add warnings to CD-ROM descriptions

* Add more recommended Sun drives

* Add capacity to name

* Move footer into base.html

* Handle removable drive insertion in the attach method (easy to do with protobuf)

* Limit which arguments to pass to an image injection command

* Cleanup

* Sort image and config files alphabetically

* Make compatible with updated protobuf interface

* Sort drives alphabetically by name

* Decriptive text for CD-ROM section

* Better description

* Hyperlink to disks page instead of button

Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-19 14:29:01 -07:00
Uwe Seimet
6b082447c5
protobuf interface cleanup (#244)
* Repeated field cleanup

* Renaming

* Added DEVICE_TYPES_INFO

* Comment update

* Added -y option to rasctl

* Updated rasctl help message
2021-09-19 14:27:47 -07:00
Uwe Seimet
f782156e51
Added INFO_IMAGE_FILES and INFO_NETWORK_INTERFACES (#243)
* Added GET_IMAGE_FILES

* Added default folder to GET_IMAGE_FILES

* Renaming

* Updated setting image folder

* Fixed default image folder handling

* Added NETWORK_INTERFACES_INFO

* Filter "lo"

* Use PF_INET in favor of PF_INET6

* Added network interfaces to server info

* Filter rascsi_bridge

* Use list of available network interfaces as default parameters
2021-09-19 09:05:01 +02:00
Uwe Seimet
3b83b014b4 Updated directory iterator options 2021-09-18 19:28:55 +02:00
Uwe Seimet
26c6a902f1 Fixed wrong parameter name 2021-09-18 08:53:02 +02:00
Uwe Seimet
7efed1a239 Added missing comments to .proto file 2021-09-17 23:18:46 +02:00
Uwe Seimet
fd97650712 Updated error messages 2021-09-17 22:22:40 +02:00
Uwe Seimet
ad0e454e66 Simplified filename validation 2021-09-17 20:14:03 +02:00
Uwe Seimet
5b3af7cf9d Improved filename validation 2021-09-17 19:59:12 +02:00
Uwe Seimet
9663144c45 Updated file validation 2021-09-17 19:54:42 +02:00
Uwe Seimet
7a1a2ec328 Updated error handling 2021-09-17 19:45:27 +02:00
Uwe Seimet
7018ccac64 Added PROTECT_IMAGE, UNPROTECT_IMAGE 2021-09-17 11:11:22 +02:00
Uwe Seimet
9266852ae2 Updated logging 2021-09-16 13:03:14 +02:00
Uwe Seimet
2aea71820c Fixed parameter name 2021-09-16 12:56:16 +02:00
Uwe Seimet
8629dea87f Replaced parameter lists by map with named parameters 2021-09-16 12:16:53 +02:00
Uwe Seimet
00a08e8d18 Help/Manpage update for rasctl 2021-09-15 22:00:48 +02:00
Uwe Seimet
2483687b8a Fixed typo 2021-09-15 17:50:00 +02:00
Uwe Seimet
3b250f0eff Added copy support to rasctl 2021-09-15 17:40:34 +02:00
Uwe Seimet
4cfeb32aa8 Added support for copying image files 2021-09-15 17:35:48 +02:00
Uwe Seimet
4ff271eeec Updated error handling 2021-09-15 16:35:51 +02:00
Uwe Seimet
7f68f9b91f Updated error handling 2021-09-15 16:33:50 +02:00
Uwe Seimet
c78ff8fce1 Fixed Eclipse warning 2021-09-15 16:26:18 +02:00
Uwe Seimet
f178221aff Error message update 2021-09-15 15:18:53 +02:00
Uwe Seimet
da110c4e8e Prevent image files in use from being deleted 2021-09-15 15:17:26 +02:00
Uwe Seimet
f6f572ee9e Fixed file permissions 2021-09-15 15:06:27 +02:00
Uwe Seimet
c72837a4a3 Added support for creating read-only image files 2021-09-15 14:51:01 +02:00
Uwe Seimet
7ed22bf33b Updated file size validation 2021-09-15 13:56:00 +02:00
Uwe Seimet
548ae19fa5 Check for existing image file when renaming 2021-09-15 13:37:14 +02:00
Uwe Seimet
4bf903f7f2 Updated logging 2021-09-15 13:35:39 +02:00
Uwe Seimet
2ffad76c64 Updated logging 2021-09-15 13:32:29 +02:00
Uwe Seimet
14437274e2 Comment update 2021-09-15 12:44:49 +02:00
Uwe Seimet
434ea0e3f7 Added RENAME_IMAGE 2021-09-15 12:26:01 +02:00
Uwe Seimet
492f332dd7 Updated file size check 2021-09-15 11:31:52 +02:00
Uwe Seimet
2a9969bf1d Comment update 2021-09-15 11:13:30 +02:00
Uwe Seimet
812a322e8d Added image file deletion 2021-09-15 11:08:23 +02:00
Uwe Seimet
9a8c35db6b Added path check 2021-09-15 10:57:12 +02:00
Uwe Seimet
8172c9fdfe Initial image file creation 2021-09-15 10:47:51 +02:00
Daniel Markstedt
8a3642bf9a
Move to protobuf for the webapp, major overhaul to easyinstall.sh, code comment translations (#229)
* Making saving and loading config files work with protobuf

* Formatted the Status column, and fixed the available ID logic

* Updated handling of removed status for devices without image file support

* Comment update

* Fixed typo

* Updated logging

* Updated handling of removed status for devices without image file support

* Comment update

* Fixed typo

* Updated logging

* Better handling of device status

* Updated parameter handling

* Updated setting default interfaces

* Revert "Updated setting default interfaces"

This reverts commit 210abc775d.

* Revert "Updated parameter handling"

This reverts commit 35302addd5.

* Abort with a 404 if rascsi is not running. Use any protobuf response to determine whether rascsi is running (should hardly be required anymore due to the other change, but just in case).

* Move id reservation back into __main__

* Remove check for device type when validating Removed image

* Leverage device property data for better status messages

* Remove redundant string sanitation when reading config csv file

* Clean up device list generation

* Cleanup

* Remove duplicates before building valid scsi id list

* Fully translated cfilesystem.h code comments to English; partially translated cfilesystem.cpp

* rascsi supports reserving IDs

* Updated help message

* Replaced BOOL by bool

* Logging update

* Logging update

* Cleanup

* Restructure the easyinstall.sh script to combine the install/update flows, and disallow installing the webapp by itself

* Remove redundant steps handled in Makefile

* Add the functionality to specify connect_type through a parameter

* Add validation to the argument parser allowing only STANDARD and FULLSPEC as options

* Complete translation of code comments for cfilesystem.h; partial translation for cfilesystem.cpp

* Cleanup

* Merge parts of the Network Assistant script by sonique6784; fix the run_choice startup parameter

* Improve on the network setup messages

* Fix routing address

* Add checks for previous configuration; cleanup

* Cleanup

* Remove redundant step in wired setup. Improve messages.

* Cleanup

* Added default parameters to device properties

* Return parameters a device was set up with

* Add flows for configuring custom network settings; adopting some logic by –sonique6784

* Improved device initialization

* Updated default parameter handling

* Updated default parameter handling

* Fixed typo

* Comment updates

* Comment update

* Make iso generation work again, and add error handling to urllib actions

* Manage default parameters in the respective device

* Print available network interfaces. Clean up step and improve descriptive messages.

* Make the script clean up previous configurations

* Make the script only show relevant interfaces

* Partial translation of cfilesystem.cpp

* Do not pass empty parameter string

* Added supports_params flag

* Completely translate code comments in cfilesystem.cpp

* Show rascsi-web status after installing

* Refactoring

* Made comparisons more consistent

* Updated error handling

* Updated exception handling

* Made comparisons more consistent

* Updated error handling

* Overlooked code comment translation

* Renaming

* Better error handling for socket connection

* Disable two NEC hd image types due to issue#232

* Comment update

* NEC sectors size must be 512 bytes

* Updated logging

* Updated vendor name handling

* Updated handling of media loading/unloading

* Comment update

* NEC sectors size must be 512 bytes

* Updated logging

* Updated vendor name handling

* Updated handling of media loading/unloading

* Better handling of removable disks in the web ui

* Added stoppable property and stopped status

* Made MO stoppable

* Removed duplicate code

* Removed duplicate code

* Copy read-only property

* Renaming

* Add an assistant for reserving scsi ids

* Don't show action if no device attached

* Implement a device_info app path, and cut down on device columns always shown

* Cleanup

* Removed duplicate code, added START/STOP

* Improved default parameter handling

* Updated load/eject handling

* Logging update

* Fixed typo

* Verified START/STOP UNIT

* Updated logging

* Updated status handling

* Updated status handling

* More status handling updates

* Logging update

* Made instance fields local variables

* Removed duplicate code, added START/STOP

* Improved default parameter handling

* Updated load/eject handling

* Logging update

* Fixed typo

* Verified START/STOP UNIT

* Updated logging

* Updated status handling

* Updated status handling

* More status handling updates

* Logging update

* Made instance fields local variables

* Made disk_t private

* Made some data structures private

* Fixed ARM compile issue

* Fast forward instead of rebase existing git repo

* Fixed ctapdriver initialization issue

* Reset read-only status when opening an image file

* Cleanup

* Cleanup

* Made logging more consistent

* Updated log level

* Cleanup

* Log load/eject on error level for testing

* Revert "Log load/eject on error level for testing"

This reverts commit d35a15ea8e.

* Assume drive is not ready after having been stopped

* Updated status handling

* Make the csv config files store all relevant device data for reading

* Read 9 column csv config files

* Fixed typo

* Rebuild manpage

* Fixed issue #234 (MODE SENSE (10) returns wrong mode parameter header)

* Removed unused code

* Enum data type update

* Removed duplicate range check

* Removed duplicate code

* Removed more duplicate code

* Logging update

* SCCD sector size was not meant to be configurable

* Better error handling for csv reading and writing

* Updated configurable sector size properties

* Removed assertion

* Improved error handling

* Updated error handling

* Re-added special error handling only relevant for SASI

* Added TODOs

* Comment update

* Added override modifier

* Removed obsolete debug flag (related code was not called)

* Comment and logging updates

* Removed obsolete try/catch

* Revert "Removed obsolete try/catch"

This reverts commit 39ca12d8b1.

* Comment update

* Removed duplicate code

* Updated error messages, use more foreach loops

* Avoid storing RaSCSI generated product info in config file

* Updated logging

* Logging update

* Save config files in json instead of csv

* Fix bugs with json config loading

* Refactoring & remove unused code

* Refactoring

* Display upper case file endings in file management list

* Only show product vendor for non-RaSCSI devices in the device list

* Translate code comment

* Refactoring

* Fix bad identation

* Improve valid file extension handling

* Add validation when attaching removable media

* Display valid file endings under the file list

* Cleanup

* Don't store 0 block size

* Fix indentation

* Read and write config files in key:pair format

* Add section for controlling logging

* README update

* Added block_count

* Cleanup, fix typos

* Support attaching CD-ROM with custom block size

* Evaluate block size when inserting a media

* rasctl display capacity if available

* Info message update

* Use kwargs for device attachment

* Fix bugs in attach_image kwargs; make config file more readable

* POC for attaching device with profile

* Only list product types valid for the particular image file

* Perform validation of HDD image size based on the product profile

* Implement sidecar config files for drive images.

* Added missing product name to NEC vital product data

* MO block size depends on capacity only

* Better error handling for device sidecar config loading

* Extended property/status display

* Property display update

* Updated error handling

* Handle image sizes in bytes internally

* Revert change

* Resolve bad merge

Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2021-09-14 21:51:12 -05:00