Skip to content

Conversation

@cvc90
Copy link
Contributor

@cvc90 cvc90 commented Sep 11, 2025

Hi @jokob-sk,

Pull Request

Description

Changed the absolute path URL to relative path URL in deviceDetailsTools.php, this is a fix for issues with reverse proxy servers.

Changes

Update deviceDetailsTools.php (/front/deviceDetailsTools.php)

URLs were changed from absolute paths to relative paths

Test

Tested locally and works fine

Change static route to relative route in URL for proper proxy operation

Summary by CodeRabbit

  • Bug Fixes
    • Updated the Maintenance > Logging link to use a relative URL, ensuring it respects the current base path.
    • Resolves incorrect redirects to the site root in subdirectory or proxy deployments.
    • Improves navigation reliability when opening the Logging tab from device details tools.
    • No visual or functional changes beyond corrected link behavior; navigation is now consistent across environments.

Change static route to relative route in URL for proper proxy operation
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 11, 2025

Walkthrough

The maintenance link in front/deviceDetailsTools.php changed from an absolute path (/maintenance.php#tab_Logging) to a relative path (maintenance.php#tab_Logging). No other markup or logic was modified.

Changes

Cohort / File(s) Summary
Link path update
front/deviceDetailsTools.php
Updated anchor href from /maintenance.php#tab_Logging to maintenance.php#tab_Logging; no other changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and specifically describes the primary change—switching an absolute URL to a relative URL in deviceDetailsTools.php. It directly matches the PR objectives (fixing proxy behavior by using relative routes) and references the file being changed. The phrasing is concise and readable for teammates scanning history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

A hop to the left, a link set right,
From root to relative, neat and light.
I twitch my whiskers, click with glee—
The path now follows where it should be.
Tap-tap paws, merge night delight! 🐇✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@cvc90 cvc90 marked this pull request as ready for review September 11, 2025 01:46
Copy link
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: 0

🧹 Nitpick comments (2)
front/deviceDetailsTools.php (2)

201-203: Make it explicitly relative (optional).

Using "./maintenance.php" makes intent unambiguous and resists unexpected tags.

Apply this minimal tweak if you like:

-                <a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="maintenance.php#tab_Logging">
+                <a onclick="setCache('activeMaintenanceTab', 'tab_Logging_id')" href="./maintenance.php#tab_Logging">

18-19: Duplicate element IDs (non-blocking).

IDs should be unique. The same ids are reused for buttons (internetinfo) and containers (wol_output) and also btnDeleteEvents appears twice. This can break getElementById/selectors.

Consider unique IDs or switch to classes for styling/hooks.

Also applies to: 42-43, 60-61, 63-64, 86-87, 106-107, 81-84, 101-104

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3653d2e and de20a26.

📒 Files selected for processing (1)
  • front/deviceDetailsTools.php (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: docker_dev
🔇 Additional comments (2)
front/deviceDetailsTools.php (2)

201-203: Relative URL change improves reverse-proxy compatibility — LGTM.

Switching from "/maintenance.php#tab_Logging" to "maintenance.php#tab_Logging" avoids escaping subpath prefixes during proxying. Looks good.


201-203: Confirmed: maintenance.php at front/maintenance.php; no root-absolute links found.

front/deviceDetailsTools.php (≈lines 201–203) uses a relative href ("maintenance.php#tab_Logging"); repo scan found no href/src/action attributes starting with '/' and no tags.

@cvc90 cvc90 closed this Sep 11, 2025
@cvc90 cvc90 deleted the NetAlertX-Changing-absolute-path-url-to-relative-path-url-in-deviceDetailsTools-php branch September 11, 2025 02:03
@cvc90 cvc90 restored the NetAlertX-Changing-absolute-path-url-to-relative-path-url-in-deviceDetailsTools-php branch September 11, 2025 02:04
@cvc90 cvc90 reopened this Sep 11, 2025
…l-to-relative-path-url-in-deviceDetailsTools-php
@jokob-sk jokob-sk merged commit 1601c10 into netalertx:main Sep 11, 2025
4 checks passed
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