Commit Graph

951 Commits

Author SHA1 Message Date
Uwe Seimet
ae66bbdc26
Dry-run shall not change any state (21.10.01 regression) (#998) 2022-11-21 09:30:10 +01:00
Daniel Markstedt
0d95890887
Get and set pretty hostname to use as system name in Web UI (#997)
- Display the pretty hostname as system name in header
- Move IP and hostname down to the footer
- New endpoint for setting the pretty hostname, plus form field in the Web UI
- (unrelated) Use platform.uname() instead of shell uname
- (unrelated) Better logic for fetching the Mac HD Drivers zip file in easyinstall.sh
2022-11-20 10:20:32 -08:00
Daniel Markstedt
2645656199
Refactor line rendering logic, and add support for conditional displaying of LUN; Made some variables more generic, not explicitly RaSCSI. (#999) 2022-11-20 10:15:59 -08:00
nucleogenic
8e6be9856e
Run all workflows against changes to the develop branch (#995) 2022-11-18 16:41:13 +00:00
nucleogenic
163cb5a10e
Add GitHub Actions for web UI, fix C++ unit test job, enable SonarCloud cache, introduce parallel execution where possible (#974) 2022-11-18 13:58:26 +00:00
Daniel Markstedt
4afb11d3dd
Shutdown splash for the OLED script; restore non-Latin transliteration; other refactoring (#991)
- Bring back the shutdown splash, with the tweak that is blanks out after 700ms
- Restore the non-Latin transliteration originally from https://github.com/akuker/RASCSI/pull/449 which was lost when the `common` package was introduced
- Bump to the latest libraries, while removing implicit dependencies from requirements.txt
- Shorter duration of the startup splash
- Reintroduce shell shutdown/reboot methods for use with the Web UI. This addresses https://github.com/akuker/RASCSI/issues/538 (the ctrlboard client will continue to use the built-in rascsi system calls which are slightly faster)
- Remove overt references to RPi. This addresses https://github.com/akuker/RASCSI/issues/990
- Other refactorings
2022-11-17 16:21:18 -08:00
Uwe Seimet
8c5dcd2f49
Fix bogus "Invalid magic" message when socket connection is established (#988) 2022-11-16 10:01:51 +01:00
Daniel Markstedt
4645e8c975
Display hardware info in footer; close open file handlers; better error handling (#989)
* Expose hardware info in env string

* Improve error handling for get_properties_by_drive_name

* Verbose uname parameters.

* Close open file in introspect method

* Add error handling for when no drive name was matched with props in the database
2022-11-15 22:28:27 -08:00
nucleogenic
3627b39af4
New theme for web UI (#957)
* Docker environment fixes

* New theme for web UI

* Apply breaking wrap to filenames only

* Reduce font sizes, whitespace and padding

* Right align action fields/buttons

* Improve mobile header, hide superfluous UI elements when logged out, drop placeholders from login labels, various other adjustments

* Force footer to bottom of screen

* Show manual link to logged out users

* Reduce header text size on desktop

* Fix incorrect selector ID

* Fix selector referencing old class name

* Fix right-aligned message when images table empty

* Add CSS linter/auto-formatter

* Run Stylelint + Prettier against modern theme CSS

* Select default theme based on browser’s user agent

* Style inputs on mobile/tablet devices

* Fixes for Safari 14 on iOS + iPad OS

* Explicitly define mobile browser support, switch to bare ua-parser without user-agent wrapper

* Add LICENSE file for modern theme icons

* Improve theme selection query string/field naming.

* Remove patch workaround from Docker build

* Update log level for UAs to info

* Move Bootstrap Reboot CSS to CDN

* Account for LUN column in attached devices table

* Prevent wrapping of config forms on small viewports

* Fix Stylelint issues

* Auto-format CSS with Prettier
2022-11-14 09:32:15 -08:00
Daniel Markstedt
5920315730
Correct reference to the interface parameter. (#984) 2022-11-12 12:28:52 -08:00
Daniel Markstedt
a7a8510796
Bump to Netatalk 2.221101 (#983) 2022-11-11 21:35:46 -08:00
Uwe Seimet
454c61ac0d
Added rascsi filter to limit logging to a particular device (#978)
* Support for ID and LUN parameter for the -L option in rascsi

* Added DeviceLogger class

* Removed dupiicate code

* Fixed SonarQube issues

* Added unit tests, improved code sharing

* Fixed regression (#979)
2022-11-11 21:08:48 +01:00
Uwe Seimet
4fa513090a
Improve code sharing and dependencies, address code duplication (#976) 2022-11-10 07:44:06 +01:00
Uwe Seimet
1c0179e7e3
rasdump and monitor updates, made rasdump work, improved bus abstraction (#973)
* Moved rasdump and monitor to sub-folders, cleaned up code

* Fixes rasdump issues and added additional features like device type check, LUN support and configurable buffer size
2022-11-09 08:40:26 +01:00
Daniel Markstedt
e8b72c48de
Introduce option to use clang++, and option to skip apt packages (#971)
- Make clang++-11 the default for compiling rascsi
- Add --with_gcc option to use g++ instead
- Add option to skip apt-get package installation (this saves a significant amount of time running the script on a Zero when you already have the required packages installed)
- Add a line to the script menu showing current options
- Surrounding cleanup
2022-11-07 18:59:19 -08:00
Uwe Seimet
1cae530d42
Added command byte count to SCSI command mapping (#966)
* Extended mapping table with command byte count

* Terminate early if command is unknown
2022-11-06 19:44:44 +01:00
Uwe Seimet
c98c52ffb8
Cleaned up dependencies on controller manager (#964)
* Cleaned up dependencies on controller manager

* Removed global fields

* Simplified setting up RascsiResponse and RascsiExecutor

* Got rid of remaining raw pointers

* Use references instead of pointers

* Improved encapsulation
2022-11-04 08:22:32 +01:00
Daniel Markstedt
921ba7d2ed
Headless bypass for sudo -v in easyinstall (#963)
* Headless bypass for sudo check. Also, correct check for mac drivers dir.

* Remove inline sudo -v checks. There's no proof they improve anything.

* Use akuker's dropbox storage
2022-11-03 20:58:31 -07:00
Uwe Seimet
83d1595a35
Improved testability of rascsi/rasctl/scsimon/rasdump, eliminated global fields (#960)
* Moved rascsi/rasctl/scsimon/rasdump.cpp to classes (for better testability)

* Moved bus.* to hal folder

* Removed some global variables

* Fixed code redundancies
2022-11-02 23:41:45 +01:00
Uwe Seimet
c41373d9bd
Use lambdas for dispatcher, code cleanup, test updates (#958)
* Using lambdas instead of member function pointers simplifies the command dispatching and reduces the code volume

* Removed duplicate error handling

* Fix for issue #956

* Unit test updates

* Resolved SonarQube issues
2022-11-02 15:36:19 +01:00
akuker
31dd063611
Create devices after bus creation (#954) 2022-11-02 08:58:59 -05:00
Uwe Seimet
621cc7d5a2
Code cleanup, especially casts, lambdas, data types, encapsulation (#952)
* Unit test updates

* Lambda syntax cleanup

* Use new-style casts

* Use std::none_of when saving the cache

* Use to_integer instead of casts

* Use accessors for getting CDB data

* Made ctrl_t private

* Improved encapsulation

* Replaced pointers by references

* Removed all remaining occurrences of DWORD and BYTE, making os.h obsolete
2022-11-02 07:36:25 +01:00
Daniel Markstedt
85edd50047
Partition and format HFS/FAT volumes in the Web UI + SMB install (#946)
- New "format as" option when creating new images; removing the image creation options from easyinstall
- Bring in HFSer as new submodule providing the driver binaries; removing the Lido driver binary from this repo
- Add SpeedTools driver option
- Point to github mirror of hfdisk, since the original git server is down
- While rearranging the easyinstall options, moved the CtrlBoard option up to the main section
- Add an easyinstall script to configure Samba, while consolidating file sharing with Netatalk
2022-11-01 16:43:24 -07:00
Uwe Seimet
9a4f433baf
Validate SCSI error codes (sense key, asc) in unit tests (issue #895) (#950) 2022-10-29 18:16:03 +02:00
Uwe Seimet
f84a13b3e2
Prevent copying of files in use (#951) 2022-10-29 18:15:30 +02:00
Uwe Seimet
6e35577368
Removed wrong inheritance of SCDP and SCBR from Disk class (#948)
* Fixed TODOs, updated SCBR and SCDP

* Introduced ByteWriter interface

* Use accessors instead of directly accessing length/block fields
2022-10-29 18:10:00 +02:00
Uwe Seimet
c1f63c6745
Added missing command mapping for DEVICES_INFO (#947) 2022-10-27 16:31:32 +02:00
Uwe Seimet
2cecf4b35c
Image file deletion: Fixed error handling (#944)
* Fixed ID/LUN check when deleting image

* Updated error handling when deleting image file

* Prevent renaming of image file in use
2022-10-26 17:43:11 +02:00
Daniel Markstedt
77a32bd828
Remove legacy robot framework tests (#942) 2022-10-25 19:41:20 -05:00
Daniel Markstedt
08194af424
Move C++ code into cpp/ dir (#941)
- Moved C++ code to cpp/ from src/raspberrypi
- Related updates to Makefile, easyinstall.sh, and the github build rules
- Removed the native X68k C code in src/x68k from the repo
2022-10-25 12:59:30 -07:00
Daniel Markstedt
4b109a70b0
Improve Web UI integration tests (#939)
* Remove deprecated critital log level from test

* Move drive_properties back into template data sets

* Move properties data integrity checks to test code

* Streamline the drive formatting logic
2022-10-25 08:51:04 -07:00
Uwe Seimet
6bbaa956ed
Use C++ filesystem library/iostreams for I/O, added unit tests (#911) (#934)
* Use C++ filesystem library/iostreams for I/O (issue #911)

* Added unit tests
2022-10-25 10:29:57 +02:00
akuker
ea8bc3970d
Architectural updates for future support of Banana Pi (#928)
* Added logic to figure out what type of host we're running on - Banana Pi or Raspberry Pi
* Split out the raspberry pi logic to separate classes that are created at start-up based upon the host configuration
* Added System Timer class for Allwinner H3 CPU
* Added stubs for GPIO BUS for Allwinner H3 CPU

Authored-by: Tony Kuker <akuker@gmail.com>
2022-10-24 19:21:40 -05:00
Daniel Markstedt
73ecd4d1b8
Restore rascsi help text for hda format; consistently use 'compatible' teminology instead of 'genuine' (#937) 2022-10-24 22:41:04 +02:00
Daniel Markstedt
8ec5b53b28
Bump the Web UI requests lib to 2.28.1 (#938) 2022-10-24 12:53:50 -07:00
Daniel Markstedt
1da3caf568
Bump to the latest bjoern/Flask/Jinja2; click/itsdangerous/MarkupSafe are implicit dependencies of the above so removing explicit requirements. (#935) 2022-10-24 11:50:35 -07:00
dependabot[bot]
db2c542c97
Bump protobuf from 3.20.1 to 3.20.2 in /python/web (#933)
* Bump protobuf from 3.20.1 to 3.20.2 in /python/web

Bumps [protobuf](https://github.com/protocolbuffers/protobuf) from 3.20.1 to 3.20.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/generate_changelog.py)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.20.1...v3.20.2)

---
updated-dependencies:
- dependency-name: protobuf
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-23 19:06:23 -07:00
Daniel Markstedt
5172d167e7
Web UI: More file path sanitation, better network bridge warnings, each endpoint return one message (#932)
- Sanitize file paths with Path: for flat file structures, always extract Path().name, and for nested file structures either look for absolute paths, or someone trying to use ".." to traverse the dir strucutre.
- Reduce redundancy in network bridge detection method, and return somewhat more informative messages
- Make all endpoints return exactly one message
- Move some warning messages to logging
- Use tempfile for iso generation temp file handling
2022-10-23 19:05:29 -07:00
Uwe Seimet
f3553c5480
Resolved issues 772, 827, 909; added numerous unit tests; code cleanup (#915)
* Resolved issues 772, 827, 909

* Added numerous unit tests

* Code cleanup

* Improved type safety by using PbDeviceType instead of string

* Do not flush cache on failed STOP UNIT

* Error message and error handling updates

* Removed duplicate code

* Use map for mapping shift counts

* Reject read/write access if the drive has 0 sectors

* Updated logging configuration for tests
2022-10-23 21:51:39 +02:00
nucleogenic
198c10f70a
Enable web UI auth for test environment (#931) 2022-10-22 09:49:46 -07:00
Daniel Markstedt
e3e833b4d2
Fix one case of Path object conversion that was missed during the refactoring (#929) 2022-10-22 08:01:08 -07:00
Daniel Markstedt
ade656e38b
Break out frontend and backend auth options into stand alone options (#925)
* Break out frontend and backend auth options into stand alone options

* Improve the token auth checks when installing clients
2022-10-21 19:49:53 -07:00
Tony Kuker
99a1c7cdbc Update version for next development version 2022-10-21 22:44:31 +01:00
Tony Kuker
5768827af8 Update revision number for release 2022-10-21 22:43:03 +01:00
Daniel Markstedt
64a6d46bee
Merge pull request #920 from akuker/rdmark-file-dir-descriptive-names
Descriptive names for file transfer target dirs
2022-10-19 21:21:57 -07:00
Daniel Markstedt
efd40ceab2 Descriptive names for file transfer target dirs 2022-10-19 19:31:59 -07:00
Daniel Markstedt
926b6c4faa
Remove empty docs dir (#918) 2022-10-18 19:28:39 -05:00
Daniel Markstedt
ac39b3b8a3
Netatalk: Prompt user when pre-existing config is found; Append the images dir as a shared volume (#916)
* Prompt the user before continuing with installation when Netatalk config dir is detected

* Add Netatalk with images dir sharing as an experimental feature
2022-10-17 17:42:49 -07:00
Daniel Markstedt
afcb1534e6
Merge pull request #914 from akuker/rdmark-suppress-warning
Web UI: Change locale fallback message log level to 'info'
2022-10-15 08:13:39 -07:00
Daniel Markstedt
aed793001d Change locale fallback to info logging 2022-10-14 19:39:32 -07:00