mirror of
https://github.com/akuker/RASCSI.git
synced 2026-04-19 03:25:25 +00:00
Introduce info.html template and use it to render detailed info (#863)
new: - new templates to render structured info contents in - get_diskinfo() class method that calls disktype and returns the results - /diskinfo endpoint in the Flask app that renders the results from get_diskinfo() changed: - /logs/show and /scsi/info endpoints in the Flask app render in templates - Now using the "RaSCSI Reloaded Control Page" header to function as the link back to the homepage (instead of the github project) which is in line with how most webapps work - Removed the center style for "Attached!" to allow the ? button to be placed on the same line - Remove individual device info, and introduced show all device info in a template
This commit is contained in:
@@ -161,7 +161,21 @@ class SysCmds:
|
||||
process = run(
|
||||
["journalctl"] + line_param + scope_param,
|
||||
capture_output=True,
|
||||
check=True,
|
||||
)
|
||||
if process.returncode == 0:
|
||||
return process.returncode, process.stdout.decode("utf-8")
|
||||
|
||||
return process.returncode, process.stderr.decode("utf-8")
|
||||
|
||||
@staticmethod
|
||||
def get_diskinfo(file_path):
|
||||
"""
|
||||
Takes (str) file_path path to image file to inspect.
|
||||
Returns either the disktype output, or the stderr output.
|
||||
"""
|
||||
process = run(
|
||||
["disktype", file_path],
|
||||
capture_output=True,
|
||||
)
|
||||
if process.returncode == 0:
|
||||
return process.returncode, process.stdout.decode("utf-8")
|
||||
|
||||
Reference in New Issue
Block a user