Commit Graph

925 Commits

Author SHA1 Message Date
Tony Kuker
d30a54f843 Address sonarcloud issues 2022-10-23 12:36:07 -05:00
Tony Kuker
0fac33c610 Fixed issue with ownership of bus object 2022-10-23 12:08:45 -05:00
Tony Kuker
fe3cc9c7be add debug config for rascsi_test 2022-10-22 20:09:42 -05:00
Tony Kuker
5414557ab5 fix compilation errors 2022-10-22 20:08:14 -05:00
Tony Kuker
e27ebb4962 initial clang format configuration 2022-10-22 17:30:43 -05:00
Tony Kuker
61667f749c run clang-format 2022-10-22 17:30:28 -05:00
Tony Kuker
44d4da2855 ignore astyle temporary files 2022-10-22 16:36:20 -05:00
Tony Kuker
ce21f70178 ran astyle 2022-10-22 16:34:22 -05:00
RaSCSI User
9da944fb3b changed several managers to pointers instead of references 2022-10-22 22:14:00 +01:00
RaSCSI User
8d70bb08ab correct select poll logic 2022-10-22 20:44:47 +01:00
RaSCSI User
5152b3bfd9 missing close() 2022-10-22 20:17:56 +01:00
RaSCSI User
89da050a90 add trace 2022-10-22 20:17:42 +01:00
RaSCSI User
8dbbfde597 remove double initialization 2022-10-22 20:17:24 +01:00
RaSCSI User
c8338e657e Need to initialize sbc_version class 2022-10-22 04:49:35 +01:00
Tony Kuker
5138f81324 fix compiler errors 2022-10-21 21:40:28 -05:00
Tony Kuker
7d3f7e555f Start to merge raspberry pi only changes 2022-10-21 21:06:18 -05: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
nucleogenic
6514e24770
Docker container for Pytest (#901)
* Dockerize Pytest

* Fix auto-delete warning in delete file test

* Allow tests to be executed with a non-default home dir

* Use hostname for Docker container only if tests executed in Docker

* Update container entrypoint to pytest

* Re-format tests with black

* Define if the execution environment is a Docker container in env fixture

* Skip unsupported host bridge attachment test in Docker
2022-10-14 19:30:08 -07:00
Daniel Markstedt
a8ac6a06cf
Fix a web UI integration test (#912)
Fix an integration test that hadn't been updated after the refactoring
2022-10-14 09:12:57 -07:00
Uwe Seimet
0c8d54f055
Fixed validation of full (absolute) filename (#910)
* Fixed validation of full (absolute) filename

* Added missing CR/LF in rasctl output
2022-10-12 22:10:56 +02:00
Daniel Markstedt
5a679509a1
More refactoring of Python code to address Sonar issues (#906)
- Use Path objects for file operations
- Use urllib to sanitize URLs
- Some explicit type conversions
- Consistent regex syntax
- Add rudimentary logging when archive extraction caching fails
- Fixed two cases of the property file creation not being notified in the Flash message
- added doctype and html lang attribute to the web server 502 page
2022-10-12 12:59:01 -07:00
Uwe Seimet
dede2a6f35
Fix logging for Data Out phase, fixed offset (#907)
Fixed issues found while testing for release 22.10
2022-10-11 17:04:17 +02:00
n4al
d6153e9647
Updating Spanish translation (#902)
* Updating Spanish translation

* Removing unused translations
2022-10-10 08:54:27 -07:00
Uwe Seimet
4e4c5b205a
Bugfix: MODE SELECT for format page is incorrect (issue #818) (#899)
* Fix issue with MODE SELECT (#818)

* Replaced strncpy because it was causing a compilation issue
2022-10-10 08:16:47 +02:00
Daniel Markstedt
ccdb51b727
Merge pull request #905 from akuker/rdmark-swedish-22101
Update Swedish translations 2022-10
2022-10-09 16:38:50 -07:00
Daniel Markstedt
e8c3deea2f Update translations 2022-10-09 16:18:17 -07:00
Daniel Markstedt
1b10b123d2
Refactor python code to address Sonarcloud issues (#900)
- copy/move/delete file class methods now take Path objects as arguments
- The file download endpoint in the Web UI uses the safer download from dir method
- Simplified logging
- Merged nested if statements
- Removed naked handling of unknown error states
- Added fallback empty list for drive_properties, to avoid errors when json file is missing or broken
- Move drive_properties to env[]
- Constants for common error messages
- Dummy variable for list comprehension
2022-10-09 13:50:20 -07:00
Uwe Seimet
ca23d9b7a3
Merged FileSupport into Disk, improved granularity, more unit tests, code cleanup (#897)
* Merged FileSupport into Disk

* Improved code granularity

* Made classes previously directly writing to cout testable

* Added numerous unit tests

* Fixed minor issues uncovered by unit tests
 
* Fixed SonarCloud issues

* Replaced remaining proprietary data types (WORD/DWORD) except for files in hal/
2022-10-08 19:26:04 +02:00
Daniel Markstedt
62e287c96d
Remove redundant help text, table columns and parameters from the Web UI (#898)
- Remove the Size option from the Drives page, since we offer custom sizes with Drive profiles now in the Create Image form
- Fetch size from drive props data structure rather than the web form
- Remove a range of redundant / obvious help text to reduce UI clutter and emphasize the important help text
- Remove the Size column from the CD-ROM drives table since it's always N/A
- Merge the two Logging related sections, and the two Create Image related sections (semantically associated)
2022-10-07 19:55:53 -07:00
Daniel Markstedt
d1a703418c
Address Sonarcloud issues for the html code; improve on css styles (#892)
Refactor and clean up code to conform to SonarCloud static analysis, improve readability and semantics.
- Add labels for each form input, and tweak placeholder text accordingly.
- Move CSS styles to the stylesheet; minor tweaks for clarity and consistency
- Use the legacy align=center attribute for centering paragraphs (backwards compatible)
- Remove all instances of using tables for layout
- Add header tags to all remaining tables, with scope parameters.
- Add descriptions to each table
- Move drive reference hyperlinks to the drive name column (addresses "same link text leads to different URL" code smell.)
- Inject lang parameters to each html tag
- Standardize on h2 tags as top header for each template
- Add 'json' to config file UI elements, to communicate actual file name/format
- Clean up indentation
- Dropbox styling: Added a colored outline, added padding to more clearly communicate its function. Hid the (X) SVG that indicates failure, since failure is already communicated by the error text. Also, the SVG always obstructed the file name or error so was quite counter-productive.
2022-10-07 13:13:29 -07:00
Daniel Markstedt
90ace5fd53
Introduce utility method to look up drive props by drive name. (#888)
* Introduce utility method to look up drive props by drive name.

* Make /drive/create endpoint fetch file ending from properties data structure; update tests
2022-10-06 14:04:41 -07:00
Daniel Markstedt
52ebb3a2ae
Improve the logic and data structure for SCSI ID management in Web UI (#893)
- Have the get_scsi_ids() utility method return a dict, while adding occupied_ids. Leverage this to improve the logic for detecting which IDs are available to be reserved in the Web UI. (Which fixes a recent regression bug that's causing no IDs to be detected as available to be reserved.)
- Improve /scsi/attach endpoint logic to capture dynamic parameter fields now prefixed with "param_" (previous it scanned for any arbitrary field, which wasn't very accurate or secure)
- Added Product string to the block_size:512 CD-ROM device, so that it's obvious when it's being used.
- Tweaked test data for attach_device tests
2022-10-06 10:00:57 -07:00
Uwe Seimet
a30438279e
Moved rascsi/rasctl specific classes to sub-folders, cleaned up code, fixed SonarCloud issues (#889)
* Moved rasctl/rascsi core code to folders

* Improved granularity in order to add more unit tests

* Pointer handling update

* Updated ID and controller handling

* Updated memory management

* Added unit tests

* Fixed SonarCloud issues
2022-10-06 16:15:19 +02:00
Daniel Markstedt
52259c374f
Improve the logic for checking the network bridge configuration (#894)
* Improve the logic for checking the network bridge configuration
2022-10-05 14:14:48 -07:00
Uwe Seimet
efbfb54d26
More unit tests, replacement of raw pointers and C arrays, separation of concerns (#878)
* Added unit tests

* Fixed SonarCloud issues

* Updated error handling

* Updated deletion of controllers

* Image folder handling cleanup

* Fixed clang warning

* Removed duplicate code

* Reduced code complexity

* Updated array handling

* Initialize device with ID and LUN

* Use smart pointers

* Updated memory management

* Logging updates

* Extracted methods

* Split scsi.h
2022-10-04 17:23:42 +02:00
Daniel Markstedt
0e4d42f04c
Use man2html to generate man pages in the Web UI (#887)
* Use man2html to generate man pages in the web UI

* Fix tests
2022-10-04 06:38:15 -07:00
Daniel Markstedt
402a1ba380
Fix corruption in manpage; remove sasidump references (#886)
* Fix corruption in manpage

* Remove sasidump references
2022-10-04 10:08:23 +02:00
Daniel Markstedt
dcb4b33f2e
Add capabilities to get and render manpage output in the Web UI (#881)
- class method to get arbitrary file contents
- new web UI endpoint to fetch the contents of rascsi man pages (rendered txt files)
- Link to manpage in page footer
- Link to new wiki page for image type docs
- Other UI tweaks
2022-10-03 12:46:18 -07:00
Daniel Markstedt
fd47411322
Device table refinement in Web UI (#884)
* Refine the attached device table to optimize information displayed

* Error handling when attempting to insert withough image file

* Format the parameters in the jinja template instead

* Call the DaynaPORT device Ethernet Adapter in the Web UI
2022-10-03 11:47:08 -07:00
Daniel Markstedt
c80953e0a4
Updated man page txts after running make docs (#885) 2022-10-03 20:35:19 +02:00
Daniel Markstedt
2dae021cdd
Merge pull request #883 from akuker/rdmark-generalize-properties
Allow for generating properties files in the Create Image UI
2022-10-02 09:49:49 -07:00
Daniel Markstedt
5e4fa38051
Add missing watchdog requirement (#880) 2022-10-02 15:30:28 +02:00
Daniel Markstedt
c231541bb4
Manpage improvements (#882)
* Capitalization of description paragraph

* Flesh out descriptions of disk image types

* Remove redundant word
2022-10-02 15:29:22 +02:00