Commit Graph

967 Commits

Author SHA1 Message Date
Daniel Markstedt
2354b62f43
Introduce FTP server option; sundry bug fixes (#1028)
* Add script to install ftp server

* Grep only the first ip address to avoid capturing the docker ip address

* Consistently use --assume-yes and --no-install-recommends with apt-get

* Capture corner case where both rascsi and piscsi groups exist

* Add CI/CD dependency of easyinstall.sh

* Update the run choices
2022-12-09 21:00:31 -08:00
Daniel Markstedt
ce6bc79b2c
Post rebranding tweaks to web ui (#1027)
- Add a label to system name, and modify the style sheet to hide it in the modern theme
- Restore the Control Page subtitle, and hide it on small screens
- Tweak some wordings and help text
2022-12-09 20:34:46 -08:00
akuker
5b3626dcf5
SCSI Dump Usability Enhancements & Cleanup (#1026)
Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-12-09 09:50:45 -06:00
Daniel Markstedt
35447cc1c6
Migrate rascsi data to piscsi with easyinstall (#1021)
Hybrid approach of:
- Always checking for legacy services for each workflow that involves installing new services, then disable and rename them.
- Check for the rascsi group, as well as old rascsi.conf, rascsi_bridge, config dir and secret file inline whenever the script interacts with them, then rename them.
- Check for the old self signed cert and key, as well as compiled protobuf libs, and delete them when the web ui is installed

Also fixed:
- the old manpage renaming script which should keep the old 'rascsi' names.
- removed the ancient apache cleanup, since it's been over 2 years now since the PHP webapp was deprecated.
- general purpose stop/disable/status functions for systemd services
- general purpose deleteFile function
- default to half of the max no. of cores for compiling
- use the SKIP_PACKAGES flag in more functions
- introduce a SKIP_MAKE_CLEAN flag
2022-12-07 10:59:15 -08:00
akuker
09ba19a24f
Optimize setting the data gpio bits (#1022)
Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-12-07 11:09:30 -06:00
Daniel Markstedt
52c2aa474f
Rebrand project to PiSCSI (#1016)
* Rebrand project to PiSCSI
- rascsi ->piscsi
- rasctl -> scsictl
- rasdump -> scsidump
- ras* -> piscsi* (rasutil -> piscsi_util, etc.)

* Refined the formatting and wording of the app startup banner
* Kept some references to rascsi and rasctl where backwards compatibility is concerned
* Point to the new github repo URL

Co-authored-by: nucleogenic <nr@nucleogenic.com>
Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
2022-12-05 09:58:23 -08:00
akuker
12068cafb8
Reliability fix for Banana Pi M2+ (#1014) Also incremented version number
Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-12-04 11:55:38 -06:00
nucleogenic
88ff542aeb
Run web API test suite in GitHub Actions (#1009)
- Fixed ignore patterns in .dockerignore
- Added healthchecks to backend and web containers
- Reduced Docker image sizes
- Removed RaSCSI references in various areas (e.g. rascsi -> backend)
- Added compilation-only step to easyinstall.sh
- Moved apt package lists to variables
- Revert to triggering GitHub Actions runs on push
- Updated web/frontend_checks workflow to run black and flake8 against all Python sources
- Capture log files from backend/web containers
- Fix None to float conversion bug when user agent is absent or unrecognised
2022-12-04 14:31:57 +00:00
akuker
eca8145311
Add debug build to github workflows #1012 (#1015)
#1012 Add debug build and gamernium/aibom builds
2022-12-03 22:40:19 -06:00
akuker
eb71c31cf1
Initial merge of (incomplete) Banana Pi updates (#993) 2022-12-02 22:20:27 -06:00
akuker
a403ec3ded
Moved hw directory to its own repository (#1011) 2022-12-01 19:20:52 -06:00
nucleogenic
315ef9f248
Auto-format Python sources with black, fix all issues reported by flake8 (#1010)
* Update config for black and flake8
* Auto-format Python sources with black
* Fix issues reported by flake8
* Exclude protobuf files from black
* Address formatting feedback
2022-11-30 05:19:17 +00:00
Daniel Markstedt
5afc6b911f
Remove Jinja extentions that are now built in (#1008) 2022-11-28 13:05:19 -08:00
dependabot[bot]
dd94dd8c85
Bump pillow from 9.0.1 to 9.3.0 in /python/ctrlboard (#1005)
* Bump pillow from 9.0.1 to 9.3.0 in /python/ctrlboard

Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.0.1 to 9.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.0.1...9.3.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-24 09:28:09 -08:00
Daniel Markstedt
88b5a1d314
OLED: Refresh network state regularly (#1002)
- counter for refreshing network status, currently set at 10 ticks (10s with the default refresh interval)
- adding a --refresh_interval option to control the overall screen refresh rate, keeping 1000ms as the default
- Restore a 'No Media' status message for RM devices that was lost with the last PR
2022-11-23 22:27:10 -08:00
nucleogenic
aa3e36d311
Revert to triggering C++ GHA workflows on push (#1003) 2022-11-22 15:42:02 +00:00
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