Skip to content

Fix: Avoid endless AJAX table update requests if the query returned 0 rows on the Log page.#4838

Open
IgorA100 wants to merge 2 commits into
ZoneMinder:masterfrom
IgorA100:patch-769833
Open

Fix: Avoid endless AJAX table update requests if the query returned 0 rows on the Log page.#4838
IgorA100 wants to merge 2 commits into
ZoneMinder:masterfrom
IgorA100:patch-769833

Conversation

@IgorA100
Copy link
Copy Markdown
Contributor

Related to #4826

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes an infinite AJAX refresh loop on the Classic skin Log page when the server returns zero log rows, by preventing bootstrap-table from repeatedly forcing a page change.

Changes:

  • Disabled the bootstrapTable('selectPage', 1) call that was triggering repeated AJAX refreshes when data.rows.length === 0.
  • Added inline comments explaining why the page-reset code was removed and referencing prior pagination work.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread web/skins/classic/views/js/log.js Outdated
Comment thread web/skins/classic/views/js/log.js Outdated
@IgorA100
Copy link
Copy Markdown
Contributor Author

@connortechnology
I committed dcf03c8 after Copilot's suggestion.
Ask Copilot to check the code again.

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