Skip to content

Service management enhancements and other fixes#2025

Merged
limetech merged 16 commits into
unraid:masterfrom
bergware:master
Feb 17, 2025
Merged

Service management enhancements and other fixes#2025
limetech merged 16 commits into
unraid:masterfrom
bergware:master

Conversation

@bergware

@bergware bergware commented Feb 16, 2025

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Introduced delayed execution and enhanced job scheduling for smoother and more predictable service reloads.
    • Improved SSH and TELNET management with dynamic port checks and automated restarts for increased connectivity stability.
    • Streamlined network configuration, simplifying updates and ensuring more consistent system operation.
    • Enhanced error handling during Nginx reload process for better service reliability.
    • Updated form submission to shift from service reload to update action for improved functionality.
    • Added user warnings for the wlan0 interface to improve VM network configuration awareness.
    • Enhanced styling for form elements related to WLAN information for better user experience.
    • Improved input field styling within alerts for a more polished appearance.
    • Added new CSS rules for input fields to enhance overall styling consistency across various themes.

- restart ssh daemon only when changes are present
- restart telnet daemon only when changes are present
Put update requests in a job queue and replace the job queue when new update requests are presented within the scheduled wait time
This approach makes only the last update request running
New log entries are provided to follow execution of the jobs
@coderabbitai

coderabbitai Bot commented Feb 16, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The changes modify several service management scripts by refining control flow and error handling. The reload_services and update_services scripts now manage queued jobs using the at command by checking, removing, and re-scheduling jobs with delays. The update_access script has been updated to streamline SSH and TELNET configuration and management, while wireless has a minor adjustment in its service update command. The create_network_ini script removes DNS data collection and now calls the update service with a fixed delay. Additionally, the rc.nginx script enhances error handling during the reload process.

Changes

File(s) Change Summary
emhttp/.../reload_services Removed the command-line argument file check; added delayed execution with sleep; introduced job management using at and atrm with logging; service loop executes only if a queued job is found and removed.
emhttp/.../update_access Streamlined configuration file check; enhanced SSH port update by comparing current vs. desired ports; added logic to start/restart SSH daemon based on port changes; refined TELNET service handling including inetd configuration update; updated related variables (SSHD, CONF, INET, SERV).
emhttp/.../update_services Switched from removing a lock file to checking for existing queued jobs with atq; removes any existing job using atrm and logs the removal; schedules a new job to reload services with a given delay, logging the new job ID.
emhttp/.../wireless Adjusted the command execution by removing a parameter from the update_services command within a specific conditional block.
sbin/create_network_ini Removed the DATA variable and the associated DNS data collection and curl command; now directly calls update_services with a fixed delay; uses the $SYS variable to check network interfaces instead of hardcoded paths.
etc/rc.d/rc.nginx Introduced a new variable SYSLOG for syslog path; modified nginx_reload function to change sleep duration and added error handling for binding failures in syslog.
emhttp/.../NetworkExtra.page Changed hidden input command from reload_services to update_services in the form submission.
emhttp/.../Custom.form.php Added a warning message for the wlan0 interface; introduced wlan0_info() function for displaying configuration requirements.
emhttp/.../AddVM.css Added new styles for input.wlan0_info, span.ipvtap, and div.wlan0.
emhttp/.../UpdateVM.css Expanded styles for input#btnvCPUSelect to include input.wlan0_info; added styles for span.ipvtap and div.wlan0.
emhttp/.../Eth0.css Added new CSS rule for .sweet-alert fieldset input[type=text] to enhance input field styling.
emhttp/.../jquery.sweetalert.css Modified selector from .sweet-alert fieldset input[type=text] to .sweet-alert input[type=text] to broaden input field styling scope.

Sequence Diagram(s)

sequenceDiagram
    participant Script as Service Script
    participant Scheduler as "at Queue"
    participant Logger as Log System
    participant ServiceLoop as "Service Loop (rpc, nfsd, ...)"

    Script->>Scheduler: Check for existing job (atq)
    alt Job exists
        Scheduler-->>Script: Return Job ID
        Script->>Scheduler: Remove job (atrm)
        Script->>Logger: Log job removal
        Script->>ServiceLoop: Execute service reload loop
    else No job found
        Script->>Logger: Log no job found and exit
    end
    Script->>Scheduler: Schedule new job with fixed delay
    Script->>Logger: Log new job ID and wait time
Loading
sequenceDiagram
    participant UA as update_access Script
    participant Config as Config File (/boot/config/ident.cfg)
    participant SSHD as SSH Daemon
    participant TELNET as inetd Service

    UA->>Config: Read current SSH port
    alt Current port ≠ Desired port
        UA->>Config: Update SSH configuration
        UA->>SSHD: Check SSH process (pgrep)
        alt SSH not running
            UA->>SSHD: Start SSH daemon
        else SSH running but changed port
            UA->>SSHD: Restart SSH daemon
        end
    else
        UA->>SSHD: No action needed
    end
    UA->>Config: Read inetd configuration for TELNET
    alt TELNET configuration change needed
        UA->>TELNET: Update inetd config (enable/disable)
        UA->>TELNET: Restart inetd service
    else
        UA->>TELNET: No action taken
    end
Loading

Poem

In my burrow of code I hop with delight,
Queued tasks tamed in the soft moonlight.
SSH and TELNET now sing in tune,
With updates that dance like a hop and a croon.
My rabbit heart leaps at each new line—
A code adventure wonderfully fine! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e907c3e and 1d724bb.

📒 Files selected for processing (7)
  • emhttp/plugins/dynamix/sheets/Eth0-azure.css (1 hunks)
  • emhttp/plugins/dynamix/sheets/Eth0-black.css (1 hunks)
  • emhttp/plugins/dynamix/sheets/Eth0-gray.css (1 hunks)
  • emhttp/plugins/dynamix/sheets/Eth0-white.css (1 hunks)
  • emhttp/plugins/dynamix/sheets/Eth0.css (1 hunks)
  • emhttp/plugins/dynamix/styles/Eth0-black.css (0 hunks)
  • emhttp/plugins/dynamix/styles/Eth0-white.css (0 hunks)
💤 Files with no reviewable changes (2)
  • emhttp/plugins/dynamix/styles/Eth0-white.css
  • emhttp/plugins/dynamix/styles/Eth0-black.css
✅ Files skipped from review due to trivial changes (4)
  • emhttp/plugins/dynamix/sheets/Eth0-white.css
  • emhttp/plugins/dynamix/sheets/Eth0-azure.css
  • emhttp/plugins/dynamix/sheets/Eth0-black.css
  • emhttp/plugins/dynamix/sheets/Eth0-gray.css
🚧 Files skipped from review as they are similar to previous changes (1)
  • emhttp/plugins/dynamix/sheets/Eth0.css

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
emhttp/plugins/dynamix/scripts/update_services (1)

14-15: Consider adding error handling for the at command.

While the implementation works, it silently ignores at command failures. Consider checking its exit status and logging any errors.

-echo "/usr/local/emhttp/webGui/scripts/reload_services ${1:-1}" | at -M now 2>/dev/null
-log "queue new job $(atq | grep -Pom1 '^\d+'), wait for ${1:-1}s"
+if ! NEW_JOB=$(echo "/usr/local/emhttp/webGui/scripts/reload_services ${1:-1}" | at -M now 2>&1); then
+  log "failed to queue new job: $NEW_JOB"
+  exit 1
+fi
+JOB_ID=$(atq | grep -Pom1 '^\d+')
+log "queue new job $JOB_ID, wait for ${1:-1}s"
emhttp/plugins/dynamix/scripts/reload_services (2)

4-5: Consider using a more precise sleep duration.

The sleep duration uses a default of 1 second, but floating-point values could provide more precise control if needed.

-sleep ${1:-1}
+sleep ${1:-1.0}

10-16: Consider logging when exiting due to no queued job.

The script silently exits when no job is found. Consider logging this case for better observability.

 if [[ -n $JOB ]]; then
   atrm $JOB 2>/dev/null
   log "execute queued job $JOB"
 else
+  log "no queued job found, exiting"
   exit 0
 fi
emhttp/plugins/dynamix/scripts/update_access (3)

9-9: Consider adding error handling for configuration loading.

The script silently continues if the configuration file exists but has syntax errors.

-[[ -e /boot/config/ident.cfg ]] && . <(/usr/bin/fromdos </boot/config/ident.cfg)
+if [[ -e /boot/config/ident.cfg ]]; then
+  if ! . <(/usr/bin/fromdos </boot/config/ident.cfg); then
+    echo "Error loading configuration file"
+    exit 1
+  fi
+fi

29-40: Consider adding error handling for SSH service operations.

The implementation should handle potential failures when starting/stopping the SSH daemon.

 if [[ $USE_SSH == yes ]]; then
   if [[ ! $(pgrep --ns $$ -cf $SSHD) -gt 0 ]]; then
-    /etc/rc.d/rc.sshd start
+    if ! /etc/rc.d/rc.sshd start; then
+      echo "Failed to start SSH daemon"
+      exit 1
+    fi
   else
     [[ $PORTSSH != $CURRENT ]] && /etc/rc.d/rc.sshd restart
   fi
 elif [[ $(pgrep --ns $$ -cf $SSHD) -gt 0 ]]; then
-  /etc/rc.d/rc.sshd stop
+  if ! /etc/rc.d/rc.sshd stop; then
+    echo "Failed to stop SSH daemon"
+    exit 1
+  fi
 fi

54-67: Consider adding error handling for inetd service operations.

The implementation should handle potential failures when restarting the inetd service.

 if  [[ $USE_TELNET == yes ]]; then
   if [[ -n $(grep -o '^#telnet' $INET) ]]; then
     sed -ri "s/^#(telnet\s.+telnetd\$)/\1/" $INET
-    /etc/rc.d/rc.inetd restart
+    if ! /etc/rc.d/rc.inetd restart; then
+      echo "Failed to restart inetd service"
+      exit 1
+    fi
   elif [[ $PORTTELNET != $CURRENT ]]; then
-    /etc/rc.d/rc.inetd restart
+    if ! /etc/rc.d/rc.inetd restart; then
+      echo "Failed to restart inetd service"
+      exit 1
+    fi
   fi
 elif [[ -n $(grep -o '^telnet' $INET) ]]; then
   sed -ri 's/^(telnet\s.+telnetd$)/#\1/' $INET
-  /etc/rc.d/rc.inetd restart
+  if ! /etc/rc.d/rc.inetd restart; then
+    echo "Failed to restart inetd service"
+    exit 1
+  fi
 fi
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9126eb4 and 199c502.

📒 Files selected for processing (5)
  • emhttp/plugins/dynamix/scripts/reload_services (1 hunks)
  • emhttp/plugins/dynamix/scripts/update_access (3 hunks)
  • emhttp/plugins/dynamix/scripts/update_services (1 hunks)
  • emhttp/plugins/dynamix/scripts/wireless (1 hunks)
  • sbin/create_network_ini (2 hunks)
🔇 Additional comments (8)
emhttp/plugins/dynamix/scripts/update_services (1)

6-12: LGTM! Improved job management with proper cleanup.

The implementation correctly handles existing jobs by checking and removing them before scheduling new ones, preventing job accumulation.

emhttp/plugins/dynamix/scripts/wireless (1)

30-30:

Details

❓ Verification inconclusive

Verify if removing the delay parameter is intentional.

The delay parameter has been removed from the update_services call. This might affect the timing of service updates when stopping wireless. Consider if this change aligns with the intended behavior.


🏁 Script executed:

#!/bin/bash
# Description: Check if other scripts in the codebase use update_services with or without delay

# Search for update_services usage patterns
rg -A 2 "update_services" --type php --type bash

Length of output: 77


Action Required: Confirm Delay Parameter Removal

Please verify that the removal of the delay parameter in the call to update_services (file: emhttp/plugins/dynamix/scripts/wireless, line 30) was intentional, as this change might affect the timing of service updates when stopping wireless. A previous search for other usages of update_services with a delay argument did not yield clear results (note: the initial command using --type bash failed, so please manually inspect or re-run the search using the appropriate file types, e.g., --type sh). If the change is deliberate, consider updating comments or documentation to clarify this altered behavior.

emhttp/plugins/dynamix/scripts/update_access (3)

3-6: LGTM! Clear variable declarations.

The variables are well-named and their purposes are clear from the context.


19-26: LGTM! Improved SSH port configuration.

The implementation correctly handles port changes and maintains default port configuration.


50-51: LGTM! Improved TELNET port configuration.

The implementation correctly handles port changes in the services file.

sbin/create_network_ini (3)

17-17: LGTM! Good practice using a variable for system paths.

Using $SYS to store the path to network interfaces improves maintainability and follows best practices by avoiding hardcoded paths.


211-211: Verify if the fixed 20-second delay is appropriate.

The script now uses a fixed 20-second delay instead of a variable delay. This might be:

  • Too long for systems that are ready sooner
  • Too short for systems that need more time to initialize

Consider making this delay configurable or determining it dynamically based on system state.


218-220: LGTM! Consistent use of $SYS variable for interface paths.

Good improvement using the $SYS variable consistently for checking network interfaces. This makes the code more maintainable and follows the DRY principle.

Also applies to: 225-225

This prevents  'access refused', which may happen when nginx gets initially started with no IP assignment.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
etc/rc.d/rc.nginx (2)

778-784: LGTM with minor suggestions for improvement.

The enhanced error handling for binding failures is a good addition. The automatic recovery using nginx_renew is particularly useful.

Consider these minor improvements:

  1. Extract the magic number '8' into a named constant
  2. Make the grep pattern more specific to avoid false positives
+readonly SYSLOG_LINES_TO_CHECK=8
+readonly BIND_ERROR_PATTERN='^.*nginx.*Address already in use.*$'
+
 nginx_reload(){
   # ...
-      if  tail -8 $SYSLOG | grep -qm1 'Address already in use'; then
+      if  tail -n $SYSLOG_LINES_TO_CHECK $SYSLOG | grep -qm1 "$BIND_ERROR_PATTERN"; then
   # ...

794-801: Add error handling and logging to the renewal process.

The nginx_renew function provides a robust recovery mechanism, but could benefit from error handling and logging.

 nginx_renew(){
+  log "Renewing $DAEMON configuration..."
   # stop unconditionally
   pkill -f $NGINX
+  nginx_waitfor_shutdown
   # rebuild configuration
   build_ssl
   # start unconditionally
-  $NGINX -c $CONF 2>/dev/null
+  if ! $NGINX -c $CONF 2>/dev/null; then
+    log "Failed to start $DAEMON during renewal"
+    return 1
+  fi
+  log "$DAEMON renewed successfully"
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 199c502 and 9852eaf.

📒 Files selected for processing (1)
  • etc/rc.d/rc.nginx (2 hunks)
🔇 Additional comments (1)
etc/rc.d/rc.nginx (1)

34-34: LGTM!

The SYSLOG variable is well-named and uses the standard system log path.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 714bdaf and c5ea90c.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix/NetworkExtra.page (1 hunks)

<form markdown="1" name="network_extra" method="POST" action="/update.php" target="progressFrame" onsubmit="return prepareText(this)">
<input type="hidden" name="#file" value="<?=$cfg?>">
<input type="hidden" name="#command" value="/webGui/scripts/reload_services">
<input type="hidden" name="#command" value="/webGui/scripts/update_services">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

LGTM! Verify dependent systems are updated.

The change to use update_services instead of reload_services is a good improvement, as it introduces better job management with proper handling of queued tasks.

Run this script to check for any other files that might still be using the old service:


🏁 Script executed:

#!/bin/bash
# Search for any remaining references to the old reload_services script
rg -l "reload_services" --type-add 'web:*.{php,page,htm,html}' -g '!NetworkExtra.page'

Length of output: 133


Heads Up: Verify Consistency in Service Scripts

While updating the hidden input in emhttp/plugins/dynamix/NetworkExtra.page to use /webGui/scripts/update_services is a solid improvement for better job management, our scan detected a reference to reload_services in the file emhttp/plugins/dynamix/scripts/update_services. Please review that file to confirm whether:

  • The reference to reload_services is intentional (e.g., for backward compatibility or logging purposes), or
  • It should be updated to align with the new command naming for consistency across the system.

Once verified, update as needed to ensure all dependent systems are synchronized with the change.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
emhttp/plugins/dynamix/scripts/reload_services (1)

10-16: Enhance job management robustness and documentation.

While the job management logic works, consider these improvements:

  1. Add error handling for atrm failures
  2. Add comments explaining the job management logic
  3. Consider logging when no job is found for better debugging
+# check and remove any queued reload job
 JOB=$(atq | grep -Pom1 '^\d+')
 if [[ -n $JOB ]]; then
-  atrm $JOB 2>/dev/null
+  if ! atrm $JOB 2>/dev/null; then
+    log "failed to remove job $JOB"
+    exit 1
+  fi
   log "execute queued job $JOB"
 else
+  log "no queued job found"
   exit 0
 fi
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5ea90c and 68ca314.

📒 Files selected for processing (1)
  • emhttp/plugins/dynamix/scripts/reload_services (1 hunks)
🔇 Additional comments (2)
emhttp/plugins/dynamix/scripts/reload_services (2)

4-6: LGTM! Good use of common functions.

Sourcing common run & log functions promotes code reuse and consistent logging across scripts.


7-9: LGTM! Well-implemented delay mechanism.

The configurable delay with a sensible default helps prevent race conditions. Good use of parameter expansion for the delay value.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🔭 Outside diff range comments (1)
emhttp/plugins/dynamix/scripts/reload_services (1)

22-24: 🛠️ Refactor suggestion

Enhance error handling and status reporting.

The current implementation suppresses all error output and doesn't check the status of service updates. Consider:

  1. Logging service update status for better observability
  2. Handling service update failures gracefully
 for cmd in $SERVICES; do
-  /etc/rc.d/rc.$cmd update &>/dev/null
+  if ! /etc/rc.d/rc.$cmd update 2>&1; then
+    log "Failed to update service: $cmd"
+  else
+    log "Successfully updated service: $cmd"
+  fi
 done
🧹 Nitpick comments (1)
emhttp/plugins/dynamix/scripts/reload_services (1)

11-20: Consider increasing the default sleep duration.

While the sleep duration is configurable, the default of 1 second might be too short for some services to properly shut down before being restarted. Consider increasing it to a more conservative value (e.g., 3-5 seconds) to ensure service stability.

-sleep ${1:-1}
+sleep ${1:-3}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 68ca314 and db4e9a1.

📒 Files selected for processing (3)
  • emhttp/plugins/dynamix/scripts/reload_services (1 hunks)
  • emhttp/plugins/dynamix/scripts/update_access (3 hunks)
  • emhttp/plugins/dynamix/scripts/update_services (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • emhttp/plugins/dynamix/scripts/update_services
  • emhttp/plugins/dynamix/scripts/update_access
🔇 Additional comments (2)
emhttp/plugins/dynamix/scripts/reload_services (2)

4-5: LGTM! Good practice for consistent logging.

Including the run & log functions from a shared source ensures consistent logging across the system.


7-9: LGTM! Efficient job ID extraction.

The queue() function efficiently extracts the first job ID using grep with appropriate flags and regex pattern.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
emhttp/plugins/dynamix.vm.manager/sheets/UpdateVM.css (1)

50-50: Enhance Font-Family Robustness for IPVTAP Span

The span.ipvtap rule sets the font to bitstream. For broader compatibility and a more robust design, consider specifying one or more fallback fonts (e.g., bitstream, sans-serif) so that if the primary font isn't available, the browser can use a fallback.

emhttp/plugins/dynamix.vm.manager/sheets/AddVM.css (1)

50-50: Specify Fallback Fonts for IPVTAP Span

For the span.ipvtap style, consider extending the font-family declaration to include fallback fonts (for example, bitstream, sans-serif). This change improves reliability in font rendering if the primary font isn’t installed.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 49d1e8e and 39c4cfa.

📒 Files selected for processing (3)
  • emhttp/plugins/dynamix.vm.manager/sheets/AddVM.css (1 hunks)
  • emhttp/plugins/dynamix.vm.manager/sheets/UpdateVM.css (1 hunks)
  • emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
🔇 Additional comments (4)
emhttp/plugins/dynamix.vm.manager/sheets/UpdateVM.css (2)

47-47: Consistent Styling for Input Elements

The combined selector for input#btnvCPUSelect, input.wlan0_info ensures that both elements share the same font size, padding, and margin, which promotes a consistent appearance. Verify that these identical styles are intended for both selectors.


53-53: Proper Alignment for WLAN Section

The new div.wlan0 rule setting text-align: left effectively aligns WLAN-related content as expected within the interface. This addition reinforces alignment consistency across the form.

emhttp/plugins/dynamix.vm.manager/sheets/AddVM.css (2)

47-47: Consistent Input Styling Across Forms

Adding input.wlan0_info alongside input#btnvCPUSelect ensures that both elements share uniform styling. This consistency is beneficial for maintaining a cohesive UI across different VM management forms.


51-51: WLAN Element Alignment

The newly introduced div.wlan0 rule sets text-align: left, which helps in aligning WLAN information correctly on the form. This aligns well with the updated UI requirements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
emhttp/plugins/dynamix/sheets/Eth0.css (1)

14-14: Clarify the Duplicate Styling Intent

The new rule for .sweet-alert fieldset input[type=text] in this file provides styling identical to the one for non-fieldset inputs in the other CSS file. Please confirm that this duplication is intentional (e.g., to handle cases where inputs are wrapped in a fieldset with potentially different behavior) and does not lead to unexpected overrides. If both are needed, consider adding a comment explaining the rationale for future maintainers.

emhttp/plugins/dynamix/styles/jquery.sweetalert.css (1)

29-29: Assess the Broadening of the CSS Selector

The selector has been changed from .sweet-alert fieldset input[type=text] to .sweet-alert input[type=text], which now targets all text inputs within .sweet-alert containers rather than only those inside a fieldset. Please verify that this broader scope is intended and does not inadvertently affect other input elements that should have distinct styling. If the change is deliberate, consider adding documentation or inline comments to clarify the design decision.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b3adeb5 and e907c3e.

📒 Files selected for processing (2)
  • emhttp/plugins/dynamix/sheets/Eth0.css (1 hunks)
  • emhttp/plugins/dynamix/styles/jquery.sweetalert.css (1 hunks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants