Skip to content

fix(System Info): add chassis serial#2629

Open
SimonFair wants to merge 2 commits intounraid:masterfrom
SimonFair:7.3-VM-Fix
Open

fix(System Info): add chassis serial#2629
SimonFair wants to merge 2 commits intounraid:masterfrom
SimonFair:7.3-VM-Fix

Conversation

@SimonFair
Copy link
Copy Markdown
Contributor

@SimonFair SimonFair commented May 6, 2026

Add support to show chassis serial numbers. Serial number must have a least one number, this is to stop unset values showing like Default String.

image

Summary by CodeRabbit

  • New Features
    • System information panel now shows chassis serial number when available. The serial is displayed with an "s/n" label and appears only if a valid serial (containing digits) is present.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c06cfca5-b716-4642-9489-74b3e2df4d23

📥 Commits

Reviewing files that changed from the base of the PR and between 559e1c8 and d8a6390.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix/scripts/system_information

Walkthrough

The system information script now retrieves chassis details via dmidecode, stores them in a new $chassis variable, formats a chassis serial number with an "s/n" prefix when present, and conditionally renders a table row showing the chassis serial number only if it contains digits. (47 words)

Changes

Chassis Information Display

Layer / File(s) Summary
Data Retrieval
emhttp/plugins/dynamix/scripts/system_information
Add retrieval of chassis details into $chassis via dmidecode('Chassis Information',3,0).
Format & Initialize
emhttp/plugins/dynamix/scripts/system_information
Initialize/format $chassis['Serial Number'] with an s/n prefix when a serial value is present.
UI Integration
emhttp/plugins/dynamix/scripts/system_information
Insert conditional HTML table row to display the Chassis serial number only when $chassis['Serial Number'] contains a digit.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 I dug through DMI’s quiet ground,
Found chassis names and numbers sound,
I stitched an "s/n" so neat and small,
Now panels show what I did scrawl,
Hopping off — the info stands tall. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly references the main change - adding chassis serial number display to the System Info panel, which matches the changeset's core functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🔧 PR Test Plugin Available

A test plugin has been generated for this PR that includes the modified files.

Version: 2026.05.06.0757
Build: View Workflow Run

📥 Installation Instructions:

Install via Unraid Web UI:

  1. Go to Plugins → Install Plugin
  2. Copy and paste this URL:
https://preview.dl.unraid.net/pr-plugins/pr-2629/webgui-pr-2629.plg
  1. Click Install

Alternative: Direct Download

⚠️ Important Notes:

  • Testing only: This plugin is for testing PR changes
  • Backup included: Original files are automatically backed up
  • Easy removal: Files are restored when plugin is removed
  • Conflicts: Remove this plugin before installing production updates
  • Post-merge behavior: This preview stays available after merge until preview storage expires or it is manually cleaned up

📝 Modified Files:

Click to expand file list
emhttp/plugins/dynamix/scripts/system_information

🔄 To Remove:

Navigate to Plugins → Installed Plugins and remove webgui-pr-2629, or run:

plugin remove webgui-pr-2629

🤖 This comment is automatically generated and will be updated with each new push to this PR.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@emhttp/plugins/dynamix/scripts/system_information`:
- Line 168: The chassis serial is rendered raw as <?=$chassis['Serial Number']?>
in system_information; replace the direct output with an HTML-escaped version of
$chassis['Serial Number'] (use PHP's htmlspecialchars with ENT_QUOTES and a
UTF-8 charset or the project's standard escaping helper) so any DMI-derived
content is properly encoded before insertion into the <td>.
- Line 167: The conditional that displays chassis serial currently requires a
digit check (preg_match('/\d/',$chassis['Serial Number'])) which hides valid
alphabetic serials; update the conditional around $chassis['Serial Number'] (the
if that contains preg_match) to only test for a non-empty value (e.g., use
!empty or a trimmed non-empty check) so any non-empty serial, including
alphabetic-only strings, is shown.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a7d34dc5-98d3-444c-8afd-847f3773b175

📥 Commits

Reviewing files that changed from the base of the PR and between c72475e and 559e1c8.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix/scripts/system_information

Comment thread emhttp/plugins/dynamix/scripts/system_information
Comment thread emhttp/plugins/dynamix/scripts/system_information Outdated
@SimonFair SimonFair added the 7.3 label May 6, 2026
@SimonFair SimonFair marked this pull request as ready for review May 6, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant