-
Notifications
You must be signed in to change notification settings - Fork 104
Admin logs-inspection bug fix #801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Admin logs-inspection bug fix #801
Conversation
Reviewer's GuideThe PR fixes a 404 error by adjusting the base path for the admin log detail AJAX endpoint in the main UI script. Sequence diagram for admin log detail AJAX request (before and after fix)sequenceDiagram
actor AdminUser
participant Browser
participant Server
Note over AdminUser,Browser: Before Fix
AdminUser->>Browser: Clicks 'View Log Detail'
Browser->>Server: GET /control/logdetail/:id
Server-->>Browser: 404 Not Found
Browser-->>AdminUser: Shows error page
Note over AdminUser,Browser: After Fix
AdminUser->>Browser: Clicks 'View Log Detail'
Browser->>Server: GET /tickets/control/logdetail/:id
Server-->>Browser: Log detail data
Browser-->>AdminUser: Shows log detail modal
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Gagan-Ram - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -816,7 +816,7 @@ $(function () { | |||
var $a = $(this); | |||
var id = $(this).attr("data-id"); | |||
$a.find(".fa").removeClass("fa-eye").addClass("fa-cog fa-spin"); | |||
var url = '/control/logdetail/'; | |||
var url = '/tickets/control/logdetail/'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue (code-quality): Use const
or let
instead of var
. (avoid-using-var
)
Explanation
`const` is preferred as it ensures you cannot reassign references (which can lead to buggy and confusing code). `let` may be used if you need to reassign references - it's preferred to `var` because it is block- rather than function-scoped.From the Airbnb JavaScript Style Guide
Fixes: #800
Before:
Error page: " Not found I'm afraid we could not find the the resource you requested."
After:

Summary by Sourcery
Bug Fixes: