fix(System Info): add chassis serial#2629
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe system information script now retrieves chassis details via dmidecode, stores them in a new ChangesChassis Information Display
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
🔧 PR Test Plugin AvailableA test plugin has been generated for this PR that includes the modified files. Version: 📥 Installation Instructions:Install via Unraid Web UI:
Alternative: Direct Download
|
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
emhttp/plugins/dynamix/scripts/system_information
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.
Summary by CodeRabbit